message
stringlengths
6
474
diff
stringlengths
8
5.22k
Updated Changelog for v1.4.3.
+Changes to GoAccess 1.4.3 - Friday, December 04, 2020 + + - Added the ability to set how often goaccess will parse data and output to + the HTML report via '--html-refresh=<secs>'. + - Changed how TLS is parsed so the Cypher uses a separate specifier than the + TLS version. It now uses '%K' for the TLS version and '%k' for the Cypher. + - Fixed issue where real-time output would double count a rotated log. This + was due to the change of inode upon rotating the log. + - Updated man page to reflect proper way of 'tail -f' a remote access log. + Changes to GoAccess 1.4.2 - Monday, November 16, 2020 - Added the ability to show 'Encryption Settings' such as 'TLSv1.2' and
session CHANGE remove vrb message Was printed too many times.
@@ -933,7 +933,6 @@ nc_server_get_cpblts_version(struct ly_ctx *ctx, LYS_VERSION version) /* models */ u = module_set_id = 0; while ((mod = ly_ctx_get_module_iter(ctx, &u))) { - VRB("HELLO module %s", mod->name); if (!strcmp(mod->name, "ietf-yang-library")) { /* ietf-yang-library is always part of the list, but it is specific since it is 1.1 schema */ sprintf(str, "%s?%s%s&module-set-id=%u", mod->ns, mod->rev_size ? "revision=" : "",
CHANGELOG: add bootloader v1.0.5
@@ -71,5 +71,8 @@ customers cannot upgrade their bootloader, its changes are recorded separately. ## Bootloader +### v1.0.5 +- Add SSD1312 driver for new OLED screens + ### v1.0.4 - Make bootloader mode more user-friendly and prompt for action on empty firmware
wingchi perf add hash table to save pid
@@ -73,7 +73,6 @@ bpf_text = """ value = forked.lookup(&pid) ; if( value!= NULL) { value->type=EVENT_EXIT; - //bpf_trace_printk("yes! value=%d",value->type); events.perf_submit(ctx,value,sizeof(data)) ; forked.delete(&pid); return 0 ; @@ -121,7 +120,6 @@ bpf_text = """ data.pid = pid ; data.tgid = bpf_get_current_pid_tgid()>>32 ; data.type=EVENT_FORK; - //bpf_trace_printk("shit!! value=%d",data.type); data.uid= bpf_get_current_uid_gid() & 0xffffffff; bpf_get_current_comm(&data.comm, sizeof(data.comm)) ; forked.insert(&pid,&data) ;
RISCV64: Correcting pmap resolve
@@ -129,7 +129,7 @@ int pmap_enter(pmap_t *pmap, addr_t pa, void *va, int attr, page_t *alloc) /* Map next level pdir */ addr = ((pmap->pdir2[pdi2] >> 10) << 12); - pmap_common.pdir0[((u64)pmap_common.ptable >> 12) & 0x1ff] = (((addr >> 12) << 10) | 0xcf); + pmap_common.pdir0[((u64)pmap_common.ptable >> 12) & 0x1ff] = (((addr >> 12) << 10) | (attr & 0x10) | 0xcf); /* PGHD_WRITE | PGHD_PRESENT | PGHD_USER); */ hal_cpuFlushTLB(va); @@ -146,13 +146,14 @@ int pmap_enter(pmap_t *pmap, addr_t pa, void *va, int attr, page_t *alloc) /* Map next level pdir */ addr = ((pmap_common.ptable[pdi1] >> 10) << 12); - pmap_common.pdir0[((u64)pmap_common.ptable >> 12) & 0x1ff] = (((addr >> 12) << 10) | 0xcf | (attr & 0x3f)); + attr |= 2; + pmap_common.pdir0[((u64)pmap_common.ptable >> 12) & 0x1ff] = (((addr >> 12) << 10) | 0xcf); /* PGHD_WRITE | PGHD_PRESENT | PGHD_USER); */ - hal_cpuFlushTLB(va); + hal_cpuFlushTLB(pmap_common.ptable); /* And at last map page or only changle attributes of map entry */ - pmap_common.ptable[pti] = (((pa >> 12) << 10) | 0xcf | (attr & 0x3f)); + pmap_common.ptable[pti] = (((pa >> 12) << 10) | 0xc1 | (attr & 0x3f)); /*lib_printf("%p pdir2[%d]=%p pdir1[%d]=%p ptable[%d]=%p\n", va, pdi2, a2, pdi1, a1, pti, pa);*/ @@ -231,7 +232,7 @@ addr_t pmap_resolve(pmap_t *pmap, void *vaddr) pmap_common.pdir0[((u64)pmap_common.ptable >> 12) & 0x1ff] = (((addr >> 12) << 10) | 0xcf); hal_cpuFlushTLB(vaddr); - addr = ((pmap_common.pdir0[pti] >> 10) << 12); + addr = ((pmap_common.ptable[pti] >> 10) << 12); hal_spinlockClear(&pmap_common.lock, &sc); return addr;
fix(fatfs) add missing cast f_tell requires a FIL type pointer causing compiling to fail.
@@ -184,10 +184,10 @@ static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs f_lseek(file_p, pos); break; case LV_FS_SEEK_CUR: - f_lseek(file_p, f_tell(file_p) + pos); + f_lseek(file_p, f_tell((FIL *)file_p) + pos); break; case LV_FS_SEEK_END: - f_lseek(file_p, f_size(file_p) + pos); + f_lseek(file_p, f_size((FIL *)file_p) + pos); break; default: break; @@ -206,7 +206,7 @@ static lv_fs_res_t fs_seek(lv_fs_drv_t * drv, void * file_p, uint32_t pos, lv_fs static lv_fs_res_t fs_tell(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p) { LV_UNUSED(drv); - *pos_p = f_tell(file_p); + *pos_p = f_tell((FIL *)file_p); return LV_FS_RES_OK; }
fix links to new iotivity.org website
@@ -153,7 +153,7 @@ Other information sources - `Wiki <https://github.com/iotivity/iotivity-lite/wiki>`_ - `OCF GitHub <https://github.com/openconnectivityfoundation>`_ - `OCF Specifications <https://openconnectivity.org/developer/specifications/>`_ -- `oneIOTa data models <https://openconnectivity.org/developer/oneiota-data-model-tool>`_ +- `OCF data models <https://openconnectivityfoundation.github.io/devicemodels/docs/index.html>`_ - `plgd (OCF compliant Cloud implementation) <https://plgd.dev/>`_ - `plgd testing <https://plgd.dev/developer-guide/testing/>`_ @@ -167,15 +167,15 @@ Grab source and dependencies using: Please check here for build instructions: -- `Linux <https://iotivity.org/documentation/building-iotivity-linux>`_ +- `Linux <https://iotivity.org/build_linux/>`_ -- `Windows <https://iotivity.org/documentation/building-iotivity-windows>`_ +- `Windows <https://iotivity.org/build_windows/>`_ - `CMake (Linux & Windows) <https://github.com/iotivity/iotivity-lite/wiki/Building-using-CMake-(Windows-&-Linux)>`_ -- `Android <https://iotivity.org/documentation/building-iotivity-android>`_ +- `Android <https://iotivity.org/build_android/>`_ -- `Java language bindings <https://iotivity.org/java-language-bindings>`_ +- `Java language bindings <https://iotivity.org/build_java/>`_ - `Python language bindings <https://github.com/iotivity/iotivity-lite/tree/master/python>`_
Default RBF to off
@@ -149,7 +149,7 @@ static const unsigned int DEFAULT_BANSCORE_THRESHOLD = 100; /** Default for -persistmempool */ static const bool DEFAULT_PERSIST_MEMPOOL = true; /** Default for -mempoolreplacement */ -static const bool DEFAULT_ENABLE_REPLACEMENT = true; +static const bool DEFAULT_ENABLE_REPLACEMENT = false; /** Default for using fee filter */ static const bool DEFAULT_FEEFILTER = true;
Fixed issue with hidapi/usbmon pairing
@@ -2024,7 +2024,7 @@ void survive_data_cb_locked(SurviveUSBInterface *si) { } else { #ifdef HIDAPI // TODO: This seems hacky.... - for (int i = 0; i < si->sv->udev_cnt; i++) { + for (int i = 0; si->sv && i < si->sv->udev_cnt; i++) { struct SurviveUSBInfo *usbInfo = &si->sv->udev[i]; int r = update_feature_report(usbInfo->handle, 0, vive_magic_raw_mode_1, sizeof(vive_magic_raw_mode_1));
Completions: Fix suggestion of option `version` Fish will now suggest the option `--version` (`-V`), even if the current `kdb` command contains no subcommand.
@@ -127,7 +127,8 @@ complete -c kdb -n '__fish_kdb_needs_namespace' -x -a '(__fish_kdb_print_namespa __fish_kdb_add_option '__fish_kdb_subcommand_supports_common_options' 'help' 'H' 'Show the man page' __fish_kdb_add_option '__fish_kdb_subcommand_supports_option_null' 'null' '0' 'Use binary 0 termination.' __fish_kdb_add_option '__fish_kdb_subcommand_supports_option_verbose' 'verbose' 'v' 'Explain what is happening' -__fish_kdb_add_option '__fish_kdb_subcommand_supports_common_options' 'version' 'V' 'Print version info' + +__fish_kdb_add_option "not __fish_kdb_subcommand; or __fish_kdb_subcommand_supports_common_options" 'version' 'V' 'Print version info' set -l description 'Use a different profile for kdb configuration' __fish_kdb_add_option '__fish_kdb_subcommand_supports_common_options' 'profile' 'p' "$description" 'current'
[bsp][stm32] add ci for stm32f411-st-nucleo bsp
@@ -86,6 +86,7 @@ env: - RTT_BSP='stm32/stm32f103-fire-arbitrary' RTT_TOOL_CHAIN='sourcery-arm' - RTT_BSP='stm32/stm32f407-atk-explorer' RTT_TOOL_CHAIN='sourcery-arm' - RTT_BSP='stm32/stm32f407-st-discovery' RTT_TOOL_CHAIN='sourcery-arm' + - RTT_BSP='stm32/stm32f411-st-nucleo' RTT_TOOL_CHAIN='sourcery-arm' - RTT_BSP='stm32/stm32f429-armfly-v6' RTT_TOOL_CHAIN='sourcery-arm' - RTT_BSP='stm32/stm32f429-atk-apollo' RTT_TOOL_CHAIN='sourcery-arm' - RTT_BSP='stm32/stm32f429-fire-challenger' RTT_TOOL_CHAIN='sourcery-arm'
OpenCanopy: Fix typo in the method names
@@ -38,7 +38,7 @@ STATIC EFI_CONSOLE_CONTROL_SCREEN_MODE mPreviousMode; STATIC EFI_STATUS -OcShowMenyByOcEnter ( +OcShowMenuByOcEnter ( IN OC_BOOT_CONTEXT *BootContext ) { @@ -64,7 +64,7 @@ OcShowMenyByOcEnter ( STATIC VOID -OcShowMenyByOcLeave ( +OcShowMenuByOcLeave ( VOID ) { @@ -95,7 +95,7 @@ OcShowMenuByOc ( mGuiContext.PickerContext = BootContext->PickerContext; mGuiContext.AudioPlaybackTimeout = -1; - Status = OcShowMenyByOcEnter (BootContext); + Status = OcShowMenuByOcEnter (BootContext); if (EFI_ERROR (Status)) { return Status; } @@ -113,7 +113,7 @@ OcShowMenuByOc ( InternalGetCursorImage ); if (EFI_ERROR (Status)) { - OcShowMenyByOcLeave (); + OcShowMenuByOcLeave (); return Status; } @@ -125,7 +125,7 @@ OcShowMenuByOc ( Index == BootContext->DefaultEntry->EntryIndex - 1 ); if (EFI_ERROR (Status)) { - OcShowMenyByOcLeave (); + OcShowMenuByOcLeave (); return Status; } } @@ -168,7 +168,7 @@ OcShowMenuByOc ( // GuiClearScreen (&mDrawContext, mBackgroundImage.Buffer); BootPickerViewDeinitialize (&mDrawContext, &mGuiContext); - OcShowMenyByOcLeave (); + OcShowMenuByOcLeave (); *ChosenBootEntry = mGuiContext.BootEntry; BootContext->PickerContext->HideAuxiliary = mGuiContext.HideAuxiliary;
VERSION bump to version 1.4.121
@@ -46,7 +46,7 @@ endif() # micro version is changed with a set of small changes or bugfixes anywhere in the project. set(SYSREPO_MAJOR_VERSION 1) set(SYSREPO_MINOR_VERSION 4) -set(SYSREPO_MICRO_VERSION 120) +set(SYSREPO_MICRO_VERSION 121) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
fix: update xst.info
-st| simpleterm, +xst| simpleterm, acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, am, bce, @@ -192,24 +192,24 @@ st| simpleterm, Tc, Ms=\E]52;%p1%s;%p2%s\007, -st-256color| simpleterm with 256 colors, - use=st, +xst-256color| simpleterm with 256 colors, + use=xst, colors#256, pairs#32767, # Nicked from xterm-256color setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m, setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m, -st-meta| simpleterm with meta key, - use=st, +xst-meta| simpleterm with meta key, + use=xst, km, rmm=\E[?1034l, smm=\E[?1034h, rs2=\E[4l\E>\E[?1034h, is2=\E[4l\E>\E[?1034h, -st-meta-256color| simpleterm with meta key and 256 colors, - use=st-256color, +xst-meta-256color| simpleterm with meta key and 256 colors, + use=xst-256color, km, rmm=\E[?1034l, smm=\E[?1034h,
vlib: use pthread_attr_setstack() to set thread stack Type: improvement
@@ -404,23 +404,28 @@ vlib_worker_thread_init (vlib_worker_thread_t * w) void * vlib_worker_thread_bootstrap_fn (void *arg) { - void *rv; vlib_worker_thread_t *w = arg; - vlib_main_t *vm = 0; w->lwp = syscall (SYS_gettid); w->thread_id = pthread_self (); __os_thread_index = w - vlib_worker_threads; - vm = vlib_global_main.vlib_mains[__os_thread_index]; + if (CLIB_DEBUG > 0) + { + void *frame_addr = __builtin_frame_address (0); + if (frame_addr < (void *) w->thread_stack || + frame_addr > (void *) w->thread_stack + VLIB_THREAD_STACK_SIZE) + { + /* heap is not set yet */ + fprintf (stderr, "thread stack is not set properly\n"); + exit (1); + } + } + + w->thread_function (arg); - vlib_process_start_switch_stack (vm, 0); - rv = (void *) clib_calljmp - ((uword (*)(uword)) w->thread_function, - (uword) arg, w->thread_stack + VLIB_THREAD_STACK_SIZE); - /* NOTREACHED, we hope */ - return rv; + return 0; } void @@ -463,6 +468,7 @@ vlib_launch_thread_int (void *fp, vlib_worker_thread_t * w, unsigned cpu_id) clib_mem_main_t *mm = &clib_mem_main; vlib_thread_main_t *tm = &vlib_thread_main; pthread_t worker; + pthread_attr_t attr; cpu_set_t cpuset; void *(*fp_arg) (void *) = fp; void *numa_heap; @@ -493,12 +499,22 @@ vlib_launch_thread_int (void *fp, vlib_worker_thread_t * w, unsigned cpu_id) CPU_ZERO (&cpuset); CPU_SET (cpu_id, &cpuset); - if (pthread_create (&worker, NULL /* attr */ , fp_arg, (void *) w)) + if (pthread_attr_init (&attr)) + return clib_error_return_unix (0, "pthread_attr_init"); + + if (pthread_attr_setstack (&attr, w->thread_stack, + VLIB_THREAD_STACK_SIZE)) + return clib_error_return_unix (0, "pthread_attr_setstack"); + + if (pthread_create (&worker, &attr, fp_arg, (void *) w)) return clib_error_return_unix (0, "pthread_create"); if (pthread_setaffinity_np (worker, sizeof (cpu_set_t), &cpuset)) return clib_error_return_unix (0, "pthread_setaffinity_np"); + if (pthread_attr_destroy (&attr)) + return clib_error_return_unix (0, "pthread_attr_destroy"); + return 0; } @@ -1514,8 +1530,6 @@ vlib_worker_thread_fn (void *arg) vlib_main_t *vm = vlib_get_main (); clib_error_t *e; - vlib_process_finish_switch_stack (vm); - ASSERT (vm->thread_index == vlib_get_thread_index ()); vlib_worker_thread_init (w);
Test Entity declaration marked PUBLIC with no ID
@@ -6730,6 +6730,18 @@ START_TEST(test_long_doctype) } END_TEST +START_TEST(test_bad_entity) +{ + const char *text = + "<!DOCTYPE doc [\n" + " <!ENTITY foo PUBLIC>\n" + "]>\n" + "<doc/>"; + expect_failure(text, XML_ERROR_SYNTAX, + "ENTITY without Public ID is not rejected"); +} +END_TEST + /* * Namespaces tests. */ @@ -12217,6 +12229,7 @@ make_suite(void) tcase_add_test(tc_basic, test_short_doctype_2); tcase_add_test(tc_basic, test_short_doctype_3); tcase_add_test(tc_basic, test_long_doctype); + tcase_add_test(tc_basic, test_bad_entity); suite_add_tcase(s, tc_namespace); tcase_add_checked_fixture(tc_namespace,
Changed a FIXME note to a TODO, as per the new standard.
@@ -161,7 +161,7 @@ class Parameters(object): # Set value of parameter setattr(self.parameters, key, val) - # FIXME: Should update/replace CCL objects appropriately + # TODO: Should update/replace CCL objects appropriately def __str__(self): """Output the parameters that were set, and their values.
Stubs for getuid() and geteuid()
@@ -1315,6 +1315,18 @@ sysreturn sched_setaffinity(int pid, u64 cpusetsize, const cpu_set_t *mast) return 0; /* stub */ } +/* uid_t getuid(void); */ +sysreturn getuid(void) +{ + return set_syscall_return(current, 0); +} + +/* uid_t geteuid(void); */ +sysreturn geteuid(void) +{ + return set_syscall_return(current, 0); +} + void register_file_syscalls(void **map) { register_syscall(map, SYS_read, read); @@ -1358,6 +1370,7 @@ void register_file_syscalls(void **map) register_syscall(map, SYS_newfstatat, newfstatat); register_syscall(map, SYS_sched_getaffinity, sched_getaffinity); register_syscall(map, SYS_sched_setaffinity, sched_setaffinity); + register_syscall(map, SYS_getuid, getuid); } void *linux_syscalls[SYS_MAX];
* Set correct CMAKE_C_FLAGS_RELEASEWITHDEBINFO cmake flags
@@ -135,6 +135,7 @@ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_ASAN} -O0 -g -ggdb -Werror -DDEBUG -D_DEBUG - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_ASAN} -O3 -DNDEBUG") set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-Wl,-s") set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} -g") +set(CMAKE_C_FLAGS_RELEASEWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}") if (CMAKE_COMPILER_IS_GNUCC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
removed unnecesarry restarting of iterations and recaching of buckets in split, now just recaching the single record which was changed and decrementing the loop counter
@@ -352,11 +352,11 @@ split( } /* refresh cached data and restart iteration */ - i = -1; - record_offset = -1 * record_total_size; - fseek(linear_hash->database, bucket_loc + sizeof(linear_hash_bucket_t), SEEK_SET); - fread(records, record_total_size, linear_hash->records_per_bucket, linear_hash->database); + fseek(linear_hash->database, bucket_loc + sizeof(linear_hash_bucket_t) + i * record_total_size, SEEK_SET); + fread(records + i * record_total_size, record_total_size, linear_hash->records_per_bucket, linear_hash->database); status.error = linear_hash_get_bucket(bucket_loc, &bucket, linear_hash); + i--; + record_offset -= record_total_size; } /* record_loc += record_total_size; */ @@ -407,11 +407,11 @@ split( } /* refresh cached data and restart iteration */ - i = -1; - record_offset = -1 * record_total_size; - fseek(linear_hash->database, bucket_loc + sizeof(linear_hash_bucket_t), SEEK_SET); - fread(records, record_total_size, linear_hash->records_per_bucket, linear_hash->database); + fseek(linear_hash->database, bucket_loc + sizeof(linear_hash_bucket_t) + i * record_total_size, SEEK_SET); + fread(records + i * record_total_size, record_total_size, linear_hash->records_per_bucket, linear_hash->database); status.error = linear_hash_get_bucket(bucket_loc, &bucket, linear_hash); + i--; + record_offset -= record_total_size; } record_offset += record_total_size; @@ -902,9 +902,10 @@ linear_hash_delete( /* obtain the swap record */ linear_hash_get_bucket_swap_record(bucket_idx, &swap_record_loc, terminal_record_key, terminal_record_value, &terminal_record_status, linear_hash); - // delete all swap records which are going to be deleted anyways + /* delete all swap records which are going to be deleted anyways */ while (linear_hash->super.compare(terminal_record_key, key, linear_hash->super.record.key_size) == 0) { linear_hash_get_bucket_swap_record(bucket_idx, &swap_record_loc, terminal_record_key, terminal_record_value, &terminal_record_status, linear_hash); + if (terminal_record_status == 0) { break; } @@ -957,9 +958,10 @@ linear_hash_delete( /* obtain the swap record */ linear_hash_get_bucket_swap_record(bucket_idx, &swap_record_loc, terminal_record_key, terminal_record_value, &terminal_record_status, linear_hash); - // delete all swap records which are going to be deleted anyways + /* delete all swap records which are going to be deleted anyways */ while (linear_hash->super.compare(terminal_record_key, key, linear_hash->super.record.key_size) == 0) { linear_hash_get_bucket_swap_record(bucket_idx, &swap_record_loc, terminal_record_key, terminal_record_value, &terminal_record_status, linear_hash); + if (terminal_record_status == 0) { break; }
nimble/ll: Fix not validating no-param HCI commands sizes If command has no input parameters its size should be verified before passing it to handler function.
@@ -1152,10 +1152,14 @@ ble_ll_hci_le_cmd_proc(const uint8_t *cmdbuf, uint8_t len, uint16_t ocf, #endif #endif case BLE_HCI_OCF_LE_RD_TRANSMIT_POWER: + if (len == 0) { rc = ble_ll_read_tx_power(rspbuf, rsplen); + } break; case BLE_HCI_OCF_LE_RD_RF_PATH_COMPENSATION: + if (len == 0) { rc = ble_ll_read_rf_path_compensation(rspbuf, rsplen); + } break; case BLE_HCI_OCF_LE_WR_RF_PATH_COMPENSATION: rc = ble_ll_write_rf_path_compensation(cmdbuf, len); @@ -1217,7 +1221,9 @@ ble_ll_hci_le_cmd_proc(const uint8_t *cmdbuf, uint8_t len, uint16_t ocf, rc = ble_ll_iso_remove_iso_data_path(cmdbuf, len); break; case BLE_HCI_OCF_LE_RD_BUF_SIZE_V2: + if (len == 0) { rc = ble_ll_hci_le_read_bufsize_v2(rspbuf, rsplen); + } break; #endif #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_ISO_TEST)
Compile with axis properties exposed.
@@ -321,6 +321,7 @@ SCRIPT = source/scriptlib/StackedSymbolTable.o source/preprocessorlib/pp_parser.o \ source/preprocessorlib/pp_expr.o SCRIPT_BUILTINS = source/openborscript/animation.o \ + source/openborscript/axis.o \ source/openborscript/binding.o \ source/openborscript/collision_attack.o \ source/openborscript/collision_body.o \
temporary disable https
@@ -23,7 +23,7 @@ tests_general.append([0, 0, workdir + 'client_http_get -n 2 -u /files/4M bsd10.n #tests_general.append([0, 0, workdir + 'tneat -L -n 1024 -P ' + workdir + 'prop_tcp.json']) if (platform.system() == "FreeBSD") or (platform.system() == "Linux"): - tests_general.append([0, 0, workdir + 'client_http_get -P ' + workdir + 'prop_tcp_security.json -p 443 -v 2 www.fh-muenster.de']) + #tests_general.append([0, 0, workdir + 'client_http_get -P ' + workdir + 'prop_tcp_security.json -p 443 -v 2 www.fh-muenster.de']) tests_general.append([0, 0, workdir + 'tneat -v 2 -P ' + workdir + 'prop_sctp_dtls.json interop.fh-muenster.de']) tests_general.append([0, 0, workdir + 'tneat -v 2 -L -n 1024 -P ' + workdir + 'prop_sctp.json'])
build/configs/rtl8721csm: No support binary signing when making binary Binary signing is not supported on public repo. So call the function to make binary without binary signing even if CONFIG_BINARY_SIGNING is enabled.
@@ -168,19 +168,11 @@ function concatenate_binary_with_signing() #signing echo "========== Binary SIGNING ==========" bash $BUILDDIR/configs/rtl8721csm/rtl8721csm_signing.sh kernel - - if [ "${CONFIG_AMEBAD_TRUSTZONE}" != "y" ];then - echo "========== Concatenate_binary for TZ disabled ==========" - cat $BINDIR/xip_image2_prepend.bin $BINDIR/ram_2_prepend.bin $BINDIR/psram_2_prepend.bin > $BINDIR/km4_image2_all.bin - cat $GNUUTL/km0_image2_all.bin $BINDIR/km4_image2_all.bin > $BINDIR/km0_km4_image2.bin - else - echo "========== Concatenate_binary for TZ enabled ==========" - cat $GNUUTL/km0_image2_all.bin $BINDIR/km4_image2_all.bin $BINDIR/km4_image3_all-en.bin $BINDIR/km4_image3_psram-en.bin > $BINDIR/km0_km4_image2.bin - fi } copy_bootloader; if [ "${CONFIG_BINARY_SIGNING}" == "y" ];then - concatenate_binary_with_signing; + # Not support binary signing on public repo. So call making binary without binary signing. + concatenate_binary_without_signing; else concatenate_binary_without_signing; fi
Add AL / CG acknowledgments
@@ -120,4 +120,4 @@ The current lead of the LSST DESC CCL Topical Team is Danielle Leonard (c-d-leon The DESC acknowledges ongoing support from the Institut National de Physique Nucleaire et de Physique des Particules in France; the Science \& Technology Facilities Council in the United Kingdom; and the Department of Energy, the National Science Foundation, and the LSST Corporation in the United States. DESC uses resources of the IN2P3 Computing Center (CC-IN2P3--Lyon/Villeurbanne - France) funded by the Centre National de la Recherche Scientifique; the National Energy Research Scientific Computing Center, a DOE Office of Science User Facility supported by the Office of Science of the U.S. Department of Energy under Contract No. DE-AC02-05CH11231; STFC DiRAC HPC Facilities, funded by UK BIS National E-infrastructure capital grants; and the UK particle physics grid, supported by the GridPP Collaboration. This work was performed in part under DOE Contract DE-AC02-76SF00515. -NEC acknowledges support from a Royal Astronomical Society research fellowship and the Delta ITP consortium, a program of the Netherlands Organisation for Scientific Research (NWO) that is funded by the Dutch Ministry of Education, Culture and Science (OCW). DA acknowledges support from the Science and Technology Facilities Council through an Ernest Rutherford Fellowship, grant reference ST/P004474. +NEC acknowledges support from a Royal Astronomical Society research fellowship and the Delta ITP consortium, a program of the Netherlands Organisation for Scientific Research (NWO) that is funded by the Dutch Ministry of Education, Culture and Science (OCW). DA acknowledges support from the Science and Technology Facilities Council through an Ernest Rutherford Fellowship, grant reference ST/P004474. AL and CG acknowledge support from the European Research Council under the European Union's Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement No. [616170] for work on the generic interface for theory inputs.
Fix a crash or unbounded allocation in RSA_padding_add_PKCS1_PSS_mgf1 and RSA_verify_PKCS1_PSS_mgf1 with 512-bit RSA vs. sha-512.
@@ -54,6 +54,7 @@ int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash, * Negative sLen has special meanings: * -1 sLen == hLen * -2 salt length is autorecovered from signature + * -3 salt length is maximized * -N reserved */ if (sLen == RSA_PSS_SALTLEN_DIGEST) @@ -73,9 +74,13 @@ int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash, EM++; emLen--; } + if (emLen < hLen + 2) { + RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1, RSA_R_DATA_TOO_LARGE); + goto err; + } if (sLen == RSA_PSS_SALTLEN_MAX) { sLen = emLen - hLen - 2; - } else if (emLen < (hLen + sLen + 2)) { /* sLen can be small negative */ + } else if (sLen > emLen - hLen - 2) { /* sLen can be small negative */ RSAerr(RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1, RSA_R_DATA_TOO_LARGE); goto err; } @@ -157,6 +162,7 @@ int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM, * Negative sLen has special meanings: * -1 sLen == hLen * -2 salt length is maximized + * -3 same as above (on signing) * -N reserved */ if (sLen == RSA_PSS_SALTLEN_DIGEST) @@ -174,9 +180,14 @@ int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM, *EM++ = 0; emLen--; } + if (emLen < hLen + 2) { + RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_PSS_MGF1, + RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); + goto err; + } if (sLen == RSA_PSS_SALTLEN_MAX) { sLen = emLen - hLen - 2; - } else if (emLen < (hLen + sLen + 2)) { + } else if (sLen > emLen - hLen - 2) { RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_PSS_MGF1, RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE); goto err;
[Bsp][tina]fix linux env error
@@ -18,8 +18,8 @@ config $PKGS_DIR option env="PKGS_ROOT" default "packages" -source "$RTT_DIR/KConfig" -source "$PKGS_DIR/KConfig" +source "$RTT_DIR/Kconfig" +source "$PKGS_DIR/Kconfig" config SOC_TINA bool
Fix windows ifdef.
@@ -541,7 +541,7 @@ static JanetStream *get_stdio_for_handle(JanetHandle handle, void *orig, int isw /* duplicate handle when converting file to stream */ #ifdef JANET_WINDOWS HANDLE prochandle = GetCurrentProcess(); - HANDLE newHandle; + HANDLE newHandle = INVALID_HANDLE_VALUE; if (!DuplicateHandle(prochandle, handle, prochandle, &newHandle, 0, FALSE, DUPLICATE_SAME_ACCESS)) { return NULL; } @@ -550,8 +550,8 @@ static JanetStream *get_stdio_for_handle(JanetHandle handle, void *orig, int isw if (newHandle < 0) { return NULL; } - return janet_stream(newHandle, flags, NULL); #endif + return janet_stream(newHandle, flags, NULL); } else { return orig; }
Tests: "language_deps" option checked more carefully.
import pytest from unit.applications.lang.python import TestApplicationPython from unit.option import option +from unit.utils import findmnt +from unit.utils import waitformount +from unit.utils import waitforunmount class TestPythonIsolation(TestApplicationPython): @@ -60,39 +63,28 @@ class TestPythonIsolation(TestApplicationPython): ), 'application exists in rootfs' def test_python_isolation_rootfs_no_language_deps(self, is_su, temp_dir): - isolation_features = option.available['features']['isolation'].keys() - if not is_su: - if not 'unprivileged_userns_clone' in isolation_features: - pytest.skip('requires unprivileged userns or root') - - if 'user' not in isolation_features: - pytest.skip('user namespace is not supported') - - if 'mnt' not in isolation_features: - pytest.skip('mnt namespace is not supported') - - if 'pid' not in isolation_features: - pytest.skip('pid namespace is not supported') + pytest.skip('requires root') isolation = { 'rootfs': temp_dir, 'automount': {'language_deps': False} } - if not is_su: - isolation['namespaces'] = { - 'mount': True, - 'credential': True, - 'pid': True - } - self.load('empty', isolation=isolation) + assert findmnt().find(temp_dir) == -1 assert (self.get()['status'] != 200), 'disabled language_deps' + assert findmnt().find(temp_dir) == -1 isolation['automount']['language_deps'] = True self.load('empty', isolation=isolation) + assert findmnt().find(temp_dir) == -1 assert (self.get()['status'] == 200), 'enabled language_deps' + assert waitformount(temp_dir), 'language_deps mount' + + self.conf({"listeners": {}, "applications": {}}) + + assert waitforunmount(temp_dir), 'language_deps unmount'
Remove SetLengths() requirement for GCM Also return NOT_SUPPORTED, rather than BAD_STATE for our current workarounds for GCM/CCM
@@ -509,15 +509,12 @@ psa_status_t mbedtls_psa_aead_update_ad( mbedtls_psa_aead_operation_t #if defined(MBEDTLS_PSA_BUILTIN_ALG_GCM) if( operation->alg == PSA_ALG_GCM ) { - if( !operation->lengths_set || operation->ad_started ) - return( PSA_ERROR_BAD_STATE ); - /* GCM currently requires all the additional data to be passed in in * one contiguous buffer, so until that is re-done, we have to enforce * this, as we cannot allocate a buffer to collate multiple calls into. */ - if( operation->ad_remaining != 0 ) - return ( PSA_ERROR_INVALID_ARGUMENT ); + if( operation->ad_started ) + return( PSA_ERROR_NOT_SUPPORTED ); status = mbedtls_to_psa_error( mbedtls_gcm_starts( &operation->ctx.gcm, @@ -537,7 +534,7 @@ psa_status_t mbedtls_psa_aead_update_ad( mbedtls_psa_aead_operation_t /* CCM requires all additional data to be passed in in one go at the minute, as we are basically operating in oneshot mode. */ if( operation->ad_started ) - return( PSA_ERROR_BAD_STATE ); + return( PSA_ERROR_NOT_SUPPORTED ); /* Save the additional data for later, this will be passed in when we have the body. */ @@ -617,11 +614,9 @@ psa_status_t mbedtls_psa_aead_update( mbedtls_psa_aead_operation_t *operation, * must be passed in in one update, rather than deal with the complexity * of non block size aligned updates. This will be fixed in 3.0 when we can change the signature of the GCM multipart functions */ - if( !operation->lengths_set || operation->body_remaining != 0 ) - return( PSA_ERROR_BAD_STATE ); + if( operation->body_started ) + return( PSA_ERROR_NOT_SUPPORTED ); - if( !operation->ad_started ) - return( PSA_ERROR_BAD_STATE ); status = mbedtls_to_psa_error( mbedtls_gcm_update( &operation->ctx.gcm, input_length, @@ -636,7 +631,7 @@ psa_status_t mbedtls_psa_aead_update( mbedtls_psa_aead_operation_t *operation, /* CCM does not support multipart yet, so all the input has to be passed in in one go. */ if( operation->body_started ) - return( PSA_ERROR_BAD_STATE ); + return( PSA_ERROR_NOT_SUPPORTED ); /* Need to store tag for Finish() / Verify() */ operation->tag_buffer =
Calculate reserved tiles counts even when using custom events
@@ -13,6 +13,7 @@ type WalkDenormalizedOptions = | { customEventsLookup: Dictionary<CustomEventDenormalized>; maxDepth: number; + customEventArgs: Record<string, unknown>; }; export const patchEventArgs = ( @@ -57,6 +58,25 @@ export const patchEventArgs = ( }; }; +export const replaceCustomEventArgs = ( + scriptEvent: ScriptEventDenormalized, + customEventArgs: Record<string, unknown> | undefined +) => { + if (!customEventArgs) { + return scriptEvent; + } + return { + ...scriptEvent, + args: { + ...scriptEvent.args, + actorId: + customEventArgs[`$actor[${scriptEvent.args?.actorId || 0}]$`] ?? + "$self$", + // @todo Replace other custom event fields + }, + }; +}; + export const walkDenormalizedEvents = ( script: ScriptEventDenormalized[], options: WalkDenormalizedOptions, @@ -71,7 +91,7 @@ export const walkDenormalizedEvents = ( // Skip commented events continue; } - callback(scriptEvent); + callback(replaceCustomEventArgs(scriptEvent, options?.customEventArgs)); if (scriptEvent.children) { Object.keys(scriptEvent.children).forEach((key) => { const script = scriptEvent.children?.[key]; @@ -94,6 +114,7 @@ export const walkDenormalizedEvents = ( { ...options, maxDepth: options.maxDepth - 1, + customEventArgs: scriptEvent.args || {}, }, callback );
add uoregon student garrett morrison to nersc email
# Jim Eliot, Mon 15 Dec 15:50:16 GMT 2014 # Added case for userid "jimeliot". # +# Garrett Morrison, Mon Jan 2 11:51:16 PST 2017 +# Added case for usedid "gmorriso". Also switch Hank's email to UOregon. +# # ***************************************************************************** @@ -94,9 +97,9 @@ case $1 in "js9") [email protected] ;; - # Hank Childs, Lawrence Berkeley National Laboratory + # Hank Childs, University of Oregon "hrchilds") - [email protected] + [email protected] ;; # Mark Miller, Lawrence Livermore National Laboratory "miller86") @@ -218,6 +221,9 @@ case $1 in "iulian") [email protected] ;; + "gmorriso") + [email protected] + ;; *) [email protected] ;;
graph-store: drop archives and backup
[%3 network:one:store] [%4 network:store] [%5 network:store] - state-6 + [%6 network:store] == ::- -+$ state-6 [%6 network:store] ++$ state-7 [%7 network:store] ++ orm orm:store ++ orm-log orm-log:store ++ mar %graph-update-3 (scag 2 (tap:orm-log update-log)) == :: - %6 [cards this(state old)] + %6 + %_ $ + -.old %7 + archive.old ~ + cards + ;: welp + cards + :: + %+ turn ~(tap by archive.old) + |= [r=resource:store m=marked-graph:store] + ^- card + =/ pax /(rap 3 'archive-'(scot %p entity.r) '-' name.r)/noun + =/ =cage drum-put+!>([pax (jam m)]) + [%pass /archive %agent [our.bowl %hood] %poke cage] + == + :: + %7 [cards this(state old)] == :: ++ on-watch
corrected error message to make it better readable
@@ -42,7 +42,7 @@ static int validateKey (Key * key, Key * parentKey) if (!rc) { ELEKTRA_SET_VALIDATION_SEMANTIC_ERRORF ( - parentKey, "Length check of key %s with value %s failed. Maximum length is %d but the given string is %d", + parentKey, "Length check of key '%s' with value '%s' failed. Maximum length is %d but the given string has length %d", keyName (key), keyString (key), i, c); }
drbg_bytes: remove check for DRBG_UNINITIALIZED state This check not only prevented the automatic reinstantiation of the DRBG, which is implemented in RAND_DRBG_generate(), but also prevented an error message from being generated in the case of failure.
@@ -772,9 +772,6 @@ static int drbg_bytes(unsigned char *out, int count) return 0; CRYPTO_THREAD_write_lock(drbg->lock); - if (drbg->state == DRBG_UNINITIALISED) - goto err; - for ( ; count > 0; count -= chunk, out += chunk) { chunk = count; if (chunk > drbg->max_request)
Add global transaction info in one phase commit xlog. commit tends to add that but the code is not right.
@@ -1291,6 +1291,7 @@ RecordTransactionCommit(void) bool RelcacheInitFileInval = false; bool wrote_xlog; bool isDtxPrepared = 0; + bool isOnePhaseQE = (Gp_role == GP_ROLE_EXECUTE && MyTmGxact->isOnePhaseCommit); TMGXACT_LOG gxact_log; XLogRecPtr recptr = InvalidXLogRecPtr; DistributedTransactionTimeStamp distribTimeStamp = 0; @@ -1307,7 +1308,7 @@ RecordTransactionCommit(void) xid = GetTopTransactionIdIfAny(); markXidCommitted = TransactionIdIsValid(xid); - if (Gp_role == GP_ROLE_EXECUTE && MyTmGxact->isOnePhaseCommit) + if (isOnePhaseQE) dtxCrackOpenGid(MyTmGxact->gid, &distribTimeStamp, &distribXid); /* Get data needed for commit record */ @@ -1420,7 +1421,7 @@ RecordTransactionCommit(void) */ if (nrels > 0 || ndeldbs > 0 || nmsgs > 0 || RelcacheInitFileInval || forceSyncCommit || XLogLogicalInfoActive() || isDtxPrepared || - OidIsValid(pending_tablespace_for_deletion)) + OidIsValid(pending_tablespace_for_deletion) || isOnePhaseQE) { XLogRecData rdata[6]; int lastrdata = 0; @@ -1592,7 +1593,7 @@ RecordTransactionCommit(void) getDtxStartTime(), getDistributedTransactionId(), /* isRedo */ false); - else if (Gp_role == GP_ROLE_EXECUTE && MyTmGxact->isOnePhaseCommit) + else if (isOnePhaseQE) DistributedLog_SetCommittedTree(xid, nchildren, children, distribTimeStamp, distribXid, /* isRedo */ false);
Optional code for iOS to ignore invalid SSL certs
@@ -39,6 +39,14 @@ namespace carto { CFUniquePtr<CFReadStreamRef> requestStream(CFReadStreamCreateForHTTPRequest(kCFAllocatorDefault, cfRequest)); CFReadStreamSetProperty(requestStream, kCFStreamPropertyHTTPShouldAutoredirect, kCFBooleanTrue); CFReadStreamSetProperty(requestStream, kCFStreamPropertyHTTPAttemptPersistentConnection, kCFBooleanTrue); + +#ifdef _CARTO_IGNORE_SSL_CERTS + CFTypeRef sslKeys[1] = { kCFStreamSSLValidatesCertificateChain }; + CFTypeRef sslValues[1] = { kCFBooleanFalse }; + CFUniquePtr<CFDictionaryRef> sslDict(CFDictionaryCreate(NULL, (const void**)sslKeys, (const void**)sslValues, 1, &kCFCopyStringDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks)); + CFReadStreamSetProperty(requestStream, kCFStreamPropertySSLSettings, sslDict); +#endif + if (!CFReadStreamOpen(requestStream)) { throw NetworkException("Failed to open HTTP stream", request.url); }
mmapstorage: fix shelltest cleanup and docs
This file contains important shell tests for mmapstorage which do not fit well into the plugin README. -# Test kdb export & import (pipe size known) +# Test kdb export & import (stat: pipe size known) ```sh # Make temp file @@ -62,9 +62,10 @@ sudo kdb umount user/tests/mmapstorage # Remove temp file rm $(kdb get system/tests/mmaptempfile) +kdb rm -r system/tests/mmaptempfile ``` -# Test kdb export & import (pipe size unknown) +# Test kdb export & import (stat: pipe size unknown) ```sh # Make temp file @@ -123,4 +124,5 @@ sudo kdb umount user/tests/mmapstorage # Remove temp file rm $(kdb get system/tests/mmaptempfile) +kdb rm -r system/tests/mmaptempfile ```
os_win32: add virtual memory functions;
@@ -104,6 +104,22 @@ void os_request_permission(os_permission permission) { // } +void* os_vm_init(size_t size) { + return VirtualAlloc(NULL, size, MEM_RESERVE, PAGE_NOACCESS); +} + +bool os_vm_free(void* p, size_t size) { + return VirtualFree(p, 0, MEM_RELEASE); +} + +bool os_vm_commit(void* p, size_t size) { + return VirtualAlloc(p, size, MEM_COMMIT, PAGE_READWRITE); +} + +bool os_vm_release(void* p, size_t size) { + return VirtualFree(p, 0, MEM_DECOMMIT); +} + void os_on_permission(fn_permission* callback) { // }
Compile damage recursive script exposure.
@@ -332,6 +332,7 @@ SCRIPT_BUILTINS = source/openborscript/commands.o source/openborscript/layer.o \ source/openborscript/level.o \ source/openborscript/math.o \ + source/openborscript/recursive_damage.o \ source/openborscript/string.o RAM = source/ramlib/ram.o RAND = source/randlib/rand32.o
rockspec: call luke with the Lua binary probed by luarocks. Closes * luaposix-git-1.rockspec (build.build_command): Prefix with luarocks expanded $(LUA), otherwise the `#! /usr/bin/env lua` shell magic in build-aux/luke, which may not match the binary installed by the user. Reported-by: Gregory Johnson
@@ -27,7 +27,7 @@ dependencies = { build = { type = 'command', - build_command = 'build-aux/luke' + build_command = '$(LUA) build-aux/luke' .. ' package="' .. package .. '"' .. ' version="' .. version .. '"' .. ' PREFIX="$(PREFIX)"'
updated comments for api docs. Added necessary comments to create api documentation for erlang:system_info/1 esp_largest_free_block and esp_get_minimum_free_size atoms.
@@ -142,6 +142,8 @@ process_info(_Pid, _Key) -> %% The following keys are supported on the ESP32 platform: %% <ul> %% <li><b>esp32_free_heap_size</b> the number of (noncontiguous) free bytes in the ESP32 heap (integer)</li> +%% <li><b>esp_largest_free_block</b> the number of the largest contiguous free bytes in the ESP32 heap (integer)</li> +%% <li><b>esp_get_minimum_free_size</b> the smallest number of free bytes in the ESP32 heap since boot (integer)</li> %% </ul> %% %% Additional keys may be supported on some platforms that are not documented here.
sdl/pixels: add RGB444Model
@@ -339,3 +339,26 @@ func BytesPerPixel(format uint32) int { func BitsPerPixel(format uint32) int { return int(C.bitsPerPixel(C.Uint32(format))) } + +type RGB444 struct { + R, G, B byte +} + +func (c RGB444) RGBA() (r, g, b, a uint32) { + r = uint32(c.R) << 12 + g = uint32(c.G) << 12 + b = uint32(c.B) << 12 + return +} + +var ( + RGB444Model color.Model = color.ModelFunc(rgb444Model) +) + +func rgb444Model(c color.Color) color.Color { + if _, ok := c.(color.RGBA); ok { + return c + } + r, g, b, _ := c.RGBA() + return RGB444{uint8(r >> 12), uint8(g >> 12), uint8(b >> 12)} +}
firfilt/autotest: extending to test recreate() with different input size
@@ -172,6 +172,19 @@ void autotest_firfilt_recreate() for (i=0; i<n; i++) CONTEND_EQUALITY(h[n-i-1], h0[i]*7.1f); + // re-create with longer coefficients array and test impulse response + float h2[2*n+1]; // new random-ish coefficients + for (i=0; i<2*n+1; i++) + h2[i] = cosf(0.2*i+1) + sinf(logf(2.0f)*i); + q = firfilt_crcf_recreate(q, h2, 2*n+1); + for (i=0; i<2*n+1; i++) { + firfilt_crcf_push(q, i==0 ? 1 : 0); + float complex v; + firfilt_crcf_execute(q, &v); + // output is same as input, subject to scaling factor + CONTEND_EQUALITY(v, h2[i]*scale); + } + firfilt_crcf_destroy(q); }
Safier VDP_drawText(..) / VDP_clearText() methods (bounds checking)
@@ -230,15 +230,22 @@ void VDP_drawTextBG(VDPPlane plane, const char *str, u16 x, u16 y) u16 data[128]; const u8 *s; u16 *d; - u16 i, w, len; + u16 i, pw, ph, len; // get the horizontal plane size (in cell) - w = (plane == WINDOW)?windowWidth:planeWidth; + pw = (plane == WINDOW)?windowWidth:planeWidth; + ph = (plane == WINDOW)?32:planeHeight; + + // string outside plane --> exit + if ((x >= pw) || (y >= ph)) + return; + + // get string len len = strlen(str); // if string don't fit in plane, we cut it - if (len > (w - x)) - len = w - x; + if (len > (pw - x)) + len = pw - x; s = (const u8*) str; d = data; @@ -251,12 +258,51 @@ void VDP_drawTextBG(VDPPlane plane, const char *str, u16 x, u16 y) void VDP_clearTextBG(VDPPlane plane, u16 x, u16 y, u16 w) { - VDP_fillTileMapRect(plane, 0, x, y, w, 1); + u16 pw, ph; + u16 wa; + + // get the horizontal plane size (in cell) + pw = (plane == WINDOW)?windowWidth:planeWidth; + ph = (plane == WINDOW)?32:planeHeight; + + // string outside plane --> exit + if ((x >= pw) || (y >= ph)) + return; + + // adjust dim + wa = w; + + // if don't fit in plane, we cut it + if (wa > (pw - x)) + wa = pw - x; + + VDP_fillTileMapRect(plane, 0, x, y, wa, 1); } void VDP_clearTextAreaBG(VDPPlane plane, u16 x, u16 y, u16 w, u16 h) { - VDP_fillTileMapRect(plane, 0, x, y, w, h); + u16 pw, ph; + u16 wa, ha; + + // get the horizontal plane size (in cell) + pw = (plane == WINDOW)?windowWidth:planeWidth; + ph = (plane == WINDOW)?32:planeHeight; + + // string outside plane --> exit + if ((x >= pw) || (y >= ph)) + return; + + // adjust dim + wa = w; + ha = h; + + // if don't fit in plane, we cut it + if (wa > (pw - x)) + wa = pw - x; + if (ha > (ph - y)) + ha = ph - y; + + VDP_fillTileMapRect(plane, 0, x, y, wa, ha); } void VDP_clearTextLineBG(VDPPlane plane, u16 y)
Rust: Correct a typo
@@ -74,7 +74,7 @@ fn main() -> Result<(), KeyError> { ## Generation -Bindings are generated when buildling the `elektra-sys` crate using `rust-bindgen`. The `build.rs` script in the `elektra-sys` crate calls and configures bindgen. It also emits additional configuration for `rustc` to tell it what library to link against, and where to find it. +Bindings are generated when building the `elektra-sys` crate using `rust-bindgen`. The `build.rs` script in the `elektra-sys` crate calls and configures bindgen. It also emits additional configuration for `rustc` to tell it what library to link against, and where to find it. Bindgen expects a `wrapper.h` file that includes all headers that bindings should be generated for. Since these headers could have additional includes, the `build.rs` also passes the elektra source and binary directory to clang, such that these includes can be found. Finally, bindgen outputs the bindings into a file, that is then included in the `elektra-sys/lib.rs` file, where it can be used from other crates.
Fix issue where empty sprites would slow down project load
@@ -79,7 +79,7 @@ const loadProject = async (projectPath) => { const oldData = oldSprite || {}; const id = oldData.id || sprite.id; - if (!oldSprite || !oldSprite.states || !oldSprite.numTiles) { + if (!oldSprite || !oldSprite.states || oldSprite.numTiles === undefined) { modifiedSpriteIds.push(id); }
Update the kubelet volume mount of non-root enabler container on the real object not on a copy of it
@@ -526,8 +526,8 @@ func (r *ReconcileSPOd) getConfiguredSPOd( volume, mount := bindata.CustomHostKubeletVolume(config.KubeletDir()) templateSpec.Volumes = append(templateSpec.Volumes, volume) - nonRootEnabler := templateSpec.InitContainers[bindata.InitContainerIDNonRootenabler] - nonRootEnabler.VolumeMounts = append(nonRootEnabler.VolumeMounts, mount) + templateSpec.InitContainers[bindata.InitContainerIDNonRootenabler].VolumeMounts = + append(templateSpec.InitContainers[bindata.InitContainerIDNonRootenabler].VolumeMounts, mount) } // Custom host proc volume
Documentation: Add empty lines before lists
@@ -21,6 +21,7 @@ For instance the key **/b/c** has the path **/** -> **b** -> **c**. Note how the name of the key determines the path to its value. You can use the file system analogy as a mnemonic to remember these commands (like the file system commands in your favorite operating system): + - `kdb ls <path>` lists keys below _path_ - `kdb rm <key>` @@ -37,6 +38,7 @@ For example `kdb get /b/c` should return `Value 2` now, if you set the values be Now we abandon the file system analogy and introduce the concept of _namespaces_. Every key in Elektra belongs to one of these namespaces: + - **spec** for specification of other keys - **proc** for in-memory keys (e.g. command-line) - **dir** for dir keys in current working directory
libhfnetdriver: move binding to a random loopback address to a separate function
@@ -93,24 +93,16 @@ static void netDriver_initNsIfNeeded(void) { (int)getpid()); } -static int netDriver_sockConnAddr(const struct sockaddr *addr, socklen_t socklen) { - int sock = socket(addr->sa_family, SOCK_STREAM, IPPROTO_TCP); - if (sock == -1) { - PLOG_D("socket(type=%d, SOCK_STREAM, IPPROTO_TCP)", addr->sa_family); - return -1; - } - int sz = (1024 * 1024); - if (setsockopt(sock, SOL_SOCKET, SO_SNDBUF, &sz, sizeof(sz)) == -1) { - PLOG_F("setsockopt(type=%d, socket=%d, SOL_SOCKET, SO_SNDBUF, size=%d", addr->sa_family, - sock, sz); - } - if (addr->sa_family == AF_INET) { /* - * Try to bind the client socket to a random loopback address, to avoid problems with - * exhausted ephemeral ports, which we run out of, due the TIME_WAIT state being imposed on - * recently closed TCP connections + * Try to bind the client socket to a random loopback address, to avoid problems with exhausted + * ephemeral ports. We out of them, because the TIME_WAIT state is imposed on recently closed TCP + * connections originating from the same IP address (127.0.0.1) */ - struct sockaddr_in bsaddr = { +static void netDriver_bindToRndLoopback(int sock, sa_family_t sa_family) { + if (sa_family != AF_INET) { + return; + } + const struct sockaddr_in bsaddr = { .sin_family = AF_INET, .sin_port = htons(0), .sin_addr.s_addr = htonl((((uint32_t)util_rnd64()) & 0x00FFFFFF) | 0x7F000000), @@ -120,6 +112,15 @@ static int netDriver_sockConnAddr(const struct sockaddr *addr, socklen_t socklen } } +static int netDriver_sockConnAddr(const struct sockaddr *addr, socklen_t socklen) { + int sock = socket(addr->sa_family, SOCK_STREAM, 0); + if (sock == -1) { + PLOG_D("socket(type=%d, SOCK_STREAM, 0)", addr->sa_family); + return -1; + } + + netDriver_bindToRndLoopback(sock, addr->sa_family); + if (TEMP_FAILURE_RETRY(connect(sock, addr, socklen)) == -1) { PLOG_D("connect(type=%d, loopback)", addr->sa_family); close(sock);
Remove code that was added for checkpointing and not removed...
@@ -2093,10 +2093,6 @@ void picoquic_update_path_rtt(picoquic_cnx_t* cnx, picoquic_path_t* old_path, pi else if (path_x->one_way_return_var != 0) { one_way_delay_sample = rtt_estimate - path_x->one_way_return_avg; is_path_x_valid = 0; - - if (one_way_delay_sample < 0) { - is_path_x_valid = is_path_x_valid; - } } else if (path_x == old_path) { one_way_delay_sample = rtt_estimate / 2;
external/mambo: Do not enable TM on P9 in ibm, pa-features Bytes 22-23 Bit 0 in ibm,pa-features indicate TM support. None of the pa_features_p9*[] in hdata/cpu-common.c set this bit so do not set it in the ibm,pa-features made for mambo either.
@@ -481,7 +481,7 @@ for { set c 0 } { $c < $mconf(cpus) } { incr c } { # bytes 14-21 lappend reg 0x0000800080008000 # bytes 22-29 22/23=TM - lappend reg 0x8000800080008000 + lappend reg 0x0000800080008000 # bytes 30-37 lappend reg 0x80008000C0008000 # bytes 38-45 40/41=radix
h2olog: no need to define placeholder values for typeof
@@ -329,12 +329,10 @@ def build_typedef_for_cplusplus(): typedef = st_quicly_conn_t_def # CAUTION: it depends on a GCC/Clang compiler extension: typeof() - i = 0 for st_name, st_fields in struct_map.items(): for st_field_access, st_field_name_alias in st_fields: - i += 1 - typedef += """static struct %s s%d; // placeholder for typeof()\n""" % (st_name, i) - typedef += """typedef typeof(s%d.%s) typeof_%s__%s;\n""" % (i, st_field_access, st_name, st_field_name_alias or st_field_access) + type_expr = """((const struct %s *)nullptr)->%s""" % (st_name, st_field_access) + typedef += """typedef typeof(%s) typeof_%s__%s;\n""" % (type_expr, st_name, st_field_name_alias or st_field_access) return typedef
Remote redundant line Causes compilation error when LV_COLOR_DEPTH == 16
@@ -473,7 +473,6 @@ static inline uint8_t lv_color_brightness(lv_color_t color) #else #define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{g8 >> 5, r8 >> 3, b8 >> 3, (g8 >> 2) & 0x7}}) #endif -static inline lv_color_t lv_color_make(uint8_t r8, uint8_t g8, uint8_t b8) #elif LV_COLOR_DEPTH == 32 #define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{b8, g8, r8, 0xff}}) /*Fix 0xff alpha*/ #endif
test via resource manager
#!./common/bats/bin/bats export BATS_JUNIT_CLASS=Singularity -source ./common/TEST_ENV || exit 1 load ./common/test_helper_functions || exit 1 source ./common/functions || exit 1 +if [ -s ./common/TEST_ENV ];then + source ./common/TEST_ENV +fi + +check_rms +rm=$RESOURCE_MANAGER + echo " " echo " " echo "-------------------------------------------------------" @@ -36,5 +42,11 @@ fi @test "[singularity] exec image" { singularity exec /tmp/${DISTRO}.img cat /etc/os-release assert_success +} + +@test "[singularity] exec image via $rm" { + export -f run_serial_binary + su ohpc-test -c "run_serial_binary singularity exec /tmp/${DISTRO}.img cat /etc/os-release" + assert_success rm -rf /tmp/${DISTRO}.img }
skip empty channels
@@ -3301,6 +3301,15 @@ while(1) else if(FD_ISSET(fd_socket, &readfds)) process_packet(); else { + cpa++; + if(channelscanlist[cpa] == 0) cpa = 0; + if(set_channel() == false) + { + errorcount++; + continue; + } + if(beaconactiveflag == true) send_beacon_aplist(); + if((attackstatus &DISABLE_AP_ATTACKS) != DISABLE_AP_ATTACKS) send_proberequest_undirected_broadcast(); tvfd.tv_sec = 1; tvfd.tv_usec = 0; } @@ -3548,6 +3557,7 @@ while(1) errorcount++; continue; } + if((attackstatus &DISABLE_AP_ATTACKS) != DISABLE_AP_ATTACKS) send_proberequest_undirected_broadcast(); tvfd.tv_sec = 0; tvfd.tv_usec = 100000; }
distro-packages/python-rpm-macros: even more robust macro for distro test
+ local mpi_family = rpm.expand("%mpi_family") + local ohpc_suffix = rpm.expand("%PROJ_DELIM") + local function is_centos() -+ local s = rpm.expand("%centos") -+ return s ~= '' ++ local s = rpm.expand("%_host_vendor") ++ return s == 'redhat' + end + + if string.match(rpm.expand("%name"), mpi_family) then
Raise informative error if resource is a directory
@@ -57,6 +57,10 @@ class ResourceUnpackingError(Exception): pass +class ResourceIsDirectoryError(Exception): + pass + + class OutputIsDirectoryError(Exception): pass @@ -239,6 +243,9 @@ def ensure_outputs_not_directories(outputs, directory): def process(fetched_file, file_name, opts, outputs, remove=True): + if not os.path.isfile(fetched_file): + raise ResourceIsDirectoryError('Resource must be a file, not a directory: %s' % fetched_file) + if opts.untar_to: try: with tarfile.open(fetched_file, mode='r:*') as tar:
opensuse: revert java path
@@ -96,7 +96,7 @@ RUN useradd \ RUN cd /tmp && wget https://services.gradle.org/distributions/gradle-7.4-bin.zip && unzip gradle-7.4-bin.zip && rm gradle-7.4-bin.zip && mv gradle-7.4 /opt/gradle RUN alternatives --auto java && alternatives --auto javac ENV PATH="${PATH}:/opt/gradle/bin" \ - JAVA_HOME="/usr/lib/jvm/java" + JAVA_HOME="/etc/alternatives/jre" USER ${JENKINS_USERID}
Fix a document description in apps/req
@@ -347,8 +347,8 @@ string is required by the SM2 signature algorithm for signing and verification. =item B<-sm2-hex-id> -Specify a binary ID string to use when signing or verifying using an SM2 -certificate. The argument for this option is string of hexadecimal digits. +Specify a binary ID string to use when verifying an SM2 certificate request. The +argument for this option is string of hexadecimal digits. =back
CMake hides symbols by default; This is more consistent with tup.
@@ -345,7 +345,7 @@ else() return() endif() -set_target_properties(lovr PROPERTIES C_VISIBILITY_PRESET default) +set_target_properties(lovr PROPERTIES C_VISIBILITY_PRESET hidden) set_target_properties(lovr PROPERTIES C_STANDARD 99) target_include_directories(lovr PRIVATE src src/modules) target_link_libraries(lovr
is it a repeat thing?
@@ -2,9 +2,9 @@ language: c script: - make vars - DEBUG=1 make vars - - make test/optimized + - # make test/optimized - make clean - - LSAN_OPTIONS=verbosity=1:log_threads=1 make test/ci + - make test/ci os: - linux - osx
Update doc/note/auto-formatting.md for dumbindent
# Auto-Formatting Within this repository: -- `C` code is formatted by `clang-format-5.0 -style=Chromium`. +- Hand-written `C` code is formatted by `clang-format-5.0 -style=Chromium`. +- Auto-generated `C` code is formatted by [`dumbindent`](/cmd/dumbindent), + which isn't as 'pretty' in some sense, but is [substantially + faster](https://github.com/google/wuffs/blob/a0f7059eeb022c4dec70ffae4041bcc54f666c0d/cmd/dumbindent/main.go#L32-L44), + making the edit-compile-run cycle more productive. - `Go` code is formatted by `gofmt`. - `Wuffs` code is formatted by [`wuffsfmt`](/cmd/wuffsfmt).
Fix the s_server psk_server_cb for use in DTLS Commit added a protocol version check to psk_server_cb but failed to take account of DTLS causing DTLS based psk connections to fail. Fixes
@@ -131,12 +131,12 @@ static unsigned int psk_server_cb(SSL *ssl, const char *identity, if (s_debug) BIO_printf(bio_s_out, "psk_server_cb\n"); - if (SSL_version(ssl) >= TLS1_3_VERSION) { + if (!SSL_is_dtls(ssl) && SSL_version(ssl) >= TLS1_3_VERSION) { /* - * This callback is designed for use in TLSv1.2. It is possible to use - * a single callback for all protocol versions - but it is preferred to - * use a dedicated callback for TLSv1.3. For TLSv1.3 we have - * psk_find_session_cb. + * This callback is designed for use in (D)TLSv1.2 (or below). It is + * possible to use a single callback for all protocol versions - but it + * is preferred to use a dedicated callback for TLSv1.3. For TLSv1.3 we + * have psk_find_session_cb. */ return 0; }
Extend test coverage of external entity handler parameters
@@ -2750,16 +2750,34 @@ END_TEST /* Test that an explicit external entity handler argument replaces * the parser as the first argument. + * + * We do not call the first parameter to the external entity handler + * 'parser' for once, since the first time the handler is called it + * will actually be a text string. We need to be able to access the + * global 'parser' variable to create our external entity parser from, + * since there are code paths we need to ensure get executed. */ static int XMLCALL -external_entity_ref_param_checker(XML_Parser parser, - const XML_Char *UNUSED_P(context), +external_entity_ref_param_checker(XML_Parser parameter, + const XML_Char *context, const XML_Char *UNUSED_P(base), const XML_Char *UNUSED_P(systemId), const XML_Char *UNUSED_P(publicId)) { - if ((void *)parser != handler_data) + const char *text = "<!ELEMENT doc (#PCDATA)*>"; + XML_Parser ext_parser; + + if ((void *)parameter != handler_data) fail("External entity ref handler parameter not correct"); + + /* Here we use the global 'parser' variable */ + ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL); + if (ext_parser == NULL) + fail("Could not create external entity parser"); + if (_XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text), + XML_TRUE) == XML_STATUS_ERROR) + xml_failure(ext_parser); + return XML_STATUS_OK; }
Fix duplicate enum
@@ -629,7 +629,6 @@ int app_kas_ffc_handler(ACVP_TEST_CASE *test_case) { goto error; break; #endif - case ACVP_KAS_FFC_FFDHE8192: case ACVP_KAS_FFC_FUNCTION: case ACVP_KAS_FFC_CURVE: case ACVP_KAS_FFC_ROLE:
common/vec3.c: Format with clang-format BRANCH=none TEST=none
#include "vec3.h" #include "util.h" -static fpv3_t zero_initialized_vector = { - FLOAT_TO_FP(0.0f), FLOAT_TO_FP(0.0f), FLOAT_TO_FP(0.0f) -}; +static fpv3_t zero_initialized_vector = { FLOAT_TO_FP(0.0f), FLOAT_TO_FP(0.0f), + FLOAT_TO_FP(0.0f) }; void fpv3_zero(fpv3_t v) {
common/pwm.c: Format with clang-format BRANCH=none TEST=none
#ifdef CONFIG_PWM -#define PWM_RAW_TO_PERCENT(v) \ - DIV_ROUND_NEAREST((uint32_t)(v) * 100, UINT16_MAX) +#define PWM_RAW_TO_PERCENT(v) DIV_ROUND_NEAREST((uint32_t)(v)*100, UINT16_MAX) #define PWM_PERCENT_TO_RAW(v) ((uint32_t)(v)*UINT16_MAX / 100) /* @@ -71,8 +70,7 @@ host_command_pwm_set_duty(struct host_cmd_handler_args *args) return EC_RES_SUCCESS; } -DECLARE_HOST_COMMAND(EC_CMD_PWM_SET_DUTY, - host_command_pwm_set_duty, +DECLARE_HOST_COMMAND(EC_CMD_PWM_SET_DUTY, host_command_pwm_set_duty, EC_VER_MASK(0)); static enum ec_status @@ -92,8 +90,7 @@ host_command_pwm_get_duty(struct host_cmd_handler_args *args) return EC_RES_SUCCESS; } -DECLARE_HOST_COMMAND(EC_CMD_PWM_GET_DUTY, - host_command_pwm_get_duty, +DECLARE_HOST_COMMAND(EC_CMD_PWM_GET_DUTY, host_command_pwm_get_duty, EC_VER_MASK(0)); /**
Fix cURL artifacts config names
<dependency org="NetBackup" name="SDK-7.7" rev="7.7" conf="rhel7_x86_64->rhel5_x86_64;rhel6_x86_64->rhel5_x86_64" /> <dependency org="R-Project" name="R" rev="3.1.0" conf="rhel7_x86_64->rhel6_x86_64;rhel6_x86_64->rhel6_x86_64;suse11_x86_64->suse10_x86_64;sles11_x86_64->suse10_x86_64" /> <dependency org="Python" name="python" rev="2.7.12" conf="rhel6_x86_64->rhel6_x86_64;rhel7_x86_64->rhel6_x86_64;suse11_x86_64->sles11_x86_64;sles11_x86_64->sles11_x86_64" /> - <dependency org="cURL" name="curl" rev="7.54.0" conf="rhel7_x86_64->rhel6_x86_64;rhel6_x86_64->rhel6_x86_64;suse11_x86_64->suse10_x86_64;sles11_x86_64->suse10_x86_64" /> + <dependency org="cURL" name="curl" rev="7.54.0" conf="rhel7_x86_64->rhel6_x86_64;rhel6_x86_64->rhel6_x86_64;suse11_x86_64->sles11_x86_64;sles11_x86_64->sles11_x86_64" /> <dependency org="Samba" name="ccache" rev="3.2.3" conf="rhel7_x86_64->rhel5_x86_64;rhel6_x86_64->rhel5_x86_64;suse11_x86_64->suse11_x86_64;sles11_x86_64->suse11_x86_64" /> <dependency org="OpenLDAP" name="openldap" rev="2.4.44" conf="rhel7_x86_64->rhel6_x86_64;rhel6_x86_64->rhel6_x86_64;suse11_x86_64->sles11_x86_64;sles11_x86_64->sles11_x86_64" /> </dependencies>
sys/socket: remove AF_PACKET which is not supported to TizenRT remove AF_PACKET which is not supported to TizenRT
@@ -131,9 +131,6 @@ extern "C" { #ifndef AF_INET6 #define AF_INET6 PF_INET6 #endif -#ifndef AF_PACKET -#define AF_PACKET PF_PACKET -#endif /**************************************************************************** * Public Structure
[add] a macro to be isolated while using signals in rt_mutex_take function.
@@ -685,7 +685,9 @@ rt_err_t rt_mutex_take(rt_mutex_t mutex, rt_int32_t time) } else { +#ifdef RT_USING_SIGNALS __again: +#endif /* end of RT_USING_SIGNALS */ /* The value of mutex is 1 in initial status. Therefore, if the * value is great than 0, it indicates the mutex is avaible. */ @@ -754,8 +756,10 @@ __again: if (thread->error != RT_EOK) { +#ifdef RT_USING_SIGNALS /* interrupt by signal, try it again */ if (thread->error == -RT_EINTR) goto __again; +#endif /* end of RT_USING_SIGNALS */ /* return error */ return thread->error;
Drop TODO 3.0 as we cannot get rid of legacy nids in 3.0 Fixes
@@ -1415,7 +1415,7 @@ EVP_CIPHER *evp_cipher_new(void) * NIDs or any functionality that use them. */ #ifndef FIPS_MODULE -/* TODO(3.x) get rid of the need for legacy NIDs */ +/* After removal of legacy support get rid of the need for legacy NIDs */ static void set_legacy_nid(const char *name, void *vlegacy_nid) { int nid; @@ -1453,7 +1453,6 @@ static void *evp_cipher_from_dispatch(const int name_id, } #ifndef FIPS_MODULE - /* TODO(3.x) get rid of the need for legacy NIDs */ cipher->nid = NID_undef; if (!evp_names_do_all(prov, name_id, set_legacy_nid, &cipher->nid) || cipher->nid == -1) {
project_include.cmake: Make esptool_py_custom_target callable from other directories
@@ -140,13 +140,14 @@ endif() # function(esptool_py_custom_target target_name flasher_filename dependencies) idf_build_get_property(idf_path IDF_PATH) + idf_component_get_property(esptool_py_dir esptool_py COMPONENT_DIR) add_custom_target(${target_name} DEPENDS ${dependencies} COMMAND ${CMAKE_COMMAND} -D IDF_PATH="${idf_path}" -D ESPTOOLPY="${ESPTOOLPY}" -D ESPTOOL_ARGS="write_flash;@flash_${flasher_filename}_args" -D WORKING_DIRECTORY="${build_dir}" - -P run_esptool.cmake + -P ${esptool_py_dir}/run_esptool.cmake WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} USES_TERMINAL )
Ensure unique visitor key variables are initialized to NULL.
@@ -1875,7 +1875,7 @@ insert_agent (int data_nkey, int agent_nkey, GModule module) static char * get_uniq_visitor_key (GLogItem * logitem) { - char *ua, *key; + char *ua = NULL, *key = NULL; size_t s1, s2, s3; ua = deblank (xstrdup (logitem->agent));
vcl: EPOLLOUT should be generated when epoll_ctl called with EPOLLOUT event Type: fix When we call epoll_ctl to add or mod fd with EPOLLOUT event, mostly to check if we can write. So we expect a EPOLLOUT event should be generated immediately unless tx queue is full.
@@ -2518,6 +2518,15 @@ vppcom_epoll_ctl (uint32_t vep_handle, int op, uint32_t session_handle, svm_fifo_add_want_deq_ntf (session->tx_fifo, SVM_FIFO_WANT_DEQ_NOTIF_IF_FULL); + /* Generate EPOLLOUT when tx_fifo/ct_tx_fifo not full */ + if ((event->events & EPOLLOUT) && + (vcl_session_write_ready (session) > 0)) + { + session_event_t e = { 0 }; + e.event_type = SESSION_IO_EVT_TX; + e.session_index = session->session_index; + vec_add1 (wrk->unhandled_evts_vector, e); + } VDBG (1, "EPOLL_CTL_ADD: vep_sh %u, sh %u, events 0x%x, data 0x%llx!", vep_handle, session_handle, event->events, event->data.u64); vcl_evt (VCL_EVT_EPOLL_CTLADD, session, event->events, event->data.u64); @@ -2543,6 +2552,17 @@ vppcom_epoll_ctl (uint32_t vep_handle, int op, uint32_t session_handle, rv = VPPCOM_EINVAL; goto done; } + + /* Generate EPOLLOUT when tx_fifo/ct_tx_fifo not full */ + if ((event->events & EPOLLOUT) && + !(session->vep.ev.events & EPOLLOUT) && + (vcl_session_write_ready (session) > 0)) + { + session_event_t e = { 0 }; + e.event_type = SESSION_IO_EVT_TX; + e.session_index = session->session_index; + vec_add1 (wrk->unhandled_evts_vector, e); + } session->vep.et_mask = VEP_DEFAULT_ET_MASK; session->vep.ev = *event; VDBG (1, "EPOLL_CTL_MOD: vep_sh %u, sh %u, events 0x%x, data 0x%llx!",
parser: Use enum_method_check to check for incomplete enums.
@@ -4525,15 +4525,12 @@ static void parse_enum_header(lily_parse_state *parser, lily_class *enum_cls) else variant_cls->build_type = empty_type; - if (lex->token == tk_right_curly) - break; - else if (lex->token == tk_word && lex->label[0] == 'd' && - keyword_by_name(lex->label) == KEY_DEFINE) - break; - else { - NEED_CURRENT_TOK(tk_comma) + if (lex->token == tk_comma) { lily_next_token(lex); + continue; } + + break; } if (enum_cls->variant_size < 2) { @@ -4544,6 +4541,23 @@ static void parse_enum_header(lily_parse_state *parser, lily_class *enum_cls) lily_fix_enum_variant_ids(parser->symtab, enum_cls); } +static void enum_method_check(lily_parse_state *parser) +{ + lily_lex_state *lex = parser->lex; + + if (lex->token == tk_right_curly) + ; + else if (lex->token == tk_word && + strcmp(lex->label, "define") == 0) { + lily_next_token(lex); + keyword_define(parser); + } + else + lily_raise_syn(parser->raiser, + "Expected '}' or 'define', not '%s'.", + tokname(lex->token)); +} + static void keyword_enum(lily_parse_state *parser) { lily_block *block = parser->emit->block; @@ -4559,6 +4573,9 @@ static void keyword_enum(lily_parse_state *parser) lex->line_num); parse_enum_header(parser, enum_cls); + + if ((parser->flags & PARSER_IN_MANIFEST) == 0) + enum_method_check(parser); } static void keyword_scoped(lily_parse_state *parser) @@ -4579,6 +4596,9 @@ static void keyword_scoped(lily_parse_state *parser) enum_cls->item_kind = ITEM_ENUM_SCOPED; parse_enum_header(parser, enum_cls); + + if ((parser->flags & PARSER_IN_MANIFEST) == 0) + enum_method_check(parser); } /* This is called when a match against a class or enum is not considered @@ -5068,23 +5088,6 @@ static void main_func_teardown(lily_parse_state *parser) parser->flags &= ~PARSER_IS_EXECUTING; } -static void enum_method_check(lily_parse_state *parser) -{ - lily_lex_state *lex = parser->lex; - - if (lex->token == tk_right_curly) - ; - else if (lex->token == tk_word && - strcmp(lex->label, "define") == 0) { - lily_next_token(lex); - keyword_define(parser); - } - else - lily_raise_syn(parser->raiser, - "Expected '}' or 'define', not '%s'.", - tokname(lex->token)); -} - static void parse_block_exit(lily_parse_state *parser) { lily_emit_state *emit = parser->emit;
fixes an oob read
@@ -257,10 +257,12 @@ apply(char *str, jsmntok_t *tok, size_t n_toks, struct extractor_specifier *es) break; // we are done // find the next toplevel key - for (ik = iv + 1; tok[ik].end < tok[iv].end; ik++) + for (ik = iv + 1; ik < n_toks && tok[ik].end < tok[iv].end; ik++) continue; iv = ik + 1; + if (ik >= n_toks || iv >= n_toks) + break; // we are done } while (ik < n_toks && iv < n_toks); }
add comment about the effects of motortest_override
@@ -26,7 +26,7 @@ typedef struct { uint8_t controls_override : 1; // will activate rx_override below & will write directly to the motors (motor_test) uint8_t acro_override : 1; - uint8_t motortest_override : 1; + uint8_t motortest_override : 1; // tuns off digital idle in the dshot driver & will write either sticks or usb_motortest values directly to motors uint8_t turtle : 1; uint8_t usb_active : 1;
tls: enable host verification by hostname Type: improvement
#include <tlsopenssl/tls_openssl.h> #include <tlsopenssl/tls_bios.h> #include <openssl/x509_vfy.h> +#include <openssl/x509v3.h> #define MAX_CRYPTO_LEN 64 @@ -670,7 +671,42 @@ openssl_set_ckpair (SSL *ssl_connection, u32 ckpair_index) SSL_use_PrivateKey (ssl_connection, pkey); BIO_free (cert_bio); TLS_DBG (1, "TLS client using ckpair index: %d", ckpair_index); + return 0; +} + +static int +openssl_ctx_init_verify (tls_ctx_t *ctx, int set_hostname_verification, + int set_hostname_strict_check) +{ + openssl_ctx_t *oc = (openssl_ctx_t *) ctx; + SSL *ssl = oc->ssl; + + if (set_hostname_verification) + { + X509_VERIFY_PARAM *param = SSL_get0_param (ssl); + if (!param) + { + TLS_DBG (1, "Couldn't fetch SSL param"); + return -1; + } + if (set_hostname_strict_check) + X509_VERIFY_PARAM_set_hostflags (param, + X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS); + + if (!X509_VERIFY_PARAM_set1_host (param, + (const char *) ctx->srv_hostname, 0)) + { + TLS_DBG (1, "Couldn't set hostname for verification"); + return -1; + } + SSL_set_verify (ssl, SSL_VERIFY_PEER, 0); + } + if (!SSL_set_tlsext_host_name (ssl, ctx->srv_hostname)) + { + TLS_DBG (1, "Couldn't set hostname"); + return -1; + } return 0; } @@ -735,10 +771,11 @@ openssl_ctx_init_client (tls_ctx_t * ctx) SSL_set_bio (oc->ssl, oc->wbio, oc->rbio); SSL_set_connect_state (oc->ssl); - rv = SSL_set_tlsext_host_name (oc->ssl, ctx->srv_hostname); - if (rv != 1) + /* Hostname validation and strict check by name, are disable by default */ + rv = openssl_ctx_init_verify (ctx, 0, 0); + if (rv) { - TLS_DBG (1, "Couldn't set hostname"); + TLS_DBG (1, "ERROR:verify init failed:%d", rv); return -1; } if (openssl_set_ckpair (oc->ssl, ctx->ckpair_index))
Reduce API logging verbosity
@@ -423,6 +423,17 @@ namespace Miningcore var layout = "[${longdate}] [${level:format=FirstCharacter:uppercase=true}] [${logger:shortName=true}] ${message} ${exception:format=ToString,StackTrace}"; + var nullTarget = new NullTarget("null") + { + }; + + loggingConfig.AddTarget(nullTarget); + + // Suppress some Aspnet stuff + loggingConfig.AddRule(level, LogLevel.Fatal, nullTarget, "Microsoft.AspNetCore.Mvc.Internal.*", true); + loggingConfig.AddRule(level, LogLevel.Fatal, nullTarget, "Microsoft.AspNetCore.Mvc.Infrastructure.*", true); + + // Api Log if (!string.IsNullOrEmpty(config.ApiLogFile) && !isShareRecoveryMode) { var target = new FileTarget("file") @@ -725,8 +736,8 @@ namespace Miningcore UseIpWhiteList(app, true, new[] { "/api/admin" }, clusterConfig.Api?.AdminIpWhitelist); UseIpWhiteList(app, true, new[] { "/metrics" }, clusterConfig.Api?.MetricsIpWhitelist); - app.UseWebSockets(); app.UseCors(builder => builder.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader().AllowCredentials()); + app.UseWebSockets(); app.MapWebSocketManager("/notifications", app.ApplicationServices.GetService<WebSocketNotificationsRelay>()); app.UseMetricServer(); app.UseMvc();
BugID:22724304: Rework the log message so as to be used in auto test.
@@ -140,7 +140,7 @@ static int32_t translate_addr(char *str) static void netmgr_ip_got_event(hal_wifi_module_t *m, hal_wifi_ip_stat_t *pnet, void *arg) { - LOGI(TAG, "Got ip : %s, gw : %s, mask : %s", pnet->ip, pnet->gate, + LOG("Got ip : %s, gw : %s, mask : %s", pnet->ip, pnet->gate, pnet->mask); #if defined(WITH_LWIP) || defined(WITH_VENDOR_LWIP)
add -Werror=format to easily detect such errors in development
@@ -262,7 +262,7 @@ IF (PKG_CONFIG_FOUND) ENDIF (LIBCAP_FOUND) ENDIF (PKG_CONFIG_FOUND) -SET(CC_WARNING_FLAGS "-Wall -Wno-unused-value -Wno-unused-function -Wno-nullability-completeness -Wno-expansion-to-defined -Werror=implicit-function-declaration -Werror=incompatible-pointer-types") +SET(CC_WARNING_FLAGS "-Wall -Wno-unused-value -Wno-unused-function -Wno-nullability-completeness -Wno-expansion-to-defined -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=format") IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") IF (NOT ("${CMAKE_C_COMPILER_VERSION}" VERSION_LESS "4.6"))
tree schema BUGFIX hash table ht params are pointers to values
@@ -444,7 +444,12 @@ lysp_check_dup_typedef(struct lys_parser_ctx *ctx, struct lysp_node *node, const static ly_bool lysp_id_cmp(void *val1, void *val2, ly_bool UNUSED(mod), void *UNUSED(cb_data)) { - return strcmp(val1, val2) == 0 ? 1 : 0; + char *id1, *id2; + + id1 = *(char **)val1; + id2 = *(char **)val2; + + return strcmp(id1, id2) == 0 ? 1 : 0; } LY_ERR
Fix oculus backend;
#include "graphics/canvas.h" #include "graphics/texture.h" #include "core/maf.h" +#include "core/ref.h" #include <stdbool.h> #include <OVR_CAPI.h> @@ -176,7 +177,7 @@ static bool oculus_getPose(Device device, vec3 position, quat orientation) { ovrPoseStatef* poseState = getPose(device); if (!poseState) return false; - ovrPosef* pose = poseState->ThePose; + ovrPosef* pose = &poseState->ThePose; vec3_set(position, pose->Position.x, pose->Position.y + state.offset, pose->Position.z); quat_set(orientation, pose->Orientation.x, pose->Orientation.y, pose->Orientation.z, pose->Orientation.w); return true; @@ -186,7 +187,7 @@ static bool oculus_getBonePose(Device device, DeviceBone bone, vec3 position, qu return false; } -static bool oculus_getVelocity(const char* path, vec3 velocity, vec3 angularVelocity) { +static bool oculus_getVelocity(Device device, vec3 velocity, vec3 angularVelocity) { ovrPoseStatef* pose = getPose(device); if (!pose) return false; @@ -226,8 +227,8 @@ static bool oculus_isDown(Device device, DeviceButton button, bool* down) { case BUTTON_MENU: return *down = (buttons & ovrButton_Enter), true; case BUTTON_PRIMARY: case BUTTON_TRIGGER: return *down = (is->IndexTriggerNoDeadzone[hand] > .5f), true; - case BUTTON_THUMBSTICK: return *down = (buttons & (ovrButton_LThumb | ovrButton_RThumb), true; - case BUTTON_GRIP: return *down = (masks->HandTrigger[hand] > .9f), true; + case BUTTON_THUMBSTICK: return *down = (buttons & (ovrButton_LThumb | ovrButton_RThumb)), true; + case BUTTON_GRIP: return *down = (is->HandTrigger[hand] > .9f), true; default: return false; } } @@ -253,7 +254,7 @@ static bool oculus_isTouched(Device device, DeviceButton button, bool* touched) } } -static bool oculus_getAxis(Device device, DeviceAxis axis, vec3* value) { +static bool oculus_getAxis(Device device, DeviceAxis axis, vec3 value) { if (device != DEVICE_HAND_LEFT && device != DEVICE_HAND_RIGHT) { return false; }
plugins: fix broken link in yanlr README
@@ -36,7 +36,7 @@ Please note that we only tested the plugin with ANTLR `4.7.1` (and later version ### Arch Linux -In [Arch Linux](https://www.archlinux.org/) the required packages are called [`antlr4`](https://www.archlinux.org/packages/extra/any/antlr4/) and [`antlr4-runtime`](https://www.archlinux.org/packages/community/x86_64/antlr4-runtime/). +In [Arch Linux](https://www.archlinux.org/) the required packages are called [`antlr4`](https://archlinux.org/packages/community/any/antlr4/) and [`antlr4-runtime`](https://www.archlinux.org/packages/community/x86_64/antlr4-runtime/). ``` pacman -Sy --noconfirm antlr4 antlr4-runtime
balloon: synchronize ReleaseHardware with EvtFileClose Fix synchronization of EvtFileClose and ReleaseHardware. Access memory allocated by WDF Virtio DMA API only when it is safe.
@@ -319,12 +319,16 @@ BalloonEvtDeviceReleaseHardware ( PAGED_CODE(); + WdfObjectAcquireLock(Device); + devCtx = GetDeviceContext(Device); VirtIOWdfDeviceFreeDmaMemoryByTag(&devCtx->VDevice.VIODevice, BALLOON_MGMT_POOL_TAG); devCtx->MemStats = NULL; devCtx->pfns_table = NULL; + WdfObjectReleaseLock(Device); + VirtIOWdfShutdown(&devCtx->VDevice); TraceEvents(TRACE_LEVEL_INFORMATION, DBG_PNP, "<-- %s\n", __FUNCTION__); @@ -655,10 +659,12 @@ BalloonEvtFileClose( // synchronize with the device to make sure it doesn't exit D0 from underneath us WdfObjectAcquireLock(Device); - RtlFillMemory(devCtx->MemStats, - sizeof(BALLOON_STAT) * VIRTIO_BALLOON_S_NR, -1); + if (devCtx->MemStats) + { + RtlFillMemory(devCtx->MemStats, sizeof(BALLOON_STAT) * VIRTIO_BALLOON_S_NR, -1); + } - if (devCtx->StatVirtQueue) + if (devCtx->StatVirtQueue && devCtx->MemStats) { BalloonMemStats(Device); }
psql: tab-complete ALTER ... DETACH CONCURRENTLY / FINALIZE New keywords per Discussion:
@@ -2209,6 +2209,8 @@ psql_completion(const char *text, int start, int end) completion_info_charp = prev3_wd; COMPLETE_WITH_QUERY(Query_for_partition_of_table); } + else if (Matches("ALTER", "TABLE", MatchAny, "DETACH", "PARTITION", MatchAny)) + COMPLETE_WITH("CONCURRENTLY", "FINALIZE"); /* ALTER TABLESPACE <foo> with RENAME TO, OWNER TO, SET, RESET */ else if (Matches("ALTER", "TABLESPACE", MatchAny))
clean ftrace files regardless of value of TRACE
@@ -131,7 +131,7 @@ endif AFLAGS+= -felf64 -I$(OBJDIR)/ LDFLAGS+= $(KERNLDFLAGS) -T linker_script -CLEANFILES+= $(foreach f,gitversion.c frame.inc stage3.dis stage3.img,$(OBJDIR)/$f) +CLEANFILES+= $(foreach f,gitversion.c frame.inc stage3.dis stage3.img src/unix/ftrace.* src/x86_64/ftrace.*,$(OBJDIR)/$f) CLEANDIRS+= $(foreach d,output src vendor vendor/lwip vendor/lwip/src,$(OBJDIR)/$d) OBJDUMPFLAGS= -d -S -M intel-mnemonic
py/mpconfig.h: Add note that uio.resource_stream() is deprecated.
@@ -1187,6 +1187,12 @@ typedef double mp_float_t; // Python" by prepocessing binary resources into Python source // and bytecode-freezing it (with a simple helper module available // e.g. in micropython-lib). +// DEPRECATED: This function was added as an experiment, and remains +// in the codebase only for further experimenting and research. +// For production, use preprocessing and pure-Python loading approach +// described above. While this adds preprocessing step, to use +// uio.resource_stream() there's still an extra processing to +// freeze some app files as FROZEN_MPY, while other - as FROZEN_STR. #ifndef MICROPY_PY_IO_RESOURCE_STREAM #define MICROPY_PY_IO_RESOURCE_STREAM (0) #endif
esp32/main: Allocate the uPy heap via malloc instead of on the bss. This allows to get slightly more memory for the heap (currently around 110k vs previous 92k) because the ESP IDF frees up some RAM after booting up.
#define MP_TASK_PRIORITY (ESP_TASK_PRIO_MIN + 1) #define MP_TASK_STACK_SIZE (16 * 1024) #define MP_TASK_STACK_LEN (MP_TASK_STACK_SIZE / sizeof(StackType_t)) -#define MP_TASK_HEAP_SIZE (92 * 1024) STATIC StaticTask_t mp_task_tcb; STATIC StackType_t mp_task_stack[MP_TASK_STACK_LEN] __attribute__((aligned (8))); -STATIC uint8_t mp_task_heap[MP_TASK_HEAP_SIZE]; void mp_task(void *pvParameter) { volatile uint32_t sp = (uint32_t)get_sp(); @@ -66,11 +64,15 @@ void mp_task(void *pvParameter) { #endif uart_init(); + // Allocate the uPy heap using malloc and get the largest available region + size_t mp_task_heap_size = heap_caps_get_largest_free_block(MALLOC_CAP_8BIT); + void *mp_task_heap = malloc(mp_task_heap_size); + soft_reset: // initialise the stack pointer for the main thread mp_stack_set_top((void *)sp); mp_stack_set_limit(MP_TASK_STACK_SIZE - 1024); - gc_init(mp_task_heap, mp_task_heap + sizeof(mp_task_heap)); + gc_init(mp_task_heap, mp_task_heap + mp_task_heap_size); mp_init(); mp_obj_list_init(mp_sys_path, 0); mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR_));
serial: remove unused variable Counter variable (int cnt) is now unused and should be deleted
@@ -26,7 +26,7 @@ VIOSerialSendCtrlMsg( UINT len; PPORTS_DEVICE pContext = GetPortsDevice(Device); VIRTIO_CONSOLE_CONTROL cpkt; - int cnt = 0; + if (!pContext->isHostMultiport) { return;
Fix overly replacement in the documentation
@@ -810,7 +810,7 @@ void mpi_core_cond_assign( data_t * input_X, TEST_CF_PUBLIC( Y, bytes ); /* Check if the given length is copied even it is smaller - than the bytesgth of the given MPIs. */ + than the length of the given MPIs. */ if( copy_limbs < limbs ) { ASSERT_COMPARE( X, copy_bytes, Y, copy_bytes );
schema BUGFIX enable forgotten support for searching YIN schemas When loading schema or searching for import modules.
@@ -1401,10 +1401,8 @@ lys_search_localfile(const char * const *searchpaths, ly_bool cwd, const char *n flen = strlen(file->d_name); if (!strcmp(&file->d_name[flen - 5], ".yang")) { format_aux = LYS_IN_YANG; - /* TODO YIN parser } else if (!strcmp(&file->d_name[flen - 4], ".yin")) { format_aux = LYS_IN_YIN; - */ } else { /* not supportde suffix/file format */ continue;
webp-lossless-bitstream-spec,cosmetics: normalize range syntax [N-M], [N, M] -> [N..M] these were missed in: webp-lossless-bitstream-spec,cosmetics: normalize range syntax
@@ -436,7 +436,7 @@ int8 ColorTransformDelta(int8 t, int8 c) { A conversion from the 8-bit unsigned representation (uint8) to the 8-bit signed one (int8) is required before calling `ColorTransformDelta()`. It should be performed using 8-bit two's complement (that is: uint8 range -\[128-255\] is mapped to the \[-128, -1\] range of its converted int8 value). +\[128..255\] is mapped to the \[-128..-1\] range of its converted int8 value). The multiplication is to be done using more precision (with at least 16-bit dynamics). The sign extension property of the shift operation
dm: acpi: refine CPU Definition Blocks name For all Definition Blocks in ACPI Namespace, their name are a fixed 32 bits. This patch refine CPU Definition Blocks name to support more than 10 CPUs for a guest.
@@ -323,10 +323,10 @@ void pm_write_dsdt(struct vmctx *ctx, int ncpu) /* Scope (_PR) */ dsdt_line(""); - dsdt_line(" Scope (_PR)"); + dsdt_line(" Scope (_SB)"); dsdt_line(" {"); for (i = 0; i < ncpu; i++) { - dsdt_line(" Device (CPU%d)", i); + dsdt_line(" Device (PR%02d)", i); dsdt_line(" {"); dsdt_line(" Name (_HID, \"ACPI0007\")"); dsdt_line(" Name (_UID, 0x%02X)", i); @@ -337,7 +337,7 @@ void pm_write_dsdt(struct vmctx *ctx, int ncpu) /* Scope (_PR.CPU(N)) */ for (i = 0; i < ncpu; i++) { - dsdt_line(" Scope (_PR.CPU%d)", i); + dsdt_line(" Scope (_SB.PR%02d)", i); dsdt_line(" {"); dsdt_line(""); @@ -353,12 +353,12 @@ void pm_write_dsdt(struct vmctx *ctx, int ncpu) } else { dsdt_line(" Method (_PPC, 0, NotSerialized)"); dsdt_line(" {"); - dsdt_line(" Return (^^CPU0._PPC)"); + dsdt_line(" Return (^^PR00._PPC)"); dsdt_line(" }"); dsdt_line(""); dsdt_line(" Method (_PCT, 0, NotSerialized)"); dsdt_line(" {"); - dsdt_line(" Return (^^CPU0._PCT)"); + dsdt_line(" Return (^^PR00._PCT)"); dsdt_line(" }"); dsdt_line(""); }
zephyr: herobrine: Configure unused pins Configure the unused pins, which are NC in hardware. BRANCH=None TEST=Built the herobrine_npcx9 image successfully.
&gpio_rtc_ec_wake_odl >; }; + + unused-pins { + compatible = "unused-gpios"; + unused-gpios = + <&gpio5 2 0>, + <&gpio5 4 0>, + <&gpio7 6 0>, + <&gpioc 5 0>, + <&gpiod 1 0>, + <&gpiod 0 0>, + <&gpioe 3 0>, + <&gpioc 1 0>, + <&gpio0 4 0>, + <&gpiod 6 0>, + <&gpio3 2 0>, + <&gpio3 5 0>, + <&gpiod 7 0>, + <&gpio8 6 0>, + <&gpiod 4 0>, + <&gpio4 1 0>, + <&gpio3 4 0>, + <&gpioc 7 0>, + <&gpioa 4 0>, + <&gpio9 6 0>, + <&gpio9 3 0>, + <&gpioa 7 0>, + <&gpio5 0 0>, + <&gpio8 1 0>; + }; };
[numerics] comment full fclib tests
@@ -306,11 +306,11 @@ if(WITH_TESTING) HDF5 ON ) - new_tests_collection( - DRIVER gfc3d_test_collection.c.in FORMULATION gfc3d COLLECTION TEST_IPM_COLLECTION_FCLIB_FULL - EXTRA_SOURCES data_collection_gfc3d_fclib_full.c test_ipm_gfc3d_1.c DEPS FCLIB::fclib - HDF5 ON - ) + # new_tests_collection( + # DRIVER gfc3d_test_collection.c.in FORMULATION gfc3d COLLECTION TEST_IPM_COLLECTION_FCLIB_FULL + # EXTRA_SOURCES data_collection_gfc3d_fclib_full.c test_ipm_gfc3d_1.c DEPS FCLIB::fclib + # HDF5 ON + # ) # --------------------------------------------------- @@ -327,11 +327,11 @@ if(WITH_TESTING) HDF5 ON ) - new_tests_collection( - DRIVER grfc3d_test_collection.c.in FORMULATION grfc3d COLLECTION TEST_IPM_COLLECTION_FCLIB_FULL - EXTRA_SOURCES data_collection_grfc3d_fclib_full.c test_ipm_grfc3d_1.c DEPS FCLIB::fclib - HDF5 ON - ) + # new_tests_collection( + # DRIVER grfc3d_test_collection.c.in FORMULATION grfc3d COLLECTION TEST_IPM_COLLECTION_FCLIB_FULL + # EXTRA_SOURCES data_collection_grfc3d_fclib_full.c test_ipm_grfc3d_1.c DEPS FCLIB::fclib + # HDF5 ON + # ) endif()
Fix ToggleableCheckBoxField to remove issue where if checked on load requires two clicks to uncheck, restyle to match other checkboxes in app
@@ -117,41 +117,34 @@ ToggleableFormField.defaultProps = { }; export class ToggleableCheckBoxField extends Component { - constructor() { - super(); - this.state = { - open: false - }; - } - - toggleOpen = () => { - const { onToggle } = this.props; - onToggle(!this.state.open); - - this.setState({ open: !this.state.open }); - }; componentWillMount () { this.id = `toggle_${Math.random().toString().replace(/0\./, '')}`; } + toggleOpen = () => { + const { onToggle, open } = this.props; + onToggle(!open); + }; + render() { const { halfWidth, label, children, - open: propsOpen + open } = this.props; - const { open: stateOpen } = this.state; - const open = stateOpen || propsOpen; return ( <div className={cx("FormField", "FormField--Toggleable", { "FormField--HalfWidth": halfWidth })} > - <input type="checkbox" onChange={this.toggleOpen} checked={open} id={this.id} style={{width:16,opacity:100,float:"left",position:"static"}}/> - <label htmlFor={this.id}>{label}</label> + <label htmlFor={this.id}> + <input id={this.id} type="checkbox" onChange={this.toggleOpen} checked={open} /> + <div className="FormCheckbox" /> + {label} + </label> <div> {open && children} </div> @@ -164,7 +157,8 @@ ToggleableCheckBoxField.propTypes = { halfWidth: PropTypes.bool, children: PropTypes.node, label: PropTypes.node, - open: PropTypes.bool + open: PropTypes.bool, + onToggle: PropTypes.func.isRequired }; ToggleableCheckBoxField.defaultProps = {
Tighten valid const/func/struct names
@@ -28,8 +28,29 @@ type Options struct { AllowDoubleUnderscoreNames bool } -func isDoubleUnderscore(s string) bool { - return len(s) >= 2 && s[0] == '_' && s[1] == '_' +func validConstName(s string) bool { + if (len(s) >= 2) && (s[0] == '_') && (s[1] == '_') { + return false + } + for i := 0; i < len(s); i++ { + switch c := s[i]; { + default: + return false + case c == '_': + case ('0' <= c) && (c <= '9'): + case ('A' <= c) && (c <= 'Z'): // Upper A-Z but not lower a-z. + } + } + return true +} + +func containsDoubleUnderscore(s string) bool { + for i := 1; i < len(s); i++ { + if (s[i-1] == '_') && (s[i] == '_') { + return true + } + } + return false } func isStatusMessage(s string) bool { @@ -138,7 +159,10 @@ func (p *parser) parseTopLevelDecl() (*a.Node, error) { if err != nil { return nil, err } - // TODO: check AllowDoubleUnderscoreNames? + if !validConstName(p.tm.ByID(id)) { + return nil, fmt.Errorf(`parse: invalid const name %q at %s:%d`, + p.tm.ByID(id), p.filename, p.line()) + } if x := p.peek1(); x != t.IDColon { got := p.tm.ByID(x) @@ -181,7 +205,7 @@ func (p *parser) parseTopLevelDecl() (*a.Node, error) { } // TODO: should we require id0 != 0? In other words, always methods // (attached to receivers) and never free standing functions? - if !p.opts.AllowDoubleUnderscoreNames && isDoubleUnderscore(p.tm.ByID(id1)) { + if !p.opts.AllowDoubleUnderscoreNames && containsDoubleUnderscore(p.tm.ByID(id1)) { return nil, fmt.Errorf(`parse: double-underscore %q used for func name at %s:%d`, p.tm.ByID(id1), p.filename, p.line()) } @@ -253,7 +277,7 @@ func (p *parser) parseTopLevelDecl() (*a.Node, error) { if err != nil { return nil, err } - if !p.opts.AllowDoubleUnderscoreNames && isDoubleUnderscore(p.tm.ByID(name)) { + if !p.opts.AllowDoubleUnderscoreNames && containsDoubleUnderscore(p.tm.ByID(name)) { return nil, fmt.Errorf(`parse: double-underscore %q used for struct name at %s:%d`, p.tm.ByID(name), p.filename, p.line()) }
Avoid holding a lock when calling OPENSSL_init_crypto We move an OPENSSL_init_crypto call slightly earlier in the process to avoid calling it while holding the store lock. This can lead to deadlocks. Fixes the no-engine build.
@@ -566,14 +566,6 @@ static int provider_forall_loaded(struct provider_store_st *store, int ret = 1; int num_provs; -#ifndef FIPS_MODE - /* - * Make sure any providers are loaded from config before we try to use - * them. - */ - OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL); -#endif - num_provs = sk_OSSL_PROVIDER_num(store->providers); if (found_activated != NULL) @@ -638,6 +630,14 @@ int ossl_provider_forall_loaded(OPENSSL_CTX *ctx, int ret = 1; struct provider_store_st *store = get_provider_store(ctx); +#ifndef FIPS_MODE + /* + * Make sure any providers are loaded from config before we try to use + * them. + */ + OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CONFIG, NULL); +#endif + if (store != NULL) { CRYPTO_THREAD_read_lock(store->lock);