message
stringlengths
6
474
diff
stringlengths
8
5.22k
session server BUGFIX error message arguments
@@ -2903,7 +2903,7 @@ nc_server_ch_client_periodic_set_period(const char *client_name, uint16_t period } if (client->conn_type != NC_CH_PERIOD) { - ERR("Call Home client \"%s\" is not of periodic connection type."); + ERR("Call Home client \"%s\" is not of periodic connection type.", client_name); /* UNLOCK */ nc_server_ch_client_unlock(client); return -1; @@ -2934,7 +2934,7 @@ nc_server_ch_client_periodic_set_anchor_time(const char *client_name, time_t anc } if (client->conn_type != NC_CH_PERIOD) { - ERR("Call Home client \"%s\" is not of periodic connection type."); + ERR("Call Home client \"%s\" is not of periodic connection type.", client_name); /* UNLOCK */ nc_server_ch_client_unlock(client); return -1;
Remove incorrect hashing Incorrect interpretation of 'empty'
@@ -219,7 +219,6 @@ int mbedtls_pkcs12_derivation( unsigned char *data, size_t datalen, unsigned char diversifier[128]; unsigned char salt_block[128], pwd_block[128], hash_block[128]; - unsigned char empty_string[2] = { 0, 0 }; unsigned char hash_output[MBEDTLS_MD_MAX_SIZE]; unsigned char *p; unsigned char c; @@ -286,24 +285,12 @@ int mbedtls_pkcs12_derivation( unsigned char *data, size_t datalen, if( ( ret = mbedtls_md_update( &md_ctx, salt_block, v )) != 0 ) goto exit; } - else - { - if( ( ret = mbedtls_md_update( &md_ctx, empty_string, - sizeof( empty_string ) )) != 0 ) - goto exit; - } if( use_password != 0) { if( ( ret = mbedtls_md_update( &md_ctx, pwd_block, v )) != 0 ) goto exit; } - else - { - if( ( ret = mbedtls_md_update( &md_ctx, empty_string, - sizeof( empty_string ) )) != 0 ) - goto exit; - } if( ( ret = mbedtls_md_finish( &md_ctx, hash_output ) ) != 0 ) goto exit;
vlib: additional runtime_data checks
@@ -681,9 +681,10 @@ start_workers (vlib_main_t * vm) vlib_node_t *n = vlib_get_node (vm, rt->node_index); rt->cpu_index = vm_clone->cpu_index; /* copy initial runtime_data from node */ - if (n->runtime_data_bytes > 0) + if (n->runtime_data && n->runtime_data_bytes > 0) clib_memcpy (rt->runtime_data, n->runtime_data, - VLIB_NODE_RUNTIME_DATA_SIZE); + clib_min (VLIB_NODE_RUNTIME_DATA_SIZE, + n->runtime_data_bytes)); else if (CLIB_DEBUG > 0) memset (rt->runtime_data, 0xfe, VLIB_NODE_RUNTIME_DATA_SIZE); @@ -696,9 +697,10 @@ start_workers (vlib_main_t * vm) vlib_node_t *n = vlib_get_node (vm, rt->node_index); rt->cpu_index = vm_clone->cpu_index; /* copy initial runtime_data from node */ - if (n->runtime_data_bytes > 0) + if (n->runtime_data && n->runtime_data_bytes > 0) clib_memcpy (rt->runtime_data, n->runtime_data, - VLIB_NODE_RUNTIME_DATA_SIZE); + clib_min (VLIB_NODE_RUNTIME_DATA_SIZE, + n->runtime_data_bytes)); else if (CLIB_DEBUG > 0) memset (rt->runtime_data, 0xfe, VLIB_NODE_RUNTIME_DATA_SIZE); @@ -961,8 +963,10 @@ vlib_worker_thread_node_runtime_update (void) vlib_node_t *n = vlib_get_node (vm, rt->node_index); rt->cpu_index = vm_clone->cpu_index; /* copy runtime_data, will be overwritten later for existing rt */ + if (n->runtime_data && n->runtime_data_bytes > 0) clib_memcpy (rt->runtime_data, n->runtime_data, - VLIB_NODE_RUNTIME_DATA_SIZE); + clib_min (VLIB_NODE_RUNTIME_DATA_SIZE, + n->runtime_data_bytes)); } for (j = 0; j < vec_len (old_rt); j++) @@ -985,8 +989,10 @@ vlib_worker_thread_node_runtime_update (void) vlib_node_t *n = vlib_get_node (vm, rt->node_index); rt->cpu_index = vm_clone->cpu_index; /* copy runtime_data, will be overwritten later for existing rt */ + if (n->runtime_data && n->runtime_data_bytes > 0) clib_memcpy (rt->runtime_data, n->runtime_data, - VLIB_NODE_RUNTIME_DATA_SIZE); + clib_min (VLIB_NODE_RUNTIME_DATA_SIZE, + n->runtime_data_bytes)); } for (j = 0; j < vec_len (old_rt); j++)
I commented that because I'm not sure on how to implement the "feature" in prod
@@ -862,6 +862,8 @@ int initialize_python(int argc, char *argv[]) { // MARK: - Redirect logs for debugging in production + /*#if DEBUG + #else NSURL *logURL = [[NSFileManager.defaultManager URLsForDirectory:NSDocumentDirectory inDomains:NSAllDomainsMask].firstObject URLByAppendingPathComponent:@"logs.txt"]; [@"" writeToURL:logURL atomically:NO encoding: NSUTF8StringEncoding error: NULL]; @@ -870,6 +872,7 @@ int initialize_python(int argc, char *argv[]) { setvbuf(stdout, NULL, _IONBF, 0); dup2(fileno(fopen([logURL.path UTF8String], "w")), STDOUT_FILENO); dup2(fileno(fopen([logURL.path UTF8String], "w")), STDERR_FILENO); + #endif*/ @autoreleasepool { return UIApplicationMain(argc, argv, NULL, NSStringFromClass(AppDelegate.class));
Turned off planes
@@ -780,7 +780,7 @@ function animate() { render(); redrawCanvas(timecode); } -var showPlanes = true; +var showPlanes = false; var ang = 0; function render() { Object.keys(lighthouses).forEach(function(idx) {
APPS: Make it possible to load_cert() from stdin again Fixes
@@ -453,7 +453,7 @@ X509 *load_cert_pass(const char *uri, int maybe_stdin, /* the format parameter is meanwhile not needed anymore and thus ignored */ X509 *load_cert(const char *uri, int format, const char *desc) { - return load_cert_pass(uri, 0, NULL, desc); + return load_cert_pass(uri, 1, NULL, desc); } /* the format parameter is meanwhile not needed anymore and thus ignored */
vendor github.com/grafov/m3u8
@@ -68,6 +68,9 @@ ALLOW .* -> vendor/github.com/golang/snappy # API for sentry ALLOW .* -> vendor/github.com/getsentry/raven-go +# Parser and generator of M3U8-playlists for Apple HLS +ALLOW .* -> vendor/github.com/grafov/m3u8 + # configuration library ALLOW .* -> vendor/github.com/heetch/confita
nrf/mphalport: Use wfi to save power while waiting at the UART REPL.
@@ -58,6 +58,7 @@ int mp_hal_stdin_rx_chr(void) { if (MP_STATE_PORT(board_stdio_uart) != NULL && uart_rx_any(MP_STATE_PORT(board_stdio_uart))) { return uart_rx_char(MP_STATE_PORT(board_stdio_uart)); } + __WFI(); } return 0;
BugID:19050431: ulocation support gaode locating service, fix coding style problem
* Copyright (C) 2015-2019 Alibaba Group Holding Limited */ -#ifndef _U_LOCATION_H_ -#define _U_LOCATION_H_ +#ifndef ULOCATION_H +#define ULOCATION_H -typedef enum -{ +typedef enum { ULOC_SCENARIO_OUTDOOR = 0, ULOC_SCENARIO_INDOOR = 1, ULOC_SCENARIO_COUNT } uloc_scenario_e; -typedef struct -{ +typedef struct { float longitude; float latitude; float altitude; } outdoor_location_t; -typedef struct -{ +typedef struct { float x; float y; float z; } indoor_location_t; -typedef union -{ +typedef union { indoor_location_t indoor; outdoor_location_t outdoor; - struct - { + struct { float x; float y; float z;
make shell script POSIX compatible
@@ -136,7 +136,7 @@ if [ "$res" = "0" ]; then echo "valgrind dummy exited with: $res" fi - res=$(("$res" != 0)) + res=$((res != 0)) fi if [ "$res" = 0 ]; then @@ -149,7 +149,7 @@ if [ "$res" = 0 ]; then echo "valgrind dummy -v get -v ab cd exited with: $?" fi - res=$(("$res" != 0)) + res=$((res != 0)) fi if [ "$res" = "0" ]; then @@ -162,7 +162,7 @@ if [ "$res" = "0" ]; then echo "valgrind dummy -v get -v ab cd exited with: $?" fi - res=$(("$res" != 0)) + res=$((res != 0)) fi if [ "$res" = "0" ]; then @@ -175,7 +175,7 @@ if [ "$res" = "0" ]; then echo "valgrind dummy -v get -v ab cd exited with: $?" fi - res=$(("$res" == 0)) + res=$((res == 0)) fi if [ "$res" = "0" ]; then @@ -188,7 +188,7 @@ if [ "$res" = "0" ]; then echo "valgrind dummy get meta -v a b exited with: $?" fi - res=$(("$res" != 0)) + res=$((res != 0)) fi if [ "$res" = "0" ]; then @@ -201,7 +201,7 @@ if [ "$res" = "0" ]; then echo "valgrind dummy set def -2 exited with: $?" fi - res=$(("$res" != 0)) + res=$((res != 0)) fi if [ "$res" = "0" ]; then @@ -214,7 +214,7 @@ if [ "$res" = "0" ]; then echo "valgrind dummy abc -v def exited with: $?" fi - res=$(("$res" != 0)) + res=$((res != 0)) fi cd ..
xfconf: Link with xfconf libraries
@@ -2,12 +2,12 @@ include (LibAddMacros) find_package (PkgConfig REQUIRED) -pkg_check_modules(XFCE REQUIRED - libxfconf-0) +pkg_check_modules (XFCE REQUIRED libxfconf-0) include_directories (${XFCE_INCLUDE_DIRS}) add_plugin ( xfconf SOURCES xfconf.h xfconf.c + LINK_LIBRARIES ${XFCE_LIBRARIES} ADD_TEST TEST_README COMPONENT libelektra${SO_VERSION}-experimental)
Don't send MAX_STREAM_DATA if state is half-closed(remote) or reset
@@ -688,6 +688,7 @@ static ssize_t conn_retransmit_protected(ngtcp2_conn *conn, uint8_t *dest, strm = ngtcp2_conn_find_stream(conn, (*pfrc)->fr.max_stream_data.stream_id); if (strm == NULL || + (strm->flags & (NGTCP2_STRM_FLAG_SHUT_RD | NGTCP2_STRM_FLAG_RESET)) || (*pfrc)->fr.max_stream_data.max_stream_data < strm->max_rx_offset) { frc = *pfrc; *pfrc = (*pfrc)->next; @@ -1339,6 +1340,8 @@ static ssize_t conn_write_pkt(ngtcp2_conn *conn, uint8_t *dest, size_t destlen, while (conn->fc_strms) { strm = conn->fc_strms; + + if (!(strm->flags & (NGTCP2_STRM_FLAG_SHUT_RD | NGTCP2_STRM_FLAG_RESET))) { rv = ngtcp2_frame_chain_new(&nfrc, conn->mem); if (rv != 0) { return rv; @@ -1350,6 +1353,7 @@ static ssize_t conn_write_pkt(ngtcp2_conn *conn, uint8_t *dest, size_t destlen, conn->frq = nfrc; strm->max_rx_offset = strm->unsent_max_rx_offset; + } strm_next = strm->fc_next; conn->fc_strms = strm_next;
improove completer result for values
@@ -201,42 +201,51 @@ function completer:_complete_option_v(options, current, completing) optvs = v end end - - local function find_and_add_candidates(values) - local found_candidates = {} + -- transform values array to candidates array + local function _transform_values(values) + local candidates = {} if #values > 0 and type(values[1]) == "string" then for _, v in ipairs(values) do - if tostring(v):startswith(completing) then - table.insert(found_candidates, { value = v, is_complete = true }) - end + table.insert(candidates, { value = v, is_complete = true }) end else for _, v in ipairs(values) do - if v.value:startswith(completing) then v.is_complete=true - table.insert(found_candidates, v) + table.insert(candidates, v) + end end + return candidates + end + -- filter candidates with completing + local function _filter_candidates(candidates) + local found_candidates = {} + for _, v in ipairs(candidates) do + if v.value:find(completing,1,true) then + v.is_complete=true + table.insert(found_candidates, v) end end return found_candidates end - local found_candidates = {} - if opt then - -- show candidates of values - local values = opt.values + -- get completion candidates from values option + local function _values_into_candidates(values) if type(values) == "function" then - values = values(completing, current) + -- no need to filter result of values() as we consider values() already filter candidates + return _transform_values(values(completing, current)) + else + return _filter_candidates(_transform_values(values)) end - found_candidates = find_and_add_candidates(values) end - if optvs and #found_candidates == 0 then - -- show candidates of values - local values = optvs.values - if type(values) == "function" then - values = values(completing) + local found_candidates = {} + if opt then + -- get candidates from values option + found_candidates = _values_into_candidates(opt.values) end - found_candidates = find_and_add_candidates(values) + + if optvs and #found_candidates == 0 then + -- get candidates from values option + found_candidates = _values_into_candidates(optvs.values) end self:_print_candidates(found_candidates) return #found_candidates > 0
runtime: initialize base before using cpu_count
@@ -74,10 +74,10 @@ static void *pthread_entry(void *data) */ int runtime_init(thread_fn_t main_fn, void *arg, unsigned int threads) { - pthread_t tid[cpu_count - 1]; + pthread_t tid[NTHREAD]; int ret, i; - if (threads < 1 || threads > cpu_count - 1) + if (threads < 1) return -EINVAL; ret = base_init(); @@ -86,6 +86,9 @@ int runtime_init(thread_fn_t main_fn, void *arg, unsigned int threads) return ret; } + if (threads > cpu_count - 1) + return -EINVAL; + ret = stack_init(); if (ret) { log_err("stack_init() failed, ret = %d", ret);
Closing devices seperately for each sensor
@@ -264,6 +264,7 @@ config_sensor(void) os_dev_close(dev); goto err; } + os_dev_close(dev); #endif #if MYNEWT_VAL(LSM303DLHC_PRESENT) @@ -287,6 +288,7 @@ config_sensor(void) os_dev_close(dev); goto err; } + os_dev_close(dev); #endif #if MYNEWT_VAL(BNO055_PRESENT) @@ -308,14 +310,14 @@ config_sensor(void) //assert(0); goto err; } -#endif - os_dev_close(dev); +#endif return (0); err: return rc; } + #endif #ifdef ARCH_sim
Wait for eBLEHALEventIndicateCb in BLE_Write_Notification_Size_Greater_Than_MTU_3
@@ -403,6 +403,7 @@ TEST( Full_BLE_Integration_Test_Advertisement, BLE_Advertise_Interval_Consistent TEST( Full_BLE_Integration_Test_Connection, BLE_Write_Notification_Size_Greater_Than_MTU_3 ) { BTStatus_t xStatus, xfStatus; + BLETESTindicateCallback_t xIndicateEvent; IotTestBleHal_checkNotificationIndication( bletestATTR_SRVCB_CCCD_E, true ); @@ -416,6 +417,8 @@ TEST( Full_BLE_Integration_Test_Connection, BLE_Write_Notification_Size_Greater_ false ); TEST_ASSERT_EQUAL( eBTStatusSuccess, xStatus ); + xStatus = IotTestBleHal_WaitEventFromQueue( eBLEHALEventIndicateCb, NO_HANDLE, ( void * ) &xIndicateEvent, sizeof( BLETESTindicateCallback_t ), BLE_TESTS_WAIT ); + IotTestBleHal_checkNotificationIndication( bletestATTR_SRVCB_CCCD_E, false ); }
removed debug dump
@@ -806,6 +806,7 @@ struct stlink_chipid_params *stlink_chipid_get_params(uint32_t chipid) { p2 = stlink_chipid_get_params_old (chipid); +#if 1 if (memcmp (p2, params, sizeof (struct stlink_chipid_params) - sizeof (struct stlink_chipid_params *)) != 0) { //fprintf (stderr, "Error, chipid params not identical\n"); //return NULL; @@ -814,6 +815,7 @@ struct stlink_chipid_params *stlink_chipid_get_params(uint32_t chipid) { fprintf (stderr, "---------- new ------------\n"); dump_a_chip (stderr, params); } +#endif return(params); }
Fix issue with tray positioning.
@@ -410,13 +410,13 @@ void ComputeTrayGeometry(TrayType *tp) if(tp->halign == TALIGN_FIXED) { x = tp->requestedX; if(x < 0) { - x += sp->width; + x += sp->width + 1; } } if(tp->valign == TALIGN_FIXED) { y = tp->requestedY; if(y < 0) { - y += sp->height; + y += sp->height + 1; } } x += sp->x;
web ui docker: pin version and add build argument
@@ -14,7 +14,8 @@ RUN apt-get install -y nodejs # pull latest libelektra RUN mkdir /home/elektra WORKDIR /home/elektra -RUN git clone --depth 1 https://github.com/ElektraInitiative/libelektra.git +ARG ELEKTRA_VER=master +RUN git clone -b ${ELEKTRA_VER} --depth 1 https://github.com/ElektraInitiative/libelektra.git WORKDIR /home/elektra/libelektra # build & install libelektra
Add astyle guidelines to the contributing document.
@@ -29,7 +29,12 @@ may require changes before being merged. run tests with `make test`. If you want to add a new test suite, simply add a file to the test folder and make sure it is run when`make test` is invoked. * Be consistent with the style. For C this means follow the indentation and style in - other files (files have MIT license at top, 4 spaces indentation, no trailing whitespace, cuddled brackets, etc.) + other files (files have MIT license at top, 4 spaces indentation, no trailing + whitespace, cuddled brackets, etc.) Use `make format` to + automatically format your C code with + [astyle](http://astyle.sourceforge.net/astyle.html). You will probably need + to install this, but it can be installed with most package managers. + For janet code, the use lisp indentation with 2 spaces. One can use janet.vim to do this indentation, or approximate as close as possible. @@ -51,6 +56,11 @@ Code should compile warning free and run valgrind clean. I find that these two c of the easiest ways to protect against a large number of bugs in an unsafe language like C. To check for valgrind errors, run `make valtest` and check the output for undefined or flagged behavior. +### Formatting + +Use [astyle](http://astyle.sourceforge.net/astyle.html) via `make format` to +ensure a consistent code style for C. + ## Janet style All janet code in the project should be formatted similar to the code in core.janet.
crypto/ppccap.c: wire new ChaCha20_ctr32_vsx.
@@ -90,11 +90,16 @@ void ChaCha20_ctr32_int(unsigned char *out, const unsigned char *inp, void ChaCha20_ctr32_vmx(unsigned char *out, const unsigned char *inp, size_t len, const unsigned int key[8], const unsigned int counter[4]); +void ChaCha20_ctr32_vsx(unsigned char *out, const unsigned char *inp, + size_t len, const unsigned int key[8], + const unsigned int counter[4]); void ChaCha20_ctr32(unsigned char *out, const unsigned char *inp, size_t len, const unsigned int key[8], const unsigned int counter[4]) { - OPENSSL_ppccap_P & PPC_ALTIVEC + OPENSSL_ppccap_P & PPC_CRYPTO207 + ? ChaCha20_ctr32_vsx(out, inp, len, key, counter) + : OPENSSL_ppccap_P & PPC_ALTIVEC ? ChaCha20_ctr32_vmx(out, inp, len, key, counter) : ChaCha20_ctr32_int(out, inp, len, key, counter); }
hssi: add return statement to `config_app::do_read`
@@ -322,6 +322,7 @@ bool config_app::do_dump(const cmd_handler::cmd_vector_t & cmds) registers = parsed.data(); register_count = parsed.size(); } + if (cmds.size() > 1) { std::ofstream out(cmds[1]); @@ -334,7 +335,6 @@ bool config_app::do_dump(const cmd_handler::cmd_vector_t & cmds) return true; } return false; - } bool config_app::do_read(const cmd_handler::cmd_vector_t & cmds) @@ -396,6 +396,7 @@ bool config_app::do_write(const cmd_handler::cmd_vector_t & cmds) return true; } } + return false; } bool config_app::do_retimer_read(const cmd_handler::cmd_vector_t & cmds)
Add missing param to the documentation of hquery
@@ -1470,7 +1470,12 @@ fxs = [ name: "h", type: "int", info: "The handle.", - } + }, + { + name: "type", + type: "const char*", + info: "The opaque ID of the queried type.", + }, ], prologue: `
Fix infinite request loop for sensors which don't have sw build id attribute
@@ -8549,7 +8549,7 @@ void DeRestPluginPrivate::delayedFastEnddeviceProbe() } // manufacturer, model id, sw build id - if (!sensor || modelId.isEmpty() || manufacturer.isEmpty() || swBuildId.isEmpty()) + if (!sensor || modelId.isEmpty() || manufacturer.isEmpty() || (swBuildId.isEmpty() && dateCode.isEmpty())) { deCONZ::ApsDataRequest apsReq;
doc: update 3.0.1 release notes Clarify description of CVE fix (only impacts ACRN implementation on Alder Lake platforms), and improve description of the ACRN shell's new vmexit command.
@@ -36,19 +36,19 @@ What's New in v3.0.1 ******************** Mitigation for Return Stack Buffer Underflow security vulnerability - For platforms that supports RRSBA (Restricted Return Stack Buffer + When running ACRN on Alder Lake platforms that support RRSBA (Restricted Return Stack Buffer Alternate), using retpoline may not be sufficient to guard against branch history injection or intra-mode branch target injection. RRSBA must - be disabled to prevent CPUs from using alternate predictors for RETs. + be disabled for Alder Lake platforms to prevent CPUs from using alternate predictors for RETs. (Addresses security issue tracked by CVE-2022-29901 and CVE-2022-28693.) ACRN shell commands added for real-time performance profiling ACRN shell commands were added to sample vmexit data per virtual CPU to facilitate real-time performance profiling: - * ``vmexit clear``: clears current vmexit buffer - * ``vmexit [vm_id]``: outputs vmexit info per vCPU * ``vmexit enable | disable``: enabled by default - + * ``vmexit clear``: clears current vmexit buffer + * ``vmexit [vm_id]``: outputs vmexit reason code and latency count information per vCPU + for a VM ID (or for all VM IDs if none is specified). See :ref:`release_notes_3.0` for additional release information.
tests: fix import in test/test_pcap.py Type: test
#!/usr/bin/env python3 +import os import unittest from framework import VppTestCase, VppTestRunner, running_gcov_tests from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath -from os import path, remove class TestPcap(VppTestCase): @@ -77,12 +77,13 @@ class TestPcap(VppTestCase): else: self.logger.info(cmd + " FAIL retval " + str(r.retval)) - self.assertTrue(path.exists('/tmp/dispatch.pcap')) - self.assertTrue(path.exists('/tmp/rxtx.pcap')) - self.assertTrue(path.exists('/tmp/filt.pcap')) + self.assertTrue(os.path.exists('/tmp/dispatch.pcap')) + self.assertTrue(os.path.exists('/tmp/rxtx.pcap')) + self.assertTrue(os.path.exists('/tmp/filt.pcap')) os.remove('/tmp/dispatch.pcap') os.remove('/tmp/rxtx.pcap') os.remove('/tmp/filt.pcap') + if __name__ == '__main__': unittest.main(testRunner=VppTestRunner)
YAML CPP: Remove unnecessary test code
@@ -54,25 +54,12 @@ TEST (yamlcpp, contract) CLOSE_PLUGIN (); } -void update_parent (CppKeySet expected, string const filepath) -{ - // We replace the value of the parent key of expected keyset, if the header file specifies the value @CONFIG_FILEPATH@. - // We could also do that via CMake, but the current solution should be easier for now. - CppKey root = expected.lookup (PREFIX, KDB_O_POP); - if (root) - { - if (root.getString () == "@CONFIG_FILEPATH@") root.setString (filepath); - expected.append (root); - } -} - static void test_read (string const & filename, CppKeySet expected, int const status = ELEKTRA_PLUGIN_STATUS_SUCCESS) #ifdef __llvm__ __attribute__ ((annotate ("oclint:suppress"))) #endif { string filepath = srcdir_file (filename.c_str ()); - update_parent (expected, filepath); OPEN_PLUGIN (PREFIX, filepath.c_str ()); @@ -89,7 +76,6 @@ static void test_write_read (CppKeySet expected) #endif { string filepath = elektraFilename (); - update_parent (expected, filepath); OPEN_PLUGIN (PREFIX, filepath.c_str ());
get-gcp-jwt: clean up references, use +ot Moves =, closer to call sites so it's clearer what's coming from where. Also uses +ot, allowing a less horrifying +sign-jwt. This also seems to not jump back and forth between tapes and cords as much, for what that's worth.
:: :: /- spider, settings -/+ jose, pkcs, strandio +/+ jose, pkcs, primitive-rsa, strandio =, strand=strand:spider -=, format -=, jose -=, pkcs +=, rsa=primitive-rsa ^- thread:spider |^ |= * %. dat ;: cork to-wain:format - ring:de:pem:pkcs8 + ring:de:pem:pkcs8:pkcs need == :: construct and return a self-signed JWT issued now, expiring in ~h1. |= [=key:rsa kid=@t iss=@t scope=@t aud=@t iat=@da] ^- @t =/ job=json - %^ sign:jws key + =, enjs:format + %^ sign:jws:jose key :: the JWT's "header" - %: pairs:enjs + %: pairs alg+s+'RS256' typ+s+'JWT' kid+s+kid ~ == :: the JWT's "payload" - %: pairs:enjs + %: pairs iss+s+iss sub+s+iss :: per g.co, use iss for sub scope+s+scope aud+s+aud - iat+(sect:enjs iat) - exp+(sect:enjs (add iat ~h1)) + iat+(sect iat) + exp+(sect (add iat ~h1)) ~ == - ?> ?=([%o *] job) - =* mep p.job - =+ :~ pod=(sa:dejs (~(got by mep) 'protected')) - pad=(sa:dejs (~(got by mep) 'payload')) - sig=(sa:dejs (~(got by mep) 'signature')) - == - %- crip :: XX - :(weld pod "." pad "." sig) + =/ [pod=@t pad=@t sig=@t] + =, dejs:format + ((ot 'protected'^so 'payload'^so 'signature'^so ~) job) + (rap 3 (join '.' `(list @t)`~[pod pad sig])) :: RPC to get a signed JWT. Probably only works with Google. :: Described at: :: https://developers.google.com/identity/protocols/oauth2/service-account ^= body %- some %- as-octt:mimes:html %- en-json:html - %: pairs:enjs + %: pairs:enjs:format ['grant_type' s+'urn:ietf:params:oauth:grant-type:jwt-bearer'] assertion+s+jot ~ =/ jon=(unit json) (de-json:html body) ?~ jon (strand-fail:strandio %bad-body ~[body]) - ?. ?=([%o [[%'id_token' %s @] ~ ~]] +.jon) - (strand-fail:strandio %bad-json ~[body]) - (pure:m p.q.n.p.u.jon) + =* job u.jon + %- pure:m + =, dejs:format + %- (ot 'id_token'^so ~) + job --
WebXR: Fix isDown; Fix hand tracking;
@@ -299,8 +299,9 @@ var webxr = { webxr_isDown: function(device, button, down, changed) { var b = state.hands[device] && state.hands[device].buttons[button]; + var c = state.lastButtonState[device]; HEAPU8[down] = b && b.pressed; - HEAPU8[changed] = b && (state.lastButtonState[device][button] ^ b.pressed); + HEAPU8[changed] = b && c && (c[button] ^ b.pressed); return !!b; }, @@ -345,18 +346,17 @@ var webxr = { return false; } - // WebXR does not have a palm joint but the skeleton otherwise matches up - HEAPF32.fill(0, poses >> 2, (poses >> 2) + 8 * 26 /* HAND_JOINT_COUNT */); + var space = state.hands[device].gripSpace; + var pose = state.frame.getPose(space, state.space); + pose && writePose(pose.transform, poses, poses + 16); poses += 32; - for (var i = 0; i < 25; i++) { - if (inputSource.hand[i]) { - var pose = state.frame.getJointPose(inputSource.hand[i], state.space); - if (pose) { - var position = poses + i * 32; - writePose(pose.transform, position, position + 16); - } - } + // TODO use fillPoses + for ([joint, space] of inputSource.hand) { + var pose = state.frame.getJointPose(space, state.space); + if (!pose) return false; + writePose(pose.transform, poses, poses + 16); + poses += 32; } return true;
Update kservice.c Update year info from 2016 to 2017
@@ -533,7 +533,7 @@ void rt_show_version(void) rt_kprintf("- RT - Thread Operating System\n"); rt_kprintf(" / | \\ %d.%d.%d build %s\n", RT_VERSION, RT_SUBVERSION, RT_REVISION, __DATE__); - rt_kprintf(" 2006 - 2016 Copyright by rt-thread team\n"); + rt_kprintf(" 2006 - 2017 Copyright by rt-thread team\n"); } RTM_EXPORT(rt_show_version);
nimble/btshell: Fix comment about default sync timeout
@@ -3795,7 +3795,7 @@ static const struct shell_param sync_create_params[] = { {"peer_addr", "usage: =[XX:XX:XX:XX:XX:XX]"}, {"sid", "usage: =[UINT8], default: 0"}, {"skip", "usage: =[0-0x01F3], default: 0x0000"}, - {"sync_timeout", "usage: =[0x000A-0x4000], default: 0x000A"}, + {"sync_timeout", "usage: =[0x000A-0x4000], default: 0x07D0"}, {"reports_disabled", "disable reports, usage: =[0-1], default: 0"}, {NULL, NULL} };
[core] HTTP/2 GOAWAY after timeout before read HTTP/2 send GOAWAY soon after client timeout, before potentially reading new stream requests, which will then have to be reset. x-ref: "Chrome gives random net::ERR_HTTP2_PROTOCOL_ERROR"
@@ -1460,10 +1460,12 @@ static void connection_check_timeout (connection * const con, const unix_time64_ con->fd); } connection_set_state(r, CON_STATE_RESPONSE_END); - con->is_readable = 0; changed = 1; } } + /* process changes before optimistic read of additional HTTP/2 frames */ + if (changed) + con->is_readable = 0; } else if (waitevents & FDEVENT_IN) { if (con->request_count == 1 || r->state != CON_STATE_READ) {
Fix version number of Imath for Bazel build
@@ -7,14 +7,14 @@ generate_header( name = "ImathConfig.h", substitutions = { "@IMATH_INTERNAL_NAMESPACE@": "Imath_3_1", - "@IMATH_LIB_VERSION@": "3.1.1", + "@IMATH_LIB_VERSION@": "3.1.3", "@IMATH_NAMESPACE_CUSTOM@": "0", "@IMATH_NAMESPACE@": "Imath", - "@IMATH_PACKAGE_NAME@": "Imath 3.1.1", + "@IMATH_PACKAGE_NAME@": "Imath 3.1.3", "@IMATH_VERSION_MAJOR@": "3", "@IMATH_VERSION_MINOR@": "1", - "@IMATH_VERSION_PATCH@": "1", - "@IMATH_VERSION@": "3.1.1", + "@IMATH_VERSION_PATCH@": "3", + "@IMATH_VERSION@": "3.1.3", "#cmakedefine IMATH_HALF_USE_LOOKUP_TABLE": "#define IMATH_HALF_USE_LOOKUP_TABLE", "#cmakedefine IMATH_ENABLE_API_VISIBILITY": "#define IMATH_ENABLE_API_VISIBILITY", "#cmakedefine IMATH_HAVE_LARGE_STACK": "/* #undef IMATH_HAVE_LARGE_STACK */",
Return main() result to OS
#include "m3.h" #include "m3_host.h" +#include "m3_env.h" #define FATAL(msg, ...) { printf("Fatal: " msg "\n", ##__VA_ARGS__); return 1; } @@ -77,6 +78,9 @@ int main (int i_argc, const char * i_argv []) i_argc -= 2; i_argv += 2; result = m3_CallMain (func, i_argc, i_argv); + + m3stack_t stack = (m3stack_t)(env->stack); + return stack[0]; } else { i_argc -= 3; i_argv += 3;
Add PhGetProcessIsPosix (removed in commit 8c5cf8d7eced4f0450a93ccabbe166f173588e60)
@@ -256,6 +256,56 @@ PhSetProcessErrorMode( ); } +/** + * Gets whether the process is running under the POSIX subsystem. + * + * \param ProcessHandle A handle to a process. The handle + * must have PROCESS_QUERY_LIMITED_INFORMATION and + * PROCESS_VM_READ access. + * \param IsPosix A variable which receives a boolean + * indicating whether the process is running under the + * POSIX subsystem. + */ +NTSTATUS PhGetProcessIsPosix( + _In_ HANDLE ProcessHandle, + _Out_ PBOOLEAN IsPosix + ) +{ + NTSTATUS status; + PROCESS_BASIC_INFORMATION basicInfo; + ULONG imageSubsystem; + + if (WindowsVersion >= WINDOWS_10) + { + *IsPosix = FALSE; // Not supported (dmex) + return STATUS_SUCCESS; + } + + status = PhGetProcessBasicInformation(ProcessHandle, &basicInfo); + + if (!NT_SUCCESS(status)) + return status; + + // No PEB for processes like System. + if (!basicInfo.PebBaseAddress) + return STATUS_UNSUCCESSFUL; + + status = NtReadVirtualMemory( + ProcessHandle, + PTR_ADD_OFFSET(basicInfo.PebBaseAddress, FIELD_OFFSET(PEB, ImageSubsystem)), + &imageSubsystem, + sizeof(ULONG), + NULL + ); + + if (NT_SUCCESS(status)) + { + *IsPosix = imageSubsystem == IMAGE_SUBSYSTEM_POSIX_CUI; + } + + return status; +} + /** * Gets a process' no-execute status. *
YAML CPP: Fix GCC compilation error Before this commit the plugin would not compile using GCC, since the compiler was unable to find a match for the operator `[]`.
@@ -86,7 +86,7 @@ YAML::Node createLeafNode (Key & key) { key.rewindMeta (); - auto metaNode{ YAML::Node (YAML::NodeType::Map) }; + YAML::Node metaNode{ YAML::Node (YAML::NodeType::Map) }; Key meta; while ((meta = key.nextMeta ())) { @@ -101,7 +101,7 @@ YAML::Node createLeafNode (Key & key) return YAML::Node (key.getString ()); } - auto node{ YAML::Node (YAML::NodeType::Sequence) }; + YAML::Node node{ YAML::Node (YAML::NodeType::Sequence) }; node.SetTag ("!elektra/meta"); node.push_back (key.getString ()); node.push_back (metaNode);
Update STM32 StoreConfigurationBlock Storing a block on a non existing position now fails Improve comments
@@ -90,6 +90,8 @@ __nfweak bool ConfigurationManager_GetConfigurationBlock(void* configurationBloc } // Stores the configuration block to the configuration flash sector +// NOTE: because inserting or removing a configuration block it's very 'RAM expensive' we choose not to support those operations +// the host debugger will have to be used to manage these operations on the device configuration collection // it's implemented with 'weak' attribute so it can be replaced at target level if a different persistance mechanism is used __nfweak bool ConfigurationManager_StoreConfigurationBlock(void* configurationBlock, DeviceConfigurationOption configuration, uint32_t configurationIndex, uint32_t blockSize) { @@ -102,8 +104,8 @@ __nfweak bool ConfigurationManager_StoreConfigurationBlock(void* configurationBl if(g_TargetConfiguration.NetworkInterfaceConfigs->Count == 0 || (configurationIndex + 1) > g_TargetConfiguration.NetworkInterfaceConfigs->Count) { - // this is a block that wasn't here before, so we need to enumerate the blocks again after storing it - requiresEnumeration = TRUE; + // there is no room for this block, fail the operation + return FALSE; } // set storage address from block address @@ -117,8 +119,8 @@ __nfweak bool ConfigurationManager_StoreConfigurationBlock(void* configurationBl if(g_TargetConfiguration.Wireless80211Configs->Count == 0 || (configurationIndex + 1) > g_TargetConfiguration.Wireless80211Configs->Count) { - // this is a block that wasn't here before, so we need to enumerate the blocks again after storing it - requiresEnumeration = TRUE; + // there is no room for this block, fail the operation + return FALSE; } // set storage address from block address @@ -137,7 +139,7 @@ __nfweak bool ConfigurationManager_StoreConfigurationBlock(void* configurationBl // always enumerate the blocks again after storing it requiresEnumeration = TRUE; - // for save all the block size has to be provided, check it + // for save all the block size has to be provided, check that if(blockSize == 0) { return FALSE;
actions: use AdoptOpenJDK 14
@@ -35,7 +35,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: 'adopt' # Use AdoptOpenJDK - java-version: '16' + java-version: '14' - name: Install Dependencies run: |
[apps] Add memory free of matrices A and B
#include "synchronization.h" // Dimensions of matrices -#define DIM_M 12 -#define DIM_N 12 -#define DIM_P 12 +#define DIM_M 20 +#define DIM_N 20 +#define DIM_P 20 int32_t *matrix_A; int32_t *matrix_B; @@ -68,13 +68,13 @@ int main() { // Initialize systolic array systolic_init(); - // Generate matrices A & B - generate_gradient_matrix(&matrix_A, DIM_M, DIM_N); - generate_gradient_matrix(&matrix_B, DIM_N, DIM_P); - // Create systolic matrices + generate_gradient_matrix(&matrix_A, DIM_M, DIM_N); systolic_matrix_create(&syst_matrix_A, matrix_A, DIM_M, DIM_N); + simple_free(matrix_A); + generate_gradient_matrix(&matrix_B, DIM_N, DIM_P); systolic_matrix_create(&syst_matrix_B, matrix_B, DIM_N, DIM_P); + simple_free(matrix_B); systolic_matrix_allocate(&syst_matrix_C, DIM_M, DIM_P); // Print out systolic matrices A & B @@ -89,9 +89,31 @@ int main() { // Wait for all cores mempool_barrier(num_cores, num_cores * 4); - // Assign grid position - uint32_t col_idx = core_id % 4; - uint32_t row_idx = core_id / 4; + // Assign grid position (row wise) + // uint32_t col_idx = core_id % 4; + // uint32_t row_idx = core_id / 4; + + // Assign grid position (col wise) + uint32_t col_idx = core_id / 4; + uint32_t row_idx = core_id % 4; + + // 16 CORES only + // Assign grid position (tile wise) + // uint32_t col_idx; + // uint32_t row_idx; + // if (core_id < 4) { + // col_idx = core_id % 2; + // row_idx = core_id / 2; + // } else if (core_id < 8) { + // col_idx = core_id % 2 + 2; + // row_idx = core_id / 6; + // } else if (core_id < 12) { + // col_idx = core_id % 2; + // row_idx = core_id / 10 + 2; + // } else { + // col_idx = core_id % 2 + 2; + // row_idx = core_id / 14 + 2; + // } if (core_id == 0) { // Start benchmark
Print Ethereum addresses at the correct length
:: ++ num (d-co:co 1) ++ pon (cury scow %p) - ++ adr |=(a=@ ['0' 'x' ((x-co:co 20) a)]) + ++ adr |=(a=@ ['0' 'x' ((x-co:co (mul 2 20)) a)]) ++ spo |=(h=? ?:(h "escaped to" "detached from")) ++ req |=(r=(unit @p) ?~(r "canceled" (pon u.r))) --
options/posix: disallow mkostemp to take O_WRONLY
@@ -139,6 +139,7 @@ char *setstate(char *state) { // ---------------------------------------------------------------------------- int mkostemp(char *pattern, int flags) { + flags &= ~O_WRONLY; auto n = strlen(pattern); __ensure(n >= 6); if(n < 6) {
[persistence] change the type of roffset in LogSN
@@ -46,9 +46,15 @@ enum upd_type { UPD_NONE }; +/* Change the type of roffset from uint32_t to uint64_t. + * 1. There is no guarantee that the checkpoint will always succeed, + * the cmdlog record offset can exceed 4GB during retries. + * 2. Depending on the memlimit, a checkpoint can occur when offset exceeds 4GB. + */ typedef struct logsn { uint32_t filenum; /* cmdlog file number : 1, 2, ... */ - uint32_t roffset; /* cmdlog record offset */ + uint32_t rsvd32; /* reserved 4 bytes */ + uint64_t roffset; /* cmdlog record offset */ } LogSN; /* command log manager entry structure */
perfmon: numa node list probing should use '/online' instead of '/has_cpu' Type: fix
@@ -147,7 +147,7 @@ intel_uncore_init (vlib_main_t *vm, perfmon_source_t *src) u32 i, j; u8 *s = 0; - if ((err = clib_sysfs_read ("/sys/devices/system/node/has_cpu", "%U", + if ((err = clib_sysfs_read ("/sys/devices/system/node/online", "%U", unformat_bitmap_list, &node_bitmap))) { clib_error_free (err);
Doc: Fix pageinspect bt_page_items() example. Oversight in commit
@@ -358,7 +358,7 @@ btpo_flags | 3 all of the items on a B-tree index page. For example: <screen> test=# SELECT itemoffset, ctid, itemlen, nulls, vars, data, dead, htid, tids[0:2] AS some_tids - FROM bt_page_items(get_raw_page('tenk2_hundred', 5)); + FROM bt_page_items('tenk2_hundred', 5); itemoffset | ctid | itemlen | nulls | vars | data | dead | htid | some_tids ------------+-----------+---------+-------+------+-------------------------+------+--------+--------------------- 1 | (16,1) | 16 | f | f | 30 00 00 00 00 00 00 00 | | |
Update RP2040 hcd_init to have rhport argument.
@@ -363,9 +363,10 @@ static void hw_endpoint_init(uint8_t dev_addr, const tusb_desc_endpoint_t *ep_de //--------------------------------------------------------------------+ // HCD API //--------------------------------------------------------------------+ -bool hcd_init(void) +bool hcd_init(uint8_t rhport) { - pico_trace("hcd_init\n"); + pico_trace("hcd_init %d\n", rhport); + assert(rhport == 0); // Reset any previous state rp2040_usb_init();
schema compile amend BUGFIX do not skip augments More augments may be applied if they are nested, effectively skipping some.
@@ -1887,9 +1887,11 @@ lys_compile_node_augments(struct lysc_ctx *ctx, struct lysc_node *node) lysc_update_path(ctx, NULL, NULL); LY_CHECK_GOTO(ret, cleanup); - /* augment was applied, remove it (index may have changed because other augments could have been applied) */ + /* augment was applied, remove it (index and the whole set may have changed because other augments + * could have been applied) */ ly_set_rm(&ctx->uses_augs, aug, NULL); lysc_augment_free(ctx->ctx, aug); + i = 0; } /* top-level augments */ @@ -1919,6 +1921,7 @@ lys_compile_node_augments(struct lysc_ctx *ctx, struct lysc_node *node) /* augment was applied, remove it */ ly_set_rm(&ctx->augs, aug, NULL); lysc_augment_free(ctx->ctx, aug); + i = 0; } cleanup:
proc_syspageSpawnName: Fixed call to vm_getSharedMap JIRA:
@@ -915,7 +915,7 @@ int proc_syspageSpawnName(const char *map, const char *name, char **argv) syspage_mapNameResolve(map); if (sysMap != NULL && (sysMap->attr & (mAttrRead | mAttrWrite)) == (mAttrRead | mAttrWrite)) - return proc_syspageSpawn((syspage_prog_t *)prog, vm_getSharedMap((syspage_prog_t *)prog, sysMap->attr), name, argv); + return proc_syspageSpawn((syspage_prog_t *)prog, vm_getSharedMap((syspage_prog_t *)prog, sysMap->id), name, argv); return -EINVAL; }
TEST: Fix test/recipes/15-test_rsa.t Perl strings should be compared with 'eq', not '=='. This only generates a perl warning, so wasn't immediately noticed. Also, remove the check of disabled 'dsa'. That never made reak sense.
@@ -49,7 +49,7 @@ sub run_rsa_tests { SKIP: { skip "Skipping msblob conversion test", 1 - if disabled($cmd) || disabled("dsa") || $cmd == 'pkey'; + if disabled($cmd) || $cmd eq 'pkey'; subtest "$cmd conversions -- public key" => sub { tconversion( -type => 'msb', -prefix => "$cmd-msb-pub",
ds lyb BUGFIX handle non-existing operational Which is perfectly fine as it is volatile and will not exist after reboot. Fixes
@@ -190,7 +190,8 @@ srpds_lyb_destroy(const struct lys_module *mod, sr_datastore_t ds) return rc; } - if ((unlink(path) == -1) && (errno != ENOENT)) { + if ((unlink(path) == -1) && (errno != ENOENT) && ((ds == SR_DS_STARTUP) || (ds == SR_DS_RUNNING))) { + /* startup is persistent and must always exist, running should always be created */ SRP_LOG_WRN("Failed to unlink \"%s\" (%s).", path, strerror(errno)); } free(path); @@ -289,17 +290,20 @@ retry_open: /* open fd */ fd = srlyb_open(path, O_RDONLY, 0); if (fd == -1) { - if ((errno == ENOENT) && (ds == SR_DS_CANDIDATE)) { + if (errno == ENOENT) { + if (ds == SR_DS_CANDIDATE) { /* no candidate exists, just use running */ ds = SR_DS_RUNNING; free(path); path = NULL; goto retry_open; - } - - if ((errno == ENOENT) && !strcmp(mod->name, "sysrepo")) { + } else if (!strcmp(mod->name, "sysrepo")) { /* fine for the internal module */ goto cleanup; + } else if (ds == SR_DS_OPERATIONAL) { + /* it may not exist */ + goto cleanup; + } } SRPLG_LOG_ERR(srpds_name, "Opening \"%s\" failed (%s).", path, strerror(errno)); @@ -560,6 +564,9 @@ retry: ds = SR_DS_RUNNING; free(path); goto retry; + } else if ((ds == SR_DS_OPERATIONAL) && (errno == ENOENT)) { + /* non-existing operational is fine */ + *read = 1; } else if (errno == EACCES) { *read = 0; } else { @@ -580,6 +587,9 @@ retry: ds = SR_DS_RUNNING; free(path); goto retry; + } else if ((ds == SR_DS_OPERATIONAL) && (errno == ENOENT)) { + /* non-existing operational is fine */ + *write = 1; } else if (errno == EACCES) { *write = 0; } else {
Fix hex escapes.
@@ -191,7 +191,7 @@ static void popstate(DstParser *p, Dst val) { static int checkescape(uint8_t c) { switch (c) { default: return -1; - case 'h': return 1; + case 'x': return 1; case 'n': return '\n'; case 't': return '\t'; case 'r': return '\r';
Print "Server started on port XXX" message upon start.
@@ -28,7 +28,9 @@ int main(int argc, char **argv) notifier n = table_find(t, sym(select)) ? create_select_notifier(h) : table_find(t, sym(poll)) ? create_poll_notifier(h) : create_epoll_notifier(h); - listen_port(h, n, 8080, closure(h, conn, h)); + u16 port = 8080; + listen_port(h, n, port, closure(h, conn, h)); + rprintf("Server started on port %d\n", port); notifier_spin(n); return 0; }
Declare SCASUM as EXTERNAL
* .. External Functions .. LOGICAL LSAME INTEGER ISAMAX - REAL SASUM, SLAMCH, CLANGE - EXTERNAL LSAME, ISAMAX, SASUM, SLAMCH, CLANGE - REAL SCASUM + REAL SASUM, SCASUM, SLAMCH, CLANGE + EXTERNAL LSAME, ISAMAX, SASUM, SCASUM, SLAMCH, CLANGE * .. * .. External Subroutines .. EXTERNAL CGEMM
fix l2cap repeat cid
@@ -1456,9 +1456,11 @@ void l2cu_change_pri_ccb (tL2C_CCB *p_ccb, tL2CAP_CHNL_PRIORITY priority) ** Returns pointer to CCB, or NULL if none ** *******************************************************************************/ +bool l2cu_find_ccb_in_list(void *p_ccb_node, void *p_local_cid); tL2C_CCB *l2cu_allocate_ccb (tL2C_LCB *p_lcb, UINT16 cid) { tL2C_CCB *p_ccb = NULL; + uint16_t tmp_cid = L2CAP_BASE_APPL_CID; L2CAP_TRACE_DEBUG ("l2cu_allocate_ccb: cid 0x%04x", cid); p_ccb = l2cu_find_free_ccb (); @@ -1481,7 +1483,13 @@ tL2C_CCB *l2cu_allocate_ccb (tL2C_LCB *p_lcb, UINT16 cid) p_ccb->in_use = TRUE; /* Get a CID for the connection */ - p_ccb->local_cid = L2CAP_BASE_APPL_CID + (list_length(l2cb.p_ccb_pool) - 1); + for (tmp_cid = L2CAP_BASE_APPL_CID; tmp_cid < MAX_L2CAP_CHANNELS + L2CAP_BASE_APPL_CID; tmp_cid++) { + if (list_foreach(l2cb.p_ccb_pool, l2cu_find_ccb_in_list, &tmp_cid) == NULL) { + break; + } + } + assert(tmp_cid != MAX_L2CAP_CHANNELS + L2CAP_BASE_APPL_CID); + p_ccb->local_cid = tmp_cid; p_ccb->p_lcb = p_lcb; p_ccb->p_rcb = NULL; p_ccb->should_free_rcb = false;
Fix script_cmd_args length in header
@@ -26,7 +26,7 @@ typedef struct _SCENE_STATE { extern UINT8 scriptrunner_bank; extern UBYTE script_ptr_bank; extern UBYTE *script_start_ptr; -extern UBYTE script_cmd_args[6]; +extern UBYTE script_cmd_args[7]; extern UBYTE script_cmd_args_len; extern const SCRIPT_CMD script_cmds[]; extern UBYTE *script_ptr;
add OIDCRedisCacheUsername to auth_openidc.conf docs
# When not specified, no authentication is performed. #OIDCRedisCachePassword <password> +# Username to be used if the Redis server requires authentication: http://redis.io/commands/auth +# NB: this can only used with Redis 6 (ACLs) or later +# When not specified, the implicit user "default" is used +#OIDCRedisCacheUsername <username> + # Logical database to select on the Redis server: https://redis.io/commands/select # When not defined the default database 0 is used. #OIDCRedisCacheDatabase <number>
fix usage line in sdr-receiver-hpsdr.c
@@ -58,7 +58,7 @@ int main(int argc, char *argv[]) number = (argc == 9) ? strtol(argv[i + 1], &end, 10) : -1; if(errno != 0 || end == argv[i + 1] || number < 1 || number > 2) { - printf("Usage: sdr-transceiver-hpsdr 1|2 1|2 1|2 1|2 1|2 1|2 1|2 1|2\n"); + printf("Usage: sdr-receiver-hpsdr 1|2 1|2 1|2 1|2 1|2 1|2 1|2 1|2\n"); return EXIT_FAILURE; } chan |= (number - 1) << i;
shapito: fix leftover va_arg
@@ -214,7 +214,6 @@ shapito_be_write_row_descriptionf(shapito_stream_t *stream, char *fmt, ...) int rc; switch (*fmt) { case 's': - name = va_arg(args, char*); rc = shapito_be_write_row_description_add(stream, offset, name, name_len, 0, 0, 20, -1, 0, 0); break;
os/arch/arm/src/stm32h745: Add reset flag to systemreset.c
@@ -112,6 +112,7 @@ static void up_systemreset(void) static reboot_reason_code_t reboot_reason; static reboot_reason_code_t stm32h745_reboot_reason_get_hw_value(void) { + lldbg("RCC RSR=0x%08x\n", RCC->RSR); if(__HAL_RCC_C1_GET_FLAG(RCC_FLAG_IWDG1RST)) { return REBOOT_SYSTEM_WATCHDOG;
libppd: Fixed jum based on uninitialized value in ppd.c Ported over the fix of CUPS issue
@@ -3367,11 +3367,11 @@ ppd_update_filters(ppd_file_t *ppd, /* I - PPD file */ srctype[256], dstsuper[16], /* Destination MIME media type */ dsttype[256], - program[1024], /* Command to run */ *ptr, /* Pointer into command to run */ buffer[2048], /* Re-written cupsFilter value */ **filter; /* Current filter */ int cost; /* Cost of filter */ + char program[1024] = { 0 }; /* Command to run */ DEBUG_printf(("4ppd_update_filters(ppd=%p, cg=%p)", ppd, pg));
adds (extremely basic) certificate renewal
:: +register: create ACME service account :: :: Note: accepts services ToS. + :: XX add rekey mechanism :: ++ register ^+ this /acme/register/(scot %p our.bow) %^ signed-request reg.dir i.nonces [%o (my [['termsOfServiceAgreed' b+&] ~])] - :: XX rekey + :: +renew: renew certificate :: + ++ renew + ^+ this + ~| %renew-effect-fail + ?. ?=(^ reg.act) ~|(%no-account !!) + ?. ?=(^ liv) ~|(%no-live-config !!) + new-order:effect(pen `dom.u.liv) :: +new-order: create a new certificate order :: ++ new-order :: XX expiration date :: [dom.u.rod key.u.rod cer (add now.bow ~d90) ego.u.rod] + :: archive live config + :: =? fig.hit ?=(^ liv) [u.liv fig.hit] - :: XX set renewal timer + :: set live config, install certificate, set renewal timer :: - install:effect(liv `fig, rod ~) + =< install:effect + (retry:effect(liv `fig, rod ~) /renew (add now.bow ~d60)) :: +get-authz: accept ACME service authorization object :: ++ get-authz ~&(unknown-retry+wir this) %directory directory:effect %register register:effect + %renew renew:effect %new-order new-order:effect %finalize-order finalize-order:effect %check-order check-order:effect
sr: fix deleting an SR l2 steering policy Type: fix
@@ -135,9 +135,13 @@ sr_steering_policy (int is_del, ip6_address_t * bsid, u32 sr_policy_index, else if (steer_pl->classify.traffic_type == SR_STEER_L2) { /* Remove HW redirection */ - vnet_feature_enable_disable ("device-input", - "sr-policy-rewrite-encaps-l2", + int ret = vnet_feature_enable_disable ("device-input", + "sr-pl-rewrite-encaps-l2", sw_if_index, 0, 0, 0); + + if (ret != 0) + return -1; + sm->sw_iface_sr_policies[sw_if_index] = ~(u32) 0; /* Remove promiscous mode from interface */
[tools/vsc.py]update json dump support indent=4
@@ -64,7 +64,7 @@ def GenerateCFiles(env): json_obj = {} json_obj['configurations'] = [config_obj] - vsc_file.write(json.dumps(json_obj)) + vsc_file.write(json.dumps(json_obj, indent=4)) vsc_file.close() return
Remove unnecessary try/catch in list_internal_identifiers The try/catch was used to catch Exceptions and exit with code 1, a legacy from check_names.py which uses the pattern to exit with code 2. But code 1 is the default for the Python runtime anyway, so it is redundant and can be removed.
@@ -44,7 +44,6 @@ def main(): parser.parse_args() - try: name_check = CodeParser(logging.getLogger()) result = name_check.parse_identifiers([ "include/mbedtls/*_internal.h", @@ -56,9 +55,5 @@ def main(): with open("identifiers", "w", encoding="utf-8") as f: f.writelines(identifiers) - except Exception: # pylint: disable=broad-except - traceback.print_exc() - sys.exit(1) - if __name__ == "__main__": main()
remove cells from 6p response side to CLEAR command.
@@ -992,6 +992,15 @@ void sixtop_six2six_sendDone(OpenQueueEntry_t* msg, owerror_t error){ } } else { // doesn't receive the ACK of response packet from request side after maximum retries. + + // if the response is for CLEAR command, remove all the cells and reset seqnum regardless NO ack received. + if ( msg->l2_sixtop_command == IANA_6TOP_CMD_CLEAR){ + schedule_removeAllManagedUnicastCellsToNeighbor( + msg->l2_sixtop_frameID, + &(msg->l2_nextORpreviousHop) + ); + neighbors_resetSequenceNumber(&(msg->l2_nextORpreviousHop)); + } } } // free the buffer
sse: add shuffle implementation of simde_mm_storer_ps
@@ -3075,11 +3075,16 @@ simde_mm_storer_ps (simde_float32 mem_addr[4], simde__m128 a) { #else simde__m128_private a_ = simde__m128_to_private(a); + #if defined(SIMDE__SHUFFLE_VECTOR) + a_.f32 = SIMDE__SHUFFLE_VECTOR(32, 16, a_.f32, a_.f32, 3, 2, 1, 0); + simde_mm_store_ps(mem_addr, simde__m128_from_private(a_)); + #else SIMDE__VECTORIZE_ALIGNED(mem_addr:16) for (size_t i = 0 ; i < sizeof(a_.f32) / sizeof(a_.f32[0]) ; i++) { mem_addr[i] = a_.f32[((sizeof(a_.f32) / sizeof(a_.f32[0])) - 1) - i]; } #endif +#endif } #if defined(SIMDE_SSE_ENABLE_NATIVE_ALIASES) # define _mm_storer_ps(mem_addr, a) simde_mm_storer_ps(mem_addr, (a))
doc: Add explanation for incr/decr keyset cursors
@@ -1546,6 +1546,26 @@ int f (KeySet *ks) * ksRewind(). When you set an invalid cursor ksCurrent() * is 0 and ksNext() == ksHead(). * + * @section cursor_directly Using Cursor directly + * + * You can also use the cursor directly + * by initializing it to some index in the Keyset + * and then incrementing or decrementing it, to + * iterate over the keyset. + * + * @code +void iterate(KeySet *ks) +{ + cursor_t cursor = 0; + Key * cursor_key; + + while((cursor_key = ksAtCursor(ks, cursor)) != 0) { + printf("%s\n", keyString(cursor_key)); + cursor++; + } +} + * @endcode + * * @note Only use a cursor for the same keyset which it was * made for. *
runtimes/charliecloud: OBS doesn't recognize file requires
@@ -32,7 +32,12 @@ URL: https://hpc.github.io/%{pname}/ Source0: https://github.com/hpc/charliecloud/releases/download/v%{version}/charliecloud-%{version}.tar.gz BuildRequires: gcc -BuildRequires: /usr/bin/python3 +%if 0%{?centos_version} || 0%{?rhel_version} +BuildRequires: python34 +%endif +%if 0%{?sles_version} || 0%{?suse_version} +BuildRequires: python3 +%endif %package test Summary: Charliecloud examples and test suite @@ -40,7 +45,12 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Requires: bats Requires: bash Requires: wget -Requires: /usr/bin/python3 +%if 0%{?centos_version} || 0%{?rhel_version} +Requires: python34 +%endif +%if 0%{?sles_version} || 0%{?suse_version} +BuildRequires: python3 +%endif # Default library install path %define install_path %{OHPC_LIBS}/%{pname}/%version
fix: a bug of using token.start as the address
@@ -2290,13 +2290,13 @@ json_vextract (char * json, size_t size, char * extractor, va_list ap) case JSMN_OBJECT: if (!cv.is_object) ERR("Cannot apply '%s' to json array:'%.*s'\n", - extractor, tokens[0].size, tokens[0].start); + extractor, tokens[0].size, json + tokens[0].start); ret = extract_object_value(&cv, 0, &info); break; case JSMN_ARRAY: if (cv.is_object) - ERR("Cannot apply '%s' to json array:'%.*s'\n", - extractor, tokens[0].size, tokens[0].start); + ERR("Cannot apply '%s' to json object:'%.*s'\n", + extractor, tokens[0].size, json + tokens[0].start); ret = extract_array_value(&cv, 0, &info); break; default:
Add libbcc-loader-static.a symbols into libbcc.a It's useful to have all the bcc symbols in one place when statically linking against bcc. This patch adds all the symbols from libbcc-loader-static into libbcc. This is in line with how libbcc-lua-static does it as well.
@@ -68,7 +68,7 @@ endif() add_library(bcc-loader-static STATIC ${bcc_sym_sources} ${bcc_util_sources}) target_link_libraries(bcc-loader-static elf) add_library(bcc-static STATIC - ${bcc_common_sources} ${bcc_table_sources} ${bcc_util_sources} ${bcc_usdt_sources}) + ${bcc_common_sources} ${bcc_table_sources} ${bcc_util_sources} ${bcc_usdt_sources} ${bcc_sym_sources} ${bcc_util_sources}) set_target_properties(bcc-static PROPERTIES OUTPUT_NAME bcc) set(bcc-lua-static ${bcc_common_sources} ${bcc_table_sources} ${bcc_sym_sources} ${bcc_util_sources})
README: add link to LZSSE-SIMDe
@@ -7,13 +7,16 @@ The initial focus is on writing complete portable implementations. Once that's complete we will start focusing on optimizations, such as implementing one set of functions with another. -Currently, there are full implementations of the following instruction +For an example of a project using SIMDe, see +[LZSSE-SIMDe](https://github.com/nemequ/LZSSE-SIMDe) + +There are currently full implementations of the following instruction sets: * MMX -For information on which instruction sets we intend to support, as -well as detailed progress information, see the +Work is underway to support various versions of SSE. For detailed +progress information, see the [instruction-set-support](https://github.com/nemequ/simde/issues?q=is%3Aissue+is%3Aopen+label%3Ainstruction-set-support+sort%3Aupdated-desc) label in the issue tracker. If you'd like to be notified when an instruction set is available you may subscribe to the relevant issue.
usrsock: Initialize g_usrsockdev in the declaration
/**************************************************************************** - * net/usrsock/usrsock_dev.c + * drivers/usrsock/usrsock_dev.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -109,7 +109,10 @@ static const struct file_operations g_usrsockdevops = #endif }; -static struct usrsockdev_s g_usrsockdev; +static struct usrsockdev_s g_usrsockdev = +{ + NXSEM_INITIALIZER(1, PRIOINHERIT_FLAGS_DISABLE) +}; /**************************************************************************** * Private Functions @@ -585,11 +588,6 @@ int usrsock_request(FAR struct iovec *iov, unsigned int iovcnt) void usrsock_register(void) { - /* Initialize device private structure. */ - - g_usrsockdev.ocount = 0; - nxsem_init(&g_usrsockdev.devsem, 0, 1); - register_driver("/dev/usrsock", &g_usrsockdevops, 0666, &g_usrsockdev); }
inform user if maximum number of errors is reached
@@ -2455,7 +2455,7 @@ while(1) } if(errorcount >= maxerrorcount) { - fprintf(stderr, "\nmaximal error count reached\n"); + fprintf(stderr, "\nmaximum number of errors is reached\n"); globalclose(); } continue;
fix tsch_schedule_remove_link_by_timeslot function to remove all links at a given timeslot and channel offset
* \author * Simon Duquennoy <[email protected]> * Beshr Al Nahas <[email protected]> + * Atis Elsts <[email protected]> */ /** @@ -337,8 +338,23 @@ int tsch_schedule_remove_link_by_timeslot(struct tsch_slotframe *slotframe, uint16_t timeslot, uint16_t channel_offset) { - return tsch_schedule_remove_link(slotframe, - tsch_schedule_get_link_by_timeslot(slotframe, timeslot, channel_offset)); + int ret = 0; + if(!tsch_is_locked()) { + if(slotframe != NULL) { + struct tsch_link *l = list_head(slotframe->links_list); + /* Loop over all items and remove all matching links */ + while(l != NULL) { + struct tsch_link *next = list_item_next(l); + if(l->timeslot == timeslot && l->channel_offset == channel_offset) { + if(tsch_schedule_remove_link(slotframe, l)) { + ret = 1; + } + } + l = next; + } + } + } + return ret; } /*---------------------------------------------------------------------------*/ /* Looks within a slotframe for a link with a given timeslot */ @@ -349,7 +365,7 @@ tsch_schedule_get_link_by_timeslot(struct tsch_slotframe *slotframe, if(!tsch_is_locked()) { if(slotframe != NULL) { struct tsch_link *l = list_head(slotframe->links_list); - /* Loop over all items. Assume there is max one link per timeslot */ + /* Loop over all items. Assume there is max one link per timeslot and channel_offset */ while(l != NULL) { if(l->timeslot == timeslot && l->channel_offset == channel_offset) { return l;
Adds deploy section to travis
@@ -60,6 +60,14 @@ script: after_success: - coveralls +deploy: + provider: pypi + user: desc-ccl + password: ... + on: + tags: true + branch: master + # Check why the note creation process crashes # - make -C doc/0000-ccl_note #after_success:
documented extrapolation better
@@ -41,9 +41,13 @@ class Pk2D(object): For reference, CCL will use bicubic interpolation to evaluate the power spectrum at any intermediate point in k and a. interp_order_lok (int): extrapolation order to be used on k-values - below the minimum of the splines (use 0, 1 or 2). + below the minimum of the splines (use 0, 1 or 2). Note that + the extrapolation will be done in either log(P(k)) or P(k), + depending on the value of `is_logp`. interp_order_hik (int): extrapolation order to be used on k-values - above the maximum of the splines (use 0, 1 or 2). + above the maximum of the splines (use 0, 1 or 2). Note that + the extrapolation will be done in either log(P(k)) or P(k), + depending on the value of `is_logp`. is_logp (boolean): if True, pkfunc/pkarr return/hold the natural logarithm of the power spectrum. Otherwise, the true value of the power spectrum is expected.
Fix typos in thread-pool.h
/// @page /// -/// This extension let the plugin use the host's thread pool. +/// This extension lets the plugin use the host's thread pool. /// /// The plugin must provide @ref clap_plugin_thread_pool, and the host may provide @ref -/// clap_host_thread_pool. If it doesn't, the plugin should process its data by its own mean. In the +/// clap_host_thread_pool. If it doesn't, the plugin should process its data by its own means. In the /// worst case, a single threaded for-loop. /// /// Simple example with N voices to process
iokernel: sched bug fix Perform the scheduler slow pass before the fast pass, otherwise the list of idle cores is likely out-of-date.
@@ -381,6 +381,26 @@ void sched_poll(void) int i, core, idle_cnt = 0; struct proc *p; + /* + * slow pass --- runs every IOKERNEL_POLL_INTERVAL + */ + + now = microtime(); + if (now - last_time >= IOKERNEL_POLL_INTERVAL) { + int i; + + last_time = now; + for (i = 0; i < dp.nr_clients; i++) + sched_detect_congestion(dp.clients[i]); + } else { + /* check if any idle directpath runtimes have received I/Os */ + for (i = 0; i < dp.nr_clients; i++) { + p = dp.clients[i]; + if (p->has_directpath && sched_threads_active(p) == 0) + sched_detect_io_for_idle_runtime(p); + } + } + /* * fast pass --- runs every poll loop */ @@ -423,26 +443,6 @@ void sched_poll(void) } } - /* - * slow pass --- runs every IOKERNEL_POLL_INTERVAL - */ - - now = microtime(); - if (now - last_time >= IOKERNEL_POLL_INTERVAL) { - int i; - - last_time = now; - for (i = 0; i < dp.nr_clients; i++) - sched_detect_congestion(dp.clients[i]); - } else { - /* check if any idle directpath runtimes have received I/Os */ - for (i = 0; i < dp.nr_clients; i++) { - p = dp.clients[i]; - if (p->has_directpath && sched_threads_active(p) == 0) - sched_detect_io_for_idle_runtime(p); - } - } - /* * final pass --- let the scheduler policy decide how to respond */
YAML Smith: Remove `getstorage` placement
- infos/needs = - infos/provides = conv - infos/recommends = -- infos/placements = getstorage setstorage +- infos/placements = setstorage - infos/status = maintained specific unittest nodep preview experimental unfinished nodoc concept discouraged - infos/metadata = - infos/description = This plugin exports key sets in the YAML format
update comment for aligned_alloc
@@ -187,13 +187,11 @@ void* memalign(size_t alignment, size_t size) { return mi_memali int posix_memalign(void** p, size_t alignment, size_t size) { return mi_posix_memalign(p, alignment, size); } void* _aligned_malloc(size_t alignment, size_t size) { return mi_aligned_alloc(alignment, size); } -// aligned_alloc is available when __USE_ISOC11 is defined. -// if aligned_alloc is not available, we will use `memalign`, `posix_memalign`, or `_aligned_malloc` -// and avoid overriding it ourselves. -// -// For example, Conda has a custom glibc where `aligned_alloc` is declared `static inline`. -// Both _ISOC11_SOURCE and __USE_ISOC11 are undefined in Conda GCC7 or GCC9. -// When compiling C codes, _ISOC11_SOURCE is undefined but __USE_ISOC11 is 1. +// `aligned_alloc` is only available when __USE_ISOC11 is defined. +// Note: Conda has a custom glibc where `aligned_alloc` is declared `static inline` and we cannot +// override it, but both _ISOC11_SOURCE and __USE_ISOC11 are undefined in Conda GCC7 or GCC9. +// Fortunately, in the case where `aligned_alloc` is declared as `static inline` it +// uses internally `memalign`, `posix_memalign`, or `_aligned_malloc` so we can avoid overriding it ourselves. #if __USE_ISOC11 void* aligned_alloc(size_t alignment, size_t size) { return mi_aligned_alloc(alignment, size); } #endif
Don't show unset geolocation.
@@ -315,14 +315,13 @@ _papplClientHTMLInfo( } else { - papplClientHTMLPrintf(client, "%s<br>\n", location ? location : "Not set"); + papplClientHTMLPrintf(client, "%s", location ? location : "Not set"); if (geo_location) - papplClientHTMLPrintf(client, "%g&deg;&nbsp;%c&nbsp;latitude x %g&deg;&nbsp;%c&nbsp;longitude", fabs(lat), lat < 0.0 ? 'S' : 'N', fabs(lon), lon < 0.0 ? 'W' : 'E'); - else - papplClientHTMLPuts(client, "Not set"); + papplClientHTMLPrintf(client, "<br>\n%g&deg;&nbsp;%c&nbsp;latitude x %g&deg;&nbsp;%c&nbsp;longitude", fabs(lat), lat < 0.0 ? 'S' : 'N', fabs(lon), lon < 0.0 ? 'W' : 'E'); } // Show an embedded map of the location... + if (geo_location || is_form) papplClientHTMLPrintf(client, "<br>\n" "<iframe id=\"map\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"https://www.openstreetmap.org/export/embed.html?bbox=%g,%g,%g,%g&amp;layer=mapnik&amp;marker=%g,%g\"></iframe>", lon - 0.00025, lat - 0.00025, lon + 0.00025, lat + 0.00025, lat, lon); @@ -370,6 +369,8 @@ _papplClientHTMLInfo( { papplClientHTMLPrintf(client, "<a href=\"tel:%s\">%s</a>", contact->telephone, contact->telephone); } + else + papplClientHTMLPuts(client, "Not set"); papplClientHTMLPuts(client, "</td></tr>\n"
Update matrix.c more cleanup, no math.h needed
@@ -14,9 +14,11 @@ isn't there (don't ask me why) changed matrix_free to return void * instead of nothing (for consistency's sake) - Derek Kwan 2016 + +- porres made minor revisions to the code in 2021 (removed unnecessary +dependencies, changed identation */ -#include <math.h> #include "m_pd.h" #include <common/api.h> #include "common/magicbit.h"
Fix script references in overrides
@@ -219,7 +219,7 @@ void FunctionOverride::HandleOverridenFunction(RED4ext::IScriptable* apContext, auto* pType = pArg->type; auto* pAllocator = pType->GetAllocator(); - auto* pInstance = pAllocator->Alloc(pType->GetSize()).memory; + auto* pInstance = pAllocator->AllocAligned(pType->GetSize(), pType->GetAlignment()).memory; pType->Init(pInstance); bool isScriptRef = pArg->type->GetType() == RED4ext::ERTTIType::ScriptReference; @@ -227,13 +227,12 @@ void FunctionOverride::HandleOverridenFunction(RED4ext::IScriptable* apContext, // Exception here we need to allocate the inner object as well if (isScriptRef) { - RED4ext::ScriptRef<void>* pScriptRef = (RED4ext::ScriptRef<void>*)pInstance; - auto pInnerType = pScriptRef->innerType; - - auto pInnerInstance = pInnerType->GetAllocator()->Alloc(pInnerType->GetSize()).memory; - pInnerType->Init(pInnerInstance); - - pScriptRef->ref = pInnerInstance; + auto* pInnerType = ((RED4ext::CRTTIScriptReferenceType*)pType)->innerType; + auto* pScriptRef = (RED4ext::ScriptRef<void>*)pInstance; + pScriptRef->innerType = pInnerType; + pScriptRef->hash = pInnerType->GetName(); + pScriptRef->ref = pInnerType->GetAllocator()->AllocAligned(pInnerType->GetSize(), pInnerType->GetAlignment()).memory; + pInnerType->Init(pScriptRef->ref); } RED4ext::CStackType arg; @@ -260,9 +259,10 @@ void FunctionOverride::HandleOverridenFunction(RED4ext::IScriptable* apContext, // Release inner values if (isScriptRef) { - RED4ext::ScriptRef<void>* pScriptRef = (RED4ext::ScriptRef<void>*)pInstance; + auto* pScriptRef = (RED4ext::ScriptRef<void>*)pInstance; pScriptRef->innerType->Destroy(pScriptRef->ref); pScriptRef->innerType->GetAllocator()->Free(pScriptRef->ref); + pScriptRef->ref = nullptr; } if (!pArg->flags.isOut || apFrame->unk30)
phys map: Add tests for holes in MMIO region and order This adds a couple of tests to ensure that there are no holes in the map for MMIO mappings and the map is sorted by start address.
@@ -89,13 +89,14 @@ static void check_map_call(void) struct proc_chip c; uint64_t start, size, end; const struct phys_map_entry *e; - struct map_call_entry *tbl, *t; + struct map_call_entry *tbl, *t, *tnext; int tbl_size = 0; bool passed; for (e = phys_map->table; !phys_map_entry_null(e); e++) tbl_size++; + tbl_size++; /* allow for null entry at end */ tbl_size *= sizeof(struct map_call_entry); tbl = malloc(tbl_size); assert(tbl != NULL); @@ -143,6 +144,31 @@ static void check_map_call(void) t->end = end; } + for (t = tbl; !map_call_entry_null(t + 1); t++) { + tnext = t + 1; + /* Make sure the table is sorted */ + if (t->start > tnext->start) { + printf("Phys map test FAILED: Entry not sorted\n"); + printf("First: addr:%016lx size:%016lx\n", + t->start, t->end - t->start); + printf("Second: addr:%016lx size:%016lx\n", + tnext->start, tnext->end - tnext->start); + assert(0); + } + + /* Look for holes in the table in MMIO region */ + /* We assume over 1PB is MMIO. */ + if ((t->end != tnext->start) && + (t->start > 0x0004000000000000)) { + printf("Phys map test FAILED: Hole in map\n"); + printf("First: addr:%016lx size:%016lx\n", + t->start, t->end - t->start); + printf("Second: addr:%016lx size:%016lx\n", + tnext->start, tnext->end - tnext->start); + assert(0); + } + } + free(tbl); }
flapjack: add i2c_ports entry for I2C_PORT_ALS BRANCH=master TEST=none Tested-by: Nick Vaccaro
@@ -238,6 +238,7 @@ BUILD_ASSERT(ARRAY_SIZE(adc_channels) == ADC_CH_COUNT); const struct i2c_port_t i2c_ports[] = { {"charger", I2C_PORT_CHARGER, 400, GPIO_I2C1_SCL, GPIO_I2C1_SDA}, {"tcpc0", I2C_PORT_TCPC0, 400, GPIO_I2C1_SCL, GPIO_I2C1_SDA}, + {"als", I2C_PORT_ALS, 400, GPIO_I2C1_SCL, GPIO_I2C1_SDA}, {"battery", I2C_PORT_BATTERY, 400, GPIO_I2C2_SCL, GPIO_I2C2_SDA}, {"accelgyro", I2C_PORT_ACCEL, 400, GPIO_I2C2_SCL, GPIO_I2C2_SDA}, {"eeprom", I2C_PORT_EEPROM, 400, GPIO_I2C2_SCL, GPIO_I2C2_SDA},
Resolves Removed the visual artifacts of the Expressions window that were present on first draw.
@@ -925,6 +925,10 @@ QvisExpressionsWindow::UpdateWindowSingleItem() // Cyrus Harrison, Wed Jun 11 13:49:19 PDT 2008 // Initial Qt4 Port. // +// Kevin Griffin, Tue Nov 12 14:30:34 PST 2019 +// Added a call to update() to remove the visual artificats present during +// the first draw of the expressions window. +// // **************************************************************************** void @@ -950,6 +954,8 @@ QvisExpressionsWindow::UpdateWindowSensitivity() stdEditorWidget->setEnabled(enable && stdExprActive); pyEditorWidget->setEnabled(enable && pyExprActive); + + this->update(); } // ****************************************************************************
fixed weak candidate len
@@ -199,7 +199,7 @@ OPTIONCODE_MACMYSTA 0xf29e (6 byte) OPTIONCODE_SNONCE 0xf29f (32 byte) -OPTIONCODE_WEAKCANDIDATE 0xf2a0 (32 byte) +OPTIONCODE_WEAKCANDIDATE 0xf2a0 (64 byte) == 63 characters + zero OPTIONCODE_GPS 0xf2a1 (max 128 byte)
Add png_fuzzer "smoke alarm test"
@@ -66,6 +66,12 @@ It should print "PASS", amongst other information, and exit(0). const char* // fuzz(wuffs_base__io_buffer* src, uint64_t hash) { + // This "smoke alarm test" should trigger the OSS-Fuzz infrastructure to send + // e-mail saying that it found a reproducible crash. + if ((hash & 0xFFFF) == 0xDEAD) { + return "internal error: smoke alarm test"; + } + wuffs_png__decoder dec; wuffs_base__status status = wuffs_png__decoder__initialize( &dec, sizeof dec, WUFFS_VERSION,
YAML CPP: Fix memory leak
@@ -46,7 +46,7 @@ static void test_contract (void) CLOSE_PLUGIN (); } -static void test_read (char const * const filepath, KeySet const * const expected) +static void test_read (char const * const filepath, KeySet * const expected) #ifdef __llvm__ __attribute__ ((annotate ("oclint:suppress"))) #endif @@ -57,6 +57,7 @@ static void test_read (char const * const filepath, KeySet const * const expecte compare_keyset (keySet, expected); + ksDel (expected); CLOSE_PLUGIN (); }
common/peci.c: Format with clang-format BRANCH=none TEST=none
@@ -143,8 +143,7 @@ static int peci_cmd(int argc, char **argv) ccprintf("PECI read data: %ph\n", HEX_BUF(r_buf, peci.r_len)); return EC_SUCCESS; } -DECLARE_CONSOLE_COMMAND(peci, peci_cmd, - "addr wlen rlen cmd timeout(us)", +DECLARE_CONSOLE_COMMAND(peci, peci_cmd, "addr wlen rlen cmd timeout(us)", "PECI command"); static int command_peci_temp(int argc, char **argv) @@ -159,7 +158,6 @@ static int command_peci_temp(int argc, char **argv) ccprintf("CPU temp: %d K, %d C\n", t, K_TO_C(t)); return EC_SUCCESS; } -DECLARE_CONSOLE_COMMAND(pecitemp, command_peci_temp, - NULL, +DECLARE_CONSOLE_COMMAND(pecitemp, command_peci_temp, NULL, "Print CPU temperature"); #endif /* CONFIG_CMD_PECI */
Fix the buffer sizing in the fatalerrtest
@@ -59,7 +59,7 @@ static int test_fatalerr(void) goto err; /* SSL_read()/SSL_write should fail because of a previous fatal error */ - if (!TEST_int_le(len = SSL_read(sssl, buf, sizeof(buf - 1)), 0)) { + if (!TEST_int_le(len = SSL_read(sssl, buf, sizeof(buf) - 1), 0)) { buf[len] = '\0'; TEST_error("Unexpected success reading data: %s\n", buf); goto err;
* Facil repo relocation
@@ -7,7 +7,7 @@ set(FACIL_LIBRARY_DIR "${FACIL_BINARY_DIR}") ExternalProject_Add( extern_facil - GIT_REPOSITORY https://github.com/boazsegev/facil.io.git + GIT_REPOSITORY https://github.com/Softmotions/facil.io.git GIT_TAG 0.7.0.beta8 # Remove in-source makefile to avoid clashing PATCH_COMMAND rm -f ./makefile
.github/workflows/travis-ci.yml: unix-coverage: Install setuptools first.
@@ -202,9 +202,9 @@ jobs: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 80 sudo update-alternatives --config gcc sudo apt-get install python3-pip - sudo pip install cpp-coveralls sudo pip3 install setuptools sudo pip3 install pyelftools + sudo pip3 install cpp-coveralls gcc --version python3 --version # script
Never exit the fuzzer until h2o ended up closing the fd internally.
@@ -126,7 +126,6 @@ struct writer_thread_arg { char *buf; size_t len; int fd; - int ofd; pthread_barrier_t barrier; }; @@ -227,7 +226,6 @@ void *writer_thread(void *arg) } } close(wta->fd); - close(wta->ofd); pthread_barrier_wait(&wta->barrier); free(wta); } @@ -247,7 +245,6 @@ static int feeder(int sfd, char *buf, size_t len, pthread_barrier_t **barrier) wta = (struct writer_thread_arg *)malloc(sizeof(*wta)); wta->fd = pair[0]; - wta->ofd = pair[1]; wta->buf = buf; wta->len = len; pthread_barrier_init(&wta->barrier, NULL, 2); @@ -344,8 +341,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) } /* Loop until the connection is closed by the client or server */ - while (is_valid_fd(c) && h2o_evloop_run(ctx.loop, 10)) - ; + while (is_valid_fd(c)) { + h2o_evloop_run(ctx.loop, 10); + } pthread_barrier_wait(end); pthread_barrier_destroy(end);
Shell Recorder: Remove unnecessary CMake code
@@ -22,7 +22,6 @@ endfunction (add_shell_recorder_test FILENAME) if (ENABLE_KDB_TESTING) - set (USE_CMAKE_KDB_COMMAND "") # set kdb command if (BUILD_SHARED) list (FIND REMOVED_PLUGINS list list_index) if (list_index EQUAL -1) @@ -30,10 +29,7 @@ if (ENABLE_KDB_TESTING) endif (list_index EQUAL -1) endif () - string (LENGTH "${USE_CMAKE_KDB_COMMAND}" LENGTH_KDB_COMMAND) - if (LENGTH_KDB_COMMAND EQUAL 0) set (INCLUDE_COMMON "${INCLUDE_COMMON_FILE}export KDB=\"${KDB_COMMAND_BASENAME}\" PATH=\"${CMAKE_BINARY_DIR}/bin:$PATH\"") - endif (LENGTH_KDB_COMMAND EQUAL 0) configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/shell_recorder.sh" "${CMAKE_CURRENT_BINARY_DIR}/shell_recorder.sh" @ONLY) configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/tutorial_wrapper/markdown_shell_recorder.sh"
Add PhFormatUInt64Prefix
@@ -2019,6 +2019,44 @@ PPH_STRING PhFormatUInt64( return PhFormat(&format, 1, 0); } +// Formats using prefix (1000=1k, 1000000=1M, 1000000000000=1B) (dmex) +PPH_STRING PhFormatUInt64Prefix( + _In_ ULONG64 Value, + _In_ BOOLEAN GroupDigits + ) +{ + static PH_STRINGREF PhpPrefixUnitNamesCounted[7] = + { + PH_STRINGREF_INIT(L""), + PH_STRINGREF_INIT(L"k"), + PH_STRINGREF_INIT(L"M"), + PH_STRINGREF_INIT(L"B"), + PH_STRINGREF_INIT(L"T"), + PH_STRINGREF_INIT(L"P"), + PH_STRINGREF_INIT(L"E") + }; + DOUBLE number = (DOUBLE)Value; + ULONG i = 0; + PH_FORMAT format[2]; + + while ( + number >= 1000 && + i < RTL_NUMBER_OF(PhpPrefixUnitNamesCounted) && + i < PhMaxSizeUnit + ) + { + number /= 1000; + i++; + } + + format[0].Type = DoubleFormatType | FormatUsePrecision | FormatCropZeros | (GroupDigits ? FormatGroupDigits : 0); + format[0].Precision = 2; + format[0].u.Double = number; + PhInitFormatSR(&format[1], PhpPrefixUnitNamesCounted[i]); + + return PhFormat(format, 2, 0); +} + PPH_STRING PhFormatDecimal( _In_ PWSTR Value, _In_ ULONG FractionalDigits,
OSSL_CMP_SRV_process_request(): Log any error queue entries on response
@@ -588,6 +588,7 @@ OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx, OSSL_CMP_PKISI_free(si); } } + OSSL_CMP_CTX_print_errors(ctx); ctx->secretValue = backup_secret; /* possibly close the transaction */
Added missing switch case for new RGB888 pen type
@@ -238,6 +238,7 @@ mp_obj_t _JPEG_decode(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args switch(self->graphics->graphics->pen_type) { case PicoGraphics::PEN_RGB332: case PicoGraphics::PEN_RGB565: + case PicoGraphics::PEN_RGB888: case PicoGraphics::PEN_P8: case PicoGraphics::PEN_P4: case PicoGraphics::PEN_3BIT:
better text.
@@ -129,7 +129,7 @@ static void usage(void) printf(" %s", *m); printf("\n"); #ifdef USE_DNSCRYPT - printf("DNSCrypt enabled\n"); + printf("DNSCrypt feature available\n"); #endif printf("BSD licensed, see LICENSE in source package for details.\n"); printf("Report bugs to %s\n", PACKAGE_BUGREPORT);
Redis 4.0.6.
@@ -10,6 +10,59 @@ HIGH: There is a critical bug that may affect a subset of users. Upgrade! CRITICAL: There is a critical bug affecting MOST USERS. Upgrade ASAP. -------------------------------------------------------------------------------- +================================================================================ +Redis 4.0.6 Released Thu Dec 4 17:54:10 CET 2017 +================================================================================ + +Upgrade urgency CRITICAL: More errors in the fixes for PSYNC2 in Redis 4.0.5 + were identified. + +This release fixes yet more errors present in the 4.0.5 fixes, that could +affect slaves. Moreover another critical issue in quicklists, when they are +used at a massive memory scale, was fixed in this release. Upgrading from +any 4.0.x release, especially if you are running 4.0.4 or 4.0.5, is highly +recommended. + +Note that while this fix for 4.0.6 was written in an hurry as well, this +time we took extra precautions in order to avoid writing a broken patch: + +1. The code was reviewed by two developers independently. +2. A regression test about the problem introduced in 4.0.4/5 was added. +3. Resisting to duplicated Lua scripts loading into the Lua engine is now + the default action of the loading function, thus it's simpler to stress + its behavior. +4. The code section was tested with Valgrind. + +The following is the list of commits included in this release: + +zhaozhao.zz in commit 57786b14: + quicklist: change the len of quicklist to unsigned long + 2 files changed, 4 insertions(+), 4 deletions(-) + +zhaozhao.zz in commit 2211540d: + quicklist: fix the return value of quicklistCount + 2 files changed, 2 insertions(+), 2 deletions(-) + +antirez in commit c85c84be: + Refactoring: improve luaCreateFunction() API. + 3 files changed, 38 insertions(+), 58 deletions(-) + +antirez in commit 85b24770: + Remove useless variable check from luaCreateFunction(). + 1 file changed, 1 insertion(+), 1 deletion(-) + +antirez in commit a945e5c0: + Fix issue #4505, Lua RDB AUX field loading of existing scripts. + 1 file changed, 9 insertions(+), 3 deletions(-) + +antirez in commit 65a2e40a: + Regression test for #4505 (Lua AUX field loading). + 1 file changed, 22 insertions(+), 1 deletion(-) + +antirez in commit d6c70f22: + DEBUG change-repl-id implemented. + 1 file changed, 7 insertions(+) + ================================================================================ Redis 4.0.5 Released Thu Dec 1 16:03:32 CET 2017 ================================================================================
shelter: --mutual becomes boolean Fixes:
@@ -44,7 +44,7 @@ EXAMPLE: Name: "crypto", Usage: "set the type of crypto wrapper", }, - cli.StringFlag{ + cli.BoolFlag{ Name: "mutual", Usage: "set the attestation type is mutual or not", }, @@ -58,7 +58,9 @@ EXAMPLE: tls := cliContext.String("tls") crypto := cliContext.String("crypto") var mutual bool = false - mutual = (bool)(cliContext.Bool("mutual")) + if cliContext.Bool("mutual") { + mutual = true + } var ret error = nil var tcpIp string = "" var tcpPort string = ""