message
stringlengths
6
474
diff
stringlengths
8
5.22k
infra/common.sh: add shard_should_run() Detects whether test block should be run in the current test shard. if shard_should_run; then ... fi
@@ -71,3 +71,30 @@ setup_ccache() { export PATH="/usr/lib/ccache:${PATH}" fi } + +####################################### +# Detects whether test block should be run in the current test shard. +# Globals: +# TEST_TOTAL_SHARDS: Valid range: [1, N]. Defaults to 1. +# TEST_SHARD_INDEX: Valid range: [0, TEST_TOTAL_SHARDS). Defaults to 0. +# libwebp_test_id: current test number; incremented with each call. +# Arguments: +# None +# Returns: +# true if the shard is active +# false if the shard is inactive +####################################### +shard_should_run() { + TEST_TOTAL_SHARDS=${TEST_TOTAL_SHARDS:=1} + TEST_SHARD_INDEX=${TEST_SHARD_INDEX:=0} + libwebp_test_id=${libwebp_test_id:=-1} + : $((libwebp_test_id += 1)) + + if [[ "${TEST_SHARD_INDEX}" -lt 0 || + "${TEST_SHARD_INDEX}" -ge "${TEST_TOTAL_SHARDS}" ]]; then + log_err "Invalid TEST_SHARD_INDEX (${TEST_SHARD_INDEX})!" \ + "Expected [0, ${TEST_TOTAL_SHARDS})." + fi + + [[ "$((libwebp_test_id % TEST_TOTAL_SHARDS))" -eq "${TEST_SHARD_INDEX}" ]] +}
Cleanup API for compute_variance
#include <cassert> /** - * @brief Generate a prefix-sum array using Brent-Kung algorithm. + * @brief Generate a prefix-sum array using the Brent-Kung algorithm. * * This will take an input array of the form: * v0, v1, v2, ... @@ -106,34 +106,35 @@ static void brent_kung_prefix_sum( * The routine computes both in a single pass, using a summed-area table to * decouple the running time from the averaging/variance kernel size. * + * @param[out] ctx The compressor context storing the output data. * @param arg The input parameter structure. */ static void compute_pixel_region_variance( astcenc_context& ctx, - const pixel_region_variance_args* arg + const pixel_region_variance_args& arg ) { // Unpack the memory structure into local variables - const astcenc_image* img = arg->img; - float rgb_power = arg->rgb_power; - float alpha_power = arg->alpha_power; - astcenc_swizzle swz = arg->swz; - bool have_z = arg->have_z; + const astcenc_image* img = arg.img; + float rgb_power = arg.rgb_power; + float alpha_power = arg.alpha_power; + astcenc_swizzle swz = arg.swz; + bool have_z = arg.have_z; - int size_x = arg->size_x; - int size_y = arg->size_y; - int size_z = arg->size_z; + int size_x = arg.size_x; + int size_y = arg.size_y; + int size_z = arg.size_z; - int offset_x = arg->offset_x; - int offset_y = arg->offset_y; - int offset_z = arg->offset_z; + int offset_x = arg.offset_x; + int offset_y = arg.offset_y; + int offset_z = arg.offset_z; - int avg_var_kernel_radius = arg->avg_var_kernel_radius; - int alpha_kernel_radius = arg->alpha_kernel_radius; + int avg_var_kernel_radius = arg.avg_var_kernel_radius; + int alpha_kernel_radius = arg.alpha_kernel_radius; float* input_alpha_averages = ctx.input_alpha_averages; vfloat4* input_averages = ctx.input_averages; vfloat4* input_variances = ctx.input_variances; - vfloat4 *work_memory = arg->work_memory; + vfloat4* work_memory = arg.work_memory; // Compute memory sizes and dimensions that we need int kernel_radius = astc::max(avg_var_kernel_radius, alpha_kernel_radius); @@ -556,7 +557,7 @@ void compute_averages_and_variances( { arg.size_x = astc::min(step_xy, size_x - x); arg.offset_x = x; - compute_pixel_region_variance(ctx, &arg); + compute_pixel_region_variance(ctx, arg); } } @@ -566,7 +567,7 @@ void compute_averages_and_variances( delete[] arg.work_memory; } -/* Public function, see header file for detailed documentation */ +/* See header for documentation. */ unsigned int init_compute_averages_and_variances( astcenc_image& img, float rgb_power,
volteer: Remove c10_gate_change This is unneeded, now that the EC doesn't need to control power sequencing. TEST=make buildall BRANCH=none
@@ -169,9 +169,6 @@ enum sensor_id { SENSOR_COUNT, }; -/* TODO: b/143375057 - Remove this code after power on. */ -void c10_gate_change(enum gpio_signal signal); - #endif /* !__ASSEMBLER__ */ #endif /* __CROS_EC_BOARD_H */
add_plugin: add support object library sources
@@ -49,9 +49,11 @@ function (add_plugintest testname) restore_variable (${PLUGIN_NAME} ARG_LINK_ELEKTRA ALLOW_MATCH) restore_variable (${PLUGIN_NAME} ARG_ADD_TEST) restore_variable (${PLUGIN_NAME} ARG_INSTALL_TEST_DATA) + restore_variable (${PLUGIN_NAME} ARG_OBJECT_SOURCES) set (TEST_SOURCES $<TARGET_OBJECTS:cframework> + ${ARG_OBJECT_SOURCES} ) foreach (A ${ARG_UNPARSED_ARGUMENTS}) @@ -215,6 +217,9 @@ endfunction () # SOURCES: # The sources of the plugin # +# OBJECT_SOURCES: +# Object library sources for the plugin +# # LINK_LIBRARIES: # add here only add libraries found by cmake # do not add dependencies to Elektra, use LINK_ELEKTRA for that @@ -253,7 +258,7 @@ function (add_plugin PLUGIN_SHORT_NAME) "CPP;ADD_TEST;TEST_README;INSTALL_TEST_DATA" # optional keywords "INCLUDE_SYSTEM_DIRECTORIES" # one value keywords # multi value keywords - "SOURCES;LINK_LIBRARIES;COMPILE_DEFINITIONS;INCLUDE_DIRECTORIES;LINK_ELEKTRA;DEPENDS;TEST_ENVIRONMENT;TEST_REQUIRED_PLUGINS" + "SOURCES;OBJECT_SOURCES;LINK_LIBRARIES;COMPILE_DEFINITIONS;INCLUDE_DIRECTORIES;LINK_ELEKTRA;DEPENDS;TEST_ENVIRONMENT;TEST_REQUIRED_PLUGINS" ${ARGN} ) @@ -263,6 +268,7 @@ function (add_plugin PLUGIN_SHORT_NAME) restore_variable (${PLUGIN_NAME} ARG_LINK_LIBRARIES) restore_variable (${PLUGIN_NAME} ARG_SOURCES) + restore_variable (${PLUGIN_NAME} ARG_OBJECT_SOURCES) restore_variable (${PLUGIN_NAME} ARG_COMPILE_DEFINITIONS) restore_variable (${PLUGIN_NAME} ARG_INCLUDE_DIRECTORIES) restore_variable (${PLUGIN_NAME} ARG_INCLUDE_SYSTEM_DIRECTORIES) @@ -414,6 +420,7 @@ function (add_plugin PLUGIN_SHORT_NAME) if (BUILD_SHARED) add_library (${PLUGIN_NAME} MODULE ${ARG_SOURCES}) + target_sources(${PLUGIN_NAME} PRIVATE ${ARG_OBJECT_SOURCES}) add_dependencies (${PLUGIN_NAME} kdberrors_generated) if (ARG_DEPENDS) add_dependencies (${PLUGIN_NAME} ${ARG_DEPENDS}) @@ -457,6 +464,7 @@ function (add_plugin PLUGIN_SHORT_NAME) #message (STATUS "added ${PLUGIN_TARGET_OBJS}") set_property (GLOBAL APPEND PROPERTY "elektra-full_SRCS" ${PLUGIN_TARGET_OBJS} + ${ARG_OBJECT_SOURCES} ) set_property (GLOBAL APPEND PROPERTY "elektra-full_LIBRARIES"
Insert in logic for clearing PackageSparing Policy Injection Error
@@ -9662,8 +9662,14 @@ InjectError( ReturnCode = EFI_DEVICE_ERROR; continue; } - if (pDimms[Index]->SkuInformation.PackageSparingCapable && - pPayloadPackageSparingPolicy->Supported && pPayloadPackageSparingPolicy->Enable) { + /* If the package sparing policy has been enabled and executed, + Support Bit will be 0x00 but the Enable Bit will still be 0x01 + to indicate that the dimm has PackageSparing Policy Enabled before. + */ + if (pDimms[Index]->SkuInformation.PackageSparingCapable && pPayloadPackageSparingPolicy->Enable && + ((!ClearStatus && pPayloadPackageSparingPolicy->Supported) || + (ClearStatus && !pPayloadPackageSparingPolicy->Supported))) { + //Inject the error if PackageSparing policy is available and is supported ReturnCode = FwCmdInjectError(pDimms[Index], SubopSoftwareErrorTriggers, (VOID *)pInputPayload); if (EFI_ERROR(ReturnCode)) { SetObjStatusForDimm(pCommandStatus, pDimms[Index], NVM_ERR_OPERATION_FAILED);
[bsp][imxrt1052] support auto update flash programming algorithm for wildfire board
@@ -46,3 +46,26 @@ objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False) # make a building DoBuilding(TARGET, objs) + +def Update_MDKFlashProgrammingAlgorithm(flash_dict): + import xml.etree.ElementTree as etree + from utils import xml_indent + + project_tree = etree.parse('project.uvoptx') + root = project_tree.getroot() + out = file('project.uvoptx', 'wb') + + for elem in project_tree.iterfind('.//Target/TargetOption/TargetDriverDllRegistry/SetRegEntry'): + Key = elem.find('Key') + if Key.text in flash_dict.keys(): + elem.find('Name').text = flash_dict[Key.text] + + xml_indent(root) + out.write(etree.tostring(root, encoding='utf-8')) + out.close() + +if GetOption('target') and GetDepend('BOARD_RT1050_FIRE'): + Update_MDKFlashProgrammingAlgorithm({ + "JL2CM3": '-U30000299 -O78 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI-JP0 -JP0 -RST1 -N00("ARM CoreSight SW-DP") -D00(0BD11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8001 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FCF000 -FN1 -FF0iMXRT1052_W25Q256JV_By_Fire -FS060000000 -FL02000000', + "CMSIS_AGDI": '-X"Any" -UAny -O974 -S9 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(0BD11477) -L00(0) -TO18 -TC10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FCF000 -FN1 -FF0iMXRT1052_W25Q256JV_By_Fire -FS060000000 -FL02000000', + })
Add auto-shebang functionality.
@@ -1080,12 +1080,14 @@ int main(int argc, const char **argv) { (install-rule dest (dyn :binpath JANET_BINPATH)))))) (defn declare-binscript - "Declare a janet file to be installed as an executable script. Creates + ``Declare a janet file to be installed as an executable script. Creates a shim on windows. If hardcode is true, will insert code into the script - such that it will run correctly even when JANET_PATH is changed." - [&keys {:main main :hardcode-syspath hardcode}] + such that it will run correctly even when JANET_PATH is changed. if auto-shebang + is truthy, will also automatically insert a correct shebang line. + `` + [&keys {:main main :hardcode-syspath hardcode :auto-shebang auto-shebang}] (def binpath (dyn :binpath JANET_BINPATH)) - (if hardcode + (if (or auto-shebang hardcode) (let [syspath (dyn :modpath JANET_MODPATH)] (def parts (peg/match path-splitter main)) (def name (last parts)) @@ -1097,7 +1099,9 @@ int main(int argc, const char **argv) { (def first-line (:read f :line)) (def second-line (string/format "(put root-env :syspath %v)\n" syspath)) (def rest (:read f :all)) - (string first-line second-line rest))) + (string (if auto-shebang + (string "#!" JANET_BINPATH "/janet\n")) + first-line (if hardcode second-line) rest))) (create-dirs path) (spit path contents) (unless is-win (shell "chmod" "+x" path))))
Fix scanning text issues
@@ -104,10 +104,14 @@ const Balance = () => { </Row> <Row> <Text fontSize={1} color="orange"> - {scanProgress.main} main wallet addresses scanned - {scanProgress.change} change wallet addresses scanned + {scanProgress.main === null ? 0 : scanProgress.main} main + wallet addresses scanned </Text> </Row> + <Text fontSize={1} color="orange"> + {scanProgress.change === null ? 0 : scanProgress.change}{' '} + change wallet addresses scanned + </Text> </Col> ) : ( <Text
Doxygen for tsch-asn.h
/************ Types ***********/ -/* The ASN is an absolute slot number over 5 bytes. */ +/** \brief The ASN is an absolute slot number over 5 bytes. */ struct tsch_asn_t { uint32_t ls4b; /* least significant 4 bytes */ uint8_t ms1b; /* most significant 1 byte */ }; -/* For quick modulo operation on ASN */ +/** \brief For quick modulo operation on ASN */ struct tsch_asn_divisor_t { uint16_t val; /* Divisor value */ uint16_t asn_ms1b_remainder; /* Remainder of the operation 0x100000000 / val */ @@ -62,37 +62,37 @@ struct tsch_asn_divisor_t { /************ Macros **********/ -/* Initialize ASN */ +/** \brief Initialize ASN */ #define TSCH_ASN_INIT(asn, ms1b_, ls4b_) do { \ (asn).ms1b = (ms1b_); \ (asn).ls4b = (ls4b_); \ } while(0); -/* Increment an ASN by inc (32 bits) */ +/** \brief Increment an ASN by inc (32 bits) */ #define TSCH_ASN_INC(asn, inc) do { \ uint32_t new_ls4b = (asn).ls4b + (inc); \ if(new_ls4b < (asn).ls4b) { (asn).ms1b++; } \ (asn).ls4b = new_ls4b; \ } while(0); -/* Decrement an ASN by inc (32 bits) */ +/** \brief Decrement an ASN by inc (32 bits) */ #define TSCH_ASN_DEC(asn, dec) do { \ uint32_t new_ls4b = (asn).ls4b - (dec); \ if(new_ls4b > (asn).ls4b) { (asn).ms1b--; } \ (asn).ls4b = new_ls4b; \ } while(0); -/* Returns the 32-bit diff between asn1 and asn2 */ +/** \brief Returns the 32-bit diff between asn1 and asn2 */ #define TSCH_ASN_DIFF(asn1, asn2) \ ((asn1).ls4b - (asn2).ls4b) -/* Initialize a struct asn_divisor_t */ +/** \brief Initialize a struct asn_divisor_t */ #define TSCH_ASN_DIVISOR_INIT(div, val_) do { \ (div).val = (val_); \ (div).asn_ms1b_remainder = ((0xffffffff % (val_)) + 1) % (val_); \ } while(0); -/* Returns the result (16 bits) of a modulo operation on ASN, +/** \brief Returns the result (16 bits) of a modulo operation on ASN, * with divisor being a struct asn_divisor_t */ #define TSCH_ASN_MOD(asn, div) \ ((uint16_t)((asn).ls4b % (div).val) \
workflow: fix `if` syntax and edit release instead
@@ -10,7 +10,8 @@ on: jobs: build: - runs-on: ubuntu-latest + #runs-on: ubuntu-latest + runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 @@ -34,13 +35,13 @@ jobs: echo "##[set-output name=artifact-metadata;]${ARTIFACT_NAME}" id: git-vars - name: Build release package - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | ./build-source.sh ./build.sh build package release - - if: github.event_name == 'release' && github.event.action == 'created' - name: Upload release + - name: Upload release + if: ${{ github.event_name == 'release' && github.event.action == 'created' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | assets=() for asset in ./MangoHud-*-Source*.tar.gz; do @@ -50,7 +51,8 @@ jobs: assets+=("-a" "$asset") done tag_name="${GITHUB_REF##*/}" - hub release create "${assets[@]}" -m "$tag_name" "$tag_name" + hub release edit "${assets[@]}" -m "" "$tag_name" + #hub release create "${assets[@]}" -m "$tag_name" "$tag_name" - name: Upload artifact uses: actions/upload-artifact@v2 continue-on-error: true
mangoapp: fix broken fsr sharpness
@@ -141,6 +141,8 @@ void msg_read_thread(){ g_fsrUpscale = mangoapp_v1->fsrUpscale; if (params->fsr_steam_sharpness < 0) g_fsrSharpness = mangoapp_v1->fsrSharpness; + else + g_fsrSharpness = params->fsr_steam_sharpness - mangoapp_v1->fsrSharpness; } if (!HUDElements.params->enabled[OVERLAY_PARAM_ENABLED_mangoapp_steam]){ steam_focused = get_prop("GAMESCOPE_FOCUSED_APP_GFX") == 769;
chip/npcx/gpio-npcx5.c: Format with clang-format BRANCH=none TEST=none
@@ -68,16 +68,18 @@ static void __gpio_wk0efgh_interrupt(void) return; } if (IS_ENABLED(CONFIG_HOST_INTERFACE_ESPI)) { - if (IS_BIT_SET(NPCX_WKEN(MIWU_TABLE_0, MIWU_GROUP_5), 5) - && - IS_BIT_SET(NPCX_WKPND(MIWU_TABLE_0, MIWU_GROUP_5), 5)) { + if (IS_BIT_SET(NPCX_WKEN(MIWU_TABLE_0, MIWU_GROUP_5), + 5) && + IS_BIT_SET(NPCX_WKPND(MIWU_TABLE_0, MIWU_GROUP_5), + 5)) { espi_espirst_handler(); return; } } else { - if (IS_BIT_SET(NPCX_WKEN(MIWU_TABLE_0, MIWU_GROUP_5), 7) - && - IS_BIT_SET(NPCX_WKPND(MIWU_TABLE_0, MIWU_GROUP_5), 7)) { + if (IS_BIT_SET(NPCX_WKEN(MIWU_TABLE_0, MIWU_GROUP_5), + 7) && + IS_BIT_SET(NPCX_WKPND(MIWU_TABLE_0, MIWU_GROUP_5), + 7)) { lpc_lreset_pltrst_handler(); return; }
Add ++rev for reversing bloq order. This is different from ++swp in that it turns leading zeroes into trailing zeroes correctly, rather than ignoring them.
?~ b 0 (add (lsh a c (end a 1 i.b)) $(c +(c), b t.b)) :: +++ rev + :: reverses block order, accounting for leading zeroes + :: + :: boz: block size + :: len: size of dat, in boz + :: dat: data to flip + ~/ %rev + |= [boz=bloq len=@ud dat=@] + ^- @ + =. dat (end boz len dat) + %^ lsh boz + (sub len (met boz dat)) + (swp boz dat) +:: ++ rip :: disassemble ~/ %rip |= {a/bloq b/@}
add titles to next/prev links
{% if next or prev %} <div class="rst-footer-buttons row" role="navigation" aria-label="footer navigation"> {% if next %} - <a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a> + <a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">Next: {{ next.title|striptags|e }} <span class="fa fa-arrow-circle-right"></span></a> {% endif %} {% if prev %} - <a href="{{ prev.link|e }}" class="btn btn-neutral" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a> + <a href="{{ prev.link|e }}" class="btn btn-neutral" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous: {{ prev.title|striptags|e }}</a> {% endif %} </div> {% endif %}
Write draw ids at the right time (fix flicker);
@@ -583,12 +583,14 @@ next: if (req->vertexCount > 0 && (!req->instanced || !batch)) { *(req->vertices) = lovrGraphicsMapBuffer(STREAM_VERTEX, req->vertexCount); uint8_t* ids = lovrGraphicsMapBuffer(STREAM_DRAWID, req->vertexCount); - memset(ids, batch ? batch->drawCount : 0, req->vertexCount * sizeof(uint8_t)); if (req->indexCount > 0) { *(req->indices) = lovrGraphicsMapBuffer(STREAM_INDEX, req->indexCount); *(req->baseVertex) = state.head[STREAM_VERTEX]; } + + // The final draw id isn't known until all the maps are done, since they could flush and reset the id + memset(ids, (batch && state.batchCount > 0) ? batch->drawCount : 0, req->vertexCount * sizeof(uint8_t)); } // Start a new batch @@ -627,8 +629,8 @@ next: }, .material = material, .transforms = transforms, - .drawStart = state.head[STREAM_MODEL], .colors = colors, + .drawStart = state.head[STREAM_MODEL], .indexed = req->indexCount > 0 };
VERSION bump to version 2.2.35
@@ -65,7 +65,7 @@ endif() # micro version is changed with a set of small changes or bugfixes anywhere in the project. set(SYSREPO_MAJOR_VERSION 2) set(SYSREPO_MINOR_VERSION 2) -set(SYSREPO_MICRO_VERSION 34) +set(SYSREPO_MICRO_VERSION 35) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
Note about regions added
@@ -71,6 +71,10 @@ esp_mem_region_t mem_regions[] = { // On startup, user must call function to assign memory regions esp_mem_assignmemory(mem_regions, ESP_ARRAYSIZE(mem_regions)); \endcode + * + * \note Even with multiple regions, maximal allocation size is length of biggest region. + * In case of example, we have <b>0x9000</b> bytes of memory but theoretically only <b>0x8000</b> may be allocated. + * Practically maximal value is little lower due to header values required to track blocks. * * \par Allocating memory *
board/zinger: Disable CONFIG_DEBUG_PRINTF We're getting low on RO flash space, so disable CONFIG_DEBUG_PRINTF to free up more space. BRANCH=none TEST=make buildall
#undef CONFIG_WATCHDOG_PERIOD_MS #define CONFIG_WATCHDOG_PERIOD_MS 2300 -/* debug printf flash footprinf is about 1400 bytes */ -#define CONFIG_DEBUG_PRINTF +/* debug printf flash footprint is about 1400 bytes */ +#undef CONFIG_DEBUG_PRINTF #define UARTN CONFIG_UART_CONSOLE #define UARTN_BASE STM32_USART_BASE(CONFIG_UART_CONSOLE)
out_stdout: use nanosecond API
#include <fluent-bit/flb_output.h> #include <fluent-bit/flb_utils.h> - +#include <fluent-bit/flb_time.h> #include <msgpack.h> #include "stdout.h" @@ -47,12 +47,16 @@ void cb_stdout_flush(void *data, size_t bytes, (void) i_ins; (void) out_context; (void) config; + flb_time tmp; + msgpack_object *p; msgpack_unpacked_init(&result); while (msgpack_unpack_next(&result, data, bytes, &off)) { - printf("[%zd] %s: ", cnt++, tag); - msgpack_object_print(stdout, result.data); - printf("\n"); + printf("[%zd] %s: [", cnt++, tag); + flb_time_pop_from_msgpack(&tmp, &result, &p); + printf("%"PRIu32".%09lu, ", (uint32_t)tmp.tv_sec, tmp.tv_nsec); + msgpack_object_print(stdout, *p); + printf("]\n"); } msgpack_unpacked_destroy(&result);
Update: slight refinement in how to handle comparisons between set elements
@@ -283,25 +283,31 @@ static bool NAL_JunctionNotRightNested(Term *conclusionTerm) return false; } -static bool EmptySetOp(Term *conclusionTerm) //to be refined, with atom appears twice restriction for now it's fine +static bool EmptySetOp(Term *conclusionTerm, Truth conclusionTruth) //to be refined, with atom appears twice restriction for now it's fine { if(Narsese_copulaEquals(conclusionTerm->atoms[0], INHERITANCE)) { - if(Narsese_copulaEquals(conclusionTerm->atoms[1], EXT_INTERSECTION)) + if(Narsese_copulaEquals(conclusionTerm->atoms[1], EXT_INTERSECTION) || Narsese_copulaEquals(conclusionTerm->atoms[1], INT_DIFFERENCE)) { if(Narsese_copulaEquals(conclusionTerm->atoms[3], EXT_SET) && Narsese_copulaEquals(conclusionTerm->atoms[4], EXT_SET)) + { + if(!Narsese_copulaEquals(conclusionTerm->atoms[1], INT_DIFFERENCE) || conclusionTruth.frequency == 0.0) { return true; } } + } if(Narsese_copulaEquals(conclusionTerm->atoms[2], INT_INTERSECTION) || Narsese_copulaEquals(conclusionTerm->atoms[2], EXT_DIFFERENCE)) { if(Narsese_copulaEquals(conclusionTerm->atoms[5], INT_SET) && Narsese_copulaEquals(conclusionTerm->atoms[6], INT_SET)) + { + if(!Narsese_copulaEquals(conclusionTerm->atoms[2], EXT_DIFFERENCE) || conclusionTruth.frequency == 0.0) { return true; } } } + } return false; } @@ -430,7 +436,7 @@ void NAL_DerivedEvent2(Term conclusionTerm, long conclusionOccurrence, Truth con { if(validation_concept == NULL || validation_concept->id == validation_cid) //concept recycling would invalidate the derivation (allows to lock only adding results to memory) { - if(!NAL_AtomAppearsTwice(&conclusionTerm) && !NAL_NestedHOLStatement(&conclusionTerm) && !NAL_InhOrSimHasDepVar(&conclusionTerm) && !NAL_JunctionNotRightNested(&conclusionTerm) && !EmptySetOp(&conclusionTerm) && !NAL_IndepOrDepVariableAppearsOnce(&conclusionTerm) && !DeclarativeImplicationWithLefthandConjunctionWithLefthandOperation(&conclusionTerm, false)) + if(!NAL_AtomAppearsTwice(&conclusionTerm) && !NAL_NestedHOLStatement(&conclusionTerm) && !NAL_InhOrSimHasDepVar(&conclusionTerm) && !NAL_JunctionNotRightNested(&conclusionTerm) && !EmptySetOp(&conclusionTerm, conclusionTruth) && !NAL_IndepOrDepVariableAppearsOnce(&conclusionTerm) && !DeclarativeImplicationWithLefthandConjunctionWithLefthandOperation(&conclusionTerm, false)) { Memory_AddEvent(&e, currentTime, conceptPriority*parentPriority*Truth_Expectation(conclusionTruth), false, true, false, 0); }
testing/fstest: Don't reuse the deleted name to simplify the root cause analysis
@@ -200,7 +200,7 @@ static bool fstest_checkexist(FAR struct fstest_filedesc_s *file) for (i = 0; i < CONFIG_TESTING_FSTEST_MAXOPEN; i++) { - if (!g_files[i].deleted && &g_files[i] != file && + if (&g_files[i] != file && g_files[i].name && strcmp(g_files[i].name, file->name) == 0) { ret = true;
NNABLA: build as a module NNABLA_RT should compile as a module to provide the necessary support for the dnn test application
@@ -108,7 +108,7 @@ CSRCS += $(SRC)/runtime/runtime_internal.c CFLAGS += -Wno-shadow -Wno-format -BIN = libnnablart$(LIBEXT) +MODULE = $(CONFIG_NNABLA_RT) nnabla.zip: $(Q) curl -L https://github.com/sony/nnabla-c-runtime/archive/refs/tags/v$(CONFIG_NNABLA_RT_VER).zip -o nnabla.zip
Fixed fw recovery case where there are 100% non-functional modules
@@ -203,7 +203,7 @@ Load( /*Get the list of functional and non-functional dimms*/ ReturnCode = GetDimmList(pNvmDimmConfigProtocol, pCmd, DIMM_INFO_CATEGORY_NONE, &pFunctionalDimms, &FunctionalDimmCount); - if (EFI_ERROR(ReturnCode)) { + if (EFI_ERROR(ReturnCode) && ReturnCode != EFI_NOT_FOUND) { goto Finish; }
Widen MT/s column in test runner report
@@ -132,7 +132,7 @@ def format_solo_result(image, result): tCTime = "%.3f s" % result.cTime tCMTS = "%.3f MT/s" % result.cRate - return "%-32s | %8s | %9s | %9s | %10s" % \ + return "%-32s | %8s | %9s | %9s | %11s" % \ (name, tPSNR, tTTime, tCTime, tCMTS) @@ -159,7 +159,7 @@ def format_result(image, reference, result): tCMTS = "%.3f MT/s" % (result.cRate) result = determine_result(image, reference, result) - return "%-32s | %22s | %15s | %15s | %10s | %s" % \ + return "%-32s | %22s | %15s | %15s | %11s | %s" % \ (name, tPSNR, tTTime, tCTime, tCMTS, result.name) @@ -258,6 +258,14 @@ def get_encoder_params(encoderName, referenceName, imageSet): refName = None return (encoder, name, outDir, refName) + # 3.x variants + if version.startswith("3."): + encoder = te.Encoder2xRel(version, simd) + name = f"reference-{version}-{simd}" + outDir = "Test/Images/%s" % imageSet + refName = None + return (encoder, name, outDir, refName) + # Latest main if version == "main": encoder = te.Encoder2x(simd) @@ -287,6 +295,7 @@ def parse_command_line(): # All reference encoders refcoders = ["ref-1.7", "ref-2.5-neon", "ref-2.5-sse2", "ref-2.5-sse4.1", "ref-2.5-avx2", + "ref-3.0-neon", "ref-3.0-sse2", "ref-3.0-sse4.1", "ref-3.0-avx2", "ref-main-neon", "ref-main-sse2", "ref-main-sse4.1", "ref-main-avx2"] # All test encoders
README.md: Use version 2.05.29
@@ -34,11 +34,11 @@ https://github.com/dresden-elektronik/deconz-rest-plugin/wiki/Supported-Devices ### Install deCONZ 1. Download deCONZ package - wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.05.28-qt5.deb + wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.05.29-qt5.deb 2. Install deCONZ package - sudo dpkg -i deconz-2.05.28-qt5.deb + sudo dpkg -i deconz-2.05.29-qt5.deb **Important** this step might print some errors *that's ok* and will be fixed in the next step. @@ -53,11 +53,11 @@ The deCONZ package already contains the REST API plugin, the development package 1. Download deCONZ development package - wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.05.28.deb + wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.05.29.deb 2. Install deCONZ development package - sudo dpkg -i deconz-dev-2.05.28.deb + sudo dpkg -i deconz-dev-2.05.29.deb 3. Install missing dependencies @@ -72,7 +72,7 @@ The deCONZ package already contains the REST API plugin, the development package 2. Checkout related version tag cd deconz-rest-plugin - git checkout -b mybranch V2_05_28 + git checkout -b mybranch V2_05_29 3. Compile the plugin
BugID:17922164: Fix ssc1667 keil compile error which is due to the debug dependence
@@ -10,7 +10,7 @@ SUPPORT_MBINS := no HOST_MCU_NAME := SSCP131 ENABLE_VFP := 0 -$(NAME)_COMPONENTS += $(HOST_MCU_FAMILY) newlib_stub +$(NAME)_COMPONENTS += $(HOST_MCU_FAMILY) osal_aos newlib_stub $(NAME)_SOURCES += config/k_config.c \ startup/board.c \
Draw selection rectangle with line height rather than font height
@@ -189,7 +189,7 @@ void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_st sel_coords.x1 = pos.x; sel_coords.y1 = pos.y; sel_coords.x2 = pos.x + letter_w + style->text.letter_space - 1; - sel_coords.y2 = pos.y + lv_font_get_height(font) - 1; + sel_coords.y2 = pos.y + line_height - 1; lv_draw_rect(&sel_coords, mask, &sel_style, opa); } }
fuzz: don't modify shared state without write lock
@@ -434,7 +434,7 @@ bool input_postProcessFile(run_t* run) { } bool input_prepareDynamicFileForMinimization(run_t* run) { - MX_SCOPED_RWLOCK_READ(&run->global->io.dynfileq_mutex); + MX_SCOPED_RWLOCK_WRITE(&run->global->io.dynfileq_mutex); if (run->global->io.dynfileqCnt == 0) { LOG_F("The dynamic file corpus is empty (fro minimization). This shouldn't happen");
.travis.yml update for conda python3.5
#!/bin/bash set -e -x -if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; -else +# UnsatisfiableError: The following specifications were found to be in conflict: +# - pyopenssl 17.0.0 py36_0 -> python 3.6* +# - python 3.5* +if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; +else + wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; fi echo $TRAVIS_PYTHON_VERSION bash miniconda.sh -b -p $HOME/miniconda
u3: refactors u3h_gut internals to more closely match u3h_git
@@ -614,7 +614,7 @@ _ch_buck_gut(u3h_buck* hab_u, u3_noun key) for ( i_w = 0; i_w < hab_u->len_w; i_w++ ) { u3_noun kev = u3h_slot_to_noun(hab_u->sot_w[i_w]); if ( _(u3r_sung(key, u3h(kev))) ) { - return u3k(u3t(kev)); + return u3t(kev); } } return u3_none; @@ -643,7 +643,7 @@ _ch_node_gut(u3h_node* han_u, c3_w lef_w, c3_w rem_w, u3_noun key) u3_noun kev = u3h_slot_to_noun(sot_w); if ( _(u3r_sung(key, u3h(kev))) ) { - return u3k(u3t(kev)); + return u3t(kev); } else { return u3_none; @@ -689,8 +689,14 @@ u3h_gut(u3p(u3h_root) har_p, u3_noun key) } else { u3h_node* han_u = u3h_slot_to_node(sot_w); + u3_weak pro = _ch_node_gut(han_u, 25, rem_w, key); - return _ch_node_gut(han_u, 25, rem_w, key); + if ( u3_none == pro ) { + return u3_none; + } + else { + return u3k(pro); + } } }
Don't discard const.
@@ -128,7 +128,7 @@ int allow(uint32_t driver, uint32_t allow, void* ptr, size_t size) { int allow_readonly(uint32_t driver, uint32_t allow, const void* ptr, size_t size) { register uint32_t r0 asm ("r0") = driver; register uint32_t r1 asm ("r1") = allow; - register void* r2 asm ("r2") = ptr; + register const void* r2 asm ("r2") = ptr; register size_t r3 asm ("r3") = size; register int ret asm ("r0"); asm volatile (
add ip_user_files to delete command in core.tcl
@@ -7,7 +7,7 @@ set elements [split $core_name _] set project_name [join [lrange $elements 0 end-2] _] set version [string trimleft [join [lrange $elements end-1 end] .] v] -file delete -force tmp/cores/$core_name tmp/cores/$project_name.cache tmp/cores/$project_name.hw tmp/cores/$project_name.xpr +file delete -force tmp/cores/$core_name tmp/cores/$project_name.cache tmp/cores/$project_name.hw tmp/cores/$project_name.xpr tmp/cores/$project_name.ip_user_files create_project -part $part_name $project_name tmp/cores
Fix error message for s_server -psk option Previously if -psk was given a bad key it would print "Not a hex number 's_server'". CLA: Trivial
@@ -1407,7 +1407,7 @@ int s_server_main(int argc, char *argv[]) for (p = psk_key = opt_arg(); *p; p++) { if (isxdigit(_UC(*p))) continue; - BIO_printf(bio_err, "Not a hex number '%s'\n", *argv); + BIO_printf(bio_err, "Not a hex number '%s'\n", psk_key); goto end; } break;
Fixed block info links for bitcoin family
@@ -100,15 +100,15 @@ namespace MiningCore.Api { CoinType.XMR, "https://xmrchain.net/block/{0}" }, { CoinType.ETH, "https://etherscan.io/block/{0}" }, { CoinType.ETC, "https://gastracker.io/block/{0}" }, - { CoinType.LTC, "http://explorer.litecoin.net/block/{0}" }, - { CoinType.BCC, "http://blockdozer.com/insight/block/{0}" }, - { CoinType.DASH, "https://chainradar.com/dsh/block/{0}" }, + { CoinType.LTC, "http://explorer.litecoin.net/tx/{0}" }, + { CoinType.BCC, "http://blockdozer.com/insight/tx/{0}" }, + { CoinType.DASH, "https://chainradar.com/dsh/transaction/{0}" }, { CoinType.BTC, "https://blockchain.info/block/{0}" }, - { CoinType.DOGE, "https://dogechain.info/block/{0}" }, - { CoinType.ZEC, "https://explorer.zcha.in/blocks/{0}" }, - { CoinType.DGB, "https://digiexplorer.info/block/{0}" }, - { CoinType.NMC, "https://explorer.namecoin.info/b/{0}" }, - { CoinType.GRS, "https://bchain.info/GRS/block/{0}" }, + { CoinType.DOGE, "https://dogechain.info/tx/{0}" }, + { CoinType.ZEC, "https://explorer.zcha.in/transactions/{0}" }, + { CoinType.DGB, "https://digiexplorer.info/tx/{0}" }, + { CoinType.NMC, "https://explorer.namecoin.info/tx/{0}" }, + { CoinType.GRS, "https://bchain.info/GRS/tx/{0}" }, }; private static readonly Dictionary<CoinType, string> paymentInfoLinkMap = new Dictionary<CoinType, string>
Docker: Install yaml-cpp on Debian Sid
@@ -38,6 +38,7 @@ RUN apt-get update && apt-get -y install \ libuv1-dev \ libxerces-c-dev \ libyajl-dev \ + libyaml-cpp-dev \ libzmq3-dev \ llvm \ maven \
no cuda for tensorflow test
@@ -154,9 +154,9 @@ Unit_Test_Tensorflow: - apt-get update -qq && apt-get install -y -qq - apt-get install -y nvidia-cuda-toolkit - apt-get install -y wget - - wget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.4.0.tar.gz - - mkdir tensorflow && tar -C tensorflow -xvzf libtensorflow-gpu-linux-x86_64-2.4.0.tar.gz - - TENSORFLOW=1 TENSORFLOW_BASE=./tensorflow/ CUDA=1 make utest + - wget https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.4.0.tar.gz + - mkdir tensorflow && tar -C tensorflow -xvzf libtensorflow-cpu-linux-x86_64-2.4.0.tar.gz + - TENSORFLOW=1 TENSORFLOW_BASE=./tensorflow/ CUDA=0 make utest needs: [Build_Tensorflow] dependencies: - Build_Tensorflow
input_thread: temporary disable old threading mechanism
@@ -799,7 +799,7 @@ int flb_input_thread_collect(struct flb_input_instance *ins, } chunks_len = it->bufpos - remaining_bytes; - flb_input_chunk_append_raw(ins, NULL, 0, it->buf, chunks_len); + //FIXMEflb_input_chunk_append_raw(ins, NULL, 0, it->buf, chunks_len); memmove(it->buf, it->buf + chunks_len, remaining_bytes); it->bufpos = remaining_bytes; return 0;
config: allow log level 'warn' and 'warning'
@@ -390,7 +390,8 @@ static int set_log_level(struct flb_config *config, const char *v_str) if (strcasecmp(v_str, "error") == 0) { config->verbose = 1; } - else if (strcasecmp(v_str, "warning") == 0) { + else if (strcasecmp(v_str, "warn") == 0 || + strcasecmp(v_str, "warning") == 0) { config->verbose = 2; } else if (strcasecmp(v_str, "info") == 0) {
Add step by step instructions to Readme
@@ -10,7 +10,21 @@ Follow instructions on the Google Benchmark repository to build and install [Goo 3. `-DCMAKE_PREFIX_PATH="File/path/to/Google/Benchmark/"` #### Example: -`cmake . -Bbuild -GNinja -DCMAKE_EXE_LINKER_FLAGS="-lcrypto -lz" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=1 -DBENCHMARK=1 -DCMAKE_PREFIX_PATH="~/benchmark/install"` + +``` +# Starting from the top level "s2n-tls" directory, remove previous CMake build files, if any +rm -rf build + +# Initialize CMake build directory with Nina build system +cmake . -Bbuild -GNinja -DCMAKE_EXE_LINKER_FLAGS="-lcrypto -lz" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=1 -DBENCHMARK=1 -DCMAKE_PREFIX_PATH="~/benchmark/install" + +# Actually build the executable binaries +cd build +ninja + +# Run a benchmark +./bin/s2n_negotiate_benchmark -r 1 -i 5 -p ../tests/pems/ -o negotiate_data -t console localhost 8000 +``` **If you would like to build with a different libcrypto, include the file path in -DCMAKE_PREFIX_PATH**: @@ -67,11 +81,11 @@ usage: ### s2n_negotiate_benchmark Example: -`./s2n_negotitate_benchmark -r 1 -i 5 -p /Users/sidhusn/s2n-tls/tests/pems/ -o negotiate_data -t console localhost 8000` +`./bin/s2n_negotiate_benchmark -r 1 -i 5 -p ../tests/pems/ -o negotiate_data -t console localhost 8000` or -`./s2n_negotitate_benchmark -r 5 -i 5 -w 10 -p /Users/sidhusn/s2n-tls/tests/pems/ -o negotiate_data -t console localhost 8000` +`./bin/s2n_negotiate_benchmark -r 5 -i 5 -w 10 -p ../tests/pems/ -o negotiate_data -t console localhost 8000`
Add more info to publish message
@@ -96,7 +96,7 @@ prv_try_send(void) { /* Now try to publish message */ if (lwesp_mqtt_client_is_connected(mqtt_client)) { if ((res = lwesp_mqtt_client_publish(mqtt_client, topic, tx_data, LWESP_U16(strlen(tx_data)), LWESP_MQTT_QOS_AT_LEAST_ONCE, 0, NULL)) == lwespOK) { - debug_printf("[MQTT Cayenne] Publishing\r\n"); + debug_printf("[MQTT Cayenne] Publishing: Channel: %d, data: %s\r\n", (int)dptr->channel, tx_data); lwesp_buff_skip(&cayenne_async_data_buff, sizeof(*dptr)); try_next = 1; } else {
pyocf: extend error volume capabilities Adding option to 1. inject error based on I/O number 2. arm/disarm error injection for easier testing
@@ -305,12 +305,7 @@ class Volume(Structure): if size == 0: size = int(self.size) - int(offset) - print_buffer( - self._storage, - size, - ignore=ignore, - **kwargs - ) + print_buffer(self._storage, size, ignore=ignore, **kwargs) def md5(self): m = md5() @@ -319,20 +314,62 @@ class Volume(Structure): class ErrorDevice(Volume): - def __init__(self, size, error_sectors: set = None, uuid=None): + def __init__( + self, + size, + error_sectors: set = None, + error_seq_no: dict = None, + armed=True, + uuid=None, + ): super().__init__(size, uuid) - self.error_sectors = error_sectors or set() + self.error_sectors = error_sectors + self.error_seq_no = error_seq_no + self.armed = armed + self.io_seq_no = {IoDir.WRITE: 0, IoDir.READ: 0} + self.error = False def set_mapping(self, error_sectors: set): self.error_sectors = error_sectors def submit_io(self, io): - if io.contents._addr in self.error_sectors: + if not self.armed: + super().submit_io(io) + return + + direction = IoDir(io.contents._dir) + seq_no_match = ( + self.error_seq_no is not None + and direction in self.error_seq_no + and self.error_seq_no[direction] <= self.io_seq_no[direction] + ) + sector_match = ( + self.error_sectors is not None and io.contents._addr in self.error_sectors + ) + + self.io_seq_no[direction] += 1 + + error = True + if self.error_seq_no is not None and not seq_no_match: + error = False + if self.error_sectors is not None and not sector_match: + error = False + if error: + self.error = True io.contents._end(io, -5) - self.stats["errors"][io.contents._dir] += 1 + self.stats["errors"][direction] += 1 else: super().submit_io(io) + def arm(self): + self.armed = True + + def disarm(self): + self.armed = False + + def error_triggered(self): + return self.error + def reset_stats(self): super().reset_stats() self.stats["errors"] = {IoDir.WRITE: 0, IoDir.READ: 0}
Docs: Clarify PBlockAddress value in SSDT-PLUG-ALT
* for Alder Lake CPUs and possibly others with CPU objects * declared as Device instead of Processor. * - * Note, just like Rocket Lake CPUs, Alder Lake CPUs require + * Note 1: Just like Rocket Lake CPUs, Alder Lake CPUs require * custom CPU profile via CPUFriend. * REF: https://github.com/dortania/bugtracker/issues/190 + * + * Note 2: PBlockAddress (0x00000510 here) can be corrected + * to match MADT and may vary across the boards and vendors. + * This field is ignored by macOS and read from MADT instead, + * so it is purely cosemtic. */ DefinitionBlock ("", "SSDT", 2, "ACDT", "CpuPlugA", 0x00003000) {
Update options window with checkbox for enabling fixed graph scaling
@@ -1238,6 +1238,7 @@ typedef enum _PHP_OPTIONS_INDEX PHP_OPTIONS_INDEX_ENABLE_UNDECORATE_SYMBOLS, PHP_OPTIONS_INDEX_ENABLE_COLUMN_HEADER_TOTALS, PHP_OPTIONS_INDEX_ENABLE_CYCLE_CPU_USAGE, + PHP_OPTIONS_INDEX_ENABLE_GRAPH_SCALING, PHP_OPTIONS_INDEX_ENABLE_MINIINFO_WINDOW, PHP_OPTIONS_INDEX_ENABLE_LASTTAB_SUPPORT, PHP_OPTIONS_INDEX_ENABLE_THEME_SUPPORT, @@ -1280,6 +1281,7 @@ static VOID PhpAdvancedPageLoad( PhAddListViewItem(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_UNDECORATE_SYMBOLS, L"Enable undecorated symbols", NULL); PhAddListViewItem(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_COLUMN_HEADER_TOTALS, L"Enable column header totals", NULL); PhAddListViewItem(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_CYCLE_CPU_USAGE, L"Enable cycle-based CPU usage", NULL); + PhAddListViewItem(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_GRAPH_SCALING, L"Enable fixed graph scaling", NULL); PhAddListViewItem(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_MINIINFO_WINDOW, L"Enable tray information window", NULL); PhAddListViewItem(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_LASTTAB_SUPPORT, L"Remember last selected window", NULL); PhAddListViewItem(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_THEME_SUPPORT, L"Enable theme support (experimental)", NULL); @@ -1307,6 +1309,7 @@ static VOID PhpAdvancedPageLoad( SetLvItemCheckForSetting(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_PLUGINS, L"EnablePlugins"); SetLvItemCheckForSetting(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_UNDECORATE_SYMBOLS, L"DbgHelpUndecorate"); SetLvItemCheckForSetting(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_COLUMN_HEADER_TOTALS, L"TreeListEnableHeaderTotals"); + SetLvItemCheckForSetting(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_GRAPH_SCALING, L"EnableScaleCpuGraph"); SetLvItemCheckForSetting(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_CYCLE_CPU_USAGE, L"EnableCycleCpuUsage"); SetLvItemCheckForSetting(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_THEME_SUPPORT, L"EnableThemeSupport"); SetLvItemCheckForSetting(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_START_ASADMIN, L"EnableStartAsAdmin"); @@ -1410,6 +1413,7 @@ static VOID PhpAdvancedPageSave( SetSettingForLvItemCheckRestartRequired(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_PLUGINS, L"EnablePlugins"); SetSettingForLvItemCheck(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_UNDECORATE_SYMBOLS, L"DbgHelpUndecorate"); SetSettingForLvItemCheckRestartRequired(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_COLUMN_HEADER_TOTALS, L"TreeListEnableHeaderTotals"); + SetSettingForLvItemCheckRestartRequired(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_GRAPH_SCALING, L"EnableScaleCpuGraph"); SetSettingForLvItemCheckRestartRequired(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_CYCLE_CPU_USAGE, L"EnableCycleCpuUsage"); SetSettingForLvItemCheckRestartRequired(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_THEME_SUPPORT, L"EnableThemeSupport"); SetSettingForLvItemCheck(listViewHandle, PHP_OPTIONS_INDEX_ENABLE_START_ASADMIN, L"EnableStartAsAdmin");
uses pkcs8 private keys for %eyre cert installation
^+ this ~| %install-effect-fail ?> ?=(^ liv) - :: XX use pkcs8 - =/ key=wain (ring:en:pem:pkcs1 key.u.liv) + =/ key=wain (ring:en:pem:pkcs8 key.u.liv) (emit %rule /install %cert `[key `wain`cer.u.liv]) :: +get-authz: get next ACME service domain authorization object :: 'n5Z5MqkYhlMI3J1tPRTp1nEt9fyGspBOO05gi148Qasp+3N+svqKomoQglNoAxU=' '-----END CERTIFICATE-----' == - (emit %rule /install %cert `[key cert]) + =/ k=key:rsa (need (ring:de:pem:pkcs1 key)) + =/ k8=wain (ring:en:pem:pkcs8 k) + (emit %rule /install %cert `[k8 cert]) :: +poke-path: for debugging :: ++ poke-path
Ruby: Disable warning about invalid suffix
@@ -68,6 +68,7 @@ else () set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-delete-non-virtual-dtor") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register") + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-reserved-user-defined-literal") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-macro-redefined") endif ()
Remove bad printf
@@ -60,7 +60,6 @@ void SurviveSensorActivations_register_runtime(SurviveSensorActivations *self, s if (self->runtime_offset == 0) self->runtime_offset = runtime_offset; else { - printf("%f\n", self->runtime_offset - runtime_offset); self->runtime_offset = self->runtime_offset * .90 + .1 * runtime_offset; } }
OcAppleBootCompatLib: Do not truncate physical addresses
@@ -238,7 +238,7 @@ ShouldUseCustomSlideOffset ( BOOLEAN Supported; UINTN StartAddr; UINTN EndAddr; - UINTN DescEndAddr; + EFI_PHYSICAL_ADDRESS DescEndAddr; UINT64 AvailableSize; MaxAvailableSize = 0; @@ -303,8 +303,7 @@ ShouldUseCustomSlideOffset ( continue; } - ASSERT (LAST_DESCRIPTOR_ADDR (Desc) < MAX_UINTN); - DescEndAddr = (UINTN)(LAST_DESCRIPTOR_ADDR (Desc) + 1); + DescEndAddr = LAST_DESCRIPTOR_ADDR (Desc) + 1; if ((Desc->PhysicalStart < EndAddr) && (DescEndAddr > StartAddr)) { //
sanitizers: if no request for sanitizers was made, print logs to /dev/tty
/* If no sanitzer support was requested, simply make it use abort() on errors */ #define kSAN_REGULAR "abort_on_error=1:handle_segv=0:handle_sigbus=0:handle_abort=0:" \ "handle_sigill=0:handle_sigfpe=0:allocator_may_return_null=1:" \ - "symbolize=1:detect_leaks=0:disable_coredump=0" + "symbolize=1:detect_leaks=0:disable_coredump=0:log_path=/dev/tty" /* * If the program ends with a signal that ASan does not handle (or can not
Fix locating ServiceDll for some services on Windows 8
* service support functions * * Copyright (C) 2010-2012 wj32 - * Copyright (C) 2019 dmex + * Copyright (C) 2019-2021 dmex * * This file is part of Process Hacker. * @@ -616,6 +616,50 @@ NTSTATUS PhGetThreadServiceTag( return status; } +NTSTATUS PhpGetServiceDllName( + _In_ PPH_STRING ServiceKeyName, + _Out_ PPH_STRING* ServiceDll + ) +{ + PPH_STRING serviceDllString = NULL; + NTSTATUS status; + HANDLE keyHandle; + + status = PhOpenKey( + &keyHandle, + KEY_READ, + PH_KEY_LOCAL_MACHINE, + &ServiceKeyName->sr, + 0 + ); + + if (NT_SUCCESS(status)) + { + if (serviceDllString = PhQueryRegistryString(keyHandle, L"ServiceDll")) + { + PPH_STRING expandedString; + + if (expandedString = PhExpandEnvironmentStrings(&serviceDllString->sr)) + { + PhMoveReference(&serviceDllString, expandedString); + } + } + else + { + status = STATUS_NOT_FOUND; + } + + NtClose(keyHandle); + } + + if (NT_SUCCESS(status)) + { + *ServiceDll = serviceDllString; + } + + return status; +} + NTSTATUS PhGetServiceDllParameter( _In_ ULONG ServiceType, _In_ PPH_STRINGREF ServiceName, @@ -625,7 +669,7 @@ NTSTATUS PhGetServiceDllParameter( static PH_STRINGREF servicesKeyName = PH_STRINGREF_INIT(L"System\\CurrentControlSet\\Services\\"); static PH_STRINGREF parameters = PH_STRINGREF_INIT(L"\\Parameters"); NTSTATUS status; - HANDLE keyHandle; + PPH_STRING serviceDllString; PPH_STRING keyName; if (ServiceType & SERVICE_USERSERVICE_INSTANCE) @@ -648,39 +692,41 @@ NTSTATUS PhGetServiceDllParameter( keyName = PhConcatStringRef3(&servicesKeyName, ServiceName, &parameters); } - if (NT_SUCCESS(status = PhOpenKey( - &keyHandle, - KEY_READ, - PH_KEY_LOCAL_MACHINE, - &keyName->sr, - 0 - ))) - { - PPH_STRING serviceDllString; + status = PhpGetServiceDllName( + keyName, + &serviceDllString + ); + PhDereferenceObject(keyName); - if (serviceDllString = PhQueryRegistryString(keyHandle, L"ServiceDll")) + if (NT_SUCCESS(status)) { - PPH_STRING expandedString; + *ServiceDll = serviceDllString; + return STATUS_SUCCESS; + } - if (expandedString = PhExpandEnvironmentStrings(&serviceDllString->sr)) + if ( + (WindowsVersion == WINDOWS_8 || WindowsVersion == WINDOWS_8_1) && + (status == STATUS_OBJECT_NAME_NOT_FOUND || status == STATUS_NOT_FOUND) + ) { - *ServiceDll = expandedString; - PhDereferenceObject(serviceDllString); - } - else + // Windows 8 places the ServiceDll for some services in the root key. (dmex) + keyName = PhConcatStringRef2( + &servicesKeyName, + ServiceName + ); + + status = PhpGetServiceDllName( + keyName, + &serviceDllString + ); + PhDereferenceObject(keyName); + + if (NT_SUCCESS(status)) { *ServiceDll = serviceDllString; + return STATUS_SUCCESS; } } - else - { - status = STATUS_NOT_FOUND; - } - - NtClose(keyHandle); - } - - PhDereferenceObject(keyName); return status; }
testing picoquic_probe_new_path_ex return code
@@ -409,8 +409,8 @@ int client_loop_cb(picoquic_quic_t* quic, picoquic_packet_loop_cb_enum cb_mode, if (picoquic_get_cnx_state(cb_ctx->cnx_client) == picoquic_state_ready && cb_ctx->multipath_probe_done == 0) { for (int i = 0; i < cb_ctx->nb_alt_paths; i++) { - if (picoquic_probe_new_path_ex(cb_ctx->cnx_client, (struct sockaddr *)&cb_ctx->server_address, - (struct sockaddr *)&cb_ctx->client_alt_address[i], cb_ctx->client_alt_if[i], picoquic_get_quic_time(quic), 0)) { + if ((ret = picoquic_probe_new_path_ex(cb_ctx->cnx_client, (struct sockaddr *)&cb_ctx->server_address, + (struct sockaddr *)&cb_ctx->client_alt_address[i], cb_ctx->client_alt_if[i], picoquic_get_quic_time(quic), 0)) != 0) { picoquic_log_app_message(cb_ctx->cnx_client, "Probe new path failed with exit code %d\n", ret); } else { picoquic_log_app_message(cb_ctx->cnx_client, "New path added, total path available %d\n", cb_ctx->cnx_client->nb_paths);
Organize uniforms better;
@@ -44,12 +44,6 @@ const char* lovrShaderVertexPrefix = "" "in vec4 lovrBoneWeights; \n" "out vec2 texCoord; \n" "out vec4 vertexColor; \n" -"#ifdef GL_AMD_vertex_shader_viewport_index \n" -"#define lovrViewportIndex gl_ViewportIndex \n" -"#else \n" -"uniform int lovrViewportIndex; \n" -"#endif \n" -"uniform int lovrViewportCount; \n" "uniform mat4 lovrModel; \n" "uniform mat4 lovrViews[2]; \n" "uniform mat4 lovrProjections[2]; \n" @@ -58,6 +52,12 @@ const char* lovrShaderVertexPrefix = "" "uniform mat3 lovrMaterialTransform; \n" "uniform float lovrPointSize; \n" "uniform mat4 lovrPose[MAX_BONES]; \n" +"uniform int lovrViewportCount; \n" +"#ifdef GL_AMD_vertex_shader_viewport_index \n" +"#define lovrViewportIndex gl_ViewportIndex \n" +"#else \n" +"uniform int lovrViewportIndex; \n" +"#endif \n" "#line 0 \n"; const char* lovrShaderVertexSuffix = "" @@ -91,12 +91,6 @@ const char* lovrShaderFragmentPrefix = "" "in vec2 texCoord; \n" "in vec4 vertexColor; \n" "out vec4 lovrCanvas[gl_MaxDrawBuffers]; \n" -"#ifdef GL_ARB_fragment_layer_viewport \n" -"#define lovrViewportIndex gl_ViewportIndex \n" -"#else \n" -"uniform int lovrViewportIndex; \n" -"#endif \n" -"uniform int lovrViewportCount; \n" "uniform float lovrMetalness; \n" "uniform float lovrRoughness; \n" "uniform vec4 lovrColor; \n" @@ -109,6 +103,12 @@ const char* lovrShaderFragmentPrefix = "" "uniform sampler2D lovrOcclusionTexture; \n" "uniform sampler2D lovrNormalTexture; \n" "uniform samplerCube lovrEnvironmentTexture; \n" +"uniform int lovrViewportCount; \n" +"#ifdef GL_ARB_fragment_layer_viewport \n" +"#define lovrViewportIndex gl_ViewportIndex \n" +"#else \n" +"uniform int lovrViewportIndex; \n" +"#endif \n" "#line 0 \n"; const char* lovrShaderFragmentSuffix = ""
[CI] Second dummy commit to trigger CI build
@@ -35,8 +35,6 @@ def copy_kernel_headers(): else: shutil.copy(source_path.as_posix(), include_path.as_posix()) - programs_root = Path(__file__).parents[1] / "programs" - if __name__ == "__main__": copy_kernel_headers()
[libc][keil] fix the bug of _sys_read and _sys_write
@@ -156,23 +156,27 @@ int _sys_read(FILEHANDLE fh, unsigned char *buf, unsigned len, int mode) return 0; /* error, but keep going */ } size = read(STDIN_FILENO, buf, len); - return 0; /* success */ + return len - size; /* success */ #else return 0; /* error */ #endif /* RT_USING_POSIX_DEVIO */ } else if (fh == STDOUT || fh == STDERR) { - return 0; /* error */ + return -1; /* 100% error */ } else { size = read(fh, buf, len); if (size >= 0) + { return len - size; /* success */ + } else + { return 0; /* error */ } + } #else return 0; /* error */ #endif /* DFS_USING_POSIX */ @@ -209,16 +213,20 @@ int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode) } else if (fh == STDIN) { - return 0; /* error */ + return -1; /* 100% error */ } else { #ifdef DFS_USING_POSIX size = write(fh, buf, len); if (size >= 0) - return 0; /* success */ + { + return len - size; /* success */ + } else + { return 0; /* error */ + } #else return 0; /* error */ #endif /* DFS_USING_POSIX */
Fix: Add SMAPE to IsRegressionMetric.
@@ -153,6 +153,7 @@ bool IsRegressionObjective(const TStringBuf lossDescription) { bool IsRegressionMetric(ELossFunction lossFunction) { return (IsRegressionObjective(lossFunction) || + lossFunction == ELossFunction::SMAPE || lossFunction == ELossFunction::R2 || lossFunction == ELossFunction::MSLE || lossFunction == ELossFunction::MedianAbsoluteError
mqtt: replace nghttp with http_parser references
@@ -13,7 +13,7 @@ idf_component_get_property(esp_hw_support_dir esp_hw_support COMPONENT_DIR) idf_component_get_property(esp_event_dir esp_event COMPONENT_DIR) idf_component_get_property(log_dir log COMPONENT_DIR) idf_component_get_property(freertos_dir freertos COMPONENT_DIR) -idf_component_get_property(nghttp_dir nghttp COMPONENT_DIR) +idf_component_get_property(http_parser_dir http_parser COMPONENT_DIR) idf_component_get_property(esp_wifi_dir esp_wifi COMPONENT_DIR) idf_component_get_property(esp_hw_support_dir esp_hw_support COMPONENT_DIR) idf_component_get_property(esp_tls_dir esp-tls COMPONENT_DIR) @@ -61,7 +61,7 @@ idf_component_get_property(mbedtls_dir mbedtls COMPONENT_DIR) ${freertos_dir}/FreeRTOS-Kernel/include/freertos/task.h ${freertos_dir}/FreeRTOS-Kernel/include/freertos/event_groups.h ${log_dir}/include/esp_log.h - ${nghttp_dir}/port/include/http_parser.h + ${http_parser_dir}/http_parser.h ) set(srcs @@ -113,7 +113,7 @@ idf_component_get_property(mbedtls_dir mbedtls COMPONENT_DIR) ${log_dir}/include ${esp_rom_dir}/include ${mbedtls_dir}/port/include - ${nghttp_dir}/port/include + ${http_parser_dir} ${mbedtls_dir}/mbedtls/include ${freertos_dir}/FreeRTOS-Kernel/include/freertos esp-mqtt/lib/include @@ -131,7 +131,7 @@ idf_component_get_property(mbedtls_dir mbedtls COMPONENT_DIR) target_link_libraries(${COMPONENT_LIB} PUBLIC mocks) else() - idf_component_get_property(nghttp_lib nghttp COMPONENT_LIB) + idf_component_get_property(http_parser_lib http_parser COMPONENT_LIB) idf_component_get_property(tcp_transport_lib tcp_transport COMPONENT_LIB) - target_link_libraries(${COMPONENT_LIB} PUBLIC ${nghttp_lib} ${tcp_transport_lib}) + target_link_libraries(${COMPONENT_LIB} PUBLIC ${http_parser_lib} ${tcp_transport_lib}) endif()
Fix crash when there are no printers (Issue
@@ -355,6 +355,9 @@ serverFindPrinter(const char *resource) /* I - Resource path */ *match = NULL; /* Matching printer */ + if (cupsArrayCount(Printers) == 0) + return (NULL); + _cupsRWLockRead(&PrintersRWLock); if (cupsArrayCount(Printers) == 1 || !strcmp(resource, "/ipp/print")) {
Add error handling to hash.c
#include <kdb.h> #include <kdbease.h> #include <kdbtypes.h> +#include <kdberrors.h> #include <string.h> #include <stdio.h> @@ -32,14 +33,24 @@ static void hash_to_string(char string[65], const uint8_t hash[32]); * @retval true If the computation was successful. */ kdb_boolean_t calculateSpecificationToken (char * hash_string, KeySet * ks, Key * parentKey) { + if(parentKey == NULL) { + // Can't set error to parentKey when it is null. + return false; + } + if(hash_string == NULL) { + ELEKTRA_SET_INTERNAL_ERROR(parentKey, "Param hash_string was NULL"); + return false; + } + if(ks == NULL) { + ELEKTRA_SET_INTERNAL_ERROR(parentKey, "Param ks was NULL"); + return false; + } + // Initialize sha_256 for streaming uint8_t hash[SIZE_OF_SHA_256_HASH]; struct Sha_256 sha_256; sha_256_init(&sha_256, hash); - //TODO: use parentKey for error reporting! - - // Duplicate ks, then cut out parentKey and all keys below. These are the ones we take into account for token calculation. KeySet * dupKs = ksDup (ks); KeySet * cutKs = ksCut (dupKs, parentKey); @@ -51,13 +62,21 @@ kdb_boolean_t calculateSpecificationToken (char * hash_string, KeySet * ks, Key ksRewind(cutKs); while ((currentKey = ksNext (cutKs)) != NULL) { Key * cascadingKey = keyDup (currentKey, KEY_CP_NAME); + if(cascadingKey == NULL) { + ELEKTRA_SET_INTERNAL_ERROR (parentKey, "keyDup() failed!"); + return false; + } /** * Key namespace is ignored for token calculation (via setting it to cascading). * Reason: Different callers of this function pass the keys for token calculation using different namespaces, * but the specification they pass is actually the same. * (e.g. tools/kdb/gen.cpp passes keys in cascading namespace while src/libs/highlevel/elektra.c passes keys in spec namespace). */ - keySetNamespace (cascadingKey, KEY_NS_CASCADING); + int result = keySetNamespace (cascadingKey, KEY_NS_CASCADING); + if(result == -1) { + ELEKTRA_SET_INTERNAL_ERROR (parentKey, "keySetNamespace() failed!"); + return false; + } // Feed key name into sha_256_write() without NULL terminator (hence -1). // This makes it easier to compare expected results with other sha256 tools. sha_256_write (&sha_256, keyName(cascadingKey), keyGetNameSize(cascadingKey) - 1);
Getting started with metrics as events.
@@ -44,21 +44,21 @@ void evtDestroy(evt_t** evt) { if (!evt || !*evt) return; - evt_t* o = *evt; + evt_t *edestroy = *evt; - evtEvents(o); // Try to send events. We're doing this in an + evtEvents(edestroy); // Try to send events. We're doing this in an // attempt to empty the evbuf before the evbuf // is destroyed. Any events added after evtEvents // and before cbufFree wil be leaked. - cbufFree(o->evbuf); + cbufFree(edestroy->evbuf); - transportDestroy(&o->transport); - if (o->log_file_re) { - regfree(o->log_file_re); - free(o->log_file_re); + transportDestroy(&edestroy->transport); + if (edestroy->log_file_re) { + regfree(edestroy->log_file_re); + free(edestroy->log_file_re); } - fmtDestroy(&o->format); - free(o); + fmtDestroy(&edestroy->format); + free(edestroy); *evt = NULL; } @@ -237,7 +237,9 @@ evtMetric(evt_t* evt, const char *host, uint64_t uid, event_t *metric) struct timeb tb; char ts[128]; - if (!evt || !metric) return -1; + if (!evt || !metric || + (evtSource(evt, CFG_SRC_METRIC) == DEFAULT_SRC_METRIC)) + return -1; ftime(&tb); snprintf(ts, sizeof(ts), "%ld.%d", tb.time, tb.millitm); @@ -257,6 +259,7 @@ evtMetric(evt_t* evt, const char *host, uint64_t uid, event_t *metric) if (cbufPut(evt->evbuf, (uint64_t)msg) == -1) { // Full; drop and ignore + DBG(NULL); free(msg); } @@ -289,6 +292,7 @@ evtLog(evt_t *evt, const char *host, const char *path, if (cbufPut(evt->evbuf, (uint64_t)msg) == -1) { // Full; drop and ignore + DBG(NULL); free(msg); }
pybricks/util_pb: ignore hsv with low s
@@ -23,6 +23,16 @@ void color_map_rgb_to_hsv(const pbio_color_rgb_t *rgb, pbio_color_hsv_t *hsv) { // Standard conversion pbio_color_rgb_to_hsv(rgb, hsv); + // For very low values, saturation is not reliable + if (hsv->v <= 3) { + hsv->s = 0; + } + + // For very low values, hue is not reliable + if (hsv->s <= 3) { + hsv->h = 0; + } + // Slight shift for lower hues to make yellow somewhat more accurate if (hsv->h < 40) { uint8_t offset = ((hsv->h - 20) << 8) / 20;
Inky Frame: Return latched SR state in read() regardless of debounce.
@@ -31,6 +31,10 @@ class Button: self._last_value = None def read(self): + if self.startup_state: + self.startup_state = False + return True + value = self.raw() if value != self._last_value and time.ticks_ms() - self._changed > self._debounce_time: self._last_value = value
fcb2: Fix moving to next location when buffer was full When FCB sector was fully filled with data and there was no space for new entry, function fcb2_getnext_in_area() returned FCB2_ERR_CRC instead of FCB2_ERR_NOVAR. This resulted in fcb2_init() clearing everything.
@@ -25,18 +25,27 @@ int fcb2_getnext_in_area(struct fcb2 *fcb, struct fcb2_entry *loc) { int rc = FCB2_ERR_CRC; - int off; int len; + int next_data_offset; + int next_entry_offset; while (rc == FCB2_ERR_CRC) { len = loc->fe_data_len; - off = loc->fe_data_off; + /* Next data offset in sector */ + next_data_offset = loc->fe_data_off + fcb2_len_in_flash(loc->fe_range, len) + + fcb2_len_in_flash(loc->fe_range, 2); + /* Possible entry offset for next data */ + next_entry_offset = fcb->f_active.fe_range->fsr_sector_size - + (FCB2_ENTRY_SIZE * (loc->fe_entry_num + 1)); loc->fe_data_len = 0; loc->fe_entry_num++; + /* If there is no space for next entry just finish search */ + if (next_data_offset >= next_entry_offset) { + return FCB2_ERR_NOVAR; + } rc = fcb2_elem_info(loc); if (len) { - loc->fe_data_off = off + fcb2_len_in_flash(loc->fe_range, len) + - fcb2_len_in_flash(loc->fe_range, 2); + loc->fe_data_off = next_data_offset; } } return rc;
Adds delete for move ctor/assigment for service dependency classes
@@ -73,8 +73,8 @@ namespace celix { namespace dm { BaseServiceDependency(const BaseServiceDependency&) = delete; BaseServiceDependency& operator=(const BaseServiceDependency&) = delete; - BaseServiceDependency(BaseServiceDependency&&) noexcept = default; - BaseServiceDependency& operator=(BaseServiceDependency&&) noexcept = default; + BaseServiceDependency(BaseServiceDependency&&) noexcept = delete; + BaseServiceDependency& operator=(BaseServiceDependency&&) noexcept = delete; /** * Whether the service dependency is valid. @@ -100,8 +100,8 @@ namespace celix { namespace dm { TypedServiceDependency(const TypedServiceDependency&) = delete; TypedServiceDependency& operator=(const TypedServiceDependency&) = delete; - TypedServiceDependency(TypedServiceDependency&&) noexcept = default; - TypedServiceDependency& operator=(TypedServiceDependency&&) noexcept = default; + TypedServiceDependency(TypedServiceDependency&&) noexcept = delete; + TypedServiceDependency& operator=(TypedServiceDependency&&) noexcept = delete; /** * Set the component instance with a pointer @@ -118,8 +118,8 @@ namespace celix { namespace dm { CServiceDependency(const CServiceDependency&) = delete; CServiceDependency& operator=(const CServiceDependency&) = delete; - CServiceDependency(CServiceDependency&&) noexcept = default; - CServiceDependency& operator=(CServiceDependency&&) noexcept = default; + CServiceDependency(CServiceDependency&&) noexcept = delete; + CServiceDependency& operator=(CServiceDependency&&) noexcept = delete; /** * Sets the service version range for the C service dependency. @@ -235,8 +235,8 @@ namespace celix { namespace dm { ServiceDependency(const ServiceDependency&) = delete; ServiceDependency& operator=(const ServiceDependency&) = delete; - ServiceDependency(ServiceDependency&&) noexcept = default; - ServiceDependency& operator=(ServiceDependency&&) noexcept = default; + ServiceDependency(ServiceDependency&&) noexcept = delete; + ServiceDependency& operator=(ServiceDependency&&) noexcept = delete; /** * Set the service name of the service dependency.
cram: fixed patch nuking timing regexp
@@ -32,14 +32,14 @@ Testing multiple samples with --xml <?xml version="1.0" encoding="UTF-8"?> <!-- Tests compiled with Criterion v2.3.2 --> <testsuites name="Criterion Tests" tests="8" failures="2" errors="0" disabled="0"> - <testsuite name="asserts" tests="8" failures="2" errors="0" disabled="0" skipped="0" time="0.001"> + <testsuite name="asserts" tests="8" failures="2" errors="0" disabled="0" skipped="0" time="\d\.\d\d\d"> (re) <testcase name="wstring" assertions="0" status="PASSED" time="\d\.\d\d\d"> (re) </testcase> <testcase name="string" assertions="0" status="PASSED" time="\d\.\d\d\d"> (re) </testcase> - <testcase name="stream" assertions="0" status="PASSED" time="0.000"> + <testcase name="stream" assertions="0" status="PASSED" time="\d\.\d\d\d"> (re) </testcase> - <testcase name="old_school" assertions="2" status="FAILED" time="0.000"> + <testcase name="old_school" assertions="2" status="FAILED" time="\d\.\d\d\d"> (re) <failure type="assert" message="2 assertion(s) failed.">asserts.c:19: &#10;asserts.c:18: You can fail an assertion with a message from anywhere&#10;</failure> </testcase> <testcase name="native" assertions="0" status="PASSED" time="\d\.\d\d\d"> (re)
build: fix building manylinux wheels
@@ -8,10 +8,12 @@ set -e -x cd /pyuv rm -rf wheeltmp +VERSIONS="cp27-cp27mu cp33-cp33m cp34-cp34m cp35-cp35m cp36-cp36m" + # Build -for PYBIN in /opt/python/*/bin; do - "$PYBIN/python" setup.py build_ext - "$PYBIN/pip" wheel . -w wheeltmp +for version in $VERSIONS; do + /opt/python/${version}/bin/python setup.py build_ext + /opt/python/${version}/bin/pip wheel . -w wheeltmp done for whl in wheeltmp/*.whl; do auditwheel repair $whl -w wheelhouse @@ -22,10 +24,10 @@ rm -rf wheeltmp cd .. # Test (ignore if some fail, we just want to know that the module works) -for PYBIN in /opt/python/*/bin; do - "$PYBIN/python" --version - "$PYBIN/pip" install pyuv --no-index -f /pyuv/wheelhouse - "$PYBIN/python" -c "import pyuv; print('%s - %s' % (pyuv.__version__, pyuv.LIBUV_VERSION));" +for version in $VERSIONS; do + /opt/python/${version}/bin/python --version + /opt/python/${version}/bin/pip install pyuv --no-index -f /pyuv/wheelhouse + /opt/python/${version}/bin/python -c "import pyuv; print('%s - %s' % (pyuv.__version__, pyuv.LIBUV_VERSION));" done exit 0
libcupsfilters: More PPD preset rules, especially for HP Checking the PPD file for the HP LaserJet 4050 (PostScript) found more option/choice names of options which influence print quality: Smoothing Halftone ProRes(600/1200/2400) Also analyse choice names for options which contain "Resolution" in their names.
@@ -2355,6 +2355,7 @@ ppdCacheAssignPresets(ppd_file_t *ppd, ((p = strcasestr(o, "resolution")) && !strcasestr(p, "enhance")) || strcasecmp(o, "RET") == 0 || + strcasecmp(o, "Smoothing") == 0 || /* HPLIP */ ((p = strcasestr(o, "uni")) && strcasestr(p, "direction"))) { if (strcasecmp(c, "True") == 0 || @@ -2399,9 +2400,11 @@ ppdCacheAssignPresets(ppd_file_t *ppd, strcasecmp(o, "PrintQuality") == 0 || strcasecmp(o, "PrintMode") == 0 || strcasestr(o, "ColorMode") || + strcasestr(o, "HalfTone") || /* HPLIP */ strcasecmp(o, "ColorResType") == 0 || /* Toshiba */ strcasestr(o, "MonoColor") || /* Brother */ strcasestr(o, "Quality") || + strcasestr(o, "Resolution") || strcasestr(o, "Precision") || /* ex. stpColorPrecision in Gutenprint */ strcasestr(o, "PrintingDirection")) /* Gutenprint */ @@ -2413,6 +2416,7 @@ ppdCacheAssignPresets(ppd_file_t *ppd, else if (strcasestr(c, "Photo") || strcasestr(c, "Enhance") || strcasestr(c, "slow") || + strncasecmp(c, "ProRes", 6) == 0 || /* HPLIP */ strncasecmp(c, "ImageREt", 8) == 0 || /* HPLIP */ ((p = strcasestr(c, "low")) && strcasestr(p, "speed"))) properties->sets_high = 2; @@ -2420,6 +2424,7 @@ ppdCacheAssignPresets(ppd_file_t *ppd, strcasestr(c, "deep") || ((p = strcasestr(c, "high")) && !strcasestr(p, "speed")) || strcasestr(c, "HQ") || + strcasecmp(c, "ProRes600") == 0 || /* HPLIP */ strcasecmp(c, "ImageREt1200") == 0 || /* HPLIP */ strcasecmp(c, "Enhanced") == 0) properties->sets_high = 3; @@ -2428,10 +2433,12 @@ ppdCacheAssignPresets(ppd_file_t *ppd, strcasecmp(c, "fine") == 0 || strcasecmp(c, "HQ") == 0 || strcasecmp(c, "CMYGray") == 0 || /* HPLIP */ + strcasecmp(c, "ProRes1200") == 0 || /* HPLIP */ strcasecmp(c, "ImageREt2400") == 0 || /* HPLIP */ strcasestr(c, "unidir")) properties->sets_high = 4; else if (strcasecmp(c, "best") == 0 || + strcasecmp(c, "ProRes2400") == 0 || /* HPLIP */ strcasecmp(c, "monolowdetail") == 0) /* Toshiba */ properties->sets_high = 5;
Use SSL_set_quic_early_data_context to find BoringSSL
@@ -210,7 +210,7 @@ have_boringssl=no if test "x${request_boringssl}" != "xno"; then save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $BORINGSSL_LIBS" - AC_CHECK_LIB([ssl], [SSL_provide_quic_data], + AC_CHECK_LIB([ssl], [SSL_set_quic_early_data_context], [have_boringssl=yes], [have_boringssl=no], [$BORINGSSL_LIBS]) LDFLAGS="$save_LDFLAGS" fi
docs/library/pyb.rst: Update pyb.usb_mode() to mention VCP+MSC+HID.
@@ -271,6 +271,7 @@ Miscellaneous functions - ``'MSC'``: enable with MSC (mass storage device class) interface - ``'VCP+MSC'``: enable with VCP and MSC - ``'VCP+HID'``: enable with VCP and HID (human interface device) + - ``'VCP+MSC+HID'``: enabled with VCP, MSC and HID (only available on PYBD boards) For backwards compatibility, ``'CDC'`` is understood to mean ``'VCP'`` (and similarly for ``'CDC+MSC'`` and ``'CDC+HID'``).
loraping: remove bootloader/mgmt dependencies Some dependencies don't seem necessary for this sample app, and removing them allows for use in constrained devices (eg, b-l072z-lrwan1 with 72K slots).
@@ -25,19 +25,13 @@ pkg.homepage: "http://mynewt.apache.org/" pkg.keywords: pkg.deps: - - "@mcuboot/boot/bootutil" - - "@apache-mynewt-core/boot/split" - "@apache-mynewt-core/kernel/os" - - "@apache-mynewt-core/mgmt/imgmgr" - - "@apache-mynewt-core/mgmt/smp" - - "@apache-mynewt-core/mgmt/smp/transport/smp_shell" - "@apache-mynewt-core/sys/config" - "@apache-mynewt-core/sys/console/full" - "@apache-mynewt-core/sys/id" - "@apache-mynewt-core/sys/log/full" - "@apache-mynewt-core/sys/shell" - "@apache-mynewt-core/sys/stats/full" - - "@apache-mynewt-core/test/flash_test" pkg.deps.CONFIG_NFFS: - "@apache-mynewt-core/fs/nffs"
fixed indentation of SDLActivity.java
@@ -315,9 +315,8 @@ private void CopyPak(){ String version = null; String toast = null; - try{ version = context.getPackageManager().getPackageInfo(context.getPackageName(),0).versionName; //get version number as string - } catch (Exception e) { } + //Toast.makeText(context,context.getPackageName().toString(), Toast.LENGTH_LONG).show(); File outFolder = new File(ctx.getExternalFilesDir(null) + "/Paks"); //set local output folder File outFile = new File(outFolder, version + ".pak"); //set local output fileame as version number @@ -335,25 +334,25 @@ private void CopyPak(){ //directory is empty } } - } else { - - if (outFolder.isDirectory() & !outFile.exists()) //if local folder true and file does not match version empty folder - { + if (outFolder.isDirectory() & !outFile.exists()) { //if local folder true and file does not match version empty folder toast = "Updating please wait!"; String[] children = outFolder.list(); - for (int i = 0; i < children.length; i++) - { + for (int i = 0; i < children.length; i++) { new File(outFolder, children[i]).delete(); } - } else {toast = "First time setup please wait!";} + } else { + toast = "First time setup please wait!"; + } if(!outFile.exists()) { Toast.makeText(context,toast, Toast.LENGTH_LONG).show(); outFolder.mkdirs(); + int resId = context.getResources().getIdentifier("raw/bor", null, context.getPackageName()); InputStream in = getResources().openRawResource(resId); FileOutputStream out = new FileOutputStream(outFile); + copyFile(in, out); in.close(); in = null; @@ -361,7 +360,12 @@ private void CopyPak(){ out.close(); out = null; } - }} catch (IOException e1) { } + } + } catch (IOException e) { + // not handled + } catch (Exception e) { + // not handled + } } private void copyFile(InputStream in, OutputStream out) throws IOException {
Add missing Python tests.
@@ -113,5 +113,39 @@ class TestInterpolation(unittest.TestCase): +class TestVec(unittest.TestCase): + + def testValuesVec2(self): + # Given + vec = Vec2(1, 2) + + # When + values = vec.values + + # Then + assertKnotsAlmostEqual([1, 2], values, self) + + def testValuesVec3(self): + # Given + vec = Vec3(3, 2, 1) + + # When + values = vec.values + + # Then + assertKnotsAlmostEqual([3, 2, 1], values, self) + + def testValuesVec4(self): + # Given + vec = Vec4(1, 3, 2, 4) + + # When + values = vec.values + + # Then + assertKnotsAlmostEqual([1, 3, 2, 4], values, self) + + + if __name__ == '__main__': unittest.main()
doc: supported KBL NUC added
@@ -14,7 +14,7 @@ Intel Apollo Lake NUC * `Intel NUC Kit NUC6CAYH Reference <https://www.intel.com/content/www/us/en/products/boards-kits/nuc/kits/nuc6cayh.html>`_ -* Intel |reg| Celeron |reg| Processor J3455 + with Intel |reg| Celeron |reg| Processor J3455 * Tested NUC with 8GB of RAM and using an 128GB SSD You can read a full `AnandTech review`_ of the NUC6CAYH NUC Kit and @@ -34,6 +34,27 @@ up ACRN on the NUC. .. _SimplyNUC: https://www.simplynuc.com/?s=NUC6CAYH&post_type=product +Intel Kaby Lake NUC +********************* + +* `Intel NUC Kit NUC7i5BNH Reference + <https://www.intel.com/content/www/us/en/products/boards-kits/nuc/kits/nuc7i5bnh.html>`_ + with Intel |reg| Core |trade| i5 7260U +* `Intel NUC Kit NUC7i7BNH Reference + <https://www.intel.com/content/www/us/en/products/boards-kits/nuc/kits/nuc7i7bnh.html>`_ + with Intel |reg| Core |trade| i5-7567U +* `Intel NUC Kit NUC7i5DNHE Reference + <https://www.intel.com/content/www/us/en/products/boards-kits/nuc/kits/nuc7i5dnhe.html>`_ + with Intel |reg| Core |trade| i5-7300U +* `Intel NUC Kit NUC7i7DNHE Reference + <https://www.intel.com/content/www/us/en/products/boards-kits/nuc/kits/nuc7i7dnhe.html>`_ + with Intel |reg| Core |trade| i7-8650U +* Tested NUC with 8GB of RAM and using an 128GB SSD + +You can search online like APL NUC. Be sure to purchase +the NUC with the recommended memory and storage options noted above. + + UP Squared board **************** @@ -53,3 +74,4 @@ You can purchase this board directly online from `UP Shop Visit the :ref:`getting-started-up2` page for instructions on how to set up ACRN on the UP2 board. +
[mechanics] Add joint properties accessor functions.
@@ -69,6 +69,20 @@ public: void setPoint(unsigned int index, SP::SiconosVector point) { _points[index] = point; } + /** Get a point for this joint. + * + * \param index The index of the point. + * \return The requested point. + */ + SP::SiconosVector point(unsigned int index) + { return _points[index]; } + + /** Get the vector of points for this joint. + * \return The vector of points. + */ + VectorOfVectors& points() + { return _points; } + /** Set an axis for this joint. The role of each axis is specific to * the joint subclass. Won't take effect until setInitialConditions * is called. @@ -79,6 +93,20 @@ public: void setAxis(unsigned int index, SP::SiconosVector axis) { _axes[index] = axis; } + /** Get an axis for this joint. + * + * \param index The index of the point. + * \return The requested axis. + */ + SP::SiconosVector axis(unsigned int index) + { return _axes[index]; } + + /** Get the vector of axes for this joint. + * \return The vector of axes. + */ + VectorOfVectors& axes() + { return _axes; } + /** Set whether points and axes should be interpreted in absolute or * relative frame. Won't take effect until setInitialConditions is * called. @@ -88,6 +116,14 @@ public: void setAbsolute(bool absoluteRef) { _absoluteRef = absoluteRef; } + /** Get whether points and axes are interpreted in absolute or + * relative frame. + * + * \return True for absolute frame, false for relative frame. + */ + bool absolute() + { return _absoluteRef; } + /** Initialize the joint constants based on the provided initial positions. */ virtual void setInitialConditions(SP::SiconosVector q1, SP::SiconosVector q2=SP::SiconosVector()) = 0;
fix(draw_img): fix typos in API comments
@@ -331,11 +331,11 @@ LV_ATTRIBUTE_FAST_MEM static lv_res_t lv_img_draw_core(const lv_area_t * coords, /** * Draw a color map to the display (image) - * @param cords_p coordinates the color map - * @param mask_p the map will drawn only on this area (truncated to draw_buf area) + * @param map_area coordinates the color map + * @param clip_area the map will drawn only on this area (truncated to draw_buf area) * @param map_p pointer to a lv_color_t array * @param draw_dsc pointer to an initialized `lv_draw_img_dsc_t` variable - * @param chroma_keyed true: enable transparency of LV_IMG_LV_COLOR_TRANSP color pixels + * @param chroma_key true: enable transparency of LV_IMG_LV_COLOR_TRANSP color pixels * @param alpha_byte true: extra alpha byte is inserted for every pixel */ LV_ATTRIBUTE_FAST_MEM static void lv_draw_map(const lv_area_t * map_area, const lv_area_t * clip_area,
SidebarItem: respect calmengine settings
@@ -102,8 +102,10 @@ export function SidebarDmItem(props: { }) { const { ship, selected = false } = props; const contact = useContact(ship); - const title = contact?.nickname || (cite(ship) ?? ship); - const hideAvatars = false; + const { hideAvatars, hideNicknames } = useSettingsState(s => s.calm); + const title = (!hideNicknames && contact?.nickname) + ? contact?.nickname + : (cite(ship) ?? ship); const { unreads } = useHarkDm(ship) || { unreads: 0 }; const img = contact?.avatar && !hideAvatars ? ( @@ -131,7 +133,7 @@ export function SidebarDmItem(props: { hasUnread={(unreads as number) > 0} to={`/~landscape/messages/dm/${ship}`} title={title} - mono={!contact?.nickname} + mono={hideAvatars || !contact?.nickname} isSynced > {img}
naive: l2 spawn proxy tests
=^ f state (n state %bat q:(gen-tx 0 marbud-mproxy %marbud-key-0)) management-proxy.own:(~(got by points.state) ~marbud) :: -++ test-l2-spawn-proxy-deposit ^- tang +++ test-l2-dopbud-spawn-proxy-deposit ^- tang %+ expect-eq !> %spawn :: =^ f state (init-dopbud state) dominion:(~(got by points.state) ~dopbud) :: +++ test-l2-sambud-spawn-proxy-predeposit ^- tang + %+ expect-eq + !> [(addr %sambud-skey) 0] + :: + !> + =| =^state:naive + =^ f state (init-sambud state) + =^ f state (n state (changed-spawn-proxy:l1 ~sambud (addr %sambud-skey))) + =^ f state (n state (changed-spawn-proxy:l1 ~sambud deposit-address:naive)) + spawn-proxy.own:(~(got by points.state) ~sambud) +:: +++ test-l2-sambud-own-spawn-proxy-postdeposit ^- tang + =/ sambud-sproxy [[~sambud %own] %set-spawn-proxy (addr %sambud-skey-0)] + %+ expect-eq + !> [(addr %sambud-skey-0) 0] + :: + !> + =| =^state:naive + =^ f state (init-sambud state) + =^ f state (n state (changed-spawn-proxy:l1 ~sambud deposit-address:naive)) + =^ f state (n state %bat q:(gen-tx 0 sambud-sproxy %sambud-key-0)) + spawn-proxy.own:(~(got by points.state) ~sambud) +:: +++ test-l2-sambud-spawn-spawn-proxy-postdeposit ^- tang + =/ sambud-sproxy [[~sambud %spawn] %set-spawn-proxy (addr %sambud-skey-1)] + %+ expect-eq + !> [(addr %sambud-skey-1) 0] + :: + !> + =| =^state:naive + =^ f state (init-sambud state) + =^ f state (n state (changed-spawn-proxy:l1 ~sambud (addr %sambud-skey-0))) + =^ f state (n state (changed-spawn-proxy:l1 ~sambud deposit-address:naive)) + =^ f state (n state %bat q:(gen-tx 0 sambud-sproxy %sambud-skey-0)) + spawn-proxy.own:(~(got by points.state) ~sambud) + +:: ++ test-marbud-l2-spawn ^- tang =/ marbud-sproxy [marbud-own %set-spawn-proxy (addr %marbud-skey)] =/ lt-spawn [%spawn ~linnup-torsyx (addr %lt-key-0)]
pkg: default test everything under /=base=/tests Checks if args is empty and if so, sets the test path to /=base=/tests.
|= arg=vase =/ m (strand ,vase) ^- form:m +;< =bowl:strand bind:m get-bowl:strandio =/ paz=(list path) - :: promote path to ~[path] if needed + :: if no args, test everything under /=base=/tests + :: + ?~ q.arg + ~[/(scot %p our.bowl)/[q.byk.bowl]/(scot %da now.bowl)/tests] + :: else cast path to ~[path] if needed :: ?@ +<.q.arg [(tail !<([~ path] arg)) ~]
validation BUGFIX avoid using invalid set Refs sysrepo/sysrepo#2518
@@ -217,12 +217,14 @@ lyd_validate_unres_when(struct lyd_node **tree, const struct lys_module *mod, st } /* remove from node types set, if present */ + if (node_types) { LYD_TREE_DFS_BEGIN(node, elem) { if (ly_set_contains(node_types, elem, &idx)) { LY_CHECK_GOTO(ret = ly_set_rm_index(node_types, idx, NULL), error); } LYD_TREE_DFS_END(node, elem); } + } /* free */ lyd_free_tree(node);
Add TestVec to Lua.
@@ -121,4 +121,43 @@ end +TestVec = {} + +function TestVec:testValuesVec2() + -- Given + vec = ts.Vec2(1, 2) + + -- When + values = vec.values + + -- Then + lu.assertAlmostEquals({ 1, 2 }, values, ts.TS_KNOT_EPSILON) +end + +function TestVec:testValuesVec3() + -- Given + vec = ts.Vec3(3, 2, 1) + + -- When + values = vec.values + + -- Then + lu.assertAlmostEquals({ 3, 2, 1 }, values, ts.TS_KNOT_EPSILON) +end + +function TestVec:testValuesVec4() + -- Given + vec = ts.Vec4(1, 3, 2, 4) + + -- When + values = vec.values + + -- Then + lu.assertAlmostEquals({ 1, 3, 2, 4 }, values, ts.TS_KNOT_EPSILON) +end + +-- end TestVec + + + os.exit( lu.run() )
added missing help entries
@@ -981,12 +981,16 @@ printf("%s %s (C) %s ZeroBeat\n" "-o <file> : output PSK file\n" " default: stdout\n" " output list must be sorted unique!\n" + "-h : show this help\n" + "-v : show version\n" "\n" "--netgear : include NETGEAR candidates\n" "--weakpass: include weak password candidates\n" "--eudate : include complete european dates\n" "--usdate : include complete american dates\n" "--wpskeys : include complete WPS keys\n" + "--help : show this help\n" + "--version : show version\n" "\n", eigenname, VERSION, VERSION_JAHR, eigenname); exit(EXIT_SUCCESS); }
get_ecdsa_sig_rs_bytes: free value of d2i_ECDSA_SIG() before return
@@ -218,7 +218,7 @@ static int get_ecdsa_sig_rs_bytes(const unsigned char *sig, size_t sig_len, r1 = ECDSA_SIG_get0_r(sign); s1 = ECDSA_SIG_get0_s(sign); if (r1 == NULL || s1 == NULL) - return 0; + goto err; r1_len = BN_num_bytes(r1); s1_len = BN_num_bytes(s1); @@ -560,7 +560,7 @@ static int get_dsa_sig_rs_bytes(const unsigned char *sig, size_t sig_len, return 0; DSA_SIG_get0(sign, &r1, &s1); if (r1 == NULL || s1 == NULL) - return 0; + goto err; r1_len = BN_num_bytes(r1); s1_len = BN_num_bytes(s1);
Add Namron modelId to corresponding button map
"sunricherMap": { "vendor": "Sunricher", "doc": "Wireless switches from Sunricher, Namron, SLC and EcoDim", - "modelids": ["ED-10010", "ED-10011", "ED-10012", "ED-10013", "ED-10014", "ED-10015", "ZG2833K8_EU05", "ZG2835", "4512700", "4512701", "4512702", "4512703", "4512705", "4512714", "4512719", "4512720", "4512721", "4512722", "S57003"], + "modelids": ["ED-10010", "ED-10011", "ED-10012", "ED-10013", "ED-10014", "ED-10015", "ZG2833K8_EU05", "ZG2835", "4512700", "4512701", "4512702", "4512703", "4512705", "4512714", "4512719", "4512720", "4512721", "4512722", "4512729", "S57003"], "map": [ [1, "0x01", "ONOFF", "ON", "0", "S_BUTTON_1", "S_BUTTON_ACTION_SHORT_RELEASED", "On"], [1, "0x01", "LEVEL_CONTROL", "MOVE_WITH_ON_OFF", "0", "S_BUTTON_1", "S_BUTTON_ACTION_HOLD", "Move up (with on/off)"],
make flang map runnable
@@ -16,16 +16,27 @@ MODULE definitions_module END MODULE definitions_module SUBROUTINE start use definitions_module + ALLOCATE(chunk%tiles (1)) + ALLOCATE(chunk%tiles(1)%field%density0 (-1:962,-1:962)) + ALLOCATE(chunk%tiles(1)%field%density1 (-1:962,-1:962)) + + print '(Z)', loc(chunk%tiles(1)) + print '(Z)', loc(chunk%tiles(1)%field) + print '(Z)', loc(chunk%tiles(1)%field%density0) + print '(Z)', loc(chunk%tiles(1)%field%density1) + + call flush(6) !$omp target data map( & !$omp chunk%tiles(1)%field%density0, & !$omp chunk%tiles(1)%field%density1) - DO tile=1,tiles_per_chunk - CALL initialise_chunk(tile) + DO tile=1,2 + chunk%tiles(1)%field%density0(tile,-1) =0 + chunk%tiles(1)%field%density1(tile,-1) =0 ENDDO !$omp end target data END SUBROUTINE start program foobar - + call start end program
use glib signal handler for gracefully exiting the main loop upon SIGINT This allows a more sensible checking for memory leaks with valgrind, the previous exit() left a lot of memory unreleased which shows up as false positives in valgrind.
#include <pthread.h> #include <signal.h> #include <glib.h> +#include <glib-unix.h> #include <gio/gio.h> #include <getopt.h> #include <poll.h> @@ -163,17 +164,16 @@ static int open_handlers(void) return num_good; } -static void sighandler(int signal) +static gboolean sighandler(gpointer user_data) { tcmulib_cleanup_all_cmdproc_threads(); tcmu_cancel_log_thread(); tcmu_cancel_config_thread(tcmu_cfg); - exit(1); -} -static struct sigaction tcmu_sigaction = { - .sa_handler = sighandler, -}; + g_main_loop_quit((GMainLoop*)user_data); + + return G_SOURCE_CONTINUE; +} gboolean tcmulib_callback(GIOChannel *source, GIOCondition condition, @@ -880,9 +880,10 @@ int main(int argc, char **argv) goto err_out; } - ret = sigaction(SIGINT, &tcmu_sigaction, NULL); - if (ret) { - tcmu_err("couldn't set sigaction\n"); + loop = g_main_loop_new(NULL, FALSE); + if (g_unix_signal_add(SIGINT, sighandler, loop) <= 0 || + g_unix_signal_add(SIGTERM, sighandler, loop) <= 0) { + tcmu_err("couldn't setup signal handlers\n"); goto err_tcmulib_close; } @@ -901,7 +902,6 @@ int main(int argc, char **argv) NULL // user date free func ); - loop = g_main_loop_new(NULL, FALSE); g_main_loop_run(loop); tcmu_dbg("Exiting...\n");
Awkward hotfix to tinycthread.h Becuase of . Only needed on Android. Not needed in the glfw tinycthread because we don't use glfw on Android.
@@ -106,6 +106,10 @@ extern "C" { #define TTHREAD_NORETURN #endif +/* HOTFIX: The TIME_UTC check below will spuriously succeed on Android NDK 18 or later, even on systems which lack timespec_get. */ +#ifdef __ANDROID__ +#undef TIME_UTC +#endif /* If TIME_UTC is missing, provide it and provide a wrapper for timespec_get. */ #ifndef TIME_UTC
Document the yara-python's "Match" structure.
@@ -240,11 +240,10 @@ The *matches* field indicates if the rule matches the data or not. The (<offset>, <string identifier>, <string data>) -The ``match`` method returns a list of instances of the class ``Match``. +The ``match`` method returns a list of instances of the class :py:class:`yara.Match`. Instances of this class have the same attributes as the dictionary passed to the callback function. - You can also specify a module callback function when invoking the ``match`` method. The provided function will be called for every imported module that scanned a file. Your callback function should expect a single parameter of @@ -348,8 +347,8 @@ Reference .. py:class:: Rules - Instances of this class are returned by :py:func:`yara.compile` and - represents a set of compiled rules. + Instances of this class are returned by :py:func:`yara.compile` and represents + a set of compiled rules. .. py:method:: match(filepath, pid, data, externals=None, callback=None, fast=False, timeout=None, modules_data=None, modules_callback=None) @@ -383,3 +382,19 @@ Reference :param str filepath: Path to the file. :param file-object file: A file object supporting the ``write`` method. :raises: **YaraError**: If an error occurred while saving the file. + +.. py:class:: Match + + Objects returned by :py:func:`yara.match`, representing a match. + + .. py:field:: rule + Name of the matching rule. + .. py:field:: namespace + Namespace associated to the matching rule. + .. py:field:: tags + Array of strings containig the tags associated to the matching rule. + .. py:field:: meta + Dictionary containing metadata associated to the matching rule. + .. py:field:: strings + List of tuples containing information about the matching strings. Each + tuple has the form: (<offset>, <string identifier>, <string data>)
Document cJSON_free API
@@ -129,12 +129,12 @@ CJSON_PUBLIC(const char*) cJSON_Version(void); /* Supply malloc, realloc and free functions to cJSON */ CJSON_PUBLIC(void) cJSON_InitHooks(cJSON_Hooks* hooks); - -/* Supply a block of JSON, and this returns a cJSON object you can interrogate. Call cJSON_Delete when finished. */ +/* Memory Management: the caller is always responsible to free the results from all variants of cJSON_Parse (with cJSON_Delete) and cJSON_Print (with stdlib free, cJSON_Hooks.free_fn, or cJSON_free as appropriate). The exception is cJSON_PrintPreallocated, where the caller has full responsibility of the buffer. */ +/* Supply a block of JSON, and this returns a cJSON object you can interrogate. */ CJSON_PUBLIC(cJSON *) cJSON_Parse(const char *value); -/* Render a cJSON entity to text for transfer/storage. Free the char* when finished. */ +/* Render a cJSON entity to text for transfer/storage. */ CJSON_PUBLIC(char *) cJSON_Print(const cJSON *item); -/* Render a cJSON entity to text for transfer/storage without any formatting. Free the char* when finished. */ +/* Render a cJSON entity to text for transfer/storage without any formatting. */ CJSON_PUBLIC(char *) cJSON_PrintUnformatted(const cJSON *item); /* Render a cJSON entity to text using a buffered strategy. prebuffer is a guess at the final size. guessing well reduces reallocation. fmt=0 gives unformatted, =1 gives formatted */ CJSON_PUBLIC(char *) cJSON_PrintBuffered(const cJSON *item, int prebuffer, cJSON_bool fmt);
odyssey: update documentation sections
@@ -68,15 +68,15 @@ cmake -DCMAKE_BUILD_TYPE=Release .. make ``` -#### Configuration reference +### Configuration reference -**Service** +##### Service * [include](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#include-string) * [daemonize](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#daemonize-yesno) * [pid\_file](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#pid_file-string) -**Logging** +##### Logging * [log\_file](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#log_file-string) * [log\_format](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#log_format-string) @@ -91,7 +91,7 @@ make * [log\_stats](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#log_stats-yesno) * [stats\_interval](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#stats_interval-integer) -**Performance** +##### Performance * [workers](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#workers-integer) * [resolvers](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#resolvers-integer) @@ -103,21 +103,23 @@ make * [nodelay](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#nodelay-yesno) * [keepalive](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#keepalive-integer) -**Global limits** +##### Global limits * [client\_max](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#client_max-integer) -**Listen** +##### Listen * [host](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#host-string) * [port](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#port-integer) * [backlog](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#backlog-integer) * [tls](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#tls-string) -**Routing rules** +##### Routing * [overview](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#routing-rules) +* [console](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#admin-console) -**Console** +##### Internals -* [example](https://github.yandex-team.ru/pmwkaa/odyssey/blob/master/documentation/configuration.md#admin-console) +* [overview](documentation/internals.md) +* [error codes](documentation/internals.md#client-error-codes)
Number of problems
@@ -35,7 +35,7 @@ const char ** data_collection() /* 4: Spheres #200 problems */ /* 5: Sphere1mm #41 problems */ /* 6: Chute* #182 problems */ - /* TOTAL #1092 problems */ + /* TOTAL #1091 problems */ if (listprob[0]==1) {
Fix test randstring, compare string and int is wrong. This will cause the generated string containing "\". Fixes a broken change in
@@ -12,9 +12,10 @@ proc randstring {min max {type binary}} { set maxval 52 } while {$len} { - set rr [format "%c" [expr {$minval+int(rand()*($maxval-$minval+1))}]] + set num [expr {$minval+int(rand()*($maxval-$minval+1))}] + set rr [format "%c" $num] if {$type eq {simplealpha} && ![string is alnum $rr]} {continue} - if {$type eq {alpha} && $rr eq 92} {continue} ;# avoid putting '\' char in the string, it can mess up TCL processing + if {$type eq {alpha} && $num eq 92} {continue} ;# avoid putting '\' char in the string, it can mess up TCL processing append output $rr incr len -1 }
hw/fsp: Remove stray va_end() in __fsp_fillmsg() __fsp_fillmsg() is called from fsp_fillmsg() and fsp_mkmsg(). Both callers wrap it in a va_start() / va_end() pair so using va_end() inside the function is almost certainly wrong.
@@ -995,7 +995,6 @@ static void __fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod, for (i = 0; i < add_words; i++) fsp_msg_set_data_word(msg, i, va_arg(list, unsigned int)); - va_end(list); } void fsp_fillmsg(struct fsp_msg *msg, u32 cmd_sub_mod, u32 add_words, ...)
That optimization was not necessary, better to not have it
@@ -143,11 +143,6 @@ typedef struct clap_host_params { // Rescan the full list of parameters according to the flags. // [main-thread] void (*rescan)(clap_host *host, uint32_t flags); - - // Only rescan the given subset of parameters according to the flags. - // CLAP_PARAM_RESCAN_ALL can't be used with this method. - // [main-thread] - void (*rescan_params)(clap_host *host, uint32_t flags, const uint32_t *indexes, uint32_t count); } clap_host_params; #ifdef __cplusplus
apps/speed.c: clean up SIGARM handling.
@@ -197,29 +197,29 @@ static const int lengths_list[] = { }; static const int *lengths = lengths_list; +#define START 0 +#define STOP 1 + #ifdef SIGALRM -# if defined(__STDC__) || defined(sgi) || defined(_AIX) -# define SIGRETTYPE void -# else -# define SIGRETTYPE int -# endif -static SIGRETTYPE sig_done(int sig); -static SIGRETTYPE sig_done(int sig) +static void alarmed(int sig) { - signal(SIGALRM, sig_done); + signal(SIGALRM, alarmed); run = 0; } -#endif -#define START 0 -#define STOP 1 +static double Time_F(int s) +{ + double ret = app_tminterval(s, usertime); + if (s == STOP) + alarm(0); + return ret; +} -#if defined(_WIN32) +#elif defined(_WIN32) + +# define SIGALRM -1 -# if !defined(SIGALRM) -# define SIGALRM -# endif static unsigned int lapse; static volatile unsigned int schlock; static void alarm_win32(unsigned int secs) @@ -263,13 +263,9 @@ static double Time_F(int s) return ret; } #else - static double Time_F(int s) { - double ret = app_tminterval(s, usertime); - if (s == STOP) - alarm(0); - return ret; + return app_tminterval(s, usertime); } #endif @@ -1961,10 +1957,8 @@ int speed_main(int argc, char **argv) /* not worth fixing */ # error "You cannot disable DES on systems without SIGALRM." # endif /* OPENSSL_NO_DES */ -#else -# ifndef _WIN32 - signal(SIGALRM, sig_done); -# endif +#elif SIGALRM > 0 + signal(SIGALRM, alarmed); #endif /* SIGALRM */ #ifndef OPENSSL_NO_MD2
Refine ssl_get_kex_mode_str() for easy automatic generation
@@ -1667,6 +1667,21 @@ cleanup: return( ret ); } +char *ssl_get_kex_mode_str(int mode) +{ + switch( mode ) + { + case MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK: + return "psk"; + case MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL: + return "ephemeral"; + case MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL: + return "psk_ephemeral"; + default: + return "unknown mode"; + } +} + MBEDTLS_CHECK_RETURN_CRITICAL static int ssl_tls13_postprocess_server_hello( mbedtls_ssl_context *ssl ) { @@ -1706,27 +1721,19 @@ static int ssl_tls13_postprocess_server_hello( mbedtls_ssl_context *ssl ) goto cleanup; } - MBEDTLS_SSL_DEBUG_MSG( 3, - ( "Server selected key exchange mode: %s", - handshake->key_exchange_mode == - MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK ? "psk" : - (handshake->key_exchange_mode == - MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL ? "ephemeral" : - "psk_ephemeral")) ); - if( !mbedtls_ssl_conf_tls13_check_kex_modes( ssl, handshake->key_exchange_mode ) ) { ret = MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE; MBEDTLS_SSL_DEBUG_MSG( 2, - ( "Not supported kex mode in client: %s", - handshake->key_exchange_mode == - MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK ? "psk" : - (handshake->key_exchange_mode == - MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL ? "ephemeral" : - "psk_ephemeral")) ); + ( "Key exchange mode(%s) is not configured supported.", + ssl_get_kex_mode_str( handshake->key_exchange_mode ) ) ); goto cleanup; } + MBEDTLS_SSL_DEBUG_MSG( 3, + ( "Server selected key exchange mode: %s", + ssl_get_kex_mode_str( handshake->key_exchange_mode ) ) ); + /* Start the TLS 1.3 key schedule: Set the PSK and derive early secret. * * TODO: We don't have to do this in case we offered 0-RTT and the
upcall not cb
@@ -28,7 +28,7 @@ int main(void) { uint32_t frequency = alarm_internal_frequency(); uint32_t interval = (500 / 1000) * frequency + (500 % 1000) * (frequency / 1000); uint32_t now = alarm_read(); - alarm_internal_subscribe((subscribe_cb*) cb, NULL); + alarm_internal_subscribe((subscribe_upcall*) cb, NULL); alarm_internal_set(now, interval); // Now block in this app for a while. This should give the timer time to
m25p16: fix chip detect
@@ -110,7 +110,7 @@ void m25p16_get_bounds(data_flash_bounds_t *bounds) { uint8_t raw_id[3]; m25p16_read_command(M25P16_READ_IDENTIFICATION, raw_id, 3); - const uint32_t chip_id = (raw_id[0] << 16) | (raw_id[1] << 8) | raw_id[2] << 16; + const uint32_t chip_id = (raw_id[0] << 16) | (raw_id[1] << 8) | raw_id[2]; switch (chip_id) { case JEDEC_ID_WINBOND_W25Q16: case JEDEC_ID_MICRON_M25P16:
fix(keymap): add brackets around if statement body
@@ -94,7 +94,9 @@ int zmk_keymap_layer_deactivate(u8_t layer) int zmk_keymap_layer_toggle(u8_t layer) { if (zmk_keymap_layer_active(layer)) + { return zmk_keymap_layer_deactivate(layer); + } return zmk_keymap_layer_activate(layer); };
Fixed buffer overflow caused by an excessive number of invalid requests with multiple logs.
@@ -551,7 +551,7 @@ count_invalid (GLog * glog, const char *line) { LOG_INVALID (("%s", line)); } - if (glog->items->errstr && glog->invalid < MAX_LOG_ERRORS) { + if (glog->items->errstr && glog->log_erridx < MAX_LOG_ERRORS) { glog->errors[glog->log_erridx++] = xstrdup (glog->items->errstr); } }
adc: fix legacy oneshot driver clock gating issue on c3 and c2
@@ -822,6 +822,7 @@ esp_err_t adc2_get_raw(adc2_channel_t channel, adc_bits_width_t width_bit, int * periph_module_enable(PERIPH_SARADC_MODULE); adc_power_acquire(); + adc_ll_digi_clk_sel(0); adc_arbiter_t config = ADC_ARBITER_CONFIG_DEFAULT(); adc_hal_arbiter_config(&config);
Update etag when storing a scene with transitiontime
@@ -2220,6 +2220,9 @@ int DeRestPluginPrivate::storeScene(const ApiRequest &req, ApiResponse &rsp) return REQ_READY_SEND; } + updateEtag(gwConfigEtag); + updateEtag(group->etag); + rspItemState["id"] = sid; rspItem["success"] = rspItemState; rsp.list.append(rspItem);
Fix zeroization at NULL pointer
@@ -5635,7 +5635,9 @@ static int tls_prf_generic( mbedtls_md_type_t md_type, exit: mbedtls_md_free( &md_ctx ); + if ( tmp != NULL ) mbedtls_platform_zeroize( tmp, tmp_len ); + mbedtls_platform_zeroize( h_i, sizeof( h_i ) ); mbedtls_free( tmp );