message
stringlengths
6
474
diff
stringlengths
8
5.22k
Several fixes to 1-Wire on ESP32
@@ -37,9 +37,9 @@ bool oneWireInit() .stop_bits = UART_STOP_BITS_1, .flow_ctrl = UART_HW_FLOWCTRL_DISABLE, .rx_flow_ctrl_thresh = 0, - .use_ref_tick = false + .use_ref_tick = false, }; - + if (gpio_set_direction(gpio_num_t (NF_ONEWIRE_ESP32_UART_TX_PIN), GPIO_MODE_OUTPUT_OD) != ESP_OK) return false; if (uart_param_config(UartDriver, &uart_config) != ESP_OK) return false; if (uart_set_pin(UartDriver, NF_ONEWIRE_ESP32_UART_TX_PIN, NF_ONEWIRE_ESP32_UART_RX_PIN, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE) != ESP_OK) return false; if (uart_driver_install(UartDriver, UART_FIFO_LEN*2, 0, 0, NULL, 0) != ESP_OK) return false; @@ -249,9 +249,6 @@ bool oneWireFindNext (bool doReset, bool alarmOnly) bool result = FALSE; uint8_t lastcrc8 = 0; - // clear serial number buffer for new search - memset(SerialNum, 0, 8); - // if the last call was the last one if (LastDevice) { @@ -411,6 +408,9 @@ bool oneWireFindFirst (bool doReset, bool alarmOnly) LastDevice = FALSE; LastFamilyDiscrepancy = 0; + // clear serial number buffer for new search + memset(SerialNum, 0, 8); + // Call Next and return it's return value; return oneWireFindNext(doReset, alarmOnly); }
allow to convert not replaycount checked handshakes
@@ -293,12 +293,6 @@ char pcapoutstr[PATH_MAX +2]; zeiger = hccapxdata; for(p = 0; p < hccapsets; p++) { - if((zeiger->message_pair & 0x80) == 0x80) - { - zeiger++; - continue; - } - keynr = geteapkey(zeiger->eapol); if((keynr != 3) && (zeiger->eapol_len >= 91) && (zeiger->eapol_len <= sizeof(zeiger->eapol))) {
bcc: Use bpf_probe_read_str to read tracepoint data_loc field The data_loc field (defined as __string in kernel source) should be treated as string NOT a fixed-size array, add a new macro TP_DATA_LOC_READ_STR which use bpf_probe_read_str to reflect this.
@@ -1356,5 +1356,11 @@ static int ____##name(unsigned long long *ctx, ##args) bpf_probe_read((void *)dst, __length, (char *)args + __offset); \ } while (0); +#define TP_DATA_LOC_READ_STR(dst, field, length) \ + do { \ + unsigned short __offset = args->data_loc_##field & 0xFFFF; \ + bpf_probe_read_str((void *)dst, length, (char *)args + __offset); \ + } while (0); + #endif )********"
OcCryptoLib: Fix potential deadlock
@@ -415,7 +415,7 @@ BigNumSignificantBitsWord ( // NumBits = OC_BN_WORD_NUM_BITS; Mask = (OC_BN_WORD)1U << (OC_BN_WORD_NUM_BITS - 1); - while ((Word & Mask) == 0) { + while (Mask != 0 && (Word & Mask) == 0) { --NumBits; Mask >>= 1U; }
DotNetTools: Hide CLR statistics when the CLR data is invalid
@@ -935,6 +935,9 @@ INT_PTR CALLBACK DotNetPerfPageDlgProc( { NMLVDISPINFO *dispInfo = (NMLVDISPINFO *)header; + if (!context->ControlBlockValid) // Don't show statistics when the CLR data is invalid. (dmex) + break; + if (dispInfo->item.iSubItem == 1) { if (dispInfo->item.mask & LVIF_TEXT)
Fix AdobeRGB support with MuPDF.
@@ -2184,6 +2184,7 @@ xform_document( { fz_set_cmm_engine(context, &fz_cmm_engine_lcms); +# if 0 /* * Create a calibrated colorspace using the AdobeRGB values. */ @@ -2197,7 +2198,13 @@ xform_document( cs = fz_new_cal_colorspace(context, "AdobeRGB", wp_val, bp_val, gamma_val, matrix_val); -// cs = fz_new_icc_colorspace_from_file(context, "AdobeRGB", "/usr/share/color/icc/colord/AdobeRGB1998.icc"); +# endif // 0 + +# ifdef __APPLE__ + cs = fz_new_icc_colorspace_from_file(context, "AdobeRGB1998", "/System/Library/ColorSync/Profiles/AdobeRGB1998.icc"); +# else + cs = fz_new_icc_colorspace_from_file(context, "AdobeRGB1998", "/usr/share/color/icc/colord/AdobeRGB1998.icc"); +# endif /* __APPLE__ */ } else #endif /* HAVE_FZ_CMM_ENGINE_LCMS */
doc: fix typos in sample app guide
@@ -427,14 +427,15 @@ Copy files from the development system to your target system Option 1: use ``scp`` to copy files over the local network Use scp from your development system to the ~/acrn-work directory on the - target (using the target system's IP address you found earlier):: + target (replace the IP address used in this example with the target + system's IP address you found earlier):: cd ~/acrn-work scp hmi_vm.img rt_vm.img acrn-hypervisor/build/acrn-my_board-MyConfiguration*.deb \ *acrn-service-vm*.deb MyConfiguration/launch_user_vm_id*.sh \ acpica-unix-20210105/generate/unix/bin/iasl \ - [email protected]:~/acrn-work + [email protected]:~/acrn-work Option 2: use a USB stick to copy files Insert a USB stick into the development computer @@ -453,7 +454,7 @@ Copy files from the development system to your target system Move the USB disk you just used to the target system and run these commands to copy the files locally:: - disk="/media/$USER/"**$(**\ ls /media/$USER\ **)** + disk="/media/$USER/"$(ls /media/$USER) cp "$disk"/*vm.img ~/acrn-work cp "$disk"/acrn-my_board-MyConfiguration*.deb ~/acrn-work @@ -501,7 +502,7 @@ Install and Run ACRN on the Target System .. code-block:: console - $ hostname -I \| cut -d ' ' -f 1 + $ hostname -I | cut -d ' ' -f 1 10.0.0.200 #. From your development computer, ssh to your target board's Service VM @@ -537,7 +538,7 @@ Install and Run ACRN on the Target System .. code-block:: console - (acrn-guest)root@ubuntu:~# hostname -I \| cut -d ' ' -f 1 + (acrn-guest)root@ubuntu:~# hostname -I | cut -d ' ' -f 1 10.0.0.100 #. Run the HMI VM Sample Application userApp (in the background) and histapp.py:: @@ -578,13 +579,15 @@ Now the two parts of the sample application are running: We can view this data displayed as a histogram: -- Option 1. Login to the HMI_VM on the target system's console. (If you want to +Option 1: Use a browser on the HMI VM using the target system console + Login to the HMI_VM on the target system's console. (If you want to login as root, click on the "Not listed?" link under the username choices you do see and enter the root username and password. Open the web browser to http://localhost -- Option 2. Open a web-browser on your development computer to the - HMI_VM IP address we found above (e.g., http://10.0.0.100). +Option 2: Use a browser on your development system + Open a web-browser on your development computer to the + HMI_VM IP address we found in an earlier step (e.g., http://10.0.0.100). You'll see a histogram graph something like this showing the percentage of latency time intervals reported by cyclictest.
ci: update Force use of string comparison to avoid issues comparing strings that include specific characters like `[` and `]`, which are special symbols and break the bash test.
@@ -45,10 +45,10 @@ for sha in $commits; do IFS=$'\n' for line in ${lines}; do stripped=$(echo $line | sed -e 's/^\s*//' | sed -e 's/\s*$//') - if [[ ${stripped} == ${author} ]]; then + if [[ "${stripped}" == "${author}" ]]; then found_author=true fi - if [[ ${stripped} == ${committer} ]]; then + if [[ "${stripped}" == "${committer}" ]]; then found_committer=true fi
Added note about trailing forward-slash on default config file.
@@ -656,7 +656,8 @@ static-file .flv # On-disk B+ Tree # Path where the on-disk database files are stored. -# The default value is the /tmp directory. +# The default value is the /tmp/ directory +# Note the trailing forward-slash. # #db-path /tmp/
fixes +spin to preserve the type of the head of the product
:> c: gate from list-item and state to product and new state ~/ %spin |* [a=(list) b=* c=_|=(^ [** +<+])] - => .(c `$-([_?>(?=(^ a) i.a) _b] [* _b])`c) + => .(c `$-([_?>(?=(^ a) i.a) _b] [_-:(c) _b])`c) =/ acc=(list _-:(c)) ~ :> transformed list and updated state |- ^- (pair _acc _b)
FAQ for Linux Handle Limit Issue
@@ -126,3 +126,17 @@ On the latest version of Windows, these counters are also exposed via PerfMon.ex Counters are also captured at the beginning of MsQuic ETW traces, and unlike PerfMon, includes all MsQuic instances running on the system, both user and kernel mode. # FAQ + +## Why do I get errors on Linux when I try to open a large number of connections? + +In many Linux setups, the default per-process file handle limit is relatively small (~1024). In scenarios where lots of (usually client) connection are opened, a large number of sockets (a type of file handle) are created. Eventually the handle limit is reached and connections start failing because new sockets cannot be created. To fix this, you will need to increase the handle limit. + +To query the maximum limit you may set: +``` +ulimit -Hn +``` + +To set a new limit (up to the max): +``` +ulimit -n newValue +```
i2c-pseudo: Fix data byte separator in multi-byte I2C_XFER_REPLY example. BRANCH=none TEST=none
@@ -193,7 +193,7 @@ adapters, even when adapter numbers have been reused. Write Command: I2C_XFER_REPLY <xfer_id> <msg_id> <addr> <flags> <errno> [<read_byte>[:...]] Example: "I2C_XFER_REPLY 3 0 0x0070 0x0000 0\n" -Example: "I2C_XFER_REPLY 3 1 0x0070 0x0001 0 0B 29 02 D9\n" +Example: "I2C_XFER_REPLY 3 1 0x0070 0x0001 0 0B:29:02:D9\n" Details: This is how a pseudo controller can reply to I2C_XFER_REQ. Only valid after I2C_XFER_REQ. A pseudo controller should write one of these for each
adds list +join gate to stdlib
|@ ++ $ ?:(*? ~ [i=(snag 0 a) t=$]) -- a +:: +join: construct a new list, placing .sep between every pair in .lit +:: +++ join + |* [sep=* lit=(list)] + =. sep `_?>(?=(^ lit) i.lit)`sep + ?~ lit ~ + =| out=(list _?>(?=(^ lit) i.lit)) + |- ^+ out + ?~ t.lit + (flop [i.lit out]) + $(out [sep i.lit out], lit t.lit) :: :: +bake: convert wet gate to dry gate by specifying argument mold ::
Whitelist hiredis repo path in cygwin
@@ -197,6 +197,7 @@ jobs: HIREDIS_PATH: ${{ github.workspace }} run: | build_hiredis() { + git config --global --add safe.directory "$(cygpath -u $HIREDIS_PATH)" cd $(cygpath -u $HIREDIS_PATH) git clean -xfd make
Added more ShellUtil lock types
@@ -26,9 +26,9 @@ enum { SCE_SHELL_UTIL_LOCK_TYPE_QUICK_MENU = 0x2, SCE_SHELL_UTIL_LOCK_TYPE_POWEROFF_MENU = 0x4, SCE_SHELL_UTIL_LOCK_TYPE_UNK8 = 0x8, - SCE_SHELL_UTIL_LOCK_TYPE_UNK10 = 0x10, - SCE_SHELL_UTIL_LOCK_TYPE_UNK20 = 0x20, - SCE_SHELL_UTIL_LOCK_TYPE_UNK40 = 0x40, + SCE_SHELL_UTIL_LOCK_TYPE_USB_CONNECTION = 0x10, + SCE_SHELL_UTIL_LOCK_TYPE_MC_INSERTED = 0x20, + SCE_SHELL_UTIL_LOCK_TYPE_MC_REMOVED = 0x40, SCE_SHELL_UTIL_LOCK_TYPE_UNK80 = 0x80, SCE_SHELL_UTIL_LOCK_TYPE_UNK100 = 0x100, SCE_SHELL_UTIL_LOCK_TYPE_UNK200 = 0x200,
mtk_isp: Enlarge CONFIG_ROM_SIZE for ISP EC porting Enlarge ROM size for Camera ISP EC porting BRANCH=None TEST=make BOARD=kukui_scp Tested-by: Nicolas Boichat
*/ #define ICACHE_BASE 0x7C000 #define CONFIG_ROM_BASE 0x0 -#define CONFIG_RAM_BASE 0x10000 +#define CONFIG_RAM_BASE 0x20000 #define CONFIG_ROM_SIZE (CONFIG_RAM_BASE - CONFIG_ROM_BASE) #define CONFIG_RAM_SIZE (CONFIG_IPC_SHARED_OBJ_ADDR - CONFIG_RAM_BASE) #define CONFIG_CODE_RAM_SIZE CONFIG_RAM_BASE
Update: don't query for fake compound nodes, and translate instance/term properly
@@ -36,8 +36,14 @@ sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach()) def toNarsese(subject_relation_predicate): (subject, relation, predicate) = subject_relation_predicate if relation == "IsA": + if subject[0].isupper(): + return "<{" + subject + "} --> " + predicate + ">." + else: return "<" + subject + " --> " + predicate + ">." if relation == "InstanceOf": + if subject[0].islower(): + return "<" + subject + " --> " + predicate + ">." + else: return "<{" + subject + "} --> " + predicate + ">." if relation == "HasProperty": return "<" + subject + " --> [" + predicate + "]>." @@ -58,7 +64,7 @@ def queryConceptNet(maxAmount, term, side, relation): edges = req.json()["edges"] for edge in edges: (s,v,p) = unwrap(edge["@id"]) - if s == term or p == term: + if (s == term or p == term) and "_" not in s and "_" not in p: print(toNarsese((s,v,p))) sys.stdout.flush()
libwebp.pc: add libsharpyuv to requires
@@ -6,6 +6,7 @@ includedir=@includedir@ Name: libwebp Description: Library for the WebP graphics format Version: @PACKAGE_VERSION@ +Requires: libsharpyuv Cflags: -I${includedir} Libs: -L${libdir} -lwebp Libs.private: -lm @PTHREAD_CFLAGS@ @PTHREAD_LIBS@
envydis/gm107: add 1 and 2 component color masks to texs and tlds
@@ -935,6 +935,14 @@ static struct insn tabda00_1[] = { }; static struct insn tabda00_2[] = { + { 0x0000000ff0000000ull, 0x001c000ff0000000ull, N("r") }, + { 0x0004000ff0000000ull, 0x001c000ff0000000ull, N("g") }, + { 0x0008000ff0000000ull, 0x001c000ff0000000ull, N("b") }, + { 0x000c000ff0000000ull, 0x001c000ff0000000ull, N("a") }, + { 0x0010000ff0000000ull, 0x001c000ff0000000ull, N("rg") }, + { 0x0014000ff0000000ull, 0x001c000ff0000000ull, N("ra") }, + { 0x0018000ff0000000ull, 0x001c000ff0000000ull, N("ga") }, + { 0x001c000ff0000000ull, 0x001c000ff0000000ull, N("ba") }, { 0x0000000000000000ull, 0x001c000000000000ull, N("rgb") }, { 0x0004000000000000ull, 0x001c000000000000ull, N("rga") }, { 0x0008000000000000ull, 0x001c000000000000ull, N("rba") },
kdb: remove third option from cmdline
@@ -230,12 +230,6 @@ Cmdline::Cmdline (int argc, char ** argv, Command * command) long_options.push_back (o); helpText += "-2 --second Suppress the second column.\n"; } - if (acceptedOptions.find ('3') != string::npos) - { - option o = { "third", no_argument, nullptr, '3' }; - long_options.push_back (o); - helpText += "-3 --third Suppress the third column.\n"; - } optionPos = acceptedOptions.find ('c'); if (optionPos != string::npos) {
docs(bar) fix typos in widget examples
@@ -22,13 +22,13 @@ Stripe pattern and range value .. lv_example:: widgets/bar/lv_example_bar_4 :language: c -Bar with RTL and RTL base direction +Bar with LTR and RTL base direction """""""""""""""""""""""""""""""""""" .. lv_example:: widgets/bar/lv_example_bar_5 :language: c -Custom drawr to show the current value +Custom drawer to show the current value """"""""""""""""""""""""""""""""""""""" .. lv_example:: widgets/bar/lv_example_bar_6
minor cleanup to expose icw_resource_group
@@ -12,6 +12,7 @@ groups: - icw_gporca_centos7 - icw_gporca_sles11 - icw_planner_ictcp_centos6 + - icw_resource_group - MU_check_centos - regression_tests_gpcloud_centos - MM_gpperfmon @@ -1547,6 +1548,7 @@ jobs: - icw_gporca_centos7 - icw_gporca_sles11 - icw_planner_ictcp_centos6 + - icw_resource_group - MU_check_centos - regression_tests_gpcloud_centos - MM_gpperfmon
arvo: moves most new structures to top level
:: +| %interface :: +:: $ball: dynamic kernel action :: $curd: tagged, untyped event :: $duct: causal history :: +hobo: %soft task builder +:: $goof: crash label and trace XX fail/ruin/crud/flaw/lack/miss :: $monk: general identity +:: $move: cause and action :: $ovum: card with cause :: $scry-sample: vane +scry argument :: $vane-sample: vane wrapper-gate aargument :: $slyt: old namespace :: +wind: kernel action builder :: $wire: event pretext +:: +wite: kernel action/error builder :: ++$ ball (wite [vane=term task=maze] maze) +$ curd (cask) +$ duct (list wire) ++ hobo == a == ++$ goof [mote=term =tang] +$ monk (each ship (pair @tas @ta)) ++$ move [=duct =ball] +$ ovum (pair wire curd) :: +$ scry-sample [%give p=b] == +$ wire path +++ wite + |$ :: note: a routed $task + :: gift: a reverse action + :: + :: NB: task: a forward action + :: sign: a sourced $gift + :: + [note gift] + $% :: %pass: advance + :: %hurl: advance failed + :: %slip: lateral + :: %give: retreat + :: %gave: retreat failed + :: + [%pass =wire =note] + [%hurl =goof =wire =note] + [%slip =note] + [%give =gift] + [%gave =goof =gift] + == :: +| %implementation :: :: ++ part => |% - :: $ball: dynamic kernel action :: $card: tagged, untyped event - :: $goof: crash label and trace XX fail/ruin/crud/flaw/lack/miss - :: $move: cause and action :: $ovum: card with cause - :: +wind: kernel action builder :: :: XX replace top-level structures :: - +$ ball (wind [vane=term task=maze] maze) +$ card (cask) - +$ goof [mote=term =tang] - +$ move [=duct =ball] +$ ovum [=wire =card] - ++ wind - |$ :: note: a routed $task - :: gift: a reverse action - :: - :: NB: task: a forward action - :: sign: a sourced $gift - :: - [note gift] - $% :: %pass: advance - :: %hurl: advance failed - :: %slip: lateral - :: %give: retreat - :: %gave: retreat failed - :: - [%pass =wire =note] - [%hurl =goof =wire =note] - [%slip =note] - [%give =gift] - [%gave =goof =gift] - == -- :: ~% %part +> ~
added note on bash shell and parenthesis vs square brackets
@@ -295,19 +295,28 @@ function initialize_build_visit() # export VISITARCH=${VISITARCH-${ARCH}} export SO_EXT="dylib" VER=$(uname -r) - # Check for Panther, because MACOSX_DEPLOYMENT_TARGET will default to 10.1 - # Used http://en.wikipedia.org/wiki/Darwin_(operating_system) to map Darwin - # Kernel versions to OSX version numbers. - # Other options for dealing with MACOSX_DEPLOYMENT_TARGET didn't work - # See issue #1499 (https://visitbugs.ornl.gov/issues/1499) + # Check for Panther, because MACOSX_DEPLOYMENT_TARGET will + # default to 10.1 + + # Used http://en.wikipedia.org/wiki/Darwin_(operating_system) + # to map Darwin Kernel versions to OSX version numbers. Other + # options for dealing with MACOSX_DEPLOYMENT_TARGET didn't + # work See issue #1499 (https://visitbugs.ornl.gov/issues/1499) # use gcc for 10.9 & earlier VER_MAJOR==${VER%%.*} - # Note for the less than conditional parenthesis must be used - # ratehr than square brackets. - if (( ${VER_MAJOR} < "8" )) ; then + # bash script educational note: + # The less than sign "<" is an arithmetic expression and + # as such one must use parenthesis (( .. )) and not square brackets. + # i.e. if (( ${VER_MAJOR} < 8 )) ; then + + # Square brackets are for contionals only. To make it a + # conditional one must use "-lt" + # i.e. if [[ ${VER_MAJOR} -lt 8 ]] ; then + + if [[ ${VER_MAJOR} -lt 8 ]] ; then export MACOSX_DEPLOYMENT_TARGET=10.3 elif [[ VER_MAJOR == 8 ]] ; then export MACOSX_DEPLOYMENT_TARGET=10.4
docs: modify a conventional expression Modify a conventional expression: "Computing Performance Requirements" -> "Process Capacity Requirements". Fix issue
@@ -44,7 +44,7 @@ To enable HyperLedger Fabric capability, the storage requirements of the C-langu The above does not include the system libraries that the BoAT Framework (C language version) depends on. The exact values may vary with different blockchain protocols. -## Part 2 Computing Performance Requirements +## Part 2 Process Capacity Requirements For supporting Ethereum, the BoAT Framework (C language version) takes about 1 second (excluding network communication time) to complete the cryptographic operations for a blockchain transaction or smart contract call, on an ARM Cortex M4 running at about 100MHz . The exact time can vary with different blockchain protocols.
better handling of read() interfacename
@@ -7801,14 +7801,11 @@ static char interfacepathname[PATH_MAX]; snprintf(interfacepathname, PATH_MAX -1, "/sys/class/net/%s/phy80211/name", interfacename); fd = open(interfacepathname, O_RDONLY); if(fd < 0) return; -if(read(fd, phyinterfacename, PHYIFNAMESIZE) == -1) +if(read(fd, phyinterfacename, PHYIFNAMESIZE) > 0) { - phyinterfacename[0] = 0; - close(fd); - return; - } pos = strchr(phyinterfacename, '\n'); if(pos) *pos = '\0'; + } close(fd); return; }
Build: Fixed Resources folder placement.
@@ -21,10 +21,10 @@ package() { mkdir -p tmp/EFI/OC/Kexts || exit 1 mkdir -p tmp/EFI/OC/Tools || exit 1 mkdir -p tmp/EFI/BOOT || exit 1 - mkdir -p tmp/EFI/Resources/Audio || exit 1 - mkdir -p tmp/EFI/Resources/Font || exit 1 - mkdir -p tmp/EFI/Resources/Image || exit 1 - mkdir -p tmp/EFI/Resources/Label || exit 1 + mkdir -p tmp/EFI/OC/Resources/Audio || exit 1 + mkdir -p tmp/EFI/OC/Resources/Font || exit 1 + mkdir -p tmp/EFI/OC/Resources/Image || exit 1 + mkdir -p tmp/EFI/OC/Resources/Label || exit 1 mkdir -p tmp/Docs/AcpiSamples || exit 1 mkdir -p tmp/Utilities || exit 1 cp BootKicker.efi tmp/EFI/OC/Tools/ || exit 1
test-suite: remove OMP_NUM_THREADS setting for imb2 test
@@ -11,8 +11,7 @@ else fi CMD_TIMEOUT="10:00" -TEST_NUM_RANKS=8 -TEST_NUM_THREADS=4 +TEST_NUM_RANKS=2 check_rms rm=$RESOURCE_MANAGER @@ -21,7 +20,6 @@ NODES=2 TASKS=$((NODES*TEST_NUM_RANKS)) # set global env settings -export OMP_NUM_THREADS=$TEST_NUM_THREADS if [ $LMOD_FAMILY_MPI == "mvapich2" ];then export MV2_ENABLE_AFFINITY=0 export IPATH_NO_CPUAFFINITY=1
Remove module dependency Elinimate macros defined by modules locally in the functions that are moving to the new constant-time module.
@@ -1277,7 +1277,7 @@ static unsigned mbedtls_cf_mpi_uint_lt( const mbedtls_mpi_uint x, ret |= y & cond; - ret = ret >> ( biL - 1 ); + ret = ret >> ( sizeof( mbedtls_mpi_uint ) * 8 - 1 ); return (unsigned) ret; }
AudioDxe: Fix issue with playback ending early
@@ -67,7 +67,7 @@ HdaControllerStreamOutputPollTimerHandler ( // Get stream DMA position. // HdaStreamDmaPos = HdaStream->HdaControllerDev->DmaPositions[HdaStream->Index].Position; - if (HdaStreamDmaPos > HdaStream->DmaPositionLast) { + if (HdaStreamDmaPos >= HdaStream->DmaPositionLast) { DmaChanged = HdaStreamDmaPos - HdaStream->DmaPositionLast; } else { DmaChanged = (HDA_STREAM_BUF_SIZE - HdaStream->DmaPositionLast) + HdaStreamDmaPos;
Ampton: tune the gyro axis and direction BRANCH=octopus TEST=run the CTS verifier, check the axis and direction is correct
@@ -150,6 +150,12 @@ const mat33_fp_t base_standard_ref = { { 0, 0, FLOAT_TO_FP(1)} }; +const mat33_fp_t gyro_standard_ref = { + { 0, FLOAT_TO_FP(-1), 0}, + { FLOAT_TO_FP(1), 0, 0}, + { 0, 0, FLOAT_TO_FP(1)} +}; + /* sensor private data */ static struct kionix_accel_data g_kx022_data; static struct bmi160_drv_data_t g_bmi160_data; @@ -220,7 +226,7 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_SENSOR, .addr = BMI160_ADDR0, .default_range = 1000, /* dps */ - .rot_standard_ref = NULL, /* Identity matrix. */ + .rot_standard_ref = &gyro_standard_ref, .min_frequency = BMI160_GYRO_MIN_FREQ, .max_frequency = BMI160_GYRO_MAX_FREQ, },
Consolidate sha256 checksums
@@ -235,9 +235,16 @@ pipeline { stages { stage('Unstash') { steps { + dir('upload') { + unstash 'astcenc-linux-x64-hash' + unstash 'astcenc-macos-x64-hash' + } dir('upload/linux-x64') { unstash 'astcenc-linux-x64' } + dir('upload/macos-x64') { + unstash 'astcenc-macos-x64' + } dir('upload/windows-x64') { unstash 'astcenc-windows-x64' withCredentials([sshUserPrivateKey(credentialsId: 'gerrit-jenkins-ssh', @@ -248,16 +255,13 @@ pipeline { usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { sh 'python3 ./signing/windows-client-wrapper.py ${USERNAME} *.zip' + sh 'mv *.zip.sha256 ../' sh 'rm -rf ./signing' } } - dir('upload/macos-x64') { - unstash 'astcenc-macos-x64' - } dir('upload') { - unstash 'astcenc-linux-x64-hash' - unstash 'astcenc-windows-x64-hash' - unstash 'astcenc-macos-x64-hash' + sh 'cat *.sha256 > release-sha256.txt' + sh 'rm *.sha256' } } }
Reject invalid encodings during decode
@@ -301,6 +301,7 @@ void physical_to_symbolic( if (rsvbits != 3) { scb.block_type = SYM_BTYPE_ERROR; + return; } int vx_low_s = read_bits(8, 12, pcb.data) | (read_bits(5, 12 + 8, pcb.data) << 8); @@ -313,6 +314,7 @@ void physical_to_symbolic( if ((vx_low_s >= vx_high_s || vx_low_t >= vx_high_t) && !all_ones) { scb.block_type = SYM_BTYPE_ERROR; + return; } } else @@ -330,6 +332,7 @@ void physical_to_symbolic( if ((vx_low_s >= vx_high_s || vx_low_t >= vx_high_t || vx_low_p >= vx_high_p) && !all_ones) { scb.block_type = SYM_BTYPE_ERROR; + return; } } @@ -384,6 +387,7 @@ void physical_to_symbolic( if (is_dual_plane && partition_count == 4) { scb.block_type = SYM_BTYPE_ERROR; + return; } scb.color_formats_matched = 0; @@ -449,6 +453,7 @@ void physical_to_symbolic( if (color_integer_count > 18) { scb.block_type = SYM_BTYPE_ERROR; + return; } // Determine the color endpoint format to use @@ -465,13 +470,14 @@ void physical_to_symbolic( } int color_quant_level = quant_mode_table[color_integer_count >> 1][color_bits]; - scb.quant_mode = (quant_method)color_quant_level; if (color_quant_level < QUANT_6) { scb.block_type = SYM_BTYPE_ERROR; + return; } // Unpack the integer color values and assign to endpoints + scb.quant_mode = (quant_method)color_quant_level; uint8_t values_to_decode[32]; decode_ise((quant_method)color_quant_level, color_integer_count, pcb.data, values_to_decode, (partition_count == 1 ? 17 : 19 + PARTITION_INDEX_BITS));
Add parentheses around macro argument of OSSL_NELEM.
@@ -539,7 +539,7 @@ struct servent *getservbyname(const char *name, const char *proto); # endif /* end vxworks */ -#define OSSL_NELEM(x) (sizeof(x)/sizeof(x[0])) +#define OSSL_NELEM(x) (sizeof(x)/sizeof((x)[0])) #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION # define CRYPTO_memcmp memcmp
remove libevent license from usage acknowledgement clause was removed a long time ago so it's no longer necessary to include in the binary output.
@@ -4219,39 +4219,6 @@ static void usage_license(void) { "THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n" "(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n" "OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" - "\n" - "\n" - "This product includes software developed by Niels Provos.\n" - "\n" - "[ libevent ]\n" - "\n" - "Copyright 2000-2003 Niels Provos <[email protected]>\n" - "All rights reserved.\n" - "\n" - "Redistribution and use in source and binary forms, with or without\n" - "modification, are permitted provided that the following conditions\n" - "are met:\n" - "1. Redistributions of source code must retain the above copyright\n" - " notice, this list of conditions and the following disclaimer.\n" - "2. Redistributions in binary form must reproduce the above copyright\n" - " notice, this list of conditions and the following disclaimer in the\n" - " documentation and/or other materials provided with the distribution.\n" - "3. All advertising materials mentioning features or use of this software\n" - " must display the following acknowledgement:\n" - " This product includes software developed by Niels Provos.\n" - "4. The name of the author may not be used to endorse or promote products\n" - " derived from this software without specific prior written permission.\n" - "\n" - "THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n" - "IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n" - "OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n" - "IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n" - "INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n" - "NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n" - "DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n" - "THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n" - "(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n" - "THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n" ); return;
SW: Fixing -d parameter in nvme_test.c
@@ -303,7 +303,7 @@ int main(int argc, char *argv[]) break; case 'd': /* drive */ drive = strtol(optarg, (char **)NULL, 0); - if ((0 != drive) || (1 != drive)) { + if ((0 != drive) && (1 != drive)) { VERBOSE0("Error: Drive (-d, --drive) must be 0 or 1\n"); exit(1); }
reverse encoder direction (CCW==decrement, CW==increment)
@@ -368,7 +368,7 @@ static lv_res_t lv_spinbox_signal(lv_obj_t * spinbox, lv_signal_t sign, void * p { if(indev_type == LV_INDEV_TYPE_ENCODER) { - lv_spinbox_decrement(spinbox); + lv_spinbox_increment(spinbox); } else { @@ -379,7 +379,7 @@ static lv_res_t lv_spinbox_signal(lv_obj_t * spinbox, lv_signal_t sign, void * p { if(indev_type == LV_INDEV_TYPE_ENCODER) { - lv_spinbox_increment(spinbox); + lv_spinbox_decrement(spinbox); } else {
Update persiststore.c fix the issue
@@ -110,7 +110,7 @@ BOAT_RESULT BoatPersistRead(const BCHAR *storage_name_str, BOAT_OUT void *data_p BUINT8 encrypted_array[len_to_read + 31]; // 31 for AES padding BUINT32 encrypted_readLen; // Plain buffer - BUINT8 plain_array[len_to_read]; + BUINT8 plain_array[len_to_read+31]; BUINT32 plain_len = sizeof(plain_array); BUINT8 readDataTmp[len_to_read + 31 + 32 + 16 + 16]; @@ -151,7 +151,7 @@ BOAT_RESULT BoatPersistRead(const BCHAR *storage_name_str, BOAT_OUT void *data_p /* decrypt data */ result = BoatAesDecrypt(salt_array, g_aes_key, encrypted_array, encrypted_readLen, plain_array); // Check size of the decrypted data matches the length to read - if (result == BOAT_SUCCESS && plain_len == len_to_read) + if (result == BOAT_SUCCESS) { /* Calculate data hash from the decrypted data */ keccak_256(plain_array, BOAT_ROUNDUP(len_to_read, 16), data_hash_array);
fixed clocking in top.sv
@@ -311,7 +311,7 @@ module top ( // Clock generation // 250MHz AFU clock always begin - #4.0ns; + #2.0ns; ha_pclock = !ha_pclock; end @@ -720,13 +720,13 @@ module top ( //-- only for DDRI_USED=TRUE // 200MHz DDR3 reference clock //-- only for DDRI_USED=TRUE always begin //-- only for DDRI_USED=TRUE - #5.0ns; //-- only for DDRI_USED=TRUE + #2.5ns; //-- only for DDRI_USED=TRUE refclk200_p = !refclk200_p; //-- only for DDRI_USED=TRUE end //-- only for DDRI_USED=TRUE //-- only for DDRI_USED=TRUE // 400MHz DDR3 system clock //-- only for DDRI_USED=TRUE always begin //-- only for DDRI_USED=TRUE - #2.5ns; //-- only for DDRI_USED=TRUE + #1.25ns; //-- only for DDRI_USED=TRUE c1_sys_clk_p = !c1_sys_clk_p; //-- only for DDRI_USED=TRUE end //-- only for DDRI_USED=TRUE
Be more precise about the snapshot contents
@@ -310,7 +310,7 @@ u3_dawn_vent(u3_noun seed) // load snapshot from file // if ( 0 != u3_Host.ops_u.ets_c ) { - fprintf(stderr, "boot: loading ethereum snapshot\r\n"); + fprintf(stderr, "boot: loading azimuth snapshot\r\n"); u3_noun raw_snap = u3ke_cue(u3m_file(u3_Host.ops_u.ets_c)); sap = u3nc(u3_nul, raw_snap); } @@ -325,7 +325,7 @@ u3_dawn_vent(u3_noun seed) // no snapshot // else { - printf("dawn: no ethereum snapshot specified\n"); + printf("dawn: no azimuth snapshot specified\n"); sap = u3_nul; }
fixed with proper c coverage
@@ -2,7 +2,10 @@ sudo: required dist: trusty -language: c +language: cpp + +compiler: + - gcc addons: apt: @@ -21,7 +24,7 @@ matrix: install: #- git lfs pull - source .ci/travis.sh - - pip install coveralls + - pip install --user cpp-coveralls cache: directories: @@ -34,8 +37,9 @@ git: script: - py.test -v -s tests + - ./configure --enable-gcov && make && make check after_success: #- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then source .ci/build-docs.sh; fi #- if [ "$TRAVIS_BRANCH" = "master" ]; then source .ci/build-docs.sh; fi - - coveralls + - coveralls --exclude lib --exclude tests --gcov-options '\-lp'
VERSION bump to version 2.0.256
@@ -61,7 +61,7 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) # set version of the project set(LIBYANG_MAJOR_VERSION 2) set(LIBYANG_MINOR_VERSION 0) -set(LIBYANG_MICRO_VERSION 255) +set(LIBYANG_MICRO_VERSION 256) set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION}) # set version of the library set(LIBYANG_MAJOR_SOVERSION 2)
Uses correct env var for osx library path
@@ -44,7 +44,7 @@ install: - if ! [[ $TRAVIS_OS_NAME == "linux" ]]; then hash -r ; fi - if ! [[ $TRAVIS_OS_NAME == "linux" ]]; then source activate test-environment ; fi - if ! [[ $TRAVIS_OS_NAME == "linux" ]]; then export PKG_CONFIG_PATH=$CONDA_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH ; fi - - if ! [[ $TRAVIS_OS_NAME == "linux" ]]; then export LD_LIBRARY_PATH=$CONDA_PREFIX/lib:$LD_LIBRARY_PATH ; fi + - if ! [[ $TRAVIS_OS_NAME == "linux" ]]; then export DYLD_LIBRARY_PATH=$CONDA_PREFIX/lib:$DYLD_LIBRARY_PATH ; fi - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib - export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig - cmake --version
TU_ASSERT return 0.
@@ -204,14 +204,14 @@ uint16_t dfu_moded_open(uint8_t rhport, tusb_desc_interface_t const * itf_desc, else { // Only one DFU interface is supported - TU_ASSERT(_dfu_state_ctx.intf == intf); + TU_ASSERT(_dfu_state_ctx.intf == intf, 0); } // CFG_TUD_DFU_ATL_MAX should big enough to hold all alt settings - TU_ASSERT(alt < CFG_TUD_DFU_ATL_MAX); + TU_ASSERT(alt < CFG_TUD_DFU_ATL_MAX, 0); // Alt should increse by one every time - TU_ASSERT(alt == last_alt++); + TU_ASSERT(alt == last_alt++, 0); //------------- DFU descriptor -------------// p_desc = tu_desc_next(p_desc); @@ -220,7 +220,7 @@ uint16_t dfu_moded_open(uint8_t rhport, tusb_desc_interface_t const * itf_desc, _dfu_state_ctx.attrs[alt] = ((tusb_desc_dfu_functional_t const *)p_desc)->bAttributes; // CFG_TUD_DFU_TRANSFER_BUFFER_SIZE has to be set to the largest buffer size used by all alt settings - TU_ASSERT(((tusb_desc_dfu_functional_t const *)p_desc)->wTransferSize <= CFG_TUD_DFU_TRANSFER_BUFFER_SIZE); + TU_ASSERT(((tusb_desc_dfu_functional_t const *)p_desc)->wTransferSize <= CFG_TUD_DFU_TRANSFER_BUFFER_SIZE, 0); p_desc = tu_desc_next(p_desc); max_len -= drv_len;
Added playback-time; exits playback early
@@ -16,6 +16,8 @@ STATIC_CONFIG_ITEM(PLAYBACK, "playback", 's', "File to be used for playback if p STATIC_CONFIG_ITEM(PLAYBACK_FACTOR, "playback-factor", 'f', "Time factor of playback -- 1 is run at the same timing as original, 0 is run as fast as possible.", 1.0f) +STATIC_CONFIG_ITEM(PLAYBACK_TIME, "playback-time", 'f', "End time of playback", -1.0f) + STATIC_CONFIG_ITEM(PLAYBACK_RUN_TIME, "run-time", 'f', "How long to run for", -1.) @@ -44,6 +46,7 @@ typedef struct SurvivePlaybackData { double next_time_s; double time_now; FLT playback_factor; + FLT playback_time; bool hasRawLight; bool hasSweepAngle; bool outputExternalPose; @@ -393,6 +396,10 @@ static void *playback_thread(void *_driver) { while (driver->keepRunning) { double next_time_s_scaled = driver->next_time_s * driver->playback_factor; double time_now = OGRelativeTime(); + if (driver->playback_time >= 0 && driver->time_now > driver->playback_time) { + driver->keepRunning = false; + return 0; + } if (next_time_s_scaled == 0 || next_time_s_scaled < time_now) { int rtnVal = playback_pump_msg(driver->ctx, driver); if (rtnVal < 0) @@ -428,6 +435,7 @@ static int playback_close(struct SurviveContext *ctx, void *_driver) { driver->playback_file = 0; survive_detach_config(ctx, "playback-factor", &driver->playback_factor); + survive_detach_config(ctx, "playback-time", &driver->playback_time); survive_install_run_time_fn(ctx, 0, 0); free(driver); return 0; @@ -464,8 +472,10 @@ int DriverRegPlayback(SurviveContext *ctx) { } survive_install_run_time_fn(ctx, survive_playback_run_time, sp); survive_attach_configf(ctx, "playback-factor", &sp->playback_factor); + survive_attach_configf(ctx, "playback-time", &sp->playback_time); - SV_INFO("Using playback file '%s' with timefactor of %f", playback_file, sp->playback_factor); + SV_INFO("Using playback file '%s' with timefactor of %f until %f", playback_file, sp->playback_factor, + sp->playback_time); ctx->poll_min_time_ms = 1; if (sp->playback_factor == 0.0)
os/mm/mm_heap: Error handling in get_heapindex Validate BASE_HEAP before processing.
@@ -219,6 +219,11 @@ int mm_get_heapindex(void *mem) if (mem == NULL) { return 0; } + if (BASE_HEAP == NULL) { + lldbg("BASE_HEAP NULL\n"); + return 0; + } + for (heap_idx = 0; heap_idx < CONFIG_KMM_NHEAPS; heap_idx++) { int region = 0; #if CONFIG_KMM_REGIONS > 1
Remove mode param from AES-CTR docs
@@ -511,10 +511,6 @@ int mbedtls_aes_crypt_ofb( mbedtls_aes_context *ctx, * \brief This function performs an AES-CTR encryption or decryption * operation. * - * This function performs the operation defined in the \p mode - * parameter (encrypt/decrypt), on the input data buffer - * defined in the \p input parameter. - * * Due to the nature of CTR, you must use the same key schedule * for both encryption and decryption operations. Therefore, you * must use the context initialized with mbedtls_aes_setkey_enc()
Two minor fixes for cluster.c clusterNodeClearSlotBit()/clusterNodeSetSlotBit(), only set bit when slot does not exist and clear bit when slot does exist.
@@ -4297,7 +4297,7 @@ static int clusterNodeCronHandleReconnect(clusterNode *node, mstime_t handshake_ link->conn = connCreate(connTypeOfCluster()); connSetPrivateData(link->conn, link); if (connConnect(link->conn, node->ip, node->cport, server.bind_source_addr, - clusterLinkConnectHandler) == -1) { + clusterLinkConnectHandler) == C_ERR) { /* We got a synchronous error from connect before * clusterSendPing() had a chance to be called. * If node->ping_sent is zero, failure detection can't work, @@ -4627,8 +4627,8 @@ int clusterMastersHaveSlaves(void) { /* Set the slot bit and return the old value. */ int clusterNodeSetSlotBit(clusterNode *n, int slot) { int old = bitmapTestBit(n->slots,slot); - bitmapSetBit(n->slots,slot); if (!old) { + bitmapSetBit(n->slots,slot); n->numslots++; /* When a master gets its first slot, even if it has no slaves, * it gets flagged with MIGRATE_TO, that is, the master is a valid @@ -4652,8 +4652,10 @@ int clusterNodeSetSlotBit(clusterNode *n, int slot) { /* Clear the slot bit and return the old value. */ int clusterNodeClearSlotBit(clusterNode *n, int slot) { int old = bitmapTestBit(n->slots,slot); + if (old) { bitmapClearBit(n->slots,slot); - if (old) n->numslots--; + n->numslots--; + } return old; }
rtnlinv.c: fix memleak
@@ -407,11 +407,11 @@ int main_rtnlinv(int argc, char* argv[argc]) debug_printf(DP_DEBUG3, "Start creating nufft-objects..."); + traj1 = md_alloc(DIMS, trj1_dims, CFL_SIZE); + for (unsigned int i = 0; i < turns; ++i) { // pick trajectory for current frame - traj1 = md_alloc(DIMS, trj1_dims, CFL_SIZE); - long pos[DIMS] = { 0 }; pos[TIME_DIM] = i; md_slice(DIMS, TIME_FLAG, pos, trj_dims, traj1, traj, CFL_SIZE); @@ -546,6 +546,11 @@ int main_rtnlinv(int argc, char* argv[argc]) md_free(fftc_mod); unmap_cfl(DIMS, trj_dims, traj); + + operator_free(fftc); + + for (unsigned int i = 0; i < turns; ++i) + linop_free(nufft_ops[i]); } unmap_cfl(DIMS, sens_dims, sens);
also pulse sensor sync
@@ -24,6 +24,7 @@ void TIM1_UP_TIM10_IRQ_Handler(void) { // Start clock pulse set_gpio_output(GPIOB, 14, true); set_gpio_output(GPIOB, 15, true); + set_gpio_output(GPIOC, 5, true); } // Reset interrupt @@ -37,6 +38,7 @@ void TIM1_CC_IRQ_Handler(void) { // End clock pulse set_gpio_output(GPIOB, 14, false); set_gpio_output(GPIOB, 15, false); + set_gpio_output(GPIOC, 5, false); } // Reset interrupt
osx: travis fixing path for QTDIR
@@ -70,7 +70,7 @@ env: - BUILD_ARTEFACTS_DIR=$HOME/build_artefacts - S3_JOB_DIR="$TRAVIS_COMMIT"/"travis-$TRAVIS_JOB_NUMBER"_"$TRAVIS_OS_NAME" - S3_DEPLOY_DIR="$TRAVIS_REPO_SLUG"/"$TRAVIS_BRANCH" - - QTDIR="$HOME/Qt5.9.5" + - QTDIR="$HOME/Qt5.9.5/5.9.5/clang_64" osx_image: xcode9.1
WIP: Rename editor selection type type
@@ -20,7 +20,7 @@ export type Tool = export type Brush = "8px" | "16px" | "fill"; -export type EditorSection = +export type EditorSelectionType = | "world" | "scene" | "actor" @@ -31,7 +31,7 @@ export type ZoomSection = "world" | "sprites" | "backgrounds" | "ui"; export interface EditorState { tool: Tool; - type: EditorSection; + type: EditorSelectionType; worldFocus: boolean; scene: string; entityId: string; @@ -223,7 +223,7 @@ const editorSlice = createSlice({ state, action: PayloadAction<{ eventId: string; - selectionType: EditorSection; + selectionType: EditorSelectionType; entityId: string; sceneId: string; }>
Improve CD file parsing error messages.
#include <catboost/libs/helpers/exception.h> #include <catboost/libs/logging/logging.h> +#include <util/generic/cast.h> #include <util/generic/set.h> #include <util/stream/file.h> #include <util/stream/input.h> @@ -17,8 +18,8 @@ using namespace NCB; namespace { - inline void CheckAllFeaturesPresent(const TVector<TColumn>& columns, const TSet<int>& parsedColumns) { - for (int i = 0; i < columns.ysize(); ++i) { + inline void CheckAllFeaturesPresent(const TVector<TColumn>& columns, const TSet<size_t>& parsedColumns) { + for (size_t i = 0; i < columns.size(); ++i) { CB_ENSURE(parsedColumns.has(i), "column not present in cd file: " << i); } } @@ -26,14 +27,15 @@ namespace { template <class TReadLineFunc> TVector<TColumn> ReadCDImpl(TReadLineFunc readLineFunc, const TCdParserDefaults& defaults) { - int columnsCount = defaults.UseDefaultType ? defaults.ColumnCount : 0; + size_t columnsCount = defaults.UseDefaultType ? SafeIntegerCast<size_t>(defaults.ColumnCount) : 0; TVector<TColumn> columns(columnsCount, TColumn{defaults.DefaultColumnType, TString()}); - TSet<int> parsedColumns; + TSet<size_t> parsedColumns; TString line; for (size_t lineNumber = 0; readLineFunc(&line); lineNumber++) { TVector<TString> tokens; + try { try { Split(line, "\t", tokens); } catch (const yexception& e) { @@ -44,10 +46,14 @@ namespace { continue; } CB_ENSURE(tokens.ysize() == 2 || tokens.ysize() == 3, - "Incorrect CD file. Each line should have two or three columns. " << - "Invalid line number #" << lineNumber << ": " << line); - int index = FromString<int>(tokens[0]); - CB_ENSURE(index >= 0, "Invalid column index " << index); + "Each line should have two or three columns. This line has " << tokens.size() + ); + + size_t index = 0; + CB_ENSURE( + TryFromString(tokens[0], index), + "Invalid column index: \"" << tokens[0] << "\"" + ); if (defaults.UseDefaultType) { CB_ENSURE( index < columnsCount, @@ -55,7 +61,7 @@ namespace { } CB_ENSURE(!parsedColumns.has(index), "column specified twice in cd file: " << index); parsedColumns.insert(index); - columns.resize(Max(columns.ysize(), index + 1)); + columns.resize(Max(columns.size(), index + 1)); TStringBuf type = tokens[1]; if (type == "QueryId") { @@ -68,6 +74,10 @@ namespace { if (tokens.ysize() == 3) { columns[index].Id = tokens[2]; } + } catch (const TCatboostException& e) { + throw TCatboostException() << "Incorrect CD file. Invalid line number #" << lineNumber + << ": " << e.what(); + } } if (!defaults.UseDefaultType) { CheckAllFeaturesPresent(columns, parsedColumns);
[CI] Fix dependencies in CI script
@@ -47,6 +47,15 @@ tc-llvm: - install/llvm expire_in: 1 day +tc-isa-sim: + stage: build + script: + - make riscv-isa-sim + artifacts: + paths: + - install/riscv-isa-sim + expire_in: 1 day + halide: stage: compiler script: @@ -78,6 +87,25 @@ apps-llvm: paths: - hardware/build/transcript - hardware/build/trace_hart_*.trace - needs: ["tc-llvm"] + needs: ["tc-gcc","tc-llvm","tc-isa-sim"] dependencies: + - tc-gcc - tc-llvm + - tc-isa-sim + +apps-gcc: + stage: test + script: + - cd apps + - make COMPILER=gcc bin/matrix_mul + - cd ../hardware + - app=matrix_mul make run + - make trace + artifacts: + paths: + - hardware/build/transcript + - hardware/build/trace_hart_*.trace + needs: ["tc-gcc","tc-isa-sim"] + dependencies: + - tc-gcc + - tc-isa-sim
llvm5.0: use input kind helper to avoid breakage Upstream llvm renamed an enum, so use a helper function that is available in all versions to fix compatibility.
@@ -230,8 +230,8 @@ int ClangLoader::parse(unique_ptr<llvm::Module> *mod, TableStorage &ts, const st if (in_memory) { invocation0.getPreprocessorOpts().addRemappedFile(main_path, &*main_buf); invocation0.getFrontendOpts().Inputs.clear(); - invocation0.getFrontendOpts().Inputs.push_back( - FrontendInputFile(main_path, IK_C)); + invocation0.getFrontendOpts().Inputs.push_back(FrontendInputFile( + main_path, FrontendOptions::getInputKindForExtension("c"))); } invocation0.getFrontendOpts().DisableFree = false; @@ -260,8 +260,8 @@ int ClangLoader::parse(unique_ptr<llvm::Module> *mod, TableStorage &ts, const st invocation1.getPreprocessorOpts().addRemappedFile(f.first, &*f.second); invocation1.getPreprocessorOpts().addRemappedFile(main_path, &*out_buf); invocation1.getFrontendOpts().Inputs.clear(); - invocation1.getFrontendOpts().Inputs.push_back( - FrontendInputFile(main_path, IK_C)); + invocation1.getFrontendOpts().Inputs.push_back(FrontendInputFile( + main_path, FrontendOptions::getInputKindForExtension("c"))); invocation1.getFrontendOpts().DisableFree = false; compiler1.createDiagnostics(); @@ -286,8 +286,8 @@ int ClangLoader::parse(unique_ptr<llvm::Module> *mod, TableStorage &ts, const st invocation2.getPreprocessorOpts().addRemappedFile(f.first, &*f.second); invocation2.getPreprocessorOpts().addRemappedFile(main_path, &*out_buf1); invocation2.getFrontendOpts().Inputs.clear(); - invocation2.getFrontendOpts().Inputs.push_back( - FrontendInputFile(main_path, IK_C)); + invocation2.getFrontendOpts().Inputs.push_back(FrontendInputFile( + main_path, FrontendOptions::getInputKindForExtension("c"))); invocation2.getFrontendOpts().DisableFree = false; // Resort to normal inlining. In -O0 the default is OnlyAlwaysInlining and // clang might add noinline attribute even for functions with inline hint.
Try using new build image.
+variables: + CI_BUILD_IMAGE: $CI_REGISTRY_IMAGE/zmk-build build: - image: zephyrprojectrtos/zephyr-build + image: $CI_BUILD_IMAGE + + variables: + GIT_CLONE_PATH: $CI_BUILD_DIR/zmk before_script: - west init -l . - west update - west config --global zephyr.base-prefer configfile - west zephyr-export - - pip3 install --user -r ../zephyr/scripts/requirements.txt script: - west build -b nucleo_wb55rg -- -DSHIELD=petejohanson_handwire @@ -18,13 +22,10 @@ build:dockerimage: image: docker:stable - variables: - CI_BUILD_IMAGE: $CI_REGISTRY_IMAGE/zmk-build before_script: - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - script: - docker pull $CI_BUILD_IMAGE:latest || true - docker build --cache-from $CI_BUILD_IMAGE:latest -t $CI_BUILD_IMAGE:latest .
chat-hook: on-migrate, send fresh invites Accepting these post-upgrade should re-establish all the required subscriptions. (But doesn't as of this commit, work still pending.)
(create-group new-group who.newp) (hookup-group new-group kind.newp) [(record-group new-group chat)]~ + :: + ?. =(our.bol host) ~ + (send-invites chat who.newp) == :: ++ unify-permissions %metadata-action !> ^- metadata-action [%add group [%chat chat] metadata] + :: + ++ send-invites + |= [chat=path who=(set ship)] + ^- (list card) + %+ murn ~(tap in who) + |= =ship + ^- (unit card) + ?: =(our.bol ship) ~ + %- some + %^ make-poke %invite-hook + %invite-action + !> ^- invite-action + =/ =invite + =+ (crip "upgrade {(spud chat)} (please accept in OS1)") + [our.bol %chat-hook chat ship -] + [%invite /chat (sham chat ship eny.bol) invite] -- :: ++ on-poke
[cmake] check the existence of date command before using it
@@ -43,9 +43,11 @@ configure_file(scripts/buildtools.py share/buildtools.py COPYONLY) set(PROJECT_NAME siconos) # Get current year (for licence and other cartridges) +find_program(DATE_COMMAND date) +if(DATE_COMMAND) execute_process(COMMAND date "+\"%Y\"" OUTPUT_VARIABLE YEAR) string(STRIP ${YEAR} YEAR) - +endif() # Read user option file, if provided on command line if(USER_OPTIONS_FILE) # Check for tilde in file name (not handled properly by cmake)
Correct include path to #include "common/tusb_fifo.h"
*/ #include "tusb_option.h" -#include "tusb_fifo.h" +#include "common/tusb_fifo.h" // Since TinyUSB doesn't use SOF for now, and this interrupt too often (1ms interval) // We disable SOF for now until needed later on
fix: basic setup link
@@ -91,7 +91,7 @@ You can setup git to run prettier automatically when you commit by installing th ### Development Setup To get your development environment setup going, start at the -[basic setup](https://zmk.dev/docs/dev-setup) docs, and make sure you can build and flash +[basic setup](https://zmk.dev/docs/development/setup/) docs, and make sure you can build and flash your own locally built firmware. ### Formatting
Add :down verb to loop macro. Also remove with-idemp from core, which was both confusing (to the author) and not generally useful.
:struct true}) (fn idempotent? [x] (not (get non-atomic-types (type x)))))) -(defmacro with-idemp - "Return janet code body that has been prepended - with a binding of form to atom. If form is a non-idempotent - form (a function call, etc.), make sure the resulting - code will only evaluate once, even if body contains multiple - copies of binding. In body, use binding instead of form." - [binding form & body] - (def $result (gensym)) - (def $form (gensym)) - ~(do - (def ,$form ,form) - (def ,binding (if (idempotent? ,$form) ,$form (gensym))) - (def ,$result (do ,;body)) - (if (= ,$form ,binding) - ,$result - (tuple 'do (tuple 'def ,binding ,$form) ,$result)))) - # C style macros and functions for imperative sugar. No bitwise though. (defn inc "Returns x + 1." [x] (+ x 1)) (defn dec "Returns x - 1." [x] (- x 1)) and object is any janet expression. The available verbs are:\n\n \t:iterate - repeatedly evaluate and bind to the expression while it is truthy.\n \t:range - loop over a range. The object should be two element tuple with a start - and end value. The range is half open, [start, end).\n + and end value, and an optional postive step. The range is half open, [start, end).\n + \t:down - Same as range, but loops in reverse.\n \t:keys - Iterate over the keys in a data structure.\n \t:pairs - Iterate over the keys value pairs in a data structure.\n \t:in - Iterate over the values in an indexed data structure or byte sequence.\n (tuple 'def bindings $iter) subloop (tuple 'set $iter (tuple + $iter inc))))) + :down (do + (def [start end _dec] object) + (def dec (if _dec _dec 1)) + (def endsym (gensym)) + (def $iter (gensym)) + (def preds @['and (tuple > $iter endsym)]) + (def subloop (doone (+ i 3) preds)) + (tuple 'do + (tuple 'var $iter start) + (tuple 'def endsym end) + (tuple 'while (tuple/slice preds) + (tuple 'def bindings $iter) + subloop + (tuple 'set $iter (tuple - $iter dec))))) :keys (do (def $dict (gensym)) (def $iter (gensym)) @@ -1111,6 +1109,24 @@ value, one key will be ignored." ### ### +(defmacro- with-idemp + "Return janet code body that has been prepended + with a binding of form to atom. If form is a non-idempotent + form (a function call, etc.), make sure the resulting + code will only evaluate once, even if body contains multiple + copies of binding. In body, use binding instead of form." + [binding form & body] + (def $result (gensym)) + (def $form (gensym)) + ~(do + (def ,$form ,form) + (def ,binding (if (idempotent? ,$form) ,$form (gensym))) + (def ,$result (do ,;body)) + (if (= ,$form ,binding) + ,$result + (tuple 'do (tuple 'def ,binding ,$form) ,$result)))) + + # Sentinel value for mismatches (def- sentinel ~',(gensym)) @@ -1184,6 +1200,7 @@ value, one key will be ignored." (put _env 'sentinel nil) (put _env 'match-1 nil) +(put _env 'with-idemp nil) ### ###
Validate Monero PaymentID on login
@@ -81,21 +81,31 @@ namespace MiningCore.Blockchain.Monero // extract worker/miner/paymentid var split = loginRequest.Login.Split('.'); - context.MinerName = split[0]; - context.WorkerName = split.Length > 1 ? split[1] : null; - context.UserAgent = loginRequest.UserAgent; + context.MinerName = split[0].Trim(); + context.WorkerName = split.Length > 1 ? split[1].Trim() : null; + context.UserAgent = loginRequest.UserAgent.Trim(); // extract paymentid var index = context.MinerName.IndexOf('#'); if (index != -1) { - context.PaymentId = context.MinerName.Substring(index + 1); - context.MinerName = context.MinerName.Substring(0, index); + context.PaymentId = context.MinerName.Substring(index + 1).Trim(); + context.MinerName = context.MinerName.Substring(0, index).Trim(); } // validate login var result = manager.ValidateAddress(context.MinerName); + // validate payment Id + if (!string.IsNullOrEmpty(context.PaymentId)) + { + if (context.PaymentId.Length != MoneroConstants.PaymentIdHexLength) + { + client.RespondError(StratumError.MinusOne, "invalid payment id", request.Id); + return; + } + } + context.IsSubscribed = result; context.IsAuthorized = result;
king: evaluate text which goes into the log
@@ -54,10 +54,10 @@ data Ef deriving (Show) data St = St - { sHistory :: Seq Text - , sLine :: Text - , sCurPos :: Word - , sSpinner :: SpinnerState + { sHistory :: !(Seq Text) + , sLine :: !Text + , sCurPos :: !Word + , sSpinner :: !SpinnerState } deriving (Show) @@ -86,7 +86,7 @@ step st@St{..} = \case word = fromIntegral record :: Text -> St -> St - record t st@St{..} = st { sHistory = trim (sHistory |> t) } + record !t st@St{..} = st { sHistory = trim (sHistory |> t) } trim :: Seq a -> Seq a trim s | length s < 20 = s
Report CPU times.
@@ -313,12 +313,16 @@ static PyObject *wsgi_request_metrics(void) double capacity_utilization = 0.0; static double start_time = 0.0; + static double start_cpu_system_time = 0.0; + static double start_cpu_user_time = 0.0; static double start_request_busy_time = 0.0; static apr_uint64_t start_request_count = 0; double time_interval = 0.0; apr_uint64_t request_count = 0; double request_rate = 0.0; + double stop_cpu_system_time = 0.0; + double stop_cpu_user_time = 0.0; static int max_threads = 0; @@ -328,6 +332,19 @@ static PyObject *wsgi_request_metrics(void) double server_time_avg = 0; double application_time_avg = 0; +#ifdef HAVE_TIMES + struct tms tmsbuf; + static float tick = 0.0; + + if (!tick) { +#ifdef _SC_CLK_TCK + tick = sysconf(_SC_CLK_TCK); +#else + tick = HZ; +#endif + } +#endif + if (!wsgi_interns_initialized) wsgi_initialize_interned_strings(); @@ -365,6 +382,11 @@ static PyObject *wsgi_request_metrics(void) start_request_busy_time = stop_request_busy_time; start_request_count = stop_request_count; + times(&tmsbuf); + + start_cpu_user_time = tmsbuf.tms_utime / tick; + start_cpu_system_time = tmsbuf.tms_stime / tick; + return result; } @@ -386,6 +408,33 @@ static PyObject *wsgi_request_metrics(void) WSGI_INTERNED_STRING(time_interval), object); Py_DECREF(object); +#ifdef HAVE_TIMES + times(&tmsbuf); + + stop_cpu_user_time = tmsbuf.tms_utime / tick; + stop_cpu_system_time = tmsbuf.tms_stime / tick; + + object = PyFloat_FromDouble(stop_cpu_user_time-start_cpu_user_time); + PyDict_SetItem(result, + WSGI_INTERNED_STRING(cpu_user_time), object); + Py_DECREF(object); + + object = PyFloat_FromDouble(stop_cpu_system_time-start_cpu_system_time); + PyDict_SetItem(result, + WSGI_INTERNED_STRING(cpu_system_time), object); + Py_DECREF(object); +#else + object = PyFloat_FromDouble(0.0); + PyDict_SetItem(result, + WSGI_INTERNED_STRING(cpu_user_time), object); + Py_DECREF(object); + + object = PyFloat_FromDouble(0.0); + PyDict_SetItem(result, + WSGI_INTERNED_STRING(cpu_system_time), object); + Py_DECREF(object); +#endif + object = wsgi_PyInt_FromLong(max_threads); PyDict_SetItem(result, WSGI_INTERNED_STRING(max_threads), object); @@ -427,6 +476,8 @@ static PyObject *wsgi_request_metrics(void) start_time = stop_time; start_request_busy_time = stop_request_busy_time; start_request_count = stop_request_count; + start_cpu_user_time = stop_cpu_user_time; + start_cpu_system_time = stop_cpu_system_time; apr_thread_mutex_lock(wsgi_monitor_lock);
Another int -> size_t
@@ -189,7 +189,7 @@ static VALUE parse(VALUE self, VALUE string, VALUE max_parse_errors) { } GumboVector *children = &output->document->v.document.children; - for (int i=0; i < children->length; i++) { + for (size_t i=0; i < children->length; i++) { GumboNode *child = children->data[i]; xmlNodePtr node = walk_tree(doc, child); if (node) {
Correctly handle pytest names with double colon in parameters ISSUE:
@@ -280,11 +280,11 @@ def get_test_log_file_path(output_dir, class_name, test_name, extension="log"): def split_node_id(nodeid, test_suffix=None): + path, possible_open_bracket, params = nodeid.partition('[') separator = "::" - if separator in nodeid: - path, test_name = nodeid.split(separator, 1) + if separator in path: + path, test_name = path.split(separator, 1) else: - path = nodeid test_name = os.path.basename(path) if test_suffix: test_name += "::" + test_suffix @@ -296,4 +296,5 @@ def split_node_id(nodeid, test_suffix=None): class_name += separator + klass_name if separator in test_name: test_name = test_name.split(separator)[-1] + test_name += possible_open_bracket + params return yatest_lib.tools.to_utf8(class_name), yatest_lib.tools.to_utf8(test_name)
imxrt117x: Fixed wrong cpuclk value JIRA:
@@ -709,7 +709,7 @@ void _imxrt_init(void) imxrt_common.iomux_lpsr = (void *)0x40c08000; imxrt_common.iomuxc = (void *)0x400e8000; - imxrt_common.cpuclk = 640000000; + imxrt_common.cpuclk = 696000000; /* Store reset flags and then clean them */ imxrt_common.resetFlags = *(imxrt_common.src + src_srsr) & 0x1f;
Added usefull staff to typetraits.h.
@@ -27,6 +27,17 @@ namespace NPrivate { struct TUserTypeTrait { static constexpr ui64 TypeTraitFlags = 0; }; + + template <class... Bs> + constexpr bool Conjunction() { + bool bs[] = { Bs::value... }; + for (auto b : bs) { + if (!b) { + return false; + } + } + return true; + }; } template <class T> @@ -269,6 +280,12 @@ template <class B> struct TNegation : std::integral_constant<bool, !bool(B::value)> { }; +//NOTE: to be replaced with std::conjunction in c++17 +template <class... Bs> +struct TConjunction; +template <class... Bs> +struct TConjunction : std::integral_constant<bool, NPrivate::Conjunction<Bs...>()> {}; + template <class T> struct TIsPointerToConstMemberFunction : std::false_type { };
Fix windows path issues with test_qplot_scene Use pathlib.Path.
# Kathleen Biagas, Tue Feb 16, 2021 # Add encoding='iso-8859-1' to open command when reading. # +# Kathleen Biagas, Wed Mar 3, 2021 +# Use pathlib's Path to fix path issues on Windows. # import unittest @@ -17,6 +19,7 @@ from visit_utils import * import unittest import os from os.path import join as pjoin +from pathlib import Path from visit_test import * from visit_utils.qplot import * @@ -26,19 +29,21 @@ try: except: pass -output_dir = pjoin(os.path.dirname(__file__),"_output") -data_dir = pjoin(os.path.dirname(__file__),"_data") +output_dir = Path(os.path.dirname(__file__),"_output") +data_dir = Path(os.path.dirname(__file__),"_data") def patch_scene_input(in_fname,ult_fname): #crv_file = os.path.abspath(pjoin(data_dir,"pattern.ult")) #qi = open(pjoin(data_dir,"qplot.example.in")).read().replace("$SOURCE_FILE",crv_file) #qi_fname = pjoin(output_dir,"qplot.example.in" #open(qi_fname,"w").write(qi) - crv_file = os.path.abspath(pjoin(data_dir,ult_fname)) - qi = open(pjoin(data_dir,in_fname), encoding="iso-8859-1").read().replace("$SOURCE_FILE",crv_file) - qi_fname = pjoin(output_dir,in_fname) - open(qi_fname,"w").write(qi) - return qi_fname + crv_file = data_dir/ult_fname + dfile = data_dir/in_fname + qi_fname = output_dir/in_fname + with dfile.open(encoding="iso-8859-1") as qi: + with qi_fname.open("w") as qi_out: + qi_out.write(qi.read().replace("$SOURCE_FILE",crv_file.as_posix())) + return qi_fname.as_posix() class TestScene(unittest.TestCase):
efficient opentimer callback.
@@ -355,6 +355,7 @@ void opentimers_timer_callback(void){ PORT_TIMER_WIDTH tempTimerGap; PORT_TIMER_WIDTH tempLastTimeout = opentimers_vars.currentTimeout; // 1. find the expired timer + idToCallCB = TOO_MANY_TIMERS_ERROR; for (i=0;i<MAX_NUM_TIMERS;i++){ if (opentimers_vars.timersBuf[i].isrunning==TRUE){ // all timers in the past within TIMERTHRESHOLD ticks @@ -366,6 +367,13 @@ void opentimers_timer_callback(void){ if (tempLastTimeout>opentimers_vars.timersBuf[i].currentCompareValue){ tempLastTimeout = opentimers_vars.timersBuf[i].currentCompareValue; } + if (idToCallCB==TOO_MANY_TIMERS_ERROR){ + idToCallCB = i; + } else { + if (opentimers_vars.timersBuf[i].priority<opentimers_vars.timersBuf[idToCallCB].priority){ + idToCallCB = i; + } + } } } } @@ -376,19 +384,6 @@ void opentimers_timer_callback(void){ // 2. call the callback of expired timers opentimers_vars.insideISR = TRUE; - idToCallCB = TOO_MANY_TIMERS_ERROR; - // find out the timer expired with highest priority - for (j=0;j<MAX_NUM_TIMERS;j++){ - if (opentimers_vars.timersBuf[j].hasExpired == TRUE){ - if (idToCallCB==TOO_MANY_TIMERS_ERROR){ - idToCallCB = j; - } else { - if (opentimers_vars.timersBuf[j].priority<opentimers_vars.timersBuf[idToCallCB].priority){ - idToCallCB = j; - } - } - } - } if (idToCallCB==TOO_MANY_TIMERS_ERROR){ // no more timer expired } else { @@ -420,6 +415,7 @@ void opentimers_timer_callback(void){ } opentimers_vars.timersBuf[j].hasExpired = FALSE; } + break; } } }
Update the script that generates the release checksums.
@@ -112,9 +112,10 @@ do $cmd INSTALL_NOTES >> $output $cmd jvisit$version.tar.gz >> $output $cmd visit-install$version2 >> $output - $cmd visit$version2.windows-x86_64.exe >> $output - $cmd visit$version2.darwin-x86_64-10_13.dmg >> $output - $cmd visit$version2.darwin-x86_64-10_13.tar.gz >> $output + $cmd visit${version}_x64.exe >> $output + $cmd visit$version.darwin-x86_64-10_13.dmg >> $output + $cmd visit$version.darwin-x86_64-10_13.tar.gz >> $output + $cmd visit$version2.linux-x86_64-ubuntu16.tar.gz >> $output $cmd visit$version2.linux-x86_64-ubuntu18.tar.gz >> $output $cmd visit$version2.linux-x86_64-debian9.tar.gz >> $output $cmd visit$version2.linux-x86_64-fedora27.tar.gz >> $output
naive: adoption test was wrong, not naive.hoon
=^ f5 state (n state %bat q:(gen-tx 0 lm-escape %rigrut-lm-key-0)) [:(welp f1 f2 f3 f4 f5) state] :: -:: :: ~dopbud is for testing L1 ownership with L2 spawn proxy :: ++ init-dopbud ++ gen-rut-jar ^- (jar @p event) =/ filter ;: cork - (cury filter-owner %.y) + (cury filter-owner %.n) (cury filter-proxy %own) (cury filter-nonce %.y) - ::(cury filter-rank %star) - ::(cury filter-dominion %l1) + (cury filter-rank %planet) + (cury filter-dominion %l1) %- cury :- filter-tx-type :* ::%spawn =/ initial-state state =/ ship-list rut-ship-list =/ suc-map (make-success-map make-event-list) + ~& event-jar :: |- ^- tang ?~ ship-list ~ %set-spawn-proxy set-spwn-proxy %set-transfer-proxy set-xfer-proxy %spawn (new-point which-spawn) - %escape (set-escape which-escape-l2) + %escape (set-escape which-escape-l1) == :: ++ set-keys ^- ^state:naive %own (~(got by default-own-keys) cur-ship) %manage (~(got by default-manage-keys) cur-ship) == - %wrong-key + %wrong-key :: if not owner then use wrong key state :: ++ def-args == :: ++ which-escape-l1 ^- ship + :: currently unused :: escaping to a L1 point ?- rank.cur-event %galaxy ~red =^ f state (n state (escape-accepted:l1 ~rigred ~rabsum-ravtyd)) [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) :: -++ test-l1-adoption-on-l2-wrong-key-or-nonce - :: this is really bad +++ test-rut-l1-adoption-on-l2-wrong-key-or-nonce =/ rr-escape [[~rabsum-ravtyd %own] %escape ~rigred] =/ rr-adopt [rigred-own %adopt ~rabsum-ravtyd] :: :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state (init-rut-full state) =^ f state (n state %bat q:(gen-tx 1 rr-escape %wrong-key)) =^ f state (n state %bat q:(gen-tx 0 rr-adopt %rigred-key-0)) [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd) :: !> =| =^state:naive - =^ f state (init-red-full state) + =^ f state (init-rut-full state) =^ f state (n state %bat q:(gen-tx 999 rr-escape %holrut-rr-key-0)) =^ f state (n state %bat q:(gen-tx 0 rr-adopt %rigred-key-0)) [escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd)
Fix compile error, add number-up checks.
@@ -369,7 +369,7 @@ _cupsConvertOptions( * Map finishing options... */ - if (copies != finishing_copies) + if (copies != finishings_copies) { // Figure out the proper job-pages-per-set value... if ((value = cupsGetOption("job-pages", num_options, options)) == NULL) @@ -378,10 +378,16 @@ _cupsConvertOptions( if (value) job_pages = atoi(value); + // Adjust for number-up + if ((value = cupsGetOption("number-up", num_options, options)) != NULL) + number_up = atoi(value); + + job_pages = (job_pages + number_up - 1) / number_up; + // When duplex printing, raster data will include an extra (blank) page to // make the total number of pages even. Make sure this is reflected in the // page count... - if ((job_pages & 1) && (keyword = cupsGetOption("sides", num_options, options)) != NULL && strcmp(sides, "one-sided")) + if ((job_pages & 1) && (keyword = cupsGetOption("sides", num_options, options)) != NULL && strcmp(keyword, "one-sided")) job_pages ++; }
Implemented location bias handling for offline geocoding, use same logic as in online services
#include "geometry/PolygonGeometry.h" #include "geometry/MultiGeometry.h" #include "projections/Projection.h" +#include "projections/EPSG3857.h" +#include "utils/Const.h" #include <geocoding/Geocoder.h> #include <geocoding/RevGeocoder.h> @@ -30,10 +32,21 @@ namespace carto { std::vector<std::shared_ptr<GeocodingResult> > GeocodingProxy::CalculateAddresses(const std::shared_ptr<geocoding::Geocoder>& geocoder, const std::shared_ptr<GeocodingRequest>& request) { geocoding::Geocoder::Options options; + if (request->isLocationDefined()) { + MapPos wgs84Center = request->getProjection()->toWgs84(request->getLocation()); + options.location = cglib::vec2<double>(wgs84Center.getX(), wgs84Center.getY()); + } if (request->getLocationRadius() > 0) { - MapPos posWgs84 = request->getProjection()->toWgs84(request->getLocation()); - options.location = cglib::vec2<double>(posWgs84.getX(), posWgs84.getY()); - options.locationRadius = request->getLocationRadius(); + EPSG3857 epsg3857; + MapPos wgs84Center = request->getProjection()->toWgs84(request->getLocation()); + double mercRadius = request->getLocationRadius() / std::cos(std::min(89.9, std::abs(wgs84Center.getY())) * Const::DEG_TO_RAD); + MapPos mercPos0 = epsg3857.fromWgs84(wgs84Center) - MapVec(mercRadius, mercRadius); + MapPos mercPos1 = epsg3857.fromWgs84(wgs84Center) + MapVec(mercRadius, mercRadius); + mercPos0[0] = std::max(mercPos0[0], epsg3857.getBounds().getMin()[0] * 0.9999); + mercPos1[0] = std::min(mercPos1[0], epsg3857.getBounds().getMax()[0] * 0.9999); + MapPos wgs84Pos0 = epsg3857.toWgs84(mercPos0); + MapPos wgs84Pos1 = epsg3857.toWgs84(mercPos1); + options.bounds = cglib::bbox2<double>(cglib::vec2<double>(wgs84Pos0.getX(), wgs84Pos0.getY()), cglib::vec2<double>(wgs84Pos1.getX(), wgs84Pos1.getY())); } std::vector<std::pair<geocoding::Address, float> > addrs = geocoder->findAddresses(request->getQuery(), options);
typechecker-regex-prototype: enable test in travis
@@ -162,7 +162,7 @@ before_script: - | if [[ $HASKELL == ON ]]; then bindings="haskell" - plugins="resolver_fm_hpu_b;dump;list;spec" + plugins="resolver_fm_hpu_b;dump;list;spec;haskell;typechecker" tools="kdb" fi - |
fix build bug when build in ci
@@ -12,6 +12,7 @@ subdir = src/include top_builddir = ../.. include $(top_builddir)/src/Makefile.global +override CPPFLAGS := -I$(prefix)/include $(CPPFLAGS) all: pg_config.h pg_config_os.h check_oids check_keywords
Add eval command to console.
#include "config.h" #include "ext/gif.h" #include "ext/file_dialog.h" +#include "machine.h" #include <zlib.h> #include <ctype.h> @@ -2216,6 +2217,28 @@ static void onConsoleResumeCommand(Console* console, const char* param) resumeRunMode(); } +static void onConsoleEvalCommand(Console* console, const char* param) +{ + printLine(console); + + tic_machine* machine = (tic_machine*)console->tic; + lua_State* lua = machine->lua; + + // TODO: check for other languages/runtimes? + if(lua) + { + if(luaL_dostring(lua, param) != LUA_OK) + { + printError(console, lua_tostring(lua, -1)); + } + lua_settop(lua, 0); + } + else + printError(console, "Lua state uninitialized.\n"); + + commandDone(console); +} + static void onAddFile(const char* name, AddResult result, void* data) { Console* console = (Console*)data; @@ -2418,6 +2441,7 @@ static const struct {"save", NULL, "save cart", onConsoleSaveCommand}, {"run", NULL, "run loaded cart", onConsoleRunCommand}, {"resume", NULL, "resume run cart", onConsoleResumeCommand}, + {"eval", "=", "run code", onConsoleEvalCommand}, {"dir", "ls", "show list of files", onConsoleDirCommand}, {"cd", NULL, "change directory", onConsoleChangeDirectory}, {"mkdir", NULL, "make directory", onConsoleMakeDirectory},
allow AssetPackage subclasses in Objective-c and Java
#ifndef _ASSETPACKAGE_I #define _ASSETPACKAGE_I -%module AssetPackage +%module(directors="1") AssetPackage !proxy_imports(carto::AssetPackage, core.BinaryData, core.StringVector) %attributeval(carto::AssetPackage, %arg(std::vector<std::string>), AssetNames, getAssetNames) !standard_equals(carto::AssetPackage); +%feature("director") carto::AssetPackage; + %include "utils/AssetPackage.h" #endif
fix device flow missing scopes
@@ -171,7 +171,9 @@ void oidcd_handleGen(struct ipcPipe pipes, const char* account_json, secFree(scope); return; } else if (strcaseequal(current_flow->val, FLOW_VALUE_DEVICE)) { + if (scope) { account_setScopeExact(account, oidc_strcopy(scope)); + } struct oidc_device_code* dc = initDeviceFlow(account); if (dc == NULL) { ipc_writeOidcErrnoToPipe(pipes);
error prone configuration new style
@@ -1702,6 +1702,9 @@ module JAVA_PLACEHOLDER: BASE_UNIT { when($MAKE_UBERJAR_VALUE) { PEERDIR+=contrib/libs/platform/java/uberjar } + when($ERROR_PRONE_VALUE) { + PEERDIR+=contrib/libs/platform/java/error_prone + } NO_PLATFORM() JAVA_MODULE() @@ -3408,6 +3411,18 @@ when ($JDK_VERSION == "10") { JDK10=yes # remove this later } +ERROR_PRONE_VERSION= +when (!$ERROR_PRONE_VERSION) { + when ($JDK_VERSION == "8" || $JDK_VERSION == "10") { + ERROR_PRONE_VERSION=2.3.1 + } + otherwise { + ERROR_PRONE_VERSION=2.3.2 + } +} + + # local jdk and tools USE_SYSTEM_JDK= USE_SYSTEM_UBERJAR= +USE_SYSTEM_ERROR_PRONE=
add pool tag for minedblocks
@@ -1698,15 +1698,15 @@ static inline void print_block(struct block_internal *block, int print_only_addr fprintf(out, "%s\n", address); } else { xdag_time_to_string(block->time, time_buf); - fprintf(out, "%s %s %s\n", address, time_buf, xdag_get_block_state_info(block->flags)); + fprintf(out, "%s %s %-8s %-32s\n", address, time_buf, xdag_get_block_state_info(block->flags), get_remark(block)); } } static inline void print_header_block_list(FILE *out) { - fprintf(out, "-----------------------------------------------------------------------\n"); - fprintf(out, "address time state \n"); - fprintf(out, "-----------------------------------------------------------------------\n"); + fprintf(out, "---------------------------------------------------------------------------------------------------------\n"); + fprintf(out, "address time state mined by \n"); + fprintf(out, "---------------------------------------------------------------------------------------------------------\n"); } // prints list of N last main blocks
Apache NimBLE 1.4.0 release
@@ -22,8 +22,8 @@ repo.versions: "0.0.0": "master" "0-dev": "0.0.0" - "0-latest": "1.3.0" - "1-latest": "1.3.0" + "0-latest": "1.4.0" + "1-latest": "1.4.0" "1.0.0": "nimble_1_0_0_tag" "1.1.0": "nimble_1_1_0_tag"
using avt ghost zone types instead
#include <vtkPointData.h> #include <vtkStructuredGrid.h> #include <vtkUnsignedCharArray.h> - #include <vtkCellData.h> +#include <avtGhostData.h> + #include "vtkPLOT3DReaderInternals.h" #include "PLOT3DFunctions.h" @@ -845,7 +846,7 @@ vtkPLOT3DReader::ReadGrid(FILE *xyzFp) if (ib[ids->GetId(ptIdx)] == 0) // If node is marked for iblanking, then hide the cell { - value |= vtkDataSetAttributes::HIDDENCELL; + value |= avtGhostZoneTypes::ZONE_NOT_APPLICABLE_TO_PROBLEM; break; } }
core/host/stack_trace.c: Format with clang-format BRANCH=none TEST=none
@@ -45,8 +45,8 @@ static void __attribute__((noinline)) _task_dump_trace_impl(int offset) for (i = 0; i < sz - offset; ++i) { fprintf(stderr, "#%-2d %s\n", i, messages[i]); /* %p is correct (as opposed to %pP) since this is the host */ - sprintf(buf, "addr2line %p -e %s", - trace[i + offset], __get_prog_name()); + sprintf(buf, "addr2line %p -e %s", trace[i + offset], + __get_prog_name()); file = popen(buf, "r"); if (file) { nb = fread(buf, 1, sizeof(buf) - 1, file); @@ -77,8 +77,8 @@ static void __attribute__((noinline)) _task_dump_trace_dispatch(int sig) } else if (in_interrupt_context()) { fprintf(stderr, "Stack trace of ISR:\n"); } else { - fprintf(stderr, "Stack trace of task %d (%s):\n", - running, task_get_name(running)); + fprintf(stderr, "Stack trace of task %d (%s):\n", running, + task_get_name(running)); } if (need_dispatch) {
fix write certificate fail
@@ -1970,8 +1970,13 @@ static int ssl_tls13_write_client_finished( mbedtls_ssl_context *ssl ) { int ret; - mbedtls_ssl_set_outbound_transform( ssl, ssl->handshake->transform_handshake ); - + if( !ssl->handshake->client_auth ) + { + MBEDTLS_SSL_DEBUG_MSG( 1, + ( "Switch to handshake traffic keys for outbound traffic" ) ); + mbedtls_ssl_set_outbound_transform( ssl, + ssl->handshake->transform_handshake ); + } ret = mbedtls_ssl_tls13_write_finished_message( ssl ); if( ret != 0 ) return( ret );
Add button map for LIDL doorbell
] }, + "lidlDoorbellMap": { + "vendor": "LIDL Silvercrest", + "doc": "Lidl / Silvercrest doorbell (_TZ1800_ladpngdx)", + "modelids": ["HG06668"], + "buttons": [ + {"S_BUTTON_1": "Action button"} + ], + "map": [ + [1, "0x01", "IAS_ZONE", "STATUS_CHANGE", "0x05", "S_BUTTON_1", "S_BUTTON_ACTION_SHORT_RELEASED", "Ring"] + ] + }, "sengledMap": { "vendor": "Sengled", "doc": "Sengled Smart Light Switch", [1, "0x01", "SENGLED", "COMMAND_0", "7", "S_BUTTON_4", "S_BUTTON_ACTION_DOUBLE_PRESS", "Off (double press)"], [1, "0x01", "SENGLED", "COMMAND_0", "8", "S_BUTTON_4", "S_BUTTON_ACTION_LONG_RELEASED", "Off (long press)"] ] - }, "elkoMap": { "vendor": "ELKO",
fix border resize bug
@@ -3563,6 +3563,8 @@ resizemouse(const Arg *arg) } } if (!selmon->lt[selmon->sellt]->arrange || c->isfloating) { + if (c->bw == 0) + c->bw = borderpx; if (!forceresize) resize(c, nx, ny, nw, nh, 1); else
mangoapp: fixing up ctl switch statements
@@ -37,23 +37,35 @@ static uint8_t raw_msg[1024] = {0}; void ctrl_thread(){ while (1){ const struct mangoapp_ctrl_msgid1_v1 *mangoapp_ctrl_v1 = (const struct mangoapp_ctrl_msgid1_v1*) raw_msg; + memset(raw_msg, 0, sizeof(raw_msg)); size_t msg_size = msgrcv(msgid, (void *) raw_msg, sizeof(raw_msg), 2, 0); switch (mangoapp_ctrl_v1->log_session) { case 1: + if (!logger->is_active()) logger->start_logging(); + break; case 2: + if (logger->is_active()) logger->stop_logging(); + break; case 3: logger->is_active() ? logger->stop_logging() : logger->start_logging(); + break; } std::lock_guard<std::mutex> lk(mangoapp_m); switch (mangoapp_ctrl_v1->no_display){ case 1: params->no_display = 1; + printf("set no_display 1\n"); + break; case 2: params->no_display = 0; + printf("set no_display 0\n"); + break; case 3: params->no_display ? params->no_display = 0 : params->no_display = 1; + printf("toggle no_display\n"); + break; } mangoapp_cv.notify_one(); }
Add ISO number for longitudinal limits flag comment
@@ -101,6 +101,7 @@ bool brake_pressed_prev = false; // If using this flag, be aware that harder braking is more likely to lead to rear endings, // and that alone this flag doesn't make braking compliant because there's also a time element. +// See ISO 15622:2018 for more information. #define UNSAFE_RAISE_LONGITUDINAL_LIMITS_TO_ISO_MAX 8 int unsafe_mode = 0;
Fix Coverity out-of-bounds access
@@ -357,8 +357,10 @@ static int evp_cipher_init_internal(EVP_CIPHER_CTX *ctx, case EVP_CIPH_CBC_MODE: n = EVP_CIPHER_CTX_get_iv_length(ctx); - if (!ossl_assert(n >= 0 && n <= (int)sizeof(ctx->iv))) + if (n < 0 || n > (int)sizeof(ctx->iv)) { + ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_IV_LENGTH); return 0; + } if (iv != NULL) memcpy(ctx->oiv, iv, n); memcpy(ctx->iv, ctx->oiv, n); @@ -368,8 +370,11 @@ static int evp_cipher_init_internal(EVP_CIPHER_CTX *ctx, ctx->num = 0; /* Don't reuse IV for CTR mode */ if (iv != NULL) { - if ((n = EVP_CIPHER_CTX_get_iv_length(ctx)) <= 0) + n = EVP_CIPHER_CTX_get_iv_length(ctx); + if (n <= 0 || n > (int)sizeof(ctx->iv)) { + ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_IV_LENGTH); return 0; + } memcpy(ctx->iv, iv, n); } break;
Fix KEY_READ showing as KEY_EXECUTE
* Authors: * * wj32 2010-2016 - * dmex 2017-2021 + * dmex 2017-2023 * */ @@ -171,7 +171,7 @@ ACCESS_ENTRIES(Key) { L"Full control", KEY_ALL_ACCESS, TRUE, TRUE }, { L"Read", KEY_READ, TRUE, FALSE }, { L"Write", KEY_WRITE, TRUE, FALSE }, - { L"Execute", KEY_EXECUTE, TRUE, FALSE }, + //{ L"Execute", KEY_EXECUTE, TRUE, FALSE }, // KEY_EXECUTE has the same value as KEY_READ (dmex) { L"Enumerate subkeys", KEY_ENUMERATE_SUB_KEYS, FALSE, TRUE }, { L"Query values", KEY_QUERY_VALUE, FALSE, TRUE }, { L"Notify", KEY_NOTIFY, FALSE, TRUE },
nimble/ll: Reset backoff only when sending scan request Don't decrement backoff if we failed to send scan request.
@@ -265,6 +265,8 @@ ble_ll_scan_ext_adv_init(struct ble_ll_aux_data **aux_data) static void ble_ll_scan_req_backoff(struct ble_ll_scan_sm *scansm, int success) { + BLE_LL_ASSERT(scansm->backoff_count == 0); + scansm->scan_rsp_pending = 0; if (success) { scansm->scan_rsp_cons_fails = 0; @@ -2467,7 +2469,10 @@ ble_ll_scan_rx_isr_end(struct os_mbuf *rxpdu, uint8_t crcok) BLE_LL_ASSERT(scansm->scan_rsp_pending == 0); /* We want to send a request. See if backoff allows us */ - --scansm->backoff_count; + if (scansm->backoff_count > 0) { + scansm->backoff_count--; + } + if (scansm->backoff_count == 0) { #if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV) phy_mode = ble_ll_phy_to_phy_mode(ble_hdr->rxinfo.phy,
Fix man paths construction
@@ -237,7 +237,7 @@ const mandeps = {b, name, mt n = leaf(b.deps, p) match std.strfind(pg, ".") | `std.None: std.fatal("manpage {} missing section\n", pg) - | `std.Some i: r = std.pathcat(config.Manpath, pg[i + 1:]) + | `std.Some i: r = std.strcat(config.Manpath, pg[i + 1:]) ;; n.instdir = r n.instmod = 0o644
fix unsafe cast of potentially packed enum
@@ -253,11 +253,13 @@ int ieee802154_get_key_security_level(unsigned index, security_level_t *level) { if (!level) return RETURNCODE_EINVAL; syscall_return_t com = command(RADIO_DRIVER, COMMAND_GET_KEY_LEVEL, (unsigned int) index, 0); - int ret = tock_command_return_u32_to_returncode(com, (uint32_t*) level); + int store_u32 = 0; + int ret = tock_command_return_u32_to_returncode(com, (uint32_t*) store_u32); if (ret == RETURNCODE_SUCCESS) { // Driver adds 1 to ensure it is positive. - *level -= 1; + store_u32 -= 1; + *level = store_u32; } return ret;
Add double click checkbox state
@@ -1316,6 +1316,7 @@ INT_PTR CALLBACK PhpOptionsGeneralDlgProc( switch (header->code) { case NM_CLICK: + case NM_DBLCLK: { LPNMITEMACTIVATE itemActivate = (LPNMITEMACTIVATE)header; LVHITTESTINFO lvHitInfo;
fix(bluetooth): Configs for non-splits.
@@ -128,6 +128,10 @@ endif endchoice +endif + +endif + if ZMK_BLE && (!ZMK_SPLIT_BLE || ZMK_SPLIT_BLE_ROLE_CENTRAL) config BT_MAX_CONN @@ -138,10 +142,6 @@ config BT_MAX_PAIRED endif -endif - -endif - endmenu config ZMK_KSCAN_MOCK_DRIVER
hv:Replace dynamic memory allocation for apic access address Replace pointer with static memory for apicv_apic_access_addr Acked-by: Eddie Dong
@@ -82,7 +82,7 @@ vlapic_dump_isr(__unused struct acrn_vlapic *vlapic, __unused char *msg) {} #endif /*APIC-v APIC-access address */ -static void *apicv_apic_access_addr; +static uint8_t apicv_apic_access_addr[CPU_PAGE_SIZE] __aligned(CPU_PAGE_SIZE); static int apicv_set_intr_ready(struct acrn_vlapic *vlapic, uint32_t vector, @@ -2098,13 +2098,6 @@ apicv_batch_set_tmr(struct acrn_vlapic *vlapic) uint64_t vlapic_apicv_get_apic_access_addr(__unused struct vm *vm) { - if (apicv_apic_access_addr == NULL) { - apicv_apic_access_addr = alloc_page(); - ASSERT(apicv_apic_access_addr != NULL, - "apicv allocate failed."); - - (void)memset((void *)apicv_apic_access_addr, 0U, CPU_PAGE_SIZE); - } return hva2hpa(apicv_apic_access_addr); }
Add thread PendingIrp sorting
@@ -615,6 +615,12 @@ BEGIN_SORT_FUNCTION(TokenState) } END_SORT_FUNCTION +BEGIN_SORT_FUNCTION(PendingIrp) +{ + sortResult = ucharcmp(threadItem1->PendingIrp, threadItem2->PendingIrp); +} +END_SORT_FUNCTION + BOOLEAN NTAPI PhpThreadTreeNewCallback( _In_ HWND hwnd, _In_ PH_TREENEW_MESSAGE Message, @@ -667,6 +673,7 @@ BOOLEAN NTAPI PhpThreadTreeNewCallback( SORT_FUNCTION(TidHex), SORT_FUNCTION(CpuCore), SORT_FUNCTION(TokenState), + SORT_FUNCTION(PendingIrp), }; int (__cdecl *sortFunction)(void *, const void *, const void *);
build BUGFIX config header installation
@@ -306,9 +306,14 @@ find_package(PCRE2 10.21 REQUIRED) include_directories(${PCRE2_INCLUDE_DIRS}) target_link_libraries(yang ${PCRE2_LIBRARIES}) -# install files +# generated header list +foreach(h IN LISTS gen_headers) + list(APPEND g_headers ${PROJECT_BINARY_DIR}/${h}) +endforeach() + +# install all library files install(TARGETS yang DESTINATION ${CMAKE_INSTALL_LIBDIR}) -install(FILES ${headers} ${CMAKE_CURRENT_BINARY_DIR}/${gen_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libyang) +install(FILES ${headers} ${g_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libyang) find_package(PkgConfig) if(PKG_CONFIG_FOUND)
SOVERSION bump to version 7.8.7
@@ -72,7 +72,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_ # with backward compatible change and micro version is connected with any internal change of the library. set(SYSREPO_MAJOR_SOVERSION 7) set(SYSREPO_MINOR_SOVERSION 8) -set(SYSREPO_MICRO_SOVERSION 6) +set(SYSREPO_MICRO_SOVERSION 7) set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION}) set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})