message
stringlengths
6
474
diff
stringlengths
8
5.22k
build: prevent build failure when test signing required If due to any reason the test signing of the driver is requested the build with EWDK may fail due to unknown file digest algorithm. Make sure the default algorithm is always defined (sha256).
@@ -172,6 +172,9 @@ Common property definitions used by all drivers: <ClCompile> <WppModuleName>$(TargetFileName)</WppModuleName> </ClCompile> + <DriverSign> + <FileDigestAlgorithm>sha256</FileDigestAlgorithm> + </DriverSign> </ItemDefinitionGroup> <!-- Enable CETCompat for vs >= 2019 or EWDK >= 2004 -->
Update declaration of mscorlib
@@ -206,6 +206,7 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + NULL, Library_corlib_native_System_Convert::ToBase64String___STATIC__STRING__SZARRAY_U1__I4__I4__BOOLEAN, NULL, NULL, @@ -266,6 +267,7 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + NULL, Library_corlib_native_System_Double::CompareTo___STATIC__I4__R8__R8, Library_corlib_native_System_Double::IsInfinity___STATIC__BOOLEAN__R8, Library_corlib_native_System_Double::IsNaN___STATIC__BOOLEAN__R8, @@ -548,6 +550,13 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, Library_corlib_native_System_String::CompareTo___I4__OBJECT, NULL, Library_corlib_native_System_String::get_Chars___CHAR__I4, @@ -994,6 +1003,7 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + NULL, Library_corlib_native_System_Convert::ToBase64String___STATIC__STRING__SZARRAY_U1__I4__I4__BOOLEAN, NULL, NULL, @@ -1054,6 +1064,7 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + NULL, Library_corlib_native_System_Double::CompareTo___STATIC__I4__R8__R8, Library_corlib_native_System_Double::IsInfinity___STATIC__BOOLEAN__R8, Library_corlib_native_System_Double::IsNaN___STATIC__BOOLEAN__R8, @@ -1222,6 +1233,13 @@ static const CLR_RT_MethodHandler method_lookup[] = NULL, NULL, NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, Library_corlib_native_System_String::CompareTo___I4__OBJECT, NULL, Library_corlib_native_System_String::get_Chars___CHAR__I4, @@ -1483,11 +1501,17 @@ const CLR_RT_NativeAssemblyData g_CLR_AssemblyNative_mscorlib = "mscorlib", #if (NANOCLR_REFLECTION == TRUE) - 0xE69C4858, + + 0xDCB6AEBA, + +#elif (NANOCLR_REFLECTION == FALSE) + + 0x7E26EC5E, + #else - 0xCE9CF574, +#error "NANOCLR_REFLECTION has to be define either TRUE or FALSE. Check the build options." #endif method_lookup, - { 100, 4, 3, 0 } + { 100, 4, 5, 0 } };
vere: skip SIGINFO on linux (unavailable)
@@ -556,6 +556,7 @@ _king_sign_init(void) // handle SIGINFO (if available) // +#ifndef U3_OS_linux { u3_usig* sig_u; @@ -566,6 +567,7 @@ _king_sign_init(void) sig_u->nex_u = u3_Host.sig_u; u3_Host.sig_u = sig_u; } +#endif // handle SIGUSR1 (fallback for SIGINFO) // @@ -608,8 +610,12 @@ _king_sign_cb(uv_signal_t* sil_u, c3_i num_i) break; } - case SIGUSR1: - case SIGINFO: { + // fallthru if defined + // +#ifndef U3_OS_linux + case SIGINFO: +#endif + case SIGUSR1: { u3_king_info(); break; }
compat: mingw: make smoke test use the same parameters as urbit-tests
@@ -136,4 +136,4 @@ jobs: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} - run: make build/urbit build/urbit-worker - - run: build/urbit -d -B ../../bin/brass.pill -F zod && curl -f --data '{"source":{"dojo":"+hood/exit"},"sink":{"app":"hood"}}' http://localhost:12321 + - run: build/urbit -l -d -B ../../bin/solid.pill -F bus && curl -f --data '{"source":{"dojo":"+hood/exit"},"sink":{"app":"hood"}}' http://localhost:12321
nimble/ll: Rename BLE_DEVICE to BLE_CONTROLLER BLE_CONTROLLER better describes the function of this syscfg setting and fits better with BLE_HOST. Also BLE_LP_CLOCK is redundant.
# syscfg.defs: - BLE_DEVICE: - description: > - Used by package management system to include BLE hardware - drivers. - value: 1 - - BLE_LP_CLOCK: + BLE_CONTROLLER: description: > - Used by BSP packages to configure LP clock for controller. + Indicates that NimBLE controller is present. The default value for + this setting shall not be overriden. value: 1 BLE_HW_WHITELIST_ENABLE: @@ -303,6 +298,16 @@ syscfg.defs: Sysinit stage for the NimBLE controller. value: 250 +# defunct settings (to be removed eventually) + BLE_DEVICE: + description: Superseded by BLE_CONTROLLER + value: 1 + defunct: 1 + BLE_LP_CLOCK: + description: Superseded by BLE_CONTROLLER + value: 1 + defunct: 1 + syscfg.vals.BLE_LL_CFG_FEAT_LL_EXT_ADV: BLE_LL_CFG_FEAT_LE_CSA2: 1 BLE_HW_WHITELIST_ENABLE: 0
Fixing link in hardware/README.md
@@ -7,7 +7,7 @@ source <xilinx_root>/Vivado/<version>/settings64.sh export XILINXD_LICENSE_FILE=<pointer to Xilinx license> ``` -The SNAP make process is internally defining a variable `${SNAP_ROOT}` which is pointing to SNAP's [root directory](..). +The SNAP make process is internally defining a variable `${SNAP_ROOT}` which is pointing to SNAP's [root directory](https://github.com/open-power/snap). From now on we will use this variable in the notation of file names. ## snap_config
Remove optionality from --sao SAO parameter was optional which caused that if one wants to pass argument one needs to use "=" which is confusing since this is not required for any other parameter
@@ -47,7 +47,7 @@ static const struct option long_options[] = { { "input-fps", required_argument, NULL, 0 }, { "deblock", required_argument, NULL, 0 }, { "no-deblock", no_argument, NULL, 0 }, - { "sao", optional_argument, NULL, 0 }, + { "sao", required_argument, NULL, 0 }, { "no-sao", no_argument, NULL, 0 }, { "rdoq", no_argument, NULL, 0 }, { "no-rdoq", no_argument, NULL, 0 },
stale: don't limit to issues
@@ -28,10 +28,10 @@ staleLabel: stale # Comment to post when marking as stale. Set to `false` to disable markComment: > - I mark this issue stale as it did not have any activity for one year. + I mark this stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. - If you want it to be alive again, ping the issue by writing a message here - or create a new issue with the remainder of this issue. + If you want it to be alive again, ping by writing a message here + or create a new issue/PR with the remainder of this issue/PR. Thank you for your contributions :sparkling_heart: @@ -41,9 +41,9 @@ markComment: > # Comment to post when closing a stale Issue or Pull Request. closeComment: > - I closed this issue now because it has been inactive for more than one year. + I closed this now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it - or create a new issue with the remainder of this issue. + or create a new issue/PR with the remainder of this issue/PR. Thank you for your contributions :sparkling_heart: @@ -51,7 +51,7 @@ closeComment: > limitPerRun: 5 # Limit to only `issues` or `pulls` -only: issues +#only: issues # Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': # pulls:
TestsUser/DiskImage: Adapt to library changes.
@@ -56,12 +56,12 @@ int main (int argc, char *argv[]) { continue; } - EFI_STATUS Status; + BOOLEAN Result; OC_APPLE_DISK_IMAGE_CONTEXT *DmgContext; - Status = OcAppleDiskImageInitializeContext (Dmg, DmgSize, &DmgContext); - if (EFI_ERROR (Status)) { - printf ("Context initialization error %zx\n", Status); + Result = OcAppleDiskImageInitializeContext (Dmg, DmgSize, &DmgContext); + if (!Result) { + printf ("Context initialization error\n"); continue; } @@ -72,19 +72,15 @@ int main (int argc, char *argv[]) { continue; } - Status = OcAppleDiskImageRead (DmgContext, 0, UncompSize, UncompDmg); - if (EFI_ERROR (Status)) { - printf ("DMG read error %zx\n", Status); + Result = OcAppleDiskImageRead (DmgContext, 0, UncompSize, UncompDmg); + if (!Result) { + printf ("DMG read error\n"); continue; } printf ("Decompressed the entire DMG...\n"); - Status = OcAppleDiskImageFreeContext (DmgContext); - if (EFI_ERROR (Status)) { - printf ("Context destruction error %zx\n", Status); - continue; - } + OcAppleDiskImageFreeContext (DmgContext); printf ("Success...\n"); }
fixing go tests
@@ -19,14 +19,7 @@ post-clean: $(Q) $(RM) -f $(BINARY_NAME) image ../runtime/soop.data deps: - $(GOGET) github.com/spf13/cobra - $(GOGET) github.com/vishvananda/netlink - $(GOGET) github.com/jstemmer/go-junit-report - $(GOGET) github.com/d2g/dhcp4 - $(GOGET) github.com/d2g/dhcp4client - $(GOGET) github.com/go-errors/errors - $(GOGET) github.com/cheggaaa/pb - $(GOGET) github.com/nanovms/ops/lepton + GO111MODULE=on $(GOGET) github.com/nanovms/ops/lepton .PHONY: build test clean deps
remove frame control options
@@ -868,9 +868,6 @@ void retro_set_environment(retro_environment_t cb) { "np2_clk_mult" , "CPU Clock Multiplier (Restart); 4|5|6|8|10|12|16|20|24|30|36|40|42|1|2" }, { "np2_ExMemory" , "RAM Size (Restart); 3|7|11|13|16|32|64|120|230|1" }, { "np2_gdc" , "GDC; uPD7220|uPD72020" }, - { "np2_dispsync" , "Disp Vsync; ON|OFF" }, - { "np2_nowait" , "No Wait; OFF|ON" }, - { "np2_drawskip" , "Frame Skip; Auto|60fps|30fps|20fps|15fps" }, { "np2_skipline" , "Skipline Revisions; Full 255 lines|ON|OFF" }, { "np2_realpal" , "Real Palettes; OFF|ON" }, { "np2_lcd" , "LCD; OFF|ON" }, @@ -977,18 +974,6 @@ static void update_variables(void) scrndraw_redraw(); } - var.key = "np2_dispsync"; - var.value = NULL; - - if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) - { - if (strcmp(var.value, "OFF") == 0) - np2cfg.DISPSYNC = 0; - else - np2cfg.DISPSYNC = 1; - sysmng_update(SYS_UPDATECFG); - } - var.key = "np2_realpal"; var.value = NULL; @@ -1001,36 +986,6 @@ static void update_variables(void) sysmng_update(SYS_UPDATECFG); } - var.key = "np2_nowait"; - var.value = NULL; - - if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) - { - if (strcmp(var.value, "OFF") == 0) - np2oscfg.NOWAIT = 0; - else - np2oscfg.NOWAIT = 1; - sysmng_update(SYS_UPDATEOSCFG); - } - - var.key = "np2_drawskip"; - var.value = NULL; - - if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) - { - if (strcmp(var.value, "Auto") == 0) - np2oscfg.DRAW_SKIP = 0; - else if (strcmp(var.value, "60fps") == 0) - np2oscfg.DRAW_SKIP = 1; - else if (strcmp(var.value, "30fps") == 0) - np2oscfg.DRAW_SKIP = 2; - else if (strcmp(var.value, "20fps") == 0) - np2oscfg.DRAW_SKIP = 3; - else if (strcmp(var.value, "15fps") == 0) - np2oscfg.DRAW_SKIP = 4; - sysmng_update(SYS_UPDATEOSCFG); - } - var.key = "np2_SNDboard"; var.value = NULL;
Fix access to the uninitialized variable database
@@ -2169,6 +2169,25 @@ InitPlan(QueryDesc *queryDesc, int eflags) estate->es_evTuple = NULL; estate->es_useEvalPlan = false; + /* + * In QD, we need to initialize the variable database before + * ExecInitNode(), that makes us can access the database + * correctly in places such as magma_beginscan(), + * magma_insertinit(). + * + * In contrast, if we are in QE, we don't need to do this since + * RebuildDatabase() ensures that the database is initialized. + * + * An example of the uninitialized database: + * prepare select_by_id(int) as select * from t where id = 1; + * execute select_by_id(1); <- uninitialized when we are in + * magma_beginscan() + */ + if (Gp_role == GP_ROLE_DISPATCH) + { + database = get_database_name(MyDatabaseId); + } + /* * Initialize the private state information for all the nodes in the query * tree. This opens files, allocates storage and leaves us ready to start
Fix test_french_charref_decimal() to work for
@@ -689,8 +689,14 @@ START_TEST(test_french_charref_decimal) const char *text = "<?xml version='1.0' encoding='iso-8859-1'?>\n" "<doc>&#233;&#232;&#224;&#231;&#234;&#200;</doc>"; - run_character_check(text, - "\xC3\xA9\xC3\xA8\xC3\xA0\xC3\xA7\xC3\xAA\xC3\x88"); +#ifdef XML_UNICODE + const XML_Char *expected = + XCS("\x00e9\x00e8\x00e0\x00e7\x00ea\x00c8"); +#else + const XML_Char *expected = + XCS("\xC3\xA9\xC3\xA8\xC3\xA0\xC3\xA7\xC3\xAA\xC3\x88"); +#endif + run_character_check(text, expected); } END_TEST
Tweak module/add-paths docstring
(defn module/add-paths ``` - Add paths to module/paths for a given loader such that + Add paths to `module/paths` for a given loader such that the generated paths behave like other module types, including - relative imports and syspath imports. ext is the file extension - to associate with this module type, including the dot. loader is the - keyword name of a loader that is module/loaders. Returns the modified module/paths. + relative imports and syspath imports. `ext` is the file extension + to associate with this module type, including the dot. `loader` is the + keyword name of a loader in `module/loaders`. Returns the modified `module/paths`. ``` [ext loader] (defn- find-prefix
advanced_https_ota: Remove check for CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK for validating image. Image should be validated even if CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is enabled
@@ -197,7 +197,7 @@ void app_main(void) */ ESP_ERROR_CHECK(example_connect()); -#if defined(CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE) && defined(CONFIG_BOOTLOADER_APP_ANTI_ROLLBACK) +#if defined(CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE) /** * We are treating successful WiFi connection as a checkpoint to cancel rollback * process and mark newly updated firmware image as active. For production cases,
removed extra parameter not being used in print flist distribution
@@ -335,7 +335,7 @@ static int distribution_gather(struct distribute_option *option, int rank, mfu_f #define DISTRIBUTE_KEY_SIZE 1 static int print_flist_distribution(struct distribute_option *option, mfu_flist* pflist, - int rank, int ranks) + int rank) { /* file list to use */ @@ -715,7 +715,7 @@ int main(int argc, char** argv) print_summary(flist); if (distribution != NULL) { - print_flist_distribution(&option, &flist, rank, ranks); + print_flist_distribution(&option, &flist, rank); } /* write data to cache file */
[core] restart dead proc on connect error if local restart dead proc on connect error only if proc started by lighttpd
@@ -2117,9 +2117,11 @@ static handler_t gw_write_error(gw_handler_ctx * const hctx, request_st * const /* (optimization to detect backend process exit while processing a * large number of ready events; (this block could be removed)) */ + if (hctx->proc && hctx->proc->is_local) { server * const srv = r->con->srv; if (0 == srv->srvconf.max_worker) gw_restart_dead_procs(hctx->host,srv->errh,hctx->conf.debug,0); + } /* cleanup this request and let request handler start request again */ if (hctx->reconnects++ < 5) return gw_reconnect(hctx, r);
new binary for ya tool app_host and doc fixes
}, "app_host": { "formula": { - "sandbox_id": 588757366, + "sandbox_id": 590215987, "match": "app_host_launcher" }, "executable": {
test: do cleanup before running check_import
@@ -22,6 +22,9 @@ exit_if_fail "For export/import /dev must be mounted" [ -e /dev/stdout ] exit_if_fail "For export/import /dev must be mounted" +"$KDB" rm -r $ROOT +"$KDB" rm $SIDE + for PLUGIN in $PLUGINS; do if is_not_rw_storage; then echo "-- $PLUGIN not a read-write storage"
temporary disable Android filesystem javascript layer in Node.js code
@@ -21,7 +21,7 @@ JXmobile.prototype.call = function () { return this; }; -var isAndroid = process.platform == "android"; +var isAndroid = false; //process.platform == "android"; global.Mobile = JXmobile;
bootutil: Support trailers larger than sector size for swap scratch
@@ -490,6 +490,7 @@ boot_swap_sectors(int idx, uint32_t sz, struct boot_loader_state *state, const struct flash_area *fap_scratch; uint32_t copy_sz; uint32_t trailer_sz; + uint32_t sector_sz; uint32_t img_off; uint32_t scratch_trailer_off; struct boot_swap_state swap_state; @@ -514,6 +515,21 @@ boot_swap_sectors(int idx, uint32_t sz, struct boot_loader_state *state, * controls if special handling is needed (swapping last sector). */ last_sector = boot_img_num_sectors(state, BOOT_PRIMARY_SLOT) - 1; + sector_sz = boot_img_sector_size(state, BOOT_PRIMARY_SLOT, last_sector); + + if (sector_sz < trailer_sz) { + uint32_t trailer_sector_sz = sector_sz; + + while (trailer_sector_sz < trailer_sz) { + /* Consider that the image trailer may span across sectors of + * different sizes. + */ + sector_sz = boot_img_sector_size(state, BOOT_PRIMARY_SLOT, --last_sector); + + trailer_sector_sz += sector_sz; + } + } + if ((img_off + sz) > boot_img_sector_off(state, BOOT_PRIMARY_SLOT, last_sector)) { copy_sz -= trailer_sz;
Remove tests for transients is_efas
@@ -22,31 +22,28 @@ temp3=temp3.$label.grib # Create a starting GRIB with a basic local definition for MARS ${tools_dir}/grib_set -s tablesVersion=19,setLocalDefinition=1,stream=efas $ECCODES_SAMPLES_PATH/GRIB2.tmpl $sample -# Check is_efas key -grib_check_key_equals $sample is_efas 0 - # Test a non-ensemble, instantaneous field ${tools_dir}/grib_set -s productDefinitionTemplateNumber=0 $sample $temp1 ${tools_dir}/grib_set -s setLocalDefinition=1,localDefinitionNumber=41 $temp1 $temp2 -grib_check_key_equals $temp2 is_efas,productDefinitionTemplateNumber '1 70' +grib_check_key_equals $temp2 productDefinitionTemplateNumber '70' grib_check_key_exists $temp2 isFillup,dateOfForecast,timeOfForecast,anoffset # Test an ensemble, instantaneous field ${tools_dir}/grib_set -s productDefinitionTemplateNumber=1,number=13 $sample $temp1 ${tools_dir}/grib_set -s setLocalDefinition=1,localDefinitionNumber=41 $temp1 $temp2 -grib_check_key_equals $temp2 is_efas,number,productDefinitionTemplateNumber '1 13 71' +grib_check_key_equals $temp2 number,productDefinitionTemplateNumber '13 71' # Test a non-ensemble, non-instantaneous field ${tools_dir}/grib_set -s productDefinitionTemplateNumber=8,stepType=accum $sample $temp1 ${tools_dir}/grib_set -s setLocalDefinition=1,localDefinitionNumber=41 $temp1 $temp2 -grib_check_key_equals $temp2 is_efas,productDefinitionTemplateNumber,typeOfStatisticalProcessing '1 72 1' +grib_check_key_equals $temp2 productDefinitionTemplateNumber,typeOfStatisticalProcessing '72 1' # Test an ensemble, non-instantaneous field (plus mars.origin tests) ${tools_dir}/grib_set -s productDefinitionTemplateNumber=11,stepType=accum $sample $temp1 ${tools_dir}/grib_set -s \ setLocalDefinition=1,localDefinitionNumber=41,type=pf,inputOriginatingCentre=ecmf,typeOfPostProcessing=1 \ $temp1 $temp2 -grib_check_key_equals $temp2 is_efas,productDefinitionTemplateNumber,typeOfStatisticalProcessing '1 73 1' +grib_check_key_equals $temp2 productDefinitionTemplateNumber,typeOfStatisticalProcessing '73 1' grib_check_key_equals $temp2 mars.origin 'ecmf' grib_check_key_equals $temp2 mars.model 'lisflood' @@ -57,10 +54,10 @@ grib_check_key_equals $temp2 mars.model 'geff' # Parameter tests ${tools_dir}/grib_set -s paramId=260267 $temp2 $temp3 -grib_check_key_equals $temp3 paramId,is_efas,lengthOfTimeRange '260267 1 6' +grib_check_key_equals $temp3 paramId,lengthOfTimeRange '260267 6' ${tools_dir}/grib_set -s paramId=260268 $temp2 $temp3 -grib_check_key_equals $temp3 paramId,is_efas,lengthOfTimeRange '260268 1 24' +grib_check_key_equals $temp3 paramId,lengthOfTimeRange '260268 24' # Use stepType ${tools_dir}/grib_set -s localDefinitionNumber=41,stepType=accum $sample $temp1
remove cmake from package requirements because we now require a source build of cmake. Add mesa requirement because vdi now needs #include <GL/glx.h>. Please check what the actual package name is on Suse. I guessed it was same as redhat
#### Debian or Ubuntu Packages ``` - sudo apt-get install cmake g++-5 g++-7 pkg-config libpci-dev libnuma-dev libelf-dev libffi-dev git python libopenmpi-dev gawk + sudo apt-get install g++-5 g++-7 pkg-config libpci-dev libnuma-dev libelf-dev libffi-dev git python libopenmpi-dev gawk mesa-common-dev # Additional packages used by rocgdb sudo apt-get install python3 texinfo libbison-dev bison flex libbabeltrace-dev python3-pip libncurses5-dev liblzma-dev python3-setuptools python3-dev #### SLES-15-SP1 Packages ``` - sudo zypper install -y git pciutils-devel cmake python-base libffi-devel gcc gcc-c++ libnuma-devel libelf-devel patchutils openmpi2-devel + sudo zypper install -y git pciutils-devel python-base libffi-devel gcc gcc-c++ libnuma-devel libelf-devel patchutils openmpi2-devel mesa-libGL-devel # Additional packages used by rocgdb sudo zypper install -y texinfo bison flex babeltrace-devel python3 python3-pip python3-devel python3-setuptools makeinfo ncurses-devel libexpat-devel xz-devel @@ -31,7 +31,7 @@ https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/<br> <b>The build_aomp.sh script will automatically enable devtoolset-7 if found in /opt/rh/devtoolset-7/enable. If you want to build an individual component you will need to manually start devtoolset-7 from the instructions above.</b><br> ``` - sudo yum install cmake3 pciutils-devel numactl-devel libffi-devel + sudo yum install pciutils-devel numactl-devel libffi-devel mesa-libGL-devel # Additional packages used by rocgdb sudo yum install texinfo bison flex ncurses-devel.x86_64 expat-devel.x86_64 xz-devel.x86_64 libbabeltrace-devel.x86_64 @@ -50,13 +50,10 @@ RHEL 7.7 and later RHEL 7 versions python3 -m pip install CppHeaderParser argparse wheel ``` -The build scripts use cmake, so we need to link cmake --> cmake3 in /usr/bin -``` - sudo ln -s /usr/bin/cmake3 /usr/bin/cmake -``` -2. Build CMake 3.13.4 in /usr/local/cmake -The default for the AOMP_CMAKE variable is /usr/local/cmake/bin/cmake. -Use these commands to install cmake 3.13.4 from source into /usr/local/cmake. + +### 2. Build CMake 3.13.4 in /usr/local/cmake + +We have seen problems with newer versions of cmake. We have only verified version 3.13.4 for the various component builds necessary for aomp. All invocations of cmake in the build scripts use $AOMP_CMAKE. The default for the AOMP_CMAKE variable is /usr/local/cmake/bin/cmake. Use these commands to install cmake 3.13.4 from source into /usr/local/cmake. ``` $ sudo apt-get install libssl-dev
acrn-config: add RDT configurable item for QEMU sdc xml add RDT configurable item for QEMU sdc xml Acked-by: Victor Sun
<RELOC desc="Enable hypervisor relocation">y</RELOC> <SCHEDULER desc="The CPU scheduler to be used by the hypervisor.">SCHED_BVT</SCHEDULER> <MULTIBOOT2 desc="Support boot ACRN from multiboot2 protocol.">y</MULTIBOOT2> + <RDT desc="Intel RDT (Resource Director Technology)."> + <RDT_ENABLED desc="Enable RDT">n</RDT_ENABLED> + <CDP_ENABLED desc="CDP (Code and Data Prioritization). CDP is an extension of CAT.">n</CDP_ENABLED> + </RDT> <HYPERV_ENABLED desc="Enable Hyper-V enlightenment">y</HYPERV_ENABLED> <IOMMU_ENFORCE_SNP desc="IOMMU enforce snoop behavior of DMA operation.">n</IOMMU_ENFORCE_SNP> <ACPI_PARSE_ENABLED desc="Enable ACPI runtime parsing.">y</ACPI_PARSE_ENABLED>
qlog: support the max stream frame type
@@ -87,6 +87,17 @@ def handle_max_data_send(event): "maximum": event["limit"] } +def handle_max_streams_send(event): + if event["is-unidirectional"]: + stream_type = "unidirectional" + else: + stream_type = "bidirectional" + return { + "frame_type": "max_streams", + "stream_type": stream_type, + "maximum": event["limit"] + } + def handle_max_stream_data_receive(event): return { "frame_type": "max_stream_data", @@ -185,6 +196,7 @@ FRAME_EVENT_HANDLERS = { "handshake-done-send": handle_handshake_done_send, "max-data-receive": handle_max_data_receive, "max-data-send": handle_max_data_send, + "max-streams-send": handle_max_streams_send, "max-stream-data-receive": handle_max_stream_data_receive, "max-stream-data-send": handle_max_stream_data_send, "new-connection-id-receive": handle_new_connection_id_receive,
unix/mpconfigport_coverage: Enable ure groups, span, start, end and sub.
#define MICROPY_PY_URANDOM_EXTRA_FUNCS (1) #define MICROPY_PY_IO_BUFFEREDWRITER (1) #define MICROPY_PY_IO_RESOURCE_STREAM (1) +#define MICROPY_PY_URE_MATCH_GROUPS (1) +#define MICROPY_PY_URE_MATCH_SPAN_START_END (1) +#define MICROPY_PY_URE_SUB (1) #define MICROPY_VFS_POSIX (1) #undef MICROPY_VFS_FAT #define MICROPY_VFS_FAT (1)
Added /var/run/appscope/appscope.sock as the first option for edge.
@@ -769,8 +769,15 @@ cfgMtcVerbositySetFromStr(config_t* cfg, const char* value) cfgMtcVerbositySet(cfg, x); } +#define EDGE_PATH "/var/run/appscope/appscope.sock" static char* cfgEdgePath(void){ + // 1) If EDGE_PATH can be accessed, return that. + if (g_fn.access(EDGE_PATH, R_OK|W_OK) == 0) { + return strdup(EDGE_PATH); + } + + // 2) If CRIBL_HOME is defined, return $CRIBL_HOME/state/appscope.sock const char *cribl_home = getenv("CRIBL_HOME"); if (cribl_home) { char new_path[PATH_MAX]; @@ -779,6 +786,7 @@ cfgEdgePath(void){ return realpath(new_path, NULL); } } + // 3) Otherwise, return /opt/cribl/state/appscope.sock return strdup("/opt/cribl/state/appscope.sock"); }
sse2: add NEON implementation of simde_mm_load{,u}_pd
@@ -2999,7 +2999,9 @@ simde_mm_load_pd (simde_float64 const mem_addr[HEDLEY_ARRAY_PARAM(2)]) { #else simde__m128d_private r_; - #if defined(SIMDE_ARM_NEON_A32V7_NATIVE) + #if defined(SIMDE_ARM_NEON_A64V8_NATIVE) + r_.neon_f64 = vld1q_f64(mem_addr); + #elif defined(SIMDE_ARM_NEON_A32V7_NATIVE) r_.neon_u32 = vld1q_u32(HEDLEY_REINTERPRET_CAST(uint32_t const*, mem_addr)); #else r_ = *SIMDE_ALIGN_CAST(simde__m128d_private const*, mem_addr); @@ -3171,6 +3173,8 @@ simde__m128d simde_mm_loadu_pd (simde_float64 const mem_addr[HEDLEY_ARRAY_PARAM(2)]) { #if defined(SIMDE_X86_SSE2_NATIVE) return _mm_loadu_pd(mem_addr); + #elif defined(SIMDE_ARM_NEON_A64V8_NATIVE) + return vld1q_f64(mem_addr); #else simde__m128d_private r_;
'in' is now a warning.
@@ -947,8 +947,10 @@ continue : Tcontinue forstmt : Tfor optexprln loopcond optexprln block {$$ = mkloopstmt($1->loc, $2, $3, $4, $5);} - | Tfor expr Tin exprln block - {$$ = mkiterstmt($1->loc, $2, $4, $5);} + | Tfor expr Tin exprln block { + $$ = mkiterstmt($1->loc, $2, $4, $5); + fprintf(stderr, "%s:%d: deprecated for syntax. use ':' to replace 'in'\n", fname($1->loc), lnum($1->loc)); + } | Tfor expr Tcolon exprln block {$$ = mkiterstmt($1->loc, $2, $4, $5);} | Tfor decl Tendln loopcond optexprln block {
fix crash in evhtp_unbind_socket when evlistener fails
@@ -767,6 +767,7 @@ htp__callback_find_(evhtp_callbacks_t * cbs, unsigned int * end_offset) { size_t path_len; + #ifndef EVHTP_DISABLE_REGEX regmatch_t pmatch[28]; #endif @@ -3691,6 +3692,11 @@ evhtp_send_reply_chunk_end(evhtp_request_t * request) void evhtp_unbind_socket(evhtp_t * htp) { + if (htp == NULL || htp->server == NULL) + { + return; + } + evhtp_safe_free(htp->server, evconnlistener_free); }
quic: handle duplicate packet from quicly Type: fix
@@ -500,10 +500,23 @@ quic_on_receive (quicly_stream_t * stream, size_t off, const void *src, max_enq = svm_fifo_max_enqueue_prod (f); QUIC_DBG (3, "Enqueuing %u at off %u in %u space", len, off, max_enq); - if (off - stream_data->app_rx_data_len + len > max_enq) + /* Handle duplicate packet/chunk from quicly */ + if (off < stream_data->app_rx_data_len) + { + QUIC_DBG (3, "Session [idx %u, app_wrk %u, thread %u, rx-fifo 0x%llx]: " + "DUPLICATE PACKET (max_enq %u, len %u, " + "app_rx_data_len %u, off %u, ToBeNQ %u)", + stream_session->session_index, + stream_session->app_wrk_index, + stream_session->thread_index, f, + max_enq, len, stream_data->app_rx_data_len, off, + off - stream_data->app_rx_data_len + len); + return 0; + } + if (PREDICT_FALSE ((off - stream_data->app_rx_data_len + len) > max_enq)) { QUIC_ERR ("Session [idx %u, app_wrk %u, thread %u, rx-fifo 0x%llx]: " - "RX fifo is full (max_enq %u, len %u, " + "RX FIFO IS FULL (max_enq %u, len %u, " "app_rx_data_len %u, off %u, ToBeNQ %u)", stream_session->session_index, stream_session->app_wrk_index,
fix(span) eliminate warning in lv_get_snippet_cnt()
@@ -59,7 +59,7 @@ static bool lv_txt_get_snippet(const char * txt, const lv_font_t * font, lv_coor uint32_t * end_ofs); static void lv_snippet_clear(void); -static uint16_t lv_get_snippet_cnt(); +static uint16_t lv_get_snippet_cnt(void); static void lv_snippet_push(lv_snippet_t * item); static lv_snippet_t * lv_get_snippet(uint16_t index); @@ -700,7 +700,7 @@ static void lv_snippet_push(lv_snippet_t * item) } } -static uint16_t lv_get_snippet_cnt() +static uint16_t lv_get_snippet_cnt(void) { return snippet_stack.index; }
doc: PG 13 relnotes: adjust partitioning items Reported-by: Amit Langote
@@ -271,6 +271,10 @@ Author: Tom Lane <[email protected]> Allow partitionwise joins to happen in more cases (Ashutosh Bapat, Etsuro Fujita, Amit Langote, Tom Lane) </para> +<para> +For example, partitionwise joins can now happen between partitioned +tables where the ancestors do not exactly match. +</para> </listitem> <listitem> @@ -303,7 +307,7 @@ Allow partitioned tables to be logically replicated via publications (Amit Lango <para> Previously, partitions had to be replicated individually. Now partitioned tables can be published explicitly causing all partitions to be automatically published. Addition/removal of partitions from -partitioned tables are automatically added/removed from publications. The CREATE PUBLICATION option publish_via_partition_root controls whether partitioned tables are published as themselves or their ancestors. +partitioned tables are automatically added/removed from publications. The CREATE PUBLICATION option publish_via_partition_root controls whether partitioned tables are published as their own or their ancestors. </para> </listitem> @@ -315,9 +319,12 @@ Author: Peter Eisentraut <[email protected]> --> <para> -Allow non-partitioned tables to be logically replicated to subscribers that receive the rows into partitioned tables (Amit Langote) +Allow logical replication into partitioned tables on subscribers (Amit Langote) </para> +<para> +Previously, subscribers could only receive rows into non-partitioned tables. +</para> </listitem> <listitem>
zephyr/shim/src/flash.c: Format with clang-format BRANCH=none TEST=none
@@ -167,8 +167,7 @@ uint32_t crec_flash_physical_get_writable_flags(uint32_t cur_flags) } #if IS_ENABLED(CONFIG_SHELL) -static int command_flashchip(const struct shell *shell, - size_t argc, +static int command_flashchip(const struct shell *shell, size_t argc, char **argv) { uint8_t manufacturer; @@ -177,23 +176,19 @@ static int command_flashchip(const struct shell *shell, uint8_t status2; int res; - res = cros_flash_physical_get_status(cros_flash_dev, - &status1, + res = cros_flash_physical_get_status(cros_flash_dev, &status1, &status2); if (!res) - shell_fprintf(shell, - SHELL_NORMAL, - "Status 1: 0x%02x, Status 2: 0x%02x\n", - status1, status2); + shell_fprintf(shell, SHELL_NORMAL, + "Status 1: 0x%02x, Status 2: 0x%02x\n", status1, + status2); - res = cros_flash_physical_get_jedec_id(cros_flash_dev, - &manufacturer, + res = cros_flash_physical_get_jedec_id(cros_flash_dev, &manufacturer, &device); if (!res) - shell_fprintf(shell, - SHELL_NORMAL, + shell_fprintf(shell, SHELL_NORMAL, "Manufacturer: 0x%02x, DID: 0x%04x\n", manufacturer, device);
remove conversion U32 -> S8 warnings using an inline U32ToS8() function
@@ -515,13 +515,17 @@ static WEBP_INLINE int ColorTransformDelta(int8_t color_pred, int8_t color) { return ((int)color_pred * color) >> 5; } +static WEBP_INLINE int8_t U32ToS8(uint32_t v) { + return (int8_t)(v & 0xff); +} + void VP8LTransformColor_C(const VP8LMultipliers* const m, uint32_t* data, int num_pixels) { int i; for (i = 0; i < num_pixels; ++i) { const uint32_t argb = data[i]; - const int8_t green = (argb >> 8) & 0xff; - const int8_t red = (argb >> 16) & 0xff; + const int8_t green = U32ToS8(argb >> 8); + const int8_t red = U32ToS8(argb >> 16); int new_red = red & 0xff; int new_blue = argb & 0xff; new_red -= ColorTransformDelta(m->green_to_red_, green); @@ -535,7 +539,7 @@ void VP8LTransformColor_C(const VP8LMultipliers* const m, uint32_t* data, static WEBP_INLINE uint8_t TransformColorRed(uint8_t green_to_red, uint32_t argb) { - const int8_t green = (argb >> 8) & 0xff; + const int8_t green = U32ToS8(argb >> 8); int new_red = argb >> 16; new_red -= ColorTransformDelta(green_to_red, green); return (new_red & 0xff); @@ -544,8 +548,8 @@ static WEBP_INLINE uint8_t TransformColorRed(uint8_t green_to_red, static WEBP_INLINE uint8_t TransformColorBlue(uint8_t green_to_blue, uint8_t red_to_blue, uint32_t argb) { - const int8_t green = (argb >> 8) & 0xff; - const int8_t red = (argb >> 16) & 0xff; + const int8_t green = U32ToS8(argb >> 8); + const int8_t red = U32ToS8(argb >> 16); uint8_t new_blue = argb & 0xff; new_blue -= ColorTransformDelta(green_to_blue, green); new_blue -= ColorTransformDelta(red_to_blue, red);
netutils/webclient: check the request argument Do an initial check on the argument of request in client_send_request function to avoid possible segmentation faults.
@@ -1245,6 +1245,11 @@ int client_send_request(struct http_client_request_t *request) pthread_t tid; pthread_addr_t ret = NULL; + if (request == NULL) { + printf("Error: Request is null\n"); + goto errret; + } + if (request->method < WGET_MODE_GET || request->method > WGET_MODE_DELETE) { printf("Error: Incorrect method value!!\n"); goto errret;
CMSIS-DSP: Improved test framework Improved measurement calibration when cached used on Cortex-A
#include "arm_math.h" #include "Calibrate.h" +#ifdef CORTEXA +#define CALIBNB 1 +#else #define CALIBNB 20 +#endif + namespace Client { IORunner::IORunner(IO *io,PatternMgr *mgr, Testing::RunningMode runningMode):m_io(io), m_mgr(mgr) { - Testing::cycles_t current; + volatile Testing::cycles_t current; this->m_runningMode = runningMode; // Set running mode on PatternMgr. @@ -102,6 +107,49 @@ Indeed, in that case the calibration value can only be measured by parsing the t Otherwise, the calibration is measured below. +*/ + +/* + +We want to ensure that the calibration of the overhead of the +measurement is the same here and when we do the measurement later. + +So to ensure the conditions are always the same, the instruction cache +and branch predictor are flushed. + +*/ +#ifdef CORTEXA + __set_BPIALL(0); + __DSB(); + __ISB(); + + __set_ICIALLU(0); + __DSB(); + __ISB(); +#endif + +/* + +We always call the empty function once to ensure it is in the cache +because it is how the measurement is done. + +*/ + if (!m_mgr->HasMemError()) + { + (s->*t)(); + } + +/* + +We measure the cycles required for a measurement, +The cycleMeasurement starts, getCycles and cycleMeasurementStop +should not be in the cache. + +So, for the overhead we always have the value corresponding to +the code not in cache. + +While for the code itself we have the value for the code in cache. + */ for(int i=0;i < CALIBNB;i++) { @@ -123,7 +171,6 @@ Otherwise, the calibration is measured below. #ifndef EXTBENCH calibration=calibration / CALIBNB; #endif - } // Testing. @@ -151,7 +198,7 @@ Otherwise, the calibration is measured below. Testing::errorID_t error=0; unsigned long line = 0; char details[200]; - Testing::cycles_t cycles=0; + volatile Testing::cycles_t cycles=0; Testing::nbParameters_t nbParams; // Read node identification (suite) @@ -218,6 +265,15 @@ Otherwise, the calibration is measured below. // Run the test once to force the code to be in cache. // By default it is disabled in the suite. +#ifdef CORTEXA + __set_BPIALL(0); + __DSB(); + __ISB(); + + __set_ICIALLU(0); + __DSB(); + __ISB(); +#endif if (s->isForcedInCache()) { if (!m_mgr->HasMemError())
+on-wake compiles
on-hear-open :: +on-hear-forward: maybe forward a packet to someone else :: + :: TODO: filter for transitive closure of sponsors/sponsees. + :: ++ on-hear-forward |= [=lane =packet] ^+ event-core == :: event-core - :: + :: +on-hear-shut: handle receipt of encrypted packet :: ++ on-hear-shut |= [=lane =packet] =- ?>(?=(%known -<) ->) (~(got by peers.ames-state) her) :: - =/ channel [[our her] now +>.ames-state -.peer-state] + =/ =channel [[our her] now +>.ames-state -.peer-state] :: abet:(on-memo:(make-peer-core peer-state channel) bone message) :: +on-memo: handle request to send message |= [=ship =message] ^+ event-core :: - =/ rcvr-state (~(get by peers.ames-state) ship) + =/ ship-state (~(get by peers.ames-state) ship) :: - ?. ?=([~ %known *] rcvr-state) + ?. ?=([~ %known *] ship-state) (enqueue-alien-message ship message) :: - =/ =peer-state +.u.rcvr-state + =/ =peer-state +.u.ship-state =/ =channel [[our ship] now +>.ames-state -.peer-state] :: =^ =bone ossuary.peer-state (get-bone ossuary.peer-state duct) |= [=wire error=(unit tang)] ^+ event-core :: - !! + =+ ^- [her=ship =bone] (parse-pump-timer-wire wire) + :: + =/ =peer-state + =- ?>(?=(%known -<) ->) + (~(got by peers.ames-state) her) + :: + =/ =channel [[our her] now +>.ames-state -.peer-state] + :: + abet:(on-wake:(make-peer-core peer-state channel) bone error) :: +make-peer-core: create nested |peer-core for per-peer processing :: ++ make-peer-core ^+ peer-core :: (run-message-pump bone %send message) + :: +on-wake: handle timer expiration + :: + ++ on-wake + |= [=bone error=(unit tang)] + ^+ peer-core + :: TODO: handle error + :: + ?^ error + !! + (run-message-pump bone %wake ~) :: +run-message-pump: process $message-pump-task and its effects :: ++ run-message-pump =/ =blob (encode-packet packet) :: send to .her and her sponsors until we find a direct lane :: + :: Skip receivers for whom we have no lane, possibly including + :: .her. + :: =/ rcvrs=(list ship) [her her-sponsors]:channel :: |- ^+ peer-core
Add default support for I2C and PWM IOs. Default generator now supports I2C and PWM periphery blocks.
@@ -19,6 +19,8 @@ class DigitalTop(implicit p: Parameters) extends ChipyardSystem with testchipip.CanHaveBackingScratchpad // Enables optionally adding a backing scratchpad with testchipip.CanHavePeripheryBlockDevice // Enables optionally adding the block device with testchipip.CanHavePeripheryTLSerial // Enables optionally adding the backing memory and serial adapter + with sifive.blocks.devices.i2c.HasPeripheryI2C // Enables optionally adding the sifive I2C + with sifive.blocks.devices.pwm.HasPeripheryPWM // Enables optionally adding the sifive PWM with sifive.blocks.devices.uart.HasPeripheryUART // Enables optionally adding the sifive UART with sifive.blocks.devices.gpio.HasPeripheryGPIO // Enables optionally adding the sifive GPIOs with sifive.blocks.devices.spi.HasPeripherySPIFlash // Enables optionally adding the sifive SPI flash controller @@ -35,6 +37,8 @@ class DigitalTop(implicit p: Parameters) extends ChipyardSystem class DigitalTopModule[+L <: DigitalTop](l: L) extends ChipyardSystemModule(l) with testchipip.CanHaveTraceIOModuleImp + with sifive.blocks.devices.i2c.HasPeripheryI2CModuleImp + with sifive.blocks.devices.pwm.HasPeripheryPWMModuleImp with sifive.blocks.devices.uart.HasPeripheryUARTModuleImp with sifive.blocks.devices.gpio.HasPeripheryGPIOModuleImp with sifive.blocks.devices.spi.HasPeripherySPIFlashModuleImp
iotjs: Fix (re)connected status in callback Note: TizenRT wifi manager "attempt" callback name missleaded me, maybe it could be renamed. Forwarded:
@@ -54,7 +54,8 @@ static void iotjs_startup_wifi_connect(void); static void iotjs_startup_wifi_sta_connected(wifi_manager_result_e status) { printf("log: %s status=0x%x\n", __FUNCTION__, status); - g_is_connected = true; + g_is_connected = ((status == WIFI_MANAGER_SUCCESS) || + (status == WIFI_MANAGER_ALREADY_CONNECTED)); } static void iotjs_startup_wifi_sta_disconnected(wifi_manager_disconnect_e status)
CFramework: Support comparison of empty key sets
@@ -233,7 +233,8 @@ int init (int argc, char ** argv); nbTest++; \ KeySet * mmks1 = (KeySet *) pks1; \ KeySet * mmks2 = (KeySet *) pks2; \ - if (mmks1 != mmks2) \ + int bothEmpty = ksGetSize (mmks1) == 0 && ksGetSize (mmks1) == ksGetSize (mmks2); \ + if (mmks1 != mmks2 && !bothEmpty) \ { \ Key * cmmk1 = 0; \ Key * cmmk2 = 0; \
update resultinfo structure
@@ -92,7 +92,7 @@ def parseData(): a = open("map_thegame.txt", "r") beatmap_info = eval(a.read()) - Info = namedtuple("Info", "time combo combostatus showscore score accuracy clicks hitresult timestamp more") + Info = namedtuple("Info", "time combo combostatus showscore score accuracy clicks hitresult timestamp id more") Circle = namedtuple("Circle", "state deltat followstate sliderhead x y") Slider = namedtuple("Slider", "followstate hitvalue tickend x y") Spinner = namedtuple("Spinner", "rotate progress bonusscore hitvalue")
sim/video: call validate_buf when set_buf
@@ -190,6 +190,11 @@ static int sim_video_data_validate_buf(uint8_t *addr, uint32_t size) static int sim_video_data_set_buf(uint8_t *addr, uint32_t size) { + if (sim_video_data_validate_buf(addr, size) < 0) + { + return -EINVAL; + } + g_sim_video_priv.next_buf = addr; g_sim_video_priv.buf_size = size; return 0;
fpgainfo: fix N5010 subvendor id to allow board plugin to be loaded The existing N5010/N5011 board images have subvendor id = 0. As checking subvendor and subdevice id has been added, the table must match.
@@ -57,12 +57,6 @@ static pthread_mutex_t board_plugin_lock = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_N // Board plug-in table static platform_data platform_data_table[] = { - { 0x1c2c, 0x1000, 0x1c2c, 0x0, -1, "libboard_n5010.so", NULL, - "Silicom FPGA SmartNIC N5010 Series" }, - - { 0x1c2c, 0x1001, 0x1c2c, 0x0, -1, "libboard_n5010.so", NULL, - "Silicom FPGA SmartNIC N5010 Series" }, - { 0x8086, 0x09c4, 0x8086, 0x0, -1, "libboard_a10gx.so", NULL, "Intel Programmable Acceleration Card with Intel Arria 10 GX FPGA" }, @@ -82,6 +76,12 @@ static platform_data platform_data_table[] = { "Intel FPGA Programmable Acceleration Card D5005" }, // Max10 SPI feature id 0xe + { 0x1c2c, 0x1000, 0x0, 0x0, 0xe, "libboard_n5010.so", NULL, + "Silicom FPGA SmartNIC N5010 Series" }, + + { 0x1c2c, 0x1001, 0x0, 0x0, 0xe, "libboard_n5010.so", NULL, + "Silicom FPGA SmartNIC N5010 Series" }, + { 0x8086, 0xaf00, 0x8086, 0x0, 0xe, "libboard_d5005.so", NULL, "Intel Open FPGA Stack Platform" },
roll back previous commit (use standard C++ atomics on msvc
@@ -17,7 +17,7 @@ terms of the MIT license. A copy of the license can be found in the file // instead of passing the memory order as a parameter. // ----------------------------------------------------------------------------------------------- -#if defined(__cplusplus) && !defined(_MSC_VER) +#if defined(__cplusplus) // Use C++ atomics #include <atomic> #define _Atomic(tp) std::atomic<tp> @@ -71,7 +71,7 @@ static inline intptr_t mi_atomic_addi(_Atomic(intptr_t)* p, intptr_t add); static inline intptr_t mi_atomic_subi(_Atomic(intptr_t)* p, intptr_t sub); -#if (!defined(_MSC_VER)) // defined(__cplusplus) || !defined(_MSC_VER) +#if defined(__cplusplus) || !defined(_MSC_VER) // In C++/C11 atomics we have polymorphic atomics so can use the typed `ptr` variants (where `tp` is the type of atomic value) // We use these macros so we can provide a typed wrapper in MSVC in C compilation mode as well @@ -193,7 +193,7 @@ static inline void mi_atomic_store_explicit(_Atomic(uintptr_t)* p, uintptr_t x, // These are used by the statistics static inline int64_t mi_atomic_addi64_relaxed(volatile _Atomic(int64_t)* p, int64_t add) { #ifdef _WIN64 - return (int64_t)mi_atomic_addi((_Atomic(intptr_t)*)p,add); + return (int64_t)mi_atomic_addi((int64_t*)p,add); #else int64_t current; int64_t sum; @@ -208,7 +208,7 @@ static inline void mi_atomic_maxi64_relaxed(volatile _Atomic(int64_t)*p, int64_t int64_t current; do { current = *p; - } while (current < x && _InterlockedCompareExchange64((int64_t*)p, x, current) != current); + } while (current < x && _InterlockedCompareExchange64(p, x, current) != current); } // The pointer macros cast to `uintptr_t`. @@ -222,8 +222,6 @@ static inline void mi_atomic_maxi64_relaxed(volatile _Atomic(int64_t)*p, int64_t #define mi_atomic_exchange_ptr_release(tp,p,x) (tp*)mi_atomic_exchange_release((_Atomic(uintptr_t)*)(p),(uintptr_t)x) #define mi_atomic_exchange_ptr_acq_rel(tp,p,x) (tp*)mi_atomic_exchange_acq_rel((_Atomic(uintptr_t)*)(p),(uintptr_t)x) -#else -#pragma message("define atomics for this platform (not C11, C++, msvc)") #endif
Do not read if output pointer is NULL Skip reading if output pointer is NULL even if the length of the input buffer is 0. The memory sanitizer will mark this as an error.
@@ -171,10 +171,12 @@ int mbedtls_mpi_core_read_le( mbedtls_mpi_uint *X, return( MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL ); if( X != NULL ) + { memset( X, 0, nx * ciL ); for( i = 0; i < buflen; i++ ) X[i / ciL] |= ((mbedtls_mpi_uint) buf[i]) << ((i % ciL) << 3); + } return( 0 ); } @@ -192,19 +194,21 @@ int mbedtls_mpi_core_read_be( mbedtls_mpi_uint *X, return( MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL ); if( X != NULL ) + { memset( X, 0, nx * ciL ); overhead = ( nx * ciL ) - buflen; /* Avoid calling `memcpy` with NULL source or destination argument, * even if buflen is 0. */ - if( buf != NULL ) + if( buf != NULL && X != NULL ) { Xp = (unsigned char*) X; memcpy( Xp + overhead, buf, buflen ); mbedtls_mpi_core_bigendian_to_host( X, nx ); } + } return( 0 ); }
Fix shmup camera offset if using multiple directions in one game
@@ -24,7 +24,8 @@ void Reset_Shmup(); void Start_Shmup() { // Set camera to follow player camera_target = &player.pos; - // camera_offset.x = -64; + + camera_offset.x = 0; camera_offset.y = 0; if (player.dir.x < 0) {
`scope_getuid` -> `scope_geteuid` for root check
@@ -68,7 +68,7 @@ attach(pid_t pid, char *scopeLibPath) char *exe_path = NULL; elf_buf_t *ebuf; - if (scope_getuid()) { + if (scope_geteuid()) { scope_printf("error: --attach requires root\n"); return EXIT_FAILURE; } @@ -197,7 +197,7 @@ attachCmd(pid_t pid, bool attach) * we need to change ownership of dyn config file. */ - if (scope_getuid() == 0) { + if (scope_geteuid() == 0) { uid_t euid = -1; gid_t egid = -1;
mmapstorage: fix builds without OPMPHM
@@ -1027,6 +1027,7 @@ static void copyKeySetToMmap (char * const dest, KeySet * keySet, KeySet * globa memcpy ((dest + mmapHeader->allocSize - SIZEOF_MMAPFOOTER), mmapFooter, SIZEOF_MMAPFOOTER); } +#ifdef ELEKTRA_ENABLE_OPTIMIZATIONS /** * @brief Deletes the OPMPHM. * @@ -1062,6 +1063,7 @@ static void mmapOpmphmPredictorDel (OpmphmPredictor * op) if (!test_bit (op->flags, OPMPHM_PREDICTOR_FLAG_MMAP_PATTERNTABLE)) elektraFree (op->patternTable); if (!test_bit (op->flags, OPMPHM_PREDICTOR_FLAG_MMAP_STRUCT)) elektraFree (op); } +#endif /** * @brief Replaces contents of a keyset with the keyset from the mapped region.
vcl: set STATE_UPDATED state when connect with non-blocking socket! State set to STATE_UPDATED to ensure the session is not assumed to be open and to also allow the app to close it prior to vpp's connected reply! Type: fix
@@ -1723,7 +1723,10 @@ vppcom_session_connect (uint32_t session_handle, vppcom_endpt_t * server_ep) if (VCL_SESS_ATTR_TEST (session->attr, VCL_SESS_ATTR_NONBLOCK)) { - session->session_state = STATE_CONNECT; + /* State set to STATE_UPDATED to ensure the session is not assumed + * to be open and to also allow the app to close it prior to vpp's + * connected reply. */ + session->session_state = STATE_UPDATED; return VPPCOM_EINPROGRESS; }
build: macos: Specify MACOSX_DEPLOYMENT_TARGET explicitly On LuaJIT, it requests to specify MACOSX_DEPLOYMENT_TARGET explicitly on build command arguments.
@@ -12,7 +12,15 @@ set(LUAJIT_SRC ${CMAKE_CURRENT_SOURCE_DIR}/${FLB_PATH_LIB_LUAJIT}) set(LUAJIT_DEST ${CMAKE_CURRENT_BINARY_DIR}) if (CMAKE_SYSTEM_NAME MATCHES "Darwin") - set(CFLAGS "${CFLAGS} -isysroot ${CMAKE_OSX_SYSROOT}") + set(CFLAGS "${CFLAGS} -isysroot ${CMAKE_OSX_SYSROOT} -fno-stack-check") + if (CMAKE_HOST_SYSTEM_VERSION VERSION_GREATER_EQUAL 20 + AND CMAKE_HOST_SYSTEM_VERSION VERSION_LESS 21) + set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=11.0") + else() + set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=10.15") + endif() +else() + set(DEPLOYMENT_TARGET "") endif() # luajit (UNIX) @@ -22,7 +30,7 @@ ExternalProject_Add(luajit EXCLUDE_FROM_ALL TRUE SOURCE_DIR ${LUAJIT_SRC} CONFIGURE_COMMAND ./configure - BUILD_COMMAND $(MAKE) CROSS=${CROSS_PREFIX} CFLAGS=${CFLAGS} BUILD_MODE=static "XCFLAGS=-fPIC" + BUILD_COMMAND $(MAKE) CROSS=${CROSS_PREFIX} CFLAGS=${CFLAGS} BUILD_MODE=static "XCFLAGS=-fPIC" ${DEPLOYMENT_TARGET} INSTALL_COMMAND cp src/libluajit.a "${LUAJIT_DEST}/lib/libluajit.a") # luajit (Windows)
Remove entry point in docker compose image for gitlab ci.
@@ -36,7 +36,7 @@ build: type: build image: name: docker/compose:1.23.2 - entrypoint: ["sh"] + entrypoint: [""] script: - $CI_PROJECT_DIR/docker-compose.sh build - $CI_PROJECT_DIR/docker-compose.sh push
[Kernel] BSP launches file server before entering shared core code path
@@ -105,7 +105,6 @@ static void _kernel_bootstrap_part2(void) { // Detect and boot other APs smp_init(); - smp_core_continue(); // Early boot is finished // Multitasking and program loading is now available @@ -114,8 +113,14 @@ static void _kernel_bootstrap_part2(void) { // specified startup programs task_spawn__with_args("launch_fs_server", FS_SERVER_EXEC_TRAMPOLINE_NAME, 0, 0, 0); - // Bootstrapping complete - kill this process - printf("[t = %d] Bootstrap task [PID %d] will exit\n", time(), getpid()); - task_die(0); - assert(0, "task_die should have stopped execution"); + // TODO(PT): Only mask the PIT once we're sure all cores have calibrated + // TODO(PT): Pull the PIT IRQ line somehow + /* + uint32_t start = ms_since_boot(); + printf("BSP spinlooping...\n"); + while (ms_since_boot() < start + 3000) {} + printf("BSP will mask PIT.\n"); + */ + + smp_core_continue(); }
out_stackdriver: initialize entry size at the beginning of the loop
@@ -1138,8 +1138,9 @@ static int stackdriver_format(struct flb_config *config, * "timestamp": "..." * } */ - + entry_size = 3; /* Extract severity */ + severity_extracted = FLB_FALSE; if (ctx->severity_key && get_severity_level(&severity, obj, ctx->severity_key) == 0) { severity_extracted = FLB_TRUE;
replace redis-trib to redis-cli since it is no longer available
@@ -1230,7 +1230,7 @@ void clusterHandleConfigEpochCollision(clusterNode *sender) { * about the node we want to remove, we don't re-add it before some time. * * Currently the CLUSTER_BLACKLIST_TTL is set to 1 minute, this means - * that redis-trib has 60 seconds to send CLUSTER FORGET messages to nodes + * that redis-cli has 60 seconds to send CLUSTER FORGET messages to nodes * in the cluster without dealing with the problem of other nodes re-adding * back the node to nodes we already sent the FORGET command to. * @@ -1705,7 +1705,7 @@ void clusterUpdateSlotsConfigWith(clusterNode *sender, uint64_t senderConfigEpoc if (server.cluster->slots[j] == sender) continue; /* The slot is in importing state, it should be modified only - * manually via redis-trib (example: a resharding is in progress + * manually via redis-cli (example: a resharding is in progress * and the migrating side slot was already closed and is advertising * a new config. We still want the slot to be closed manually). */ if (server.cluster->importing_slots_from[j]) continue; @@ -4100,7 +4100,7 @@ void clusterUpdateState(void) { * B) If according to our config other nodes are already in charge for * this slots, we set the slots as IMPORTING from our point of view * in order to justify we have those slots, and in order to make - * redis-trib aware of the issue, so that it can try to fix it. + * redis-cli aware of the issue, so that it can try to fix it. * 2) If we find data in a DB different than DB0 we return C_ERR to * signal the caller it should quit the server with an error message * or take other actions.
[CUDA] Map llvm.powi.* to __nv_powi* Fixes
@@ -857,11 +857,13 @@ void mapLibDeviceCalls(llvm::Module *Module) { {"llvm.pow.f32", "__nv_powf"}, {"llvm.pow.f64", "__nv_pow"}, + {"llvm.powi.f32", "__nv_powif"}, + {"llvm.powi.f64", "__nv_powi"}, + // TODO: frexp // TODO: ldexp // TODO: lgamma_r // TODO: modf - // TODO: pown // TODO: remquo // TODO: rootn };
Fix offset calculation for negative incx
@@ -59,10 +59,9 @@ int CNAME(BLASLONG n, BLASLONG k1, BLASLONG k2, FLOAT dummy1, FLOAT dummy4, lda *= 2; k1 --; -#ifndef MINUS ipiv += k1; -#else - ipiv -= (k2 - 1) * incx; +#ifdef MINUS + ipiv -= (k2 - k1 - 1) * incx; #endif if (n <= 0) return 0;
it is directory, not dir!
@@ -2396,7 +2396,7 @@ namespace "package" do args << relpath end - Jake.run($jarbin, args, respath) if File.dir?(respath) + Jake.run($jarbin, args, respath) if File.directory?(respath) print_timestamp('package:android FINISH')
Update the EdDSA docs with information about Algorithm Identifiers
@@ -15,11 +15,24 @@ one-shot digest sign and digest verify using PureEdDSA and B<Ed25519> or B<Ed448 (see RFC8032). It has associated private and public key formats compatible with RFC 8410. +=head2 ED25591 and ED448 Signature Parameters + No additional parameters can be set during one-shot signing or verification. In particular, because PureEdDSA is used, a digest must B<NOT> be specified when signing or verifying. See L<EVP_PKEY-X25519(7)> for information related to B<X25519> and B<X448> keys. +The following signature parameters can be retrieved using +EVP_PKEY_CTX_get_params(). + +=over 4 + +=item "algorithm-id" (B<OSSL_SIGNATURE_PARAM_ALGORITHM_ID>) <octet string> + +The parameters are described in L<provider-signature(7)>. + +=back + =head1 NOTES The PureEdDSA algorithm does not support the streaming mechanism
Fix Error: vi.c:888:57: error: format string is not a string literal (potentially insecure)
@@ -885,7 +885,7 @@ static void vi_printf(FAR struct vi_s *vi, FAR const char *prefix, /* Expand the prefix message in the scratch buffer */ - len = prefix ? snprintf(vi->scratch, SCRATCH_BUFSIZE, prefix) : 0; + len = prefix ? snprintf(vi->scratch, SCRATCH_BUFSIZE, "%s", prefix) : 0; va_start(ap, fmt); len += vsnprintf(vi->scratch + len, SCRATCH_BUFSIZE - len, fmt, ap);
Fix warning in tui build
@@ -71,8 +71,8 @@ int main() { fill_char = new_fill_char; } field_fill_subrect(&field, 0, 0, field.height, field.width, '.'); - field_fill_subrect(&field, 1, 1, field.height - 2, field.width - 2, - fill_char); + field_fill_subrect(&field, 1, 1, (Usz)(field.height - 2), + (Usz)(field.width - 2), fill_char); // field_debug_draw(stdscr, &field, 0, 0); field_copy_subrect(&field, &field, 0, 0, 4, 4, 8, 8); field_copy_subrect(&field, &field, 0, 0, 0, 0, 0, 0);
out_forward: add missing ra check(#4511)
@@ -670,7 +670,8 @@ static int config_set_properties(struct flb_upstream_node *node, } #ifdef FLB_HAVE_RECORD_ACCESSOR - if (fc->compress != COMPRESS_NONE && fc->ra_static == FLB_FALSE) { + if (fc->compress != COMPRESS_NONE && + (fc->ra_tag && fc->ra_static == FLB_FALSE) ) { flb_plg_error(ctx->ins, "compress mode %s is incompatible with dynamic " "tags", tmp); return -1;
Added note to osThreadTerminate
@@ -592,6 +592,9 @@ Possible \ref osStatus_t return values: \note This function \b cannot be called from \ref CMSIS_RTOS_ISR_Calls "Interrupt Service Routines". \note Avoid calling the function with a \em thread_id that does not exist or has been terminated already. +\note \b osThreadTerminate destroys non-joinable threads and removes their thread_id from the system. Subsequent access to the +thread_id (for example \ref osThreadGetState) will return an \ref osThreadError. Joinable threads will not be destroyed and +return the status \ref osThreadTerminated until they are joined with \ref osThreadJoin. <b>Code Example</b> \code
fix bug where session name is incorrect with librarypath flag
@@ -38,6 +38,11 @@ func (rc *Config) Run(args []string) { // Directory contains scope.yml which is configured to output to that // directory and has a command directory configured in that directory. env := os.Environ() + if !rc.Passthrough { + rc.setupWorkDir(args, false) + env = append(env, "SCOPE_CONF_PATH="+filepath.Join(rc.WorkDir, "scope.yml")) + log.Info().Bool("passthrough", rc.Passthrough).Strs("args", args).Msg("calling syscall.Exec") + } if len(rc.LibraryPath) > 0 { // Validate path exists if !util.CheckDirExists(rc.LibraryPath) { @@ -46,11 +51,6 @@ func (rc *Config) Run(args []string) { // Prepend "-f" [PATH] to args args = append([]string{"-f", rc.LibraryPath}, args...) } - if !rc.Passthrough { - rc.setupWorkDir(args, false) - env = append(env, "SCOPE_CONF_PATH="+filepath.Join(rc.WorkDir, "scope.yml")) - log.Info().Bool("passthrough", rc.Passthrough).Strs("args", args).Msg("calling syscall.Exec") - } if !rc.Subprocess { syscall.Exec(ldscopePath(), append([]string{"ldscope"}, args...), env) }
Update CHIBIOS_STM32F0xx_GCC_options.cmake remove wrong duplicate specs for linker
@@ -12,5 +12,5 @@ set(CMAKE_CXX_FLAGS "-mthumb -fno-builtin -mcpu=cortex-m0 -Wall -std=c++11 -w -f set(CMAKE_ASM_FLAGS "-c -mthumb -mcpu=cortex-m0 -g -Wa,--no-warn -x assembler-with-cpp " CACHE INTERNAL "asm compiler flags") set(CMAKE_EXE_LINKER_FLAGS " -Wl,-gc-sections -Wl,--no-wchar-size-warning -mthumb -mcpu=cortex-m0 -mabi=aapcs " CACHE INTERNAL "executable linker flags") -set(CMAKE_MODULE_LINKER_FLAGS " -mthumb -mcpu=cortex-m0 -mabi=aapcs -specs=nano.specs " CACHE INTERNAL "module linker flags") -set(CMAKE_SHARED_LINKER_FLAGS " -mthumb -mcpu=cortex-m0 -mabi=aapcs -specs=nano.specs " CACHE INTERNAL "shared linker flags") +set(CMAKE_MODULE_LINKER_FLAGS " -mthumb -mcpu=cortex-m0 -mabi=aapcs " CACHE INTERNAL "module linker flags") +set(CMAKE_SHARED_LINKER_FLAGS " -mthumb -mcpu=cortex-m0 -mabi=aapcs " CACHE INTERNAL "shared linker flags")
I don't understand why but the & don't build in C!
@@ -24,7 +24,7 @@ typedef struct clap_version { static CLAP_CONSTEXPR const clap_version CLAP_VERSION = {0, 15, 0}; -static CLAP_CONSTEXPR inline bool clap_version_is_compatible(const clap_version &v) { +static CLAP_CONSTEXPR inline bool clap_version_is_compatible(const clap_version v) { // For version 0, we require the same minor version because // we may still break the ABI at this point if (v.major == 0 && CLAP_VERSION.major == 0)
dm: update uos path in launch_hard_rt_vm.sh
@@ -31,7 +31,7 @@ echo ${passthru_bdf["sata"]} > /sys/bus/pci/devices/${passthru_bdf["sata"]}/driv echo ${passthru_bdf["sata"]} > /sys/bus/pci/drivers/pci-stub/bind /usr/bin/acrn-dm -A -m $mem_size -c $1 -s 0:0,hostbridge \ - -k /root/rt_uos_kernel \ + -k /usr/lib/kernel/default-iot-lts2018-preempt-rt \ --lapic_pt \ --rtvm \ --virtio_poll 1000000 \
Let FORCE_VCS_INFO_UPDATE invalidate AARs
@@ -5688,7 +5688,7 @@ ${input;hide:EXTRA_INPUTS} \ --bundle-name $REALPRJNAME \ --peers $PEERS \ --maven-repos ${MAPSMOBI_MAVEN_REPO_RESOURCE_GLOBAL} \ -&& ${cwd:BINDIR} ${GRADLE_RESOURCE_GLOBAL}/bin/gradle $_GRADLE_FLAGS_VALUE --no-daemon --offline -g $BIN_GRADLE_USER_HOME_DIR bundle${_BUNDLE_BUILD_TYPE}Aar ${env:"ANDROID_HOME=$ANDROID_SDK_RESOURCE_GLOBAL/android_sdk"} ${env:"JAVA_HOME=$JDK_RESOURCE_GLOBAL"} ${env:"ANDROID_SDK_HOME=$BINDIR"} \ +&& ${cwd:BINDIR} ${GRADLE_RESOURCE_GLOBAL}/bin/gradle $_GRADLE_FLAGS_VALUE --no-daemon --offline -g $BIN_GRADLE_USER_HOME_DIR bundle${_BUNDLE_BUILD_TYPE}Aar ${env:"ANDROID_HOME=$ANDROID_SDK_RESOURCE_GLOBAL/android_sdk"} ${env:"JAVA_HOME=$JDK_RESOURCE_GLOBAL"} ${env:"ANDROID_SDK_HOME=$BINDIR"} $VCS_INFO_DISABLE_CACHE__NO_UID__ \ && ${cwd:BINDIR} $COPY_CMD build/outputs/aar/${REALPRJNAME}-${tolower:_BUNDLE_BUILD_TYPE}.aar $TARGET \ && ${cwd:BINDIR} $COPY_CMD build/${suf=-pom.xml:REALPRJNAME} ${output;suf=-pom.xml:REALPRJNAME} \ && ${cwd:BINDIR} $COPY_CMD build/libs/${suf=-sources.jar:REALPRJNAME} ${output;suf=-sources.jar:REALPRJNAME}
mithrax: rgbkbd: Add rgb keyboard type field rgbkbd_type describes number of zones and LEDs supported. BRANCH=none TEST=make -j buildall Cq-Depend: chromium:3732802
@@ -61,8 +61,11 @@ const uint8_t rgbkbd_count = ARRAY_SIZE(rgbkbds); const uint8_t rgbkbd_hsize = RGB_GRID0_COL; const uint8_t rgbkbd_vsize = RGB_GRID0_ROW; +const enum ec_rgbkbd_type rgbkbd_type = EC_RGBKBD_TYPE_FOUR_ZONES_12_LEDS; + #define LED(x, y) RGBKBD_COORD((x), (y)) #define DELM RGBKBD_DELM + const uint8_t rgbkbd_map[] = { DELM, /* 0: (null) */ LED(0, 0), DELM, /* 1: ~ ` */
hw/nrf51/adc: Use init config when user does not provide new on os_open
@@ -116,6 +116,11 @@ nrf51_adc_open(struct os_dev *odev, uint32_t wait, void *arg) } } + if (!cfg) { + /* Use initial configuration */ + cfg = init_adc_config; + } + /* Initialize the device */ rc = nrfx_adc_init(&cfg->adc_cfg, nrf51_adc_event_handler); if (rc != NRFX_SUCCESS) {
Use series of pipe Queues instead of ShiftQueue for adding AXI4 memory delay
@@ -159,11 +159,11 @@ class WithBlackBoxSimMem(additionalLatency: Int = 0) extends OverrideHarnessBind } if (additionalLatency > 0) { withClockAndReset (port.clock, port.reset) { - mem.io.axi.aw <> ShiftQueue(Decoupled(port.bits.aw), additionalLatency) - mem.io.axi.w <> ShiftQueue(Decoupled(port.bits.w ), additionalLatency) - port.bits.b <> ShiftQueue(Decoupled(mem.io.axi.b), additionalLatency) - mem.io.axi.ar <> ShiftQueue(Decoupled(port.bits.ar), additionalLatency) - port.bits.r <> ShiftQueue(Decoupled(mem.io.axi.r), additionalLatency) + mem.io.axi.aw <> (0 until additionalLatency).foldLeft(Decoupled(port.bits.aw))((t, _) => Queue(t, 1, pipe=true)) + mem.io.axi.w <> (0 until additionalLatency).foldLeft(Decoupled(port.bits.w ))((t, _) => Queue(t, 1, pipe=true)) + port.bits.b <> (0 until additionalLatency).foldLeft(Decoupled(mem.io.axi.b))((t, _) => Queue(t, 1, pipe=true)) + mem.io.axi.ar <> (0 until additionalLatency).foldLeft(Decoupled(port.bits.ar))((t, _) => Queue(t, 1, pipe=true)) + port.bits.r <> (0 until additionalLatency).foldLeft(Decoupled(mem.io.axi.r))((t, _) => Queue(t, 1, pipe=true)) } } mem.io.clock := port.clock
super + indicator left click creates overlay
@@ -267,6 +267,7 @@ static Button buttons[] = { /* click event mask button function argument */ { ClkLtSymbol, 0, Button1, cyclelayout, {.i = -1 } }, { ClkLtSymbol, 0, Button3, cyclelayout, {.i = +1 } }, + { ClkLtSymbol, MODKEY, Button1, createoverlay, {0} }, { ClkLtSymbol, 0, Button2, setlayout, {.v = &layouts[0]} }, { ClkWinTitle, 0, Button1, togglewin, {0} }, { ClkWinTitle, MODKEY, Button1, setoverlay, {0} },
Use virtual device id to avoid NPE Inject mouse events using id -1 (virtual device) instead of 0 which does not exist (and causes the InputDevice to be null). Fixes <https://github.com/Genymobile/scrcpy/issues/962>
@@ -13,6 +13,8 @@ import java.io.IOException; public class Controller { + private static final int DEVICE_ID_VIRTUAL = -1; + private final Device device; private final DesktopConnection connection; private final DeviceMessageSender sender; @@ -174,7 +176,8 @@ public class Controller { } } - MotionEvent event = MotionEvent.obtain(lastTouchDown, now, action, pointerCount, pointerProperties, pointerCoords, 0, buttons, 1f, 1f, 0, 0, + MotionEvent event = MotionEvent + .obtain(lastTouchDown, now, action, pointerCount, pointerProperties, pointerCoords, 0, buttons, 1f, 1f, DEVICE_ID_VIRTUAL, 0, InputDevice.SOURCE_TOUCHSCREEN, 0); return injectEvent(event); } @@ -196,7 +199,8 @@ public class Controller { coords.setAxisValue(MotionEvent.AXIS_HSCROLL, hScroll); coords.setAxisValue(MotionEvent.AXIS_VSCROLL, vScroll); - MotionEvent event = MotionEvent.obtain(lastTouchDown, now, MotionEvent.ACTION_SCROLL, 1, pointerProperties, pointerCoords, 0, 0, 1f, 1f, 0, 0, + MotionEvent event = MotionEvent + .obtain(lastTouchDown, now, MotionEvent.ACTION_SCROLL, 1, pointerProperties, pointerCoords, 0, 0, 1f, 1f, DEVICE_ID_VIRTUAL, 0, InputDevice.SOURCE_MOUSE, 0); return injectEvent(event); }
bugid:16796279:examples:add http2 stream example
@@ -38,6 +38,11 @@ TARGET += coap-example SRCS_coap-example := coap/coap_example.c app_entry.c endif +ifneq (,$(filter -DHTTP2_COMM_ENABLED,$(CFLAGS))) +TARGET += http2-example +SRCS_http2-example := http2/http2_example_stream.c app_entry.c +endif + ifneq (,$(filter -DOTA_ENABLED,$(CFLAGS))) ifneq (,$(filter -DMQTT_COMM_ENABLED,$(CFLAGS)))
Add -DGO_VET=local
@@ -5668,6 +5668,10 @@ module _GO_BASE_UNIT: _BASE_UNIT { GO_VET_TOOL=${YOLINT_NEXT_RESOURCE_GLOBAL}/yolint _GO_VET_FLAGS= } + "local" ? { + _GO_VET=yes + _GO_VET_FLAGS= + } default ? { _GO_VET=no _GO_VET_FLAGS=
sm2: Allow setting 0 length SM2 dist ID param Fixes
@@ -430,7 +430,7 @@ static int sm2sig_set_ctx_params(void *vpsm2ctx, const OSSL_PARAM params[]) p = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_DIST_ID); if (p != NULL) { void *tmp_id = NULL; - size_t tmp_idlen; + size_t tmp_idlen = 0; /* * If the 'z' digest has already been computed, the ID is set too late @@ -438,7 +438,8 @@ static int sm2sig_set_ctx_params(void *vpsm2ctx, const OSSL_PARAM params[]) if (!psm2ctx->flag_compute_z_digest) return 0; - if (!OSSL_PARAM_get_octet_string(p, &tmp_id, 0, &tmp_idlen)) + if (p->data_size != 0 + && !OSSL_PARAM_get_octet_string(p, &tmp_id, 0, &tmp_idlen)) return 0; OPENSSL_free(psm2ctx->id); psm2ctx->id = tmp_id;
Tests: Add fences to CMake comment block
@@ -23,6 +23,7 @@ file(READ "${CMAKE_CURRENT_BINARY_DIR}/include_common.sh" INCLUDE_COMMON_FILE) file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/include_common.sh") +# ~~~ # Add a test for a script # # The given testname is blah.sh @@ -30,6 +31,7 @@ file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/include_common.sh") # it will be installed on the system as blah.sh # the test will be called testscr_blah # and the script file for the test will be testscr_blah.sh +# ~~~ function (add_scripttest testname) get_filename_component (testname_we ${testname} NAME_WE)
craask: Config to reduce flash size Disable extended console help: ~3500 bytes TEST=Verify on nivviks BRANCH=none
@@ -14,6 +14,10 @@ CONFIG_PLATFORM_EC_DYNAMIC_MOTION_SENSOR_COUNT=y CONFIG_PLATFORM_EC_BUTTONS_RUNTIME_CONFIG=y +# Flash space saving +# Turning off extended console help saves ~3500 bytes +CONFIG_SHELL_HELP=n + # Keyboard CONFIG_PLATFORM_EC_KEYBOARD_KEYPAD=y CONFIG_PLATFORM_EC_KEYBOARD_FACTORY_TEST=y
runtimes/singularity: fix MANPATH and remove unused LD_LIBRARY_PATH
@@ -127,8 +127,7 @@ module-whatis "URL %{url}" set version %{version} prepend-path PATH %{install_path}/bin -prepend-path LD_LIBRARY_PATH %{install_path}/lib -prepend-path MANPATH %{install_path}/man +prepend-path MANPATH %{install_path}/share/man setenv %{PNAME}_DIR %{install_path} setenv %{PNAME}_BIN %{install_path}/bin
BugID:19029333: modify code style
/* - * Copyright (C) 2015-2017 Alibaba Group Holding Limited + * Copyright (C) 2015-2019 Alibaba Group Holding Limited */ -#include "k_api.h" #include "debug_api.h" -#include <stdio.h> +#include "k_api.h" void k_err_proc_debug(kstat_t err, char *file, int line) { @@ -16,3 +15,4 @@ void k_err_proc_debug(kstat_t err, char *file, int line) g_err_proc(err); } } +
More beginner-friendly error message
@@ -60,7 +60,7 @@ Vector lovrPoolAllocate(Pool* pool, VectorType type, float** data) { } float* lovrPoolResolve(Pool* pool, Vector vector) { - lovrAssert(vector.handle.generation == pool->generation, "Attempt to use a vector in a different generation than the one it was created in (vectors can not be saved into variables)"); + lovrAssert(vector.handle.generation == pool->generation, "Attempt to use a temporary vector from a previous frame"); return pool->data + vector.handle.index; }
vmxnet3: memory leak on parsing bad CLI command When parsing bad "create interface vmxnet3" command, we should call unformat_free prior to return Type: fix Fixes:
@@ -58,12 +58,14 @@ vmxnet3_create_command_fn (vlib_main_t * vm, unformat_input_t * input, else if (unformat (line_input, "num-rx-queues %u", &size)) args.rxq_num = size; else + { + unformat_free (line_input); return clib_error_return (0, "unknown input `%U'", format_unformat_error, input); } + } unformat_free (line_input); - vmxnet3_create_if (vm, &args); if (args.error == 0) vlib_cli_output (vm, "%U\n", format_vnet_sw_if_index_name,
test/cbi: allow to use test with WP GPIO active low CBI test is usable without setting CONFIG_WP_ACTIVE_HIGH option. BRANCH=none TEST=make run-cbi
static void test_setup(void) { + /* Make sure that write protect is disabled */ +#ifdef CONFIG_WP_ACTIVE_HIGH + gpio_set_level(GPIO_WP, 0); +#else + gpio_set_level(GPIO_WP_L, 1); +#endif /* CONFIG_WP_ACTIVE_HIGH */ + cbi_create(); cbi_write(); } @@ -228,7 +235,11 @@ DECLARE_EC_TEST(test_all_tags) zassert_equal(count, CBI_TAG_COUNT, "%d, %d", count, CBI_TAG_COUNT); /* Write protect */ +#ifdef CONFIG_WP_ACTIVE_HIGH gpio_set_level(GPIO_WP, 1); +#else + gpio_set_level(GPIO_WP_L, 0); +#endif /* CONFIG_WP_ACTIVE_HIGH */ zassert_equal(cbi_write(), EC_ERROR_ACCESS_DENIED, NULL); return EC_SUCCESS;
More MacOS font folders Installed latest MacOS and lost default fonts _serif, _sans etc. Discovered that fonts moved to /System/Library/Fonts/Supplemental/ folder. Not sure if this unique to my case or on new mac fonts relocated. Can anybody confirm this?
@@ -527,7 +527,7 @@ const char *fontFolders[] = { "/System/Library/Fonts/CoreAddition/", "/System/Li "/System/Library/Fonts/Extra/", "/System/Library/Fonts/Cache/", 0 }; #else //#define FONT_BASE "/Library/Fonts/" -const char *fontFolders[] = { "/Library/Fonts/", 0 }; +const char *fontFolders[] = { "/System/Library/Fonts", "/System/Library/Fonts/Supplemental/", "/Library/Fonts/", 0 }; #endif const char **testFolder = fontFolders; @@ -1388,7 +1388,7 @@ void nme_font_iterate_device_fonts(value inFunc) "/System/Library/Fonts/AppFonts/", "/System/Library/Fonts/LanguageSupport/", "/System/Library/Fonts/Watch/", "/System/Library/Fonts/Extra/", "/System/Library/Fonts/Cache/" #elif defined(__APPLE__) - "/Library/Fonts/" + "/System/Library/Fonts", "/System/Library/Fonts/Supplemental/", "/Library/Fonts/" #elif defined(HX_WINDOWS) win_path #else
arm/backtrace_fp: fix build warning common/arm_backtrace_fp.c: In function 'up_backtrace': common/arm_backtrace_fp.c:126:23: warning: assignment to 'void *' from 'uintptr_t' {aka 'unsigned int'} makes pointer from integer without a cast [-Wint-conversion] 126 | istacklimit = arm_intstack_top(); | ^
@@ -123,7 +123,7 @@ int up_backtrace(struct tcb_s *tcb, { #if CONFIG_ARCH_INTERRUPTSTACK > 7 # ifdef CONFIG_SMP - istacklimit = arm_intstack_top(); + istacklimit = (void *)arm_intstack_top(); # else istacklimit = g_intstacktop; # endif /* CONFIG_SMP */
modulization: combine vmx_caps into cpu_caps in cpu_caps.c, the vmx_caps & cpu_caps can be combined. Changes to be committed: modified: arch/x86/cpu_caps.c Acked-by: Eddie Dong
#define VAPIC_FEATURE_POST_INTR (1U << 4U) #define VAPIC_FEATURE_VX2APIC_MODE (1U << 5U) -static struct vmx_capability { - uint32_t ept; - uint32_t vpid; -} vmx_caps; - struct cpu_capability { uint8_t apicv_features; uint8_t ept_features; -}; -static struct cpu_capability cpu_caps; + + uint32_t vmx_ept; + uint32_t vmx_vpid; +} cpu_caps; struct cpuinfo_x86 boot_cpu_data; @@ -261,10 +258,21 @@ static void apicv_cap_detect(void) cpu_caps.apicv_features = features; } +static void vmx_mmu_cap_detect(void) +{ + uint64_t val; + + /* Read the MSR register of EPT and VPID Capability - SDM A.10 */ + val = msr_read(MSR_IA32_VMX_EPT_VPID_CAP); + cpu_caps.vmx_ept = (uint32_t) val; + cpu_caps.vmx_vpid = (uint32_t) (val >> 32U); +} + void cpu_cap_detect(void) { apicv_cap_detect(); ept_cap_detect(); + vmx_mmu_cap_detect(); } bool is_ept_supported(void) @@ -287,6 +295,16 @@ bool is_apicv_posted_intr_supported(void) return ((cpu_caps.apicv_features & VAPIC_FEATURE_POST_INTR) != 0U); } +bool cpu_has_vmx_ept_cap(uint32_t bit_mask) +{ + return ((cpu_caps.vmx_ept & bit_mask) != 0U); +} + +bool cpu_has_vmx_vpid_cap(uint32_t bit_mask) +{ + return ((cpu_caps.vmx_vpid & bit_mask) != 0U); +} + void get_cpu_name(void) { cpuid(CPUID_EXTEND_FUNCTION_2, @@ -366,25 +384,8 @@ static inline bool cpu_has_vmx_unrestricted_guest_cap(void) != 0UL); } -bool cpu_has_vmx_ept_cap(uint32_t bit_mask) -{ - return ((vmx_caps.ept & bit_mask) != 0U); -} - -bool cpu_has_vmx_vpid_cap(uint32_t bit_mask) -{ - return ((vmx_caps.vpid & bit_mask) != 0U); -} - static int32_t check_vmx_mmu_cap(void) { - uint64_t val; - - /* Read the MSR register of EPT and VPID Capability - SDM A.10 */ - val = msr_read(MSR_IA32_VMX_EPT_VPID_CAP); - vmx_caps.ept = (uint32_t) val; - vmx_caps.vpid = (uint32_t) (val >> 32U); - if (!cpu_has_vmx_ept_cap(VMX_EPT_INVEPT)) { pr_fatal("%s, invept not supported\n", __func__); return -ENODEV;
CMSIS-NN: Fixed component dependency to DSP.
@@ -2334,7 +2334,7 @@ and 8-bit Java bytecodes in Jazelle state. <!-- CMSIS NN --> <condition id="CMSIS NN"> <description>Components required for NN</description> - <require condition="CMSIS DSP"/> + <require Cclass="CMSIS" Cgroup="DSP"/> </condition> <!-- RTOS RTX -->
Fixup log printout.
@@ -1136,16 +1136,26 @@ iter_stub_fwd_no_cache(struct module_qstate *qstate, struct iter_qstate *iq) stub = hints_lookup_stub(qstate->env->hints, iq->qchase.qname, iq->qchase.qclass, iq->dp); if (stub != NULL && stub->dp != NULL) { - verbose(VERB_ALGO, "%s: stub for '%s'/'%s' no_cache %d", __func__, - iq->qchase.qname, stub->dp->name, stub->dp->no_cache); + if(stub->dp->no_cache) { + char qname[255+1]; + char dpname[255+1]; + dname_str(iq->qchase.qname, qname); + dname_str(stub->dp->name, dpname); + verbose(VERB_ALGO, "stub for %s %s has no_cache", qname, dpname); + } return (stub->dp->no_cache); } /* Check for forward. */ dp = forwards_lookup(qstate->env->fwds, iq->qchase.qname, iq->qchase.qclass); if (dp) { - verbose(VERB_ALGO, "%s: fwd for '%s'/'%s' no_cache %d", __func__, - iq->qchase.qname, dp->name, dp->no_cache); + if(dp->no_cache) { + char qname[255+1]; + char dpname[255+1]; + dname_str(iq->qchase.qname, qname); + dname_str(dp->name, dpname); + verbose(VERB_ALGO, "forward for %s %s has no_cache", qname, dpname); + } return (dp->no_cache); }
Reorder flag checks
@@ -7273,7 +7273,7 @@ NTSTATUS PhLoaderEntryRelocateImage( if (dataDirectory->Size == 0) return STATUS_SUCCESS; if (imageNtHeader->FileHeader.Characteristics & IMAGE_FILE_RELOCS_STRIPPED) - return STATUS_SUCCESS; // STATUS_CONFLICTING_ADDRESSES + return STATUS_SUCCESS; for (ULONG i = 0; i < imageNtHeader->FileHeader.NumberOfSections; i++) { @@ -7345,15 +7345,15 @@ NTSTATUS PhLoaderEntryRelocateImage( sectionHeaderAddress = PTR_ADD_OFFSET(BaseAddress, sectionHeader->VirtualAddress); sectionHeaderSize = sectionHeader->SizeOfRawData; - if (sectionHeader->Characteristics & IMAGE_SCN_MEM_EXECUTE) - sectionProtection = PAGE_EXECUTE; if (sectionHeader->Characteristics & IMAGE_SCN_MEM_READ) sectionProtection = PAGE_READONLY; if (sectionHeader->Characteristics & IMAGE_SCN_MEM_WRITE) sectionProtection = PAGE_WRITECOPY; - if (sectionHeader->Characteristics & IMAGE_SCN_MEM_EXECUTE && sectionHeader->Characteristics & IMAGE_SCN_MEM_READ) + if (sectionHeader->Characteristics & IMAGE_SCN_MEM_EXECUTE) + sectionProtection = PAGE_EXECUTE; + if (sectionHeader->Characteristics & IMAGE_SCN_MEM_READ && sectionHeader->Characteristics & IMAGE_SCN_MEM_EXECUTE) sectionProtection = PAGE_EXECUTE_READ; - if (sectionHeader->Characteristics & IMAGE_SCN_MEM_EXECUTE && sectionHeader->Characteristics & IMAGE_SCN_MEM_WRITE) + if (sectionHeader->Characteristics & IMAGE_SCN_MEM_WRITE && sectionHeader->Characteristics & IMAGE_SCN_MEM_EXECUTE) sectionProtection = PAGE_EXECUTE_READWRITE; status = NtProtectVirtualMemory(
Fix: mingw: undefined reference rand_r Exclude mingw from ENABLE_OPTIMIZATIONS.
@@ -64,6 +64,7 @@ if (CMAKE_COMPILER_IS_GNUCXX) execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION) if (WIN32) message (STATUS "mingw detected") + set (ENABLE_OPTIMIZATIONS OFF CACHE BOOL "Turn on optimizations that trade memory for speed" FORCE) else(WIN32) #not supported by icc: set (EXTRA_FLAGS "${EXTRA_FLAGS} -Wno-deprecated-declarations")
driverless: Consider also PCLm printers as supporting driverless printing
@@ -92,6 +92,9 @@ list_printers (int mode) ippfind_argv[i++] = "("; ippfind_argv[i++] = "--txt-pdl"; /* PDL list in TXT record contains */ ippfind_argv[i++] = "image/pwg-raster"; /* PWG Raster (IPP Everywhere) */ + ippfind_argv[i++] = "--or"; /* or */ + ippfind_argv[i++] = "--txt-pdl"; + ippfind_argv[i++] = "application/PCLm"; /* PCLm */ #ifdef CUPS_RASTER_HAVE_APPLERASTER ippfind_argv[i++] = "--or"; /* or */ ippfind_argv[i++] = "--txt-pdl"; @@ -279,10 +282,13 @@ list_printers (int mode) (strcasestr(pdl, "application/pdf") || strcasestr(pdl, "application/postscript") || strcasestr(pdl, "application/vnd.hp-PCL") || + strcasestr(pdl, "application/PCLm") || strcasestr(pdl, "image/"))) { value[0] = '\0'; if (strcasestr(pdl, "application/pdf")) strncat(value, ",PDF", sizeof(value)); + if (strcasestr(pdl, "application/PCLm")) + strncat(value, ",PCLM", sizeof(value)); if (strcasestr(pdl, "application/postscript")) strncat(value, ",PS", sizeof(value)); if (strcasestr(pdl, "application/vnd.hp-PCL"))
Fix bug with wrong function call on MQTT client
@@ -1000,7 +1000,7 @@ mqtt_conn_cb(esp_evt_t* evt) { /* Data sent callback */ mqtt_data_sent_cb(client, esp_evt_conn_data_send_get_length(evt), - esp_evt_conn_data_send_get_length(evt) == espOK); + esp_evt_conn_data_send_get_result(evt) == espOK); break; }
Use lovrLog functions in oculus_mobile.c; Question: Are we okay to simplify log levels to DEBUG/WARN? If not, maybe we add a LOVR_LOG_LEVEL thing...
@@ -317,7 +317,7 @@ static void android_vthrow(lua_State* L, const char* format, va_list args) { #define MAX_ERROR_LENGTH 1024 char lovrErrorMessage[MAX_ERROR_LENGTH]; vsnprintf(lovrErrorMessage, MAX_ERROR_LENGTH, format, args); - __android_log_print(ANDROID_LOG_FATAL, "LOVR", "Error: %s\n", lovrErrorMessage); + lovrWarn("Error: %s\n", lovrErrorMessage); assert(0); } @@ -329,7 +329,7 @@ static int luax_custom_atpanic(lua_State *L) { } void bridgeLovrInit(BridgeLovrInitData *initData) { - __android_log_print(ANDROID_LOG_DEBUG, "LOVR", "\n INSIDE LOVR\n"); + lovrLog("\n INSIDE LOVR\n"); // Save writable data directory for LovrFilesystemInit later { @@ -349,7 +349,7 @@ void bridgeLovrInit(BridgeLovrInitData *initData) { luax_setmainstate(L); lua_atpanic(L, luax_custom_atpanic); luaL_openlibs(L); - __android_log_print(ANDROID_LOG_DEBUG, "LOVR", "\n OPENED LIB\n"); + lovrLog("\n OPENED LIB\n"); lovrSetErrorCallback((lovrErrorHandler) android_vthrow, L); @@ -391,7 +391,7 @@ void bridgeLovrInit(BridgeLovrInitData *initData) { lua_pushcfunction(L, luax_getstack); if (luaL_loadbuffer(L, (const char*) boot_lua, boot_lua_len, "boot.lua") || lua_pcall(L, 0, 1, -2)) { - __android_log_print(ANDROID_LOG_DEBUG, "LOVR", "\n LUA STARTUP FAILED: %s\n", lua_tostring(L, -1)); + lovrWarn("\n LUA STARTUP FAILED: %s\n", lua_tostring(L, -1)); lua_close(L); assert(0); } @@ -401,7 +401,7 @@ void bridgeLovrInit(BridgeLovrInitData *initData) { lua_atpanic(Lcoroutine, luax_custom_atpanic); coroutineRef = luaL_ref(L, LUA_REGISTRYINDEX); // Hold on to the Lua-side coroutine object so it isn't GC'd - __android_log_print(ANDROID_LOG_DEBUG, "LOVR", "\n BRIDGE INIT COMPLETE\n"); + lovrLog("\n BRIDGE INIT COMPLETE\n"); } void bridgeLovrUpdate(BridgeLovrUpdateData *updateData) { @@ -424,7 +424,7 @@ void bridgeLovrUpdate(BridgeLovrUpdateData *updateData) { } int coroutineArgs = luax_pushLovrHeadsetRenderError(Lcoroutine); if (lua_resume(Lcoroutine, coroutineArgs) != LUA_YIELD) { - __android_log_print(ANDROID_LOG_DEBUG, "LOVR", "\n LUA QUIT\n"); + lovrLog("\n LUA QUIT\n"); assert(0); } }
EC: Reverse the default asn1_flag in a new EC_GROUP The default was OPENSSL_EC_NAMED_CURVE, but that's not true until a curve name has been set, so we change the initial value to OPENSSL_EC_EXPLICIT_CURVE and let EC_GROUP_set_curve_name() change it to OPENSSL_EC_NAMED_CURVE. Submitted by Matt Caswell
@@ -63,7 +63,7 @@ EC_GROUP *ec_group_new_ex(OSSL_LIB_CTX *libctx, const char *propq, if (ret->cofactor == NULL) goto err; } - ret->asn1_flag = OPENSSL_EC_NAMED_CURVE; + ret->asn1_flag = OPENSSL_EC_EXPLICIT_CURVE; ret->asn1_form = POINT_CONVERSION_UNCOMPRESSED; if (!meth->group_init(ret)) goto err; @@ -481,6 +481,10 @@ const BIGNUM *EC_GROUP_get0_cofactor(const EC_GROUP *group) void EC_GROUP_set_curve_name(EC_GROUP *group, int nid) { group->curve_name = nid; + group->asn1_flag = + (nid != NID_undef) + ? OPENSSL_EC_NAMED_CURVE + : OPENSSL_EC_EXPLICIT_CURVE; } int EC_GROUP_get_curve_name(const EC_GROUP *group)
Add USE_PERL fallback option for create script used with FUNCTION_PROFILE
@@ -531,8 +531,11 @@ $(BLASOBJS) $(BLASOBJS_P) : functable.h $(BLASOBJS) $(BLASOBJS_P) : override CFLAGS += -DPROFILE_FUNC_NAME=interface_$(*F) functable.h : Makefile +ifndef USE_PERL ./create $(FUNCALLFILES) > functable.h - +else + ./create.pl $(FUNCALLFILES) > functable.h +endif endif clean ::
nimble/ll: Fix len od directed advertsing report
@@ -761,11 +761,13 @@ ble_ll_scan_send_adv_report(uint8_t pdu_type, uint8_t txadd, struct os_mbuf *om, if ((inita[5] & 0x40)) { /* For resolvable we send separate event */ subev = BLE_HCI_LE_SUBEV_DIRECT_ADV_RPT; + event_len = BLE_HCI_LE_ADV_DIRECT_RPT_LEN; } else { subev = BLE_HCI_LE_SUBEV_ADV_RPT; + event_len = BLE_HCI_LE_ADV_RPT_MIN_LEN; } evtype = BLE_HCI_ADV_RPT_EVTYPE_DIR_IND; - event_len = BLE_HCI_LE_ADV_DIRECT_RPT_LEN; + adv_data_len = 0; } else { subev = BLE_HCI_LE_SUBEV_ADV_RPT;
Fix test_addpattern test Thanks
@@ -207,13 +207,14 @@ BOOST_FIXTURE_TEST_CASE(test_progressive_stepping, Fixture) BOOST_FIXTURE_TEST_CASE(test_addpattern, Fixture) { int pat_index, n_patterns_1, n_patterns_2; + char newpat[] = "new_pattern"; // get the number of current patterns error = EN_getcount(ph, EN_PATCOUNT, &n_patterns_1); BOOST_REQUIRE(error == 0); // add a new pattern - error = EN_addpattern(ph, 'new_pattern'); + error = EN_addpattern(ph, newpat); BOOST_REQUIRE(error == 0); // get the new patterns count, shoul dbe the old one + 1 @@ -222,7 +223,7 @@ BOOST_FIXTURE_TEST_CASE(test_addpattern, Fixture) BOOST_REQUIRE(n_patterns_1 + 1 == n_patterns_2); // gwt the new patterns index, should be as the number of patterns - error = EN_getpatternindex(ph, 'new_pattern', &pat_index); + error = EN_getpatternindex(ph, newpat, &pat_index); BOOST_REQUIRE(pat_index == n_patterns_2); }
out_s3: fix parameter for scheduler timer
@@ -1200,17 +1200,18 @@ static void cb_s3_flush(const void *data, size_t bytes, void *out_context, struct flb_config *config) { - struct flb_s3 *ctx = out_context; - flb_sds_t json = NULL; - struct s3_file *chunk = NULL; - struct multipart_upload *m_upload = NULL; + int ret; + int len; + int timeout_check = FLB_FALSE; char *buffer = NULL; size_t buffer_size; - int timeout_check = FLB_FALSE; size_t chunk_size = 0; size_t upload_size = 0; - int ret; - int len; + flb_sds_t json = NULL; + struct s3_file *chunk = NULL; + struct flb_s3 *ctx = out_context; + struct multipart_upload *m_upload = NULL; + struct flb_sched *sched; (void) i_ins; (void) config; @@ -1242,7 +1243,8 @@ static void cb_s3_flush(const void *data, size_t bytes, "Creating upload timer with frequency %ds", ctx->timer_ms / 1000); - ret = flb_sched_timer_cb_create(config, FLB_SCHED_TIMER_CB_PERM, + sched = flb_sched_ctx_get(); + ret = flb_sched_timer_cb_create(sched, FLB_SCHED_TIMER_CB_PERM, ctx->timer_ms, cb_s3_upload, ctx);
Be more specific about location of compile error (we only know the innermost tuple).
@@ -980,7 +980,7 @@ onvalue." (def {:error err :error-line errl :error-column errc} res) (onerr where "compile" (if (< 0 errl) - (string err " on line " errl ", column " errc) + (string err " in form at line " errl ", column " errc) err))))) :a)) (def res (resume f))
mesh: Fix transport tx and rx Fix seg_tx occupy when no segment not send and allocate rx_seg when receive such message. this is port of
@@ -403,8 +403,7 @@ static void seg_tx_send_unacked(struct seg_tx *tx) BUF_TIMEOUT); if (!seg) { BT_DBG("Allocating segment failed"); - tx->sending = 0U; - return; + goto end; } net_buf_reserve(seg, BT_MESH_NET_HDR_LEN); @@ -420,12 +419,17 @@ static void seg_tx_send_unacked(struct seg_tx *tx) seg_tx_complete(tx, -EIO); BT_DBG("Sending segment failed"); tx->seg_pending--; - tx->sending = 0U; - return; + goto end; } } - tx->sending = 0U; tx->seg_o = 0U; + end: + if (!tx->seg_pending) { + k_delayed_work_submit(&tx->retransmit, + SEG_RETRANSMIT_TIMEOUT(tx)); + } + + tx->sending = 0U; tx->attempts--; } @@ -1349,6 +1353,10 @@ static void seg_rx_reset(struct seg_rx *rx, bool full_reset) } for (i = 0; i <= rx->seg_n; i++) { + if (!rx->seg[i]) { + continue; + } + k_mem_slab_free(&segs, &rx->seg[i]); rx->seg[i] = NULL; } @@ -1457,12 +1465,12 @@ static struct seg_rx *seg_rx_alloc(struct bt_mesh_net_rx *net_rx, const u8_t *hdr, const u64_t *seq_auth, u8_t seg_n) { - int i, j; + int i; /* No race condition on this check, as this function only executes in * the collaborative Bluetooth rx thread: */ - if (k_mem_slab_num_free_get(&segs) < seg_n) { + if (k_mem_slab_num_free_get(&segs) < 1) { BT_WARN("Not enough segments for incoming message"); return NULL; } @@ -1485,14 +1493,6 @@ static struct seg_rx *seg_rx_alloc(struct bt_mesh_net_rx *net_rx, rx->dst = net_rx->ctx.recv_dst; rx->block = 0; - /* Allocating everything at the beginning to avoid any failures - * after initial rx. Could reduce overall buffer usage by - * allocating as we go? - */ - for (j = 0; j <= seg_n; j++) { - k_mem_slab_alloc(&segs, &rx->seg[j]); - } - BT_DBG("New RX context. Block Complete 0x%08x", (unsigned) BLOCK_COMPLETE(seg_n)); @@ -1681,6 +1681,13 @@ found_rx: k_delayed_work_submit(&rx->ack, ack_timeout(rx)); } + /* Allocated segment here */ + err = k_mem_slab_alloc(&segs, &rx->seg[seg_o]); + if (err) { + BT_WARN("Unable allocate buffer for Seg %u", seg_o); + return -ENOBUFS; + } + memcpy(rx->seg[seg_o], buf->om_data, buf->om_len); BT_DBG("Received %u/%u", seg_o, seg_n);