message
stringlengths
6
474
diff
stringlengths
8
5.22k
Corrected minor typos in README.md for the display libs
@@ -51,13 +51,14 @@ int main() { // draw a box to put some text in pico_display.set_pen(10, 20, 30); - rect text_rect(10, 10, 150, 150); + Rect text_rect(10, 10, 150, 150); pico_display.rectangle(text_rect); // write some text inside the box with 10 pixels of margin // automatically word wrapping text_rect.deflate(10); - pico_display.text("This is a message", point(text_rect.x, text_rect.y), text_rect.w); + pico_display.set_pen(110, 120, 130); + pico_display.text("This is a message", Point(text_rect.x, text_rect.y), text_rect.w); // now we've done our drawing let's update the screen pico_display.update();
Improve startup time when show_touches is enabled Enabling "show touches" involves the execution of an adb command, which takes some time. In order to parallelize, execute the command as soon as possible, but reap the process only once everything is initialized.
@@ -106,13 +106,17 @@ static void event_loop(void) { } } -static SDL_bool set_show_touches_enabled(const char *serial, SDL_bool enabled) { +static process_t set_show_touches_enabled(const char *serial, SDL_bool enabled) { const char *value = enabled ? "1" : "0"; const char *const adb_cmd[] = { "shell", "settings", "put", "system", "show_touches", value }; - process_t proc = adb_execute(serial, adb_cmd, ARRAY_LEN(adb_cmd)); - return process_check_success(proc, "show_touches"); + return adb_execute(serial, adb_cmd, ARRAY_LEN(adb_cmd)); +} + +static void wait_show_touches(process_t process) { + // reap the process, ignore the result + process_check_success(process, "show_touches"); } SDL_bool scrcpy(const struct scrcpy_options *options) { @@ -121,6 +125,14 @@ SDL_bool scrcpy(const struct scrcpy_options *options) { return SDL_FALSE; } + process_t proc_show_touches; + SDL_bool show_touches_waited; + if (options->show_touches) { + LOGI("Enable show_touches"); + proc_show_touches = set_show_touches_enabled(options->serial, SDL_TRUE); + show_touches_waited = SDL_FALSE; + } + SDL_bool ret = SDL_TRUE; if (!SDL_SetHint(SDL_HINT_NO_SIGNAL_HANDLERS, "1")) { @@ -183,8 +195,8 @@ SDL_bool scrcpy(const struct scrcpy_options *options) { } if (options->show_touches) { - LOGI("Enable show_touches"); - set_show_touches_enabled(options->serial, SDL_TRUE); + wait_show_touches(proc_show_touches); + show_touches_waited = SDL_TRUE; } event_loop(); @@ -192,10 +204,6 @@ SDL_bool scrcpy(const struct scrcpy_options *options) { screen_destroy(&screen); - if (options->show_touches) { - LOGI("Disable show_touches"); - set_show_touches_enabled(options->serial, SDL_FALSE); - } finally_stop_and_join_controller: controller_stop(&controller); controller_join(&controller); @@ -209,6 +217,16 @@ finally_stop_decoder: finally_destroy_frames: frames_destroy(&frames); finally_destroy_server: + if (options->show_touches) { + if (!show_touches_waited) { + // wait the process which enabled "show touches" + wait_show_touches(proc_show_touches); + } + LOGI("Disable show_touches"); + proc_show_touches = set_show_touches_enabled(options->serial, SDL_FALSE); + wait_show_touches(proc_show_touches); + } + server_destroy(&server); return ret;
pybricks.common.IMU: gyro becomes angular_velocity This method measures angular velocity; it does not measure gyro.
@@ -92,7 +92,7 @@ STATIC mp_obj_t common_IMU_acceleration(size_t n_args, const mp_obj_t *pos_args, STATIC MP_DEFINE_CONST_FUN_OBJ_KW(common_IMU_acceleration_obj, 1, common_IMU_acceleration); // pybricks._common.IMU.gyro -STATIC mp_obj_t common_IMU_gyro(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +STATIC mp_obj_t common_IMU_angular_velocity(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { PB_PARSE_ARGS_METHOD(n_args, pos_args, kw_args, common_IMU_obj_t, self, PB_ARG_DEFAULT_NONE(axis)); @@ -103,12 +103,12 @@ STATIC mp_obj_t common_IMU_gyro(size_t n_args, const mp_obj_t *pos_args, mp_map_ return common_IMU_project_3d_axis(axis_in, values); } -STATIC MP_DEFINE_CONST_FUN_OBJ_KW(common_IMU_gyro_obj, 1, common_IMU_gyro); +STATIC MP_DEFINE_CONST_FUN_OBJ_KW(common_IMU_angular_velocity_obj, 1, common_IMU_angular_velocity); // dir(pybricks.common.IMU) STATIC const mp_rom_map_elem_t common_IMU_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_acceleration), MP_ROM_PTR(&common_IMU_acceleration_obj) }, - { MP_ROM_QSTR(MP_QSTR_gyro), MP_ROM_PTR(&common_IMU_gyro_obj) }, + { MP_ROM_QSTR(MP_QSTR_angular_velocity), MP_ROM_PTR(&common_IMU_angular_velocity_obj)}, }; STATIC MP_DEFINE_CONST_DICT(common_IMU_locals_dict, common_IMU_locals_dict_table);
Removes truncated HMAC code from ssl_context_info program Commit removes conditional compilation block which depends on MBEDTLS_SSL_TRUNCATED_HMAC config option.
@@ -868,7 +868,6 @@ void print_deserialized_ssl_context( const uint8_t *ssl, size_t len ) print_if_bit( "MBEDTLS_HAVE_TIME", SESSION_CONFIG_TIME_BIT, session_cfg_flag ); print_if_bit( "MBEDTLS_X509_CRT_PARSE_C", SESSION_CONFIG_CRT_BIT, session_cfg_flag ); print_if_bit( "MBEDTLS_SSL_MAX_FRAGMENT_LENGTH", SESSION_CONFIG_MFL_BIT, session_cfg_flag ); - print_if_bit( "MBEDTLS_SSL_TRUNCATED_HMAC", SESSION_CONFIG_TRUNC_HMAC_BIT, session_cfg_flag ); print_if_bit( "MBEDTLS_SSL_ENCRYPT_THEN_MAC", SESSION_CONFIG_ETM_BIT, session_cfg_flag ); print_if_bit( "MBEDTLS_SSL_SESSION_TICKETS", SESSION_CONFIG_TICKET_BIT, session_cfg_flag ); print_if_bit( "MBEDTLS_SSL_SESSION_TICKETS and client", SESSION_CONFIG_CLIENT_TICKET_BIT, session_cfg_flag );
DOC: Fix check of EVP_PKEY_fromdata{,_init} in examples
@@ -110,8 +110,8 @@ TODO Write a set of cookbook documents and link to them. EVP_PKEY *pkey = NULL; if (ctx == NULL - || !EVP_PKEY_key_fromdata_init(ctx) - || !EVP_PKEY_fromdata(ctx, &pkey, params)) + || EVP_PKEY_key_fromdata_init(ctx) <= 0 + || EVP_PKEY_fromdata(ctx, &pkey, params) <= 0) exit(1); /* Do what you want with |pkey| */ @@ -173,8 +173,8 @@ TODO Write a set of cookbook documents and link to them. ctx = EVP_PKEY_CTX_new_from_name(NULL, "EC", NULL); if (ctx == NULL || params != NULL - || !EVP_PKEY_key_fromdata_init(ctx) - || !EVP_PKEY_fromdata(ctx, &pkey, params)) { + || EVP_PKEY_key_fromdata_init(ctx) <= 0 + || EVP_PKEY_fromdata(ctx, &pkey, params) <= 0) { exitcode = 1; } else { /* Do what you want with |pkey| */
fix: add a blank Expect: header field and explanation as to why
@@ -945,12 +945,21 @@ cws_new(const char *url, const char *websocket_protocols, const struct cws_callb * Then we manually override the string sent to be "GET". */ curl_easy_setopt(easy, CURLOPT_CUSTOMREQUEST, "GET"); +#if 0 /* * CURLOPT_UPLOAD=1 with HTTP/1.1 implies: * Expect: 100-continue * but we don't want that, rather 101. Then force: 101. */ priv->headers = curl_slist_append(priv->headers, "Expect: 101"); +#else + /* + * This disables a automatic CURL behaviour where we receive a + * error if the server can't be bothered to send just a header + * with a 100 response code (https://stackoverflow.com/questions/9120760/curl-simple-file-upload-417-expectation-failed/19250636") + */ + priv->headers = curl_slist_append(priv->headers, "Expect:"); +#endif /* * CURLOPT_UPLOAD=1 without a size implies in: * Transfer-Encoding: chunked
Add new flag -maxpptime (default 600 for 10 minutes)
@@ -4601,10 +4601,13 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv, // Loop through current peer nodes and check their current Sent Bytes, should be okay on performance even with lots of peers // If peer node has sent over 10MB of data, then disconnect it and add it to our banned list for 24 hours + // -maxpp=10000000 (10MB) + // -maxpptime=600 (10 minutes) LOCK(cs_vNodes); for (CNode* pnode : vNodes) { - if (pnode->nSendBytes >= GetArg("-maxpp", 10000000)) //10000000 = 10MB -maxpp=10000000 flag default + // check if the peer has been connected for more than 10 minutes -maxpptime default 600 for 10 mins, if so, dont disconnect/ban it + if (pnode->nSendBytes >= GetArg("-maxpp", 10000000) && GetTime() - pnode->nTimeConnected < GetArg("-maxpptime", 10*60)) //10000000 = 10MB -maxpp=10000000 flag default { printf("Disconnecting and Banning Node: %s, Too Many SendBytes = %" PRIszu"\n", pnode->addr.ToString().c_str(), pnode->nSendBytes); pnode->fDisconnect = true;
Try Xcode 9 for CI
machine: xcode: - version: 8.3 + version: 9.0 test: override: - # First run Xcode 8.0 tests - - sudo xcode-select --switch /Applications/Xcode-8.0.app + # First run Xcode 8.3 tests + - sudo xcode-select --switch /Applications/Xcode-8.3.app # iOS 8 platform with iOS 9 SDK - xcodebuild clean test CODE_SIGNING_REQUIRED=NO @@ -20,8 +20,8 @@ test: -sdk macosx10.11 -scheme "TrustKit OS X" - # Switch to Xcode 8.3 - - sudo xcode-select --switch /Applications/Xcode-8.3.app + # Switch to Xcode 9.0 + - sudo xcode-select --switch /Applications/Xcode-9.0.app # iOS 10 platform with iOS 10 SDK - xcodebuild clean test CODE_SIGNING_REQUIRED=NO
Likes error fix
@@ -46,7 +46,7 @@ public class UpdateNbLikes { super(); BasicConfigurator.configure(); configFile = new File(Environment.getProperty("catalina.home") + File.separator + ".." + File.separator + "solr" - + File.separator + "solrcloud" + File.separator + "FileShare_shard1_replica1" + File.separator + "data" + + File.separator + "solr_home" + File.separator + "FileShare_shard1_replica1" + File.separator + "data" + File.separator + configPropertiesFileName); if (configFile.exists()) { properties.load(new FileInputStream(configFile));
all.sh: Fix order of CIPHER dependencies
@@ -1231,22 +1231,24 @@ component_test_full_no_cipher () { msg "build: full minus CIPHER" scripts/config.py full scripts/config.py unset MBEDTLS_CIPHER_C + # Direct dependencies + scripts/config.py unset MBEDTLS_CCM_C scripts/config.py unset MBEDTLS_CMAC_C + scripts/config.py unset MBEDTLS_GCM_C scripts/config.py unset MBEDTLS_NIST_KW_C scripts/config.py unset MBEDTLS_PKCS12_C scripts/config.py unset MBEDTLS_PKCS5_C - scripts/config.py unset MBEDTLS_CCM_C - scripts/config.py unset MBEDTLS_GCM_C scripts/config.py unset MBEDTLS_PSA_CRYPTO_C scripts/config.py unset MBEDTLS_SSL_TLS_C scripts/config.py unset MBEDTLS_SSL_TICKET_C + # Indirect dependencies + scripts/config.py unset MBEDTLS_SSL_CLI_C scripts/config.py unset MBEDTLS_PSA_CRYPTO_SE_C scripts/config.py unset MBEDTLS_PSA_CRYPTO_STORAGE_C - scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3 - scripts/config.py unset MBEDTLS_SSL_CLI_C - scripts/config.py unset MBEDTLS_SSL_SRV_C scripts/config.py unset MBEDTLS_SSL_DTLS_ANTI_REPLAY scripts/config.py unset MBEDTLS_SSL_DTLS_CONNECTION_ID + scripts/config.py unset MBEDTLS_SSL_PROTO_TLS1_3 + scripts/config.py unset MBEDTLS_SSL_SRV_C scripts/config.py unset MBEDTLS_USE_PSA_CRYPTO make @@ -1258,13 +1260,15 @@ component_test_crypto_full_no_cipher () { msg "build: crypto_full minus CIPHER" scripts/config.py crypto_full scripts/config.py unset MBEDTLS_CIPHER_C + # Direct dependencies + scripts/config.py unset MBEDTLS_CCM_C scripts/config.py unset MBEDTLS_CMAC_C + scripts/config.py unset MBEDTLS_GCM_C scripts/config.py unset MBEDTLS_NIST_KW_C scripts/config.py unset MBEDTLS_PKCS12_C scripts/config.py unset MBEDTLS_PKCS5_C - scripts/config.py unset MBEDTLS_CCM_C - scripts/config.py unset MBEDTLS_GCM_C scripts/config.py unset MBEDTLS_PSA_CRYPTO_C + # Indirect dependencies scripts/config.py unset MBEDTLS_PSA_CRYPTO_SE_C scripts/config.py unset MBEDTLS_PSA_CRYPTO_STORAGE_C scripts/config.py unset MBEDTLS_USE_PSA_CRYPTO
build: register out_prometheus_exporter
@@ -166,6 +166,7 @@ option(FLB_OUT_KAFKA_REST "Enable Kafka Rest output plugin" Yes) option(FLB_OUT_CLOUDWATCH_LOGS "Enable AWS CloudWatch output plugin" Yes) option(FLB_OUT_KINESIS_FIREHOSE "Enable AWS Firehose output plugin" Yes) option(FLB_OUT_KINESIS_STREAMS "Enable AWS Kinesis output plugin" Yes) +option(FLB_OUT_PROMETHEUS_EXPORTER "Enable Prometheus exporter plugin" Yes) option(FLB_OUT_S3 "Enable AWS S3 output plugin" Yes) option(FLB_OUT_WEBSOCKET "Enable Websocket output plugin" Yes) option(FLB_FILTER_ALTER_SIZE "Enable alter_size filter" Yes)
Tools: Make target-specific installation clearer in the getting started guide Closes
@@ -125,7 +125,7 @@ Consult :doc:`/versions` for information about which ESP-IDF version to use in a Step 3. Set up the tools ======================== -Aside from the ESP-IDF, you also need to install the tools used by ESP-IDF, such as the compiler, debugger, Python packages, etc. +Aside from the ESP-IDF, you also need to install the tools used by ESP-IDF, such as the compiler, debugger, Python packages, etc, for projects supporting {IDF_TARGET_NAME}. .. code-block:: bash @@ -139,9 +139,34 @@ or with Fish shell cd ~/esp/esp-idf ./install.fish {IDF_TARGET_PATH_NAME} -.. note:: - To install tools for multiple targets you can specify those targets at once. For example: ``./install.sh esp32,esp32c3,esp32s3``. - To install tools for all supported targets, run the script without specifying targets ``./install.sh`` or use ``./install.sh all``. +The above commands install tools for {IDF_TARGET_NAME} only. If you intend to develop projects for more chip targets then you should list all of them and run for example: + +.. code-block:: bash + + cd ~/esp/esp-idf + ./install.sh esp32,esp32s2 + +or with Fish shell + +.. code-block:: fish + + cd ~/esp/esp-idf + ./install.fish esp32,esp32s2 + +In order to install tools for all supported targets please run the following command: + +.. code-block:: bash + + cd ~/esp/esp-idf + ./install.sh all + +or with Fish shell + +.. code-block:: fish + + cd ~/esp/esp-idf + ./install.fish all + Alternative File Downloads ~~~~~~~~~~~~~~~~~~~~~~~~~~
dpdk: fix hugepage pre-alloc
@@ -1291,7 +1291,8 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input) clib_error_t *e; uword n_pages; vec_validate(mem_by_socket, c); - n_pages = round_pow2 (mem_by_socket[c], default_hugepage_sz); + n_pages = round_pow2 ((uword) mem_by_socket[c]<<20, + default_hugepage_sz); n_pages /= default_hugepage_sz; if ((e = clib_sysfs_prealloc_hugepages(c, 0, n_pages)))
Remove MERGE_FIXME for simplify_function. All callers of simplify_function() are using the same parameters as in upstream. Guess thie FIXME has been out of date. So retire it.
@@ -4147,12 +4147,8 @@ simplify_boolean_equality(Oid opno, List *args) * will be done even if simplification of the function call itself is not * possible. */ -/* - * GPDB_92_MERGE_FIXME: please check if the arguments input by whom is - * called this function is correct,? - */ -static Expr *simplify_function(Oid funcid, - Oid result_type, int32 result_typmod, +static Expr * +simplify_function(Oid funcid, Oid result_type, int32 result_typmod, Oid result_collid, Oid input_collid, List **args_p, bool funcvariadic, bool process_args, bool allow_non_const, eval_const_expressions_context *context)
Fizz: Set proper PD source voltage and current Fizz allocates 15W to the type-c port. This patch allows the port to use it. BRANCH=none TEST=Verify 5V 3A PDO is offered.
#define PDO_FIXED_FLAGS (PDO_FIXED_DUAL_ROLE | PDO_FIXED_DATA_SWAP |\ PDO_FIXED_COMM_CAP) -/* TODO(crosbug.com/p/61098): fill in correct source and sink capabilities */ const uint32_t pd_src_pdo[] = { - PDO_FIXED(5000, 1500, PDO_FIXED_FLAGS), -}; -const int pd_src_pdo_cnt = ARRAY_SIZE(pd_src_pdo); -const uint32_t pd_src_pdo_max[] = { PDO_FIXED(5000, 3000, PDO_FIXED_FLAGS), }; -const int pd_src_pdo_max_cnt = ARRAY_SIZE(pd_src_pdo_max); +const int pd_src_pdo_cnt = ARRAY_SIZE(pd_src_pdo); const uint32_t pd_snk_pdo[] = { PDO_FIXED(5000, 500, PDO_FIXED_FLAGS),
transport.c: Fix crash with delayed compression Files: transport.c Notes: Fixes crash with delayed compression option using Bitvise server. Contributor: Zenju
@@ -765,7 +765,7 @@ int _libssh2_transport_send(LIBSSH2_SESSION *session, ((session->state & LIBSSH2_STATE_AUTHENTICATED) || session->local.comp->use_in_auth); - if(encrypted && compressed) { + if(encrypted && compressed && session->local.comp_abstract) { /* the idea here is that these function must fail if the output gets larger than what fits in the assigned buffer so thus they don't check the input size as we don't know how much it compresses */
4.4.3 final changelog
+CARTO Mobile SDK 4.4.3 +------------------- + +### New features: + +* Added an experimental option to configure various 'VectorTileLayer' parameters via project.json nutiparameters +* Added support for configuring vector tile map parameters via project.json +* Updated boost dependency to the latest stable version + +### Changes, fixes: + +* Build script cleanup + + CARTO Mobile SDK 4.4.3RC3 -------------------
fix(tool): export.sh cannot export xtensa-clang if installed issue
"description": "LLVM for Xtensa (ESP32, ESP32-S2) based on clang", "export_paths": [ [ - "xtensa-clang", + "xtensa-esp32-elf-clang", "bin" ] ], "clang", "--version" ], - "version_regex": "version\\s*([0-9\\.]+)\\s*\\([^\\s]+\\s*(\\w+)\\)", + "version_regex": "version\\s*([0-9\\.]+)\\s*\\([^\\s]+\\s*(\\w{10}).+\\)", "version_regex_replace": "\\1-\\2", "versions": [ {
metadata: Remove unnecessary check
@@ -79,12 +79,6 @@ static inline void ocf_metadata_load_superblock(ocf_cache_t cache, static inline void ocf_metadata_flush_superblock(ocf_cache_t cache, ocf_metadata_end_t cmpl, void *priv) { - /* TODO: Shouldn't it be checked by the caller? */ - if (!cache->device) { - cmpl(priv, 0); - return; - } - cache->metadata.iface.flush_superblock(cache, cmpl, priv); }
net/lwip: fix the exception order According to RFC 4862 clause 5.4.5. If DAD is failed, interface SHOULD be disabled, but it was not processed because of the exception order.
@@ -418,16 +418,6 @@ void nd6_input(struct pbuf *p, struct netif *inp) /* Check for ANY address in src (DAD algorithm). */ if (ip6_addr_isany(ip6_current_src_addr())) { - if (lladdr_opt != NULL) { - /* RFC 7.1.1. - * If the IP source address is the unspecified address, there is no - * source link-layer address option in the message. */ - pbuf_free(p); - ND6_STATS_INC(nd6.proterr); - ND6_STATS_INC(nd6.drop); - return; - } - if (ip6_addr_issolicitednode(ip6_current_dest_addr())) { /* Sender is validating this address. */ for (i = 0; i < LWIP_IPV6_NUM_ADDRESSES; ++i) { @@ -449,6 +439,16 @@ void nd6_input(struct pbuf *p, struct netif *inp) ND6_STATS_INC(nd6.drop); return; } + + if (lladdr_opt != NULL) { + /* RFC 7.1.1. + * If the IP source address is the unspecified address, there is no + * source link-layer address option in the message. */ + pbuf_free(p); + ND6_STATS_INC(nd6.proterr); + ND6_STATS_INC(nd6.drop); + return; + } } else { ip6_addr_t target_address;
subproc: nullify stdio later
@@ -201,10 +201,6 @@ static bool subproc_PrepareExecv(run_t* run) { } } - if (run->global->exe.nullifyStdio) { - util_nullifyStdio(); - } - if (run->global->exe.clearEnv) { environ = NULL; } @@ -238,6 +234,10 @@ static bool subproc_PrepareExecv(run_t* run) { PLOG_W("sigprocmask(empty_set)"); } + if (run->global->exe.nullifyStdio) { + util_nullifyStdio(); + } + return true; }
ipmi: endian conversion
@@ -192,7 +192,7 @@ static void ipmi_init_esel_record(void) { memset(&sel_record, 0, sizeof(struct sel_record)); sel_record.record_type = SEL_REC_TYPE_AMI_ESEL; - sel_record.generator_id = SEL_GENERATOR_ID_AMI; + sel_record.generator_id = cpu_to_le16(SEL_GENERATOR_ID_AMI); sel_record.evm_ver = SEL_EVM_VER_2; sel_record.sensor_type = SENSOR_TYPE_SYS_EVENT; sel_record.sensor_number =
pack: fix heap-double-free in flb_pack_state_reset
@@ -333,11 +333,13 @@ int flb_pack_state_init(struct flb_pack_state *s) void flb_pack_state_reset(struct flb_pack_state *s) { flb_free(s->tokens); + s->tokens = NULL; s->tokens_size = 0; s->tokens_count = 0; s->last_byte = 0; s->buf_size = 0; flb_free(s->buf_data); + s->buf_data = NULL; }
ci: exclude esp_rom component when checking rom api usage
@@ -6,7 +6,7 @@ set -uo pipefail cd ${IDF_PATH} # git ls-files operates on working directory only, make sure we're at the top directory deprecated_rom_apis=$(cat ${IDF_PATH}/components/esp_rom/esp32/ld/esp32.rom.api.ld | grep "esp_rom_" | cut -d "=" -f 2 | cut -d " " -f 2) -files_to_search=$(git ls-files --full-name '*.c') +files_to_search=$(git ls-files --full-name '*.c' ':!:components/esp_rom/') count=0 for api in $deprecated_rom_apis; do found_files=$(grep -E "\W+"$api"\W+" $files_to_search)
build: add build types helpstring to cmake project Type: feature
@@ -61,6 +61,7 @@ if (compiler_flag_no_address_of_packed_member) endif() # release +list(APPEND BUILD_TYPES "release") string(CONCAT CMAKE_C_FLAGS_RELEASE "-O2 " "-fstack-protector " @@ -71,6 +72,7 @@ string(CONCAT CMAKE_C_FLAGS_RELEASE string(CONCAT CMAKE_EXE_LINKER_FLAGS_RELEASE "-pie") # debug +list(APPEND BUILD_TYPES "debug") string(CONCAT CMAKE_C_FLAGS_DEBUG "-O0 " "-DCLIB_DEBUG " @@ -80,9 +82,11 @@ string(CONCAT CMAKE_C_FLAGS_DEBUG ) # coverity +list(APPEND BUILD_TYPES "coverity") string(CONCAT CMAKE_C_FLAGS_COVERITY "-O2 -D__COVERITY__") # gcov +list(APPEND BUILD_TYPES "gcov") string(CONCAT CMAKE_C_FLAGS_GCOV "-O0 " "-DCLIB_DEBUG " @@ -92,6 +96,11 @@ string(CONCAT CMAKE_C_FLAGS_GCOV string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UC) + +string(REPLACE ";" " " BUILD_TYPES "${BUILD_TYPES}") +set_property(CACHE CMAKE_BUILD_TYPE PROPERTY + HELPSTRING "Build type - valid options are: ${BUILD_TYPES}") + ############################################################################## # install config ##############################################################################
sparse: Silence "directive in argument list" for version string core/init.c:966:1: error: directive in argument list core/init.c:968:1: error: directive in argument list core/init.c:970:1: error: directive in argument list
@@ -66,6 +66,12 @@ static bool kernel_32bit; /* We backup the previous vectors here before copying our own */ static uint8_t old_vectors[EXCEPTION_VECTORS_END]; +#ifdef DEBUG +#define DEBUG_STR "-debug" +#else +#define DEBUG_STR "" +#endif + #ifdef SKIBOOT_GCOV void skiboot_gcov_done(void); #endif @@ -962,13 +968,8 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt) /* Call library constructors */ do_ctors(); - prlog(PR_NOTICE, "OPAL %s%s starting...\n", version, -#ifdef DEBUG - "-debug" -#else - "" -#endif - ); + prlog(PR_NOTICE, "OPAL %s%s starting...\n", version, DEBUG_STR); + prlog(PR_DEBUG, "initial console log level: memory %d, driver %d\n", (debug_descriptor.console_log_levels >> 4), (debug_descriptor.console_log_levels & 0x0f));
Remove useless bms_free() calls in build_child_join_rel(). These seem to be leftovers from the original partitionwise-join patch, perhaps. Discussion:
@@ -858,11 +858,8 @@ build_child_join_rel(PlannerInfo *root, RelOptInfo *outer_rel, /* * Lateral relids referred in child join will be same as that referred in - * the parent relation. Throw any partial result computed while building - * the targetlist. + * the parent relation. */ - bms_free(joinrel->direct_lateral_relids); - bms_free(joinrel->lateral_relids); joinrel->direct_lateral_relids = (Relids) bms_copy(parent_joinrel->direct_lateral_relids); joinrel->lateral_relids = (Relids) bms_copy(parent_joinrel->lateral_relids);
BugID:19174429: fix the build error in linkkitapp@sv6266
@@ -562,7 +562,7 @@ void ota_crc16_init(ota_crc16_ctx *inCtx) inCtx->crc = 0; } -void ota_crc16_update(ota_crc16_ctx *inCtx, const void *inSrc, size_t inLen) +void ota_crc16_update(ota_crc16_ctx *inCtx, const void *inSrc, unsigned int inLen) { const unsigned char *src = (const unsigned char *) inSrc; const unsigned char *srcEnd = src + inLen;
Add checks for ticket and resumption_key fields From RFC 8446 and the definition of session, we should check the length.
@@ -1898,7 +1898,7 @@ mbedtls_ssl_mode_t mbedtls_ssl_get_mode_from_ciphersuite( * struct { * uint64 ticket_received; * uint32 ticket_lifetime; - * opaque ticket<0..2^16-1>; + * opaque ticket<1..2^16-1>; * } ClientOnlyData; * * struct { @@ -1925,9 +1925,14 @@ static int ssl_tls13_session_save( const mbedtls_ssl_session *session, size_t needed = 1 /* endpoint */ + 2 /* ciphersuite */ + 4 /* ticket_age_add */ - + 2 /* resumption_key length */ - + session->resumption_key_len; /* resumption_key */ + + 1 /* ticket_flags */ + + 1; /* resumption_key length */ *olen = 0; + + if( session->resumption_key_len > MBEDTLS_SSL_TLS1_3_TICKET_RESUMPTION_KEY_LEN ) + return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); + needed += session->resumption_key_len; /* resumption_key */ + #if defined(MBEDTLS_HAVE_TIME) needed += 8; /* start_time or ticket_received */ #endif @@ -1937,8 +1942,13 @@ static int ssl_tls13_session_save( const mbedtls_ssl_session *session, { needed += 4 /* ticket_lifetime */ + 2; /* ticket_len */ + + /* Check size_t overflow */ if( session->ticket_len > SIZE_MAX - needed ) + { return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); + } + needed += session->ticket_len; /* ticket */ } #endif /* MBEDTLS_SSL_CLI_C */ @@ -1980,7 +1990,8 @@ static int ssl_tls13_session_save( const mbedtls_ssl_session *session, MBEDTLS_PUT_UINT16_BE( session->ticket_len, p, 0 ); p += 2; - if( session->ticket_len > 0 ) + + if( session->ticket != NULL && session->ticket_len > 0 ) { memcpy( p, session->ticket, session->ticket_len ); p += session->ticket_len;
[kernel] guard a few more non-convergence messages in TimeSteppingDirectProjection.
@@ -214,7 +214,7 @@ void TimeSteppingDirectProjection::advanceToEvent() DEBUG_EXPR(oneStepNSProblem(SICONOS_OSNSP_TS_POS)->display()); - if (info) + if (info && _warnOnNonConvergence) { std::cout << " TimeSteppingDirectProjection::advanceToEvent() project on constraints. solver failed." <<std::endl ; } @@ -363,7 +363,7 @@ void TimeSteppingDirectProjection::advanceToEvent() - if (_nbProjectionIteration == _projectionMaxIteration) + if (_nbProjectionIteration == _projectionMaxIteration && _warnOnNonConvergence) { std::cout << "TimeSteppingDirectProjection::advanceToEvent() Max number of projection iterations reached (" << _nbProjectionIteration << ")" <<std::endl ; printf(" max criteria equality = %e.\n", _maxViolationEquality); @@ -586,8 +586,6 @@ void TimeSteppingDirectProjection::newtonSolve(double criterion, unsigned int ma computeFreeState(); // updateOutput(0); // updateIndexSets(); - if (info) - std::cout << "new loop because of info\n" <<std::endl; // if there is not any Interaction at // the beginning of the simulation _allNSProblems may not be @@ -600,8 +598,6 @@ void TimeSteppingDirectProjection::newtonSolve(double criterion, unsigned int ma { info = computeOneStepNSProblem(SICONOS_OSNSP_TS_VELOCITY); } - if (info) - std::cout << "info!" <<std::endl; // Check output from solver (convergence or not ...) if (!checkSolverOutputProjectOnConstraints) DefaultCheckSolverOutput(info);
Fix getDirectoryItems on windows;
@@ -137,8 +137,13 @@ bool fs_mkdir(const char* path) { bool fs_list(const char* path, fs_list_cb* callback, void* context) { WCHAR wpath[FS_PATH_MAX]; - if (!MultiByteToWideChar(CP_UTF8, 0, path, -1, wpath, FS_PATH_MAX)) { + + int length = MultiByteToWideChar(CP_UTF8, 0, path, -1, wpath, FS_PATH_MAX); + + if (length == 0 || length + 3 >= FS_PATH_MAX) { return false; + } else { + wcscat(wpath, L"/*"); } WIN32_FIND_DATAW findData;
Clean up ReadHeader harness
void harness() { IotHttpsResponseHandle_t respHandle = allocate_IotResponseHandle(); - size_t pName_len; - __CPROVER_assume(pName_len >= 0 && - pName_len <= IOT_HTTPS_MAX_HOST_NAME_LENGTH); - char *pName = safeMalloc(pName_len); - uint32_t len; - __CPROVER_assume(len >= 0 && len <= MAX_ACCEPTED_SIZE); - char *pValue = safeMalloc(len); + size_t nameLen; + size_t valueLen; + char *pName = safeMalloc(nameLen); + char *pValue = safeMalloc(valueLen); if (respHandle) { - /* We need to bound respHandle->readHeaderValueLength in order to - * terminate strncpy */ - __CPROVER_assume(respHandle->readHeaderValueLength >= 0 && - respHandle->readHeaderValueLength <= MAX_ACCEPTED_SIZE + 1); __CPROVER_assume(is_valid_IotResponseHandle(respHandle)); } - IotHttpsClient_ReadHeader(respHandle, pName, pName_len, pValue, len); + IotHttpsClient_ReadHeader(respHandle, pName, nameLen, pValue, valueLen); }
Fix missed input mapping for gpcheckcloud_tests_gpcloud_centos
@@ -1161,6 +1161,8 @@ jobs: gpcloud_secret_access_key: {{gpcloud-secret-access-key}} TARGET_OS: ubuntu - task: gpcheckcloud_tests_gpcloud_centos + input_mapping: + bin_gpdb: bin_gpdb_centos6 file: gpdb_src/concourse/tasks/gpcheckcloud_tests_gpcloud.yml image: centos-gpdb-dev-6 params:
TWKappaMatric to TWKappaMetric misprint correction
@@ -2472,8 +2472,8 @@ double TKappaMetric::GetFinalError(const TMetricHolder& error) const { /* WKappa */ namespace { - struct TWKappaMatric: public TAdditiveMetric<TWKappaMatric> { - explicit TWKappaMatric(int classCount = 2, double border = GetDefaultClassificationBorder()) + struct TWKappaMetric: public TAdditiveMetric<TWKappaMetric> { + explicit TWKappaMetric(int classCount = 2, double border = GetDefaultClassificationBorder()) : Border(border) , ClassCount(classCount) { UseWeights.MakeIgnored(); @@ -2501,14 +2501,14 @@ namespace { } THolder<IMetric> MakeBinClassWKappaMetric(double border) { - return MakeHolder<TWKappaMatric>(2, border); + return MakeHolder<TWKappaMetric>(2, border); } THolder<IMetric> MakeMultiClassWKappaMetric(int classCount) { - return MakeHolder<TWKappaMatric>(classCount); + return MakeHolder<TWKappaMetric>(classCount); } -TMetricHolder TWKappaMatric::EvalSingleThread( +TMetricHolder TWKappaMetric::EvalSingleThread( const TVector<TVector<double>>& approx, const TVector<TVector<double>>& approxDelta, bool isExpApprox, @@ -2523,15 +2523,15 @@ TMetricHolder TWKappaMatric::EvalSingleThread( return CalcKappaMatrix(approx, target, begin, end, Border); } -TString TWKappaMatric::GetDescription() const { +TString TWKappaMetric::GetDescription() const { return BuildDescription(ELossFunction::WKappa, "%.3g", MakeBorderParam(Border)); } -void TWKappaMatric::GetBestValue(EMetricBestValue* valueType, float*) const { +void TWKappaMetric::GetBestValue(EMetricBestValue* valueType, float*) const { *valueType = EMetricBestValue::Max; } -double TWKappaMatric::GetFinalError(const TMetricHolder& error) const { +double TWKappaMetric::GetFinalError(const TMetricHolder& error) const { return CalcKappa(error, ClassCount, EKappaMetricType::Weighted); }
interop: Enable 0RTT in zerortt test
@@ -28,11 +28,14 @@ if [ "$ROLE" == "client" ]; then fi if [ "$TESTCASE" == "resumption" ] || [ "$TESTCASE" == "zerortt" ]; then CLIENT_ARGS="$CLIENT_ARGS --session-file session.txt --tp-file tp.txt" + if [ "$TESTCASE" == "resumption" ]; then + CLIENT_ARGS="$CLIENT_ARGS --disable-early-data" + fi REQS=($REQUESTS) REQUESTS=${REQS[0]} /usr/local/bin/client $CLIENT_ARGS --exit-on-first-stream-close $REQUESTS $CLIENT_PARAMS &> $LOG REQUESTS=${REQS[@]:1} - /usr/local/bin/client $CLIENT_ARGS --disable-early-data $REQUESTS $CLIENT_PARAMS &> $LOG + /usr/local/bin/client $CLIENT_ARGS $REQUESTS $CLIENT_PARAMS &> $LOG elif [ "$TESTCASE" == "multiconnect" ]; then CLIENT_ARGS="$CLIENT_ARGS --exit-on-first-stream-close --timeout=180s" for REQ in $REQUESTS; do
Fix a static analysis false positive Static analyzer's can't tell that hi_calloc is calloc-like, and report a potential null pointer dereference. This isn't possible but it's probably smarter to make the test anyway in the event code changes.
@@ -641,13 +641,14 @@ void redisReaderFree(redisReader *r) { if (r->reply != NULL && r->fn && r->fn->freeObject) r->fn->freeObject(r->reply); - /* We know r->task[i] is allocatd if i < r->tasks */ + if (r->task) { + /* We know r->task[i] is allocated if i < r->tasks */ for (int i = 0; i < r->tasks; i++) { hi_free(r->task[i]); } - if (r->task) hi_free(r->task); + } sdsfree(r->buf); hi_free(r);
rsa: ignore performance test in CI Even with a static key the performance vary a lot between different builds.
@@ -306,7 +306,7 @@ static void print_rsa_details(mbedtls_rsa_context *rsa) } #endif -TEST_CASE("test performance RSA key operations", "[bignum]") +TEST_CASE("test performance RSA key operations", "[bignum][ignore]") { for (int keysize = 2048; keysize <= 4096; keysize += 2048) { rsa_key_operations(keysize, true, false, false);
khan: alignment
%fyrd =* fyd p.task =/ =beak (get-beak bear.fyd now) + =/ =wire (make-wire beak p.args.fyd) =/ =dais:clay (get-dais beak p.q.args.fyd rof) =/ =vase (slam !>(some) (vale.dais q.q.args.fyd)) - =/ =wire (make-wire beak p.args.fyd) :_ khan-gate [hen %pass wire %k %fard bear.fyd name.fyd vase]~ ==
extmod/modev3devices: do not dereference pbdev This will no longer be possible going forward. The gyro is currently using it to reset the port, but this functionality should instead move to pbdevice.
@@ -433,6 +433,7 @@ STATIC const mp_obj_type_t ev3devices_UltrasonicSensor_type = { // pybricks.ev3devices.GyroSensor class object typedef struct _ev3devices_GyroSensor_obj_t { mp_obj_base_t base; + pbio_port_t port; // FIXME: Shouldn't be here pbdevice_t *pbdev; pbio_direction_t direction; mp_int_t offset; @@ -473,6 +474,7 @@ STATIC mp_obj_t ev3devices_GyroSensor_make_new(const mp_obj_type_t *type, size_t self->direction = pb_type_enum_get_value(direction, &pb_enum_type_Direction); mp_int_t port_num = pb_type_enum_get_value(port, &pb_enum_type_Port); + self->port = port_num; pbio_error_t err; while ((err = pbdevice_get_device(&self->pbdev, PBIO_IODEV_TYPE_ID_EV3_GYRO_SENSOR, port_num)) == PBIO_ERROR_AGAIN) { @@ -530,11 +532,9 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(ev3devices_GyroSensor_reset_angle_obj, 0, ev3d STATIC mp_obj_t ev3devices_GyroSensor_calibrate(mp_obj_t self_in) { ev3devices_GyroSensor_obj_t *self = MP_OBJ_TO_PTR(self_in); - pbio_port_t port = self->pbdev->port; - // Trick the sensor into going into other uart mode mode pbio_error_t err; - while ((err = pbdevice_get_device(&self->pbdev, PBIO_IODEV_TYPE_ID_CUSTOM_UART, port)) == PBIO_ERROR_AGAIN) { + while ((err = pbdevice_get_device(&self->pbdev, PBIO_IODEV_TYPE_ID_CUSTOM_UART, self->port)) == PBIO_ERROR_AGAIN) { mp_hal_delay_ms(1000); } pb_assert(err); @@ -542,7 +542,7 @@ STATIC mp_obj_t ev3devices_GyroSensor_calibrate(mp_obj_t self_in) { // Wait until the sensor is back, up to a timeout mp_int_t time_start = mp_hal_ticks_ms(); while (mp_hal_ticks_ms() - time_start < 10000) { - err = pbdevice_get_device(&self->pbdev, PBIO_IODEV_TYPE_ID_EV3_GYRO_SENSOR, port); + err = pbdevice_get_device(&self->pbdev, PBIO_IODEV_TYPE_ID_EV3_GYRO_SENSOR, self->port); if (err == PBIO_SUCCESS) { break; }
Fix h09 header tests against null paths
@@ -1496,17 +1496,34 @@ int h09_header_split_test(const uint8_t* bytes, size_t length, size_t split, h09 DBG_PRINTF("Expected proto %d, got %d", expected->expected_proto, stream_ctx->ps.hq.proto); ret = -1; } - else if (stream_ctx->ps.hq.path_length != strlen(expected->expected_path) || - (stream_ctx->ps.hq.path_length > 0 && (expected->expected_path == NULL || stream_ctx->ps.hq.path != NULL || - memcmp(expected->expected_path, stream_ctx->ps.hq.path, stream_ctx->ps.hq.path_length) != 0))) { - DBG_PRINTF("Expected path <%s>, got <%d,%x>", (expected->expected_path == NULL)?"":expected->expected_path, - stream_ctx->ps.hq.path_length, stream_ctx->ps.hq.path); - ret = -1; - } else if (stream_ctx->ps.hq.command_length != expected->expected_command_length) { DBG_PRINTF("Expected command length %zu, got %zu", expected->expected_command_length, stream_ctx->ps.hq.command_length); ret = -1; } + else + { + if (expected->expected_path == NULL) { + if (stream_ctx->ps.hq.path_length > 0) { + DBG_PRINTF("Expected empty, result path length %d", stream_ctx->ps.hq.path_length); + ret = -1; + } + } + else if (stream_ctx->ps.hq.path_length != strlen(expected->expected_path)) { + DBG_PRINTF("Expected path <%s>, result path length %d", + expected->expected_path, stream_ctx->ps.hq.path_length); + ret = -1; + } + else if (stream_ctx->ps.hq.path_length > 0) { + if (stream_ctx->ps.hq.path == NULL) { + DBG_PRINTF("Result path is NULL, length %d", stream_ctx->ps.hq.path_length); + ret = -1; + } + else if (memcmp(expected->expected_path, stream_ctx->ps.hq.path, stream_ctx->ps.hq.path_length) != 0) { + DBG_PRINTF("Result path differs from expected path <%s>", expected->expected_path); + ret = -1; + } + } + } } } else {
Improved LTC block explorer links
@@ -24,7 +24,7 @@ namespace MiningCore.Blockchain { CoinType.XMR, new Dictionary<string, string> { { string.Empty, "https://chainradar.com/xmr/block/{0}" }}}, { CoinType.ETN, new Dictionary<string, string> { { string.Empty, "https://blockexplorer.electroneum.com/block/{0}" } }}, - { CoinType.LTC, new Dictionary<string, string> { { string.Empty, "http://explorer.litecoin.net/block/{0}" }}}, + { CoinType.LTC, new Dictionary<string, string> { { string.Empty, "https://chainz.cryptoid.info/ltc/block.dws?{0}.htm" } }}, { CoinType.BCH, new Dictionary<string, string> { { string.Empty, "https://www.blocktrail.com/BCC/block/{0}" }}}, { CoinType.DASH, new Dictionary<string, string> { { string.Empty, "https://chainz.cryptoid.info/dash/block.dws?{0}.htm" }}}, { CoinType.BTC, new Dictionary<string, string> { { string.Empty, "https://blockchain.info/block/{0}" }}}, @@ -53,7 +53,7 @@ namespace MiningCore.Blockchain { CoinType.ETN, "https://blockexplorer.electroneum.com/tx/{0}" }, { CoinType.ETH, "https://etherscan.io/tx/{0}" }, { CoinType.ETC, "https://gastracker.io/tx/{0}" }, - { CoinType.LTC, "http://explorer.litecoin.net/tx/{0}" }, + { CoinType.LTC, "https://chainz.cryptoid.info/ltc/tx.dws?{0}.htm" }, { CoinType.BCH, "https://www.blocktrail.com/BCC/tx/{0}" }, { CoinType.DASH, "https://chainz.cryptoid.info/dash/tx.dws?{0}.htm" }, { CoinType.BTC, "https://blockchain.info/tx/{0}" }, @@ -80,7 +80,7 @@ namespace MiningCore.Blockchain { { CoinType.ETH, "https://etherscan.io/address/{0}" }, { CoinType.ETC, "https://gastracker.io/addr/{0}" }, - { CoinType.LTC, "http://explorer.litecoin.net/address/{0}" }, + { CoinType.LTC, "https://chainz.cryptoid.info/ltc/address.dws?{0}.htm" }, { CoinType.BCH, "https://www.blocktrail.com/BCC/address/{0}" }, { CoinType.DASH, "https://chainz.cryptoid.info/dash/address.dws?{0}.htm" }, { CoinType.BTC, "https://blockchain.info/address/{0}" },
Add new "samples" subcommand to pysam/samtools.py
@@ -41,6 +41,7 @@ SAMTOOLS_DISPATCH = { "ampliconstats": ("ampliconstats", None), "version": ("version", None), "fqimport": ("import", None), + "samples": ("samples", None), } # instantiate samtools commands as python functions
Update trunk/arcadia/build/ya.conf.json horadric update (265700955)
}, "horadric":{ "formula": { - "sandbox_id": 258007958, + "sandbox_id": 265700955, "match": "horadric" }, "executable": {
Fixing incorrect check in s2n_handshake_test that was introduced while refactoring
@@ -148,7 +148,7 @@ int test_cipher_preferences(struct s2n_config *server_config, struct s2n_config if (!expect_failure) { GUARD(try_handshake(server_conn, client_conn)); } else { - ne_check(try_handshake(server_conn, client_conn), -1); + eq_check(try_handshake(server_conn, client_conn), -1); } GUARD(s2n_connection_free(server_conn));
hslua-cli: don't do IO when gathering options in `luaOptions`
@@ -52,7 +52,7 @@ getOptions = do in concat errs ++ usageInfo usageHead luaOptions let (mscript, arg) = first listToMaybe $ splitAt 1 args - opts <- foldl' (>>=) (return defaultLuaOpts) actions + let opts = foldl' (flip ($)) defaultLuaOpts actions return opts { optScript = mscript , optScriptArgs = arg @@ -90,8 +90,15 @@ runStandalone :: LuaError e => Settings e -> IO () runStandalone settings = do opts <- getOptions settingsRunner settings $ do + let putErr = Lua.liftIO . hPutStrLn stderr -- print version info when (optVersion opts) (showVersion $ settingsVersionInfo settings) + when (optInteractive opts) $ + putErr "[WARNING] Flag `-i` is not supported yet." + when (optNoEnv opts) $ + putErr "[WARNING] Flag `-E` is not fully supported yet." + when (optWarnings opts) $ + putErr "[WARNING] Flag `-W` is not supported yet." -- push `arg` table case optScript opts of @@ -175,22 +182,20 @@ defaultLuaOpts = Options } -- | Lua command line options. -luaOptions :: [OptDescr (Options -> IO Options)] +luaOptions :: [OptDescr (Options -> Options)] luaOptions = [ Option "e" [] - (flip ReqArg "stat" $ \stat opt -> return $ + (flip ReqArg "stat" $ \stat opt -> let code = ExecuteCode $ UTF8.fromString stat in opt{ optExecute = code:optExecute opt }) "execute string 'stat'" , Option "i" [] - (NoArg $ \opt -> do - hPutStrLn stderr "[WARNING] Flag `-i` is not supported yet." - return opt { optInteractive = True }) + (NoArg $ \opt -> opt { optInteractive = True }) "interactive mode -- currently not supported" , Option "l" [] - (flip ReqArg "mod" $ \mod' opt -> return $ + (flip ReqArg "mod" $ \mod' opt -> let toName = Lua.Name . UTF8.fromString code = case break (== '=') mod' of (glb, '=':m) -> RequireModule (toName glb) (toName m) @@ -203,18 +208,14 @@ luaOptions = ]) , Option "v" [] - (NoArg $ \opt -> return opt { optVersion = True }) + (NoArg $ \opt -> opt { optVersion = True }) "show version information" , Option "E" [] - (NoArg $ \opt -> do - hPutStrLn stderr "[WARNING] Flag `-E` is not fully supported yet." - return opt { optNoEnv = True }) - "ignore environment variables -- currently not supported" + (NoArg $ \opt -> opt { optNoEnv = True }) + "ignore environment variables -- partially supported" , Option "W" [] - (NoArg $ \opt -> do - hPutStrLn stderr "[WARNING] Flag `-W` is not supported yet." - return opt { optWarnings = True }) + (NoArg $ \opt -> opt { optWarnings = True }) "turn warnings on -- currently not supported" ]
scratch_destroy: move VERIFY_CHECK after invalid scrach space check
@@ -25,11 +25,11 @@ static secp256k1_scratch* secp256k1_scratch_create(const secp256k1_callback* err static void secp256k1_scratch_destroy(const secp256k1_callback* error_callback, secp256k1_scratch* scratch) { if (scratch != NULL) { - VERIFY_CHECK(scratch->alloc_size == 0); /* all checkpoints should be applied */ if (secp256k1_memcmp_var(scratch->magic, "scratch", 8) != 0) { secp256k1_callback_call(error_callback, "invalid scratch space"); return; } + VERIFY_CHECK(scratch->alloc_size == 0); /* all checkpoints should be applied */ memset(scratch->magic, 0, sizeof(scratch->magic)); free(scratch); }
Increasing char array size because of unsigned long long
@@ -57,7 +57,7 @@ static void testAddressSet (const char * keyValue, int retValue) static void testAddressesSetGet (const char * keyValue, unsigned long long longValue) { - char intChar[16]; + char intChar[21]; KeySet * testKs = ksNew (10, keyNew ("user/tests/mac/addr", KEY_VALUE, keyValue, KEY_META, META, "", KEY_END), KS_END); setKey (testKs); convertLong (intChar, longValue); @@ -119,7 +119,7 @@ static void testAddressesSingleHyphen (void) static void testAddressesNumber (void) { - char intChar[16]; + char intChar[21]; convertLong (intChar, 0); testAddressSet (intChar, 1);
LWIP: Make system timeout POSIX compliant (required by lwip_select) `lwip_select` uses `sys_arch_sem_wait` function making the assumption that it is POSIX compliant. This commit makes that function wait for at least timeout (milliseconds), as required by POSIX specification. * Relates to
@@ -171,7 +171,7 @@ sys_sem_signal_isr(sys_sem_t *sem) * @brief Wait for a semaphore to be signaled * * @param sem pointer of the semaphore - * @param timeout if zero, will wait infinitely, or will wait for milliseconds specify by this argument + * @param timeout if zero, will wait infinitely, or will wait at least for milliseconds specified by this argument * @return SYS_ARCH_TIMEOUT when timeout, 0 otherwise */ u32_t @@ -184,7 +184,13 @@ sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout) ret = xSemaphoreTake(*sem, portMAX_DELAY); LWIP_ASSERT("taking semaphore failed", ret == pdTRUE); } else { - TickType_t timeout_ticks = timeout / portTICK_PERIOD_MS; + /* Round up the number of ticks. + * Not only we need to round up the number of ticks, but we also need to add 1. + * Indeed, this function shall wait for AT LEAST timeout, but on FreeRTOS, + * if we specify a timeout of 1 tick to `xSemaphoreTake`, it will take AT MOST + * 1 tick before triggering a timeout. Thus, we need to pass 2 ticks as a timeout + * to `xSemaphoreTake`. */ + TickType_t timeout_ticks = ((timeout + portTICK_PERIOD_MS - 1) / portTICK_PERIOD_MS) + 1; ret = xSemaphoreTake(*sem, timeout_ticks); if (ret == errQUEUE_EMPTY) { /* timed out */
os/fs/smartfs: Write only new entry name in case of renaming an entry in the same sector Instead of calling smartfs_writeentry, use FS_IOCTL to overwrite only the entry name avoiding other unnecessary steps.
@@ -1917,6 +1917,9 @@ int smartfs_rename(struct inode *mountpt, const char *oldrelpath, const char *ne struct smartfs_entry_s newentry; mode_t mode; uint16_t type; +#ifdef CONFIG_SMARTFS_USE_SECTOR_BUFFER + struct smart_read_write_s readwrite; +#endif /* Sanity checks */ @@ -1960,11 +1963,10 @@ int smartfs_rename(struct inode *mountpt, const char *oldrelpath, const char *ne #ifdef CONFIG_SMARTFS_USE_SECTOR_BUFFER if (oldentry.dfirst == newentry.dsector) { /* We will not use any new entry found, we will overwrite the existing entry but with a new name */ - strncpy(oldentry.name, newentry.name, fs->fs_llformat.namesize); - oldentry.prev_parent = oldentry.dsector; - ret = smartfs_writeentry(fs, oldentry, type, mode); + smartfs_setbuffer(&readwrite, oldentry.dsector, oldentry.doffset + offsetof(struct smartfs_entry_header_s, name), fs->fs_llformat.namesize, (uint8_t *)newentry.name); + ret = FS_IOCTL(fs, BIOC_WRITESECT, (unsigned long)&readwrite); if (ret != OK) { - fdbg("Error writing new entry\n"); + fdbg("Unable to write new entry to MTD, logical sector = %d, error = %d\n", oldentry.dsector, ret); } /* Old entry doesn't have to be invalidated, directly go to end */ goto errout_with_semaphore;
Fix project name case to match filename
# under the License. # -pkg.name: hw/mcu/microchip/pic32mx470f512h +pkg.name: hw/mcu/microchip/pic32mx470F512H pkg.description: MCU definition for the Microchip PIC32MX470F512H microcontroller. pkg.author: "Apache Mynewt <[email protected]>" pkg.homepage: "http://mynewt.apache.org/"
adds DER and PEM encoding for RSA private keys
=/ d=@ux (~(inv fo (elcm (dec p) (dec q))) e) [p q n e d] :: + ++ der + |% + ++ en + |% + ++ pass !! + ++ ring + |= k=key + ^- @ux + =; pec + (rep 3 ~(ren asn1 pec)) + :~ %seq + [%int 0] + [%int n.k] + [%int e.k] + [%int d.k] + [%int p.k] + [%int q.k] + [%int (mod d.k (dec p.k))] + [%int (mod d.k (dec q.k))] + [%int (~(inv fo p.k) q.k)] + == + -- + ++ de + !! + -- + :: + ++ pem + |% + ++ en + |% + ++ pass !! + ++ ring + |= k=key + ^- wain + :- '-----BEGIN RSA PRIVATE KEY-----' + =/ a (en:base64 (ring:en:der k)) + |- ^- wain + ?~ a + ['-----END RSA PRIVATE KEY-----' ~] + [(end 3 64 a) $(a (rsh 3 64 a))] + -- + ++ de + !! + -- + :: ++ en |= [m=@ k=key] ~| %rsa-len ~ -- :: + ++ test-rsapem + =/ k=key:rsa [`@ux`17 `@ux`11 `@ux`187 `@ux`7 `@ux`23] + =/ exp=wain + :~ '-----BEGIN RSA PRIVATE KEY-----' + 'MBwCAQACAgC7AgEHAgEXAgERAgELAgEHAgEDAgEO' + '-----END RSA PRIVATE KEY-----' + == + %- expect-eq !> + [exp (ring:en:pem:rsa k)] + :: ++ testrsa =/ k1=key:rsa =/ p `@ux`61
Added ksceKernelExitProcess nid.
@@ -2449,6 +2449,7 @@ modules: kernel: true nid: 0x7A69DE86 functions: + ksceKernelExitProcess: 0x4CA7DC42 ksceKernelLaunchApp: 0x71CF71FD ksceKernelGetProcessAuthid: 0xE4C83B0D ksceKernelGetProcessKernelBuf: 0xB9E68092
[http3] Use QUIC packet type macro constants This patch replaces raw hex numbers for QUIC packet types with macro constants defined in quicly.
@@ -611,7 +611,7 @@ static void process_packets(h2o_quic_ctx_t *ctx, quicly_address_t *destaddr, qui /* try to accept any of the Initial packets being received */ size_t i; for (i = 0; i != num_packets; ++i) - if ((packets[i].octets.base[0] & 0xf0) == 0xc0) + if ((packets[i].octets.base[0] & QUICLY_PACKET_TYPE_BITMASK) == QUICLY_PACKET_TYPE_INITIAL) if ((conn = ctx->acceptor(ctx, destaddr, srcaddr, packets + i)) != NULL) break; if (conn == NULL)
fix markdown syntax typo
@@ -419,7 +419,7 @@ To have better control of the calling sequence of functions, send mixed transact | QUADHD | 4 | 21 | +----------+------+------+ - * Only the first Device attached to the bus can use the CS0 pin. + \* Only the first Device attached to the bus can use the CS0 pin. .. _speed_considerations:
Warning that permit_upload = 0
@@ -670,6 +670,8 @@ void init_gpu_stats(uint32_t& vendorID, overlay_params& params) params.enabled[OVERLAY_PARAM_ENABLED_gpu_stats] = false; } } + if (!params.permit_upload) + printf("MANGOHUD: Uploading is disabled (permit_upload = 0)\n"); } void init_system_info(){
board-inspector: Fix sys.path for all internal modules
@@ -14,11 +14,11 @@ import lxml.etree import argparse from collections import namedtuple from importlib import import_module -from cpuparser import parse_cpuid, get_online_cpu_ids, get_offline_cpu_ids script_dir = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.join(script_dir)) +from cpuparser import parse_cpuid, get_online_cpu_ids, get_offline_cpu_ids from inspectorlib import validator class AddLLCCATAction(argparse.Action):
Update comments lib/common/socket.c
@@ -1777,9 +1777,9 @@ uint64_t h2o_socket_ebpf_lookup_flags(h2o_loop_t *loop, int (*init_key)(h2o_ebpf if (ebpf_map_lookup(return_map_fd, &tid, &flags) != 0) { if (errno == ENOENT) - // ENOENT could be issued in some reasons even if BPF tries to insert the entry, for example: - // * the entry in LRU hash was evicted - // * the insert operation in BPF program failed with ENOMEM + /* ENOENT could be issued in some reasons even if BPF tries to insert the entry, for example: + /* * the entry in LRU hash was evicted + /* * the insert operation in BPF program failed with ENOMEM */ h2o_error_printf( "BPF_MAP_LOOKUP failed. " "BPF handler for h2o:socket_lookup_flags might not have set the flags via h2o_return map\n");
Rename disable-lua flag to no-lua
@@ -48,7 +48,7 @@ local function compile(ext, file_name) end end -local function benchmark(test_dir, disable_lua) +local function benchmark(test_dir, no_lua) -- remove temporaries from previous runs util.shell(string.format([[ rm -f %s/*.so ]], test_dir)) @@ -76,7 +76,7 @@ local function benchmark(test_dir, disable_lua) lua = "lua/src/lua" end - if not (ext == "lua" and disable_lua) then + if not (ext == "lua" and no_lua) then local result = measure(lua, test_dir, name) table.insert(results, {name = name, result = result}) end @@ -105,11 +105,11 @@ local function benchmark(test_dir, disable_lua) print("----------") end -local function run_all_benchmarks(disable_lua) +local function run_all_benchmarks(no_lua) for test in lfs.dir("benchmarks") do if not string.find(test, "^%.") then local test_dir = "benchmarks/" .. test - benchmark(test_dir, disable_lua) + benchmark(test_dir, no_lua) end end end @@ -120,12 +120,12 @@ end local p = argparse(arg[0], "Titan benchmarks") p:argument("test_dir", "Only benchmark a specific directory"):args("?") -p:flag("--disable-lua", "Do not run the lua benchmark") +p:flag("--no-lua", "Do not run the (slow) lua benchmark") local args = p:parse() if args.test_dir then local test_dir = string.gsub(args.test_dir, "/*$", "") - benchmark(test_dir, args.disable_lua) + benchmark(test_dir, args.no_lua) else - run_all_benchmarks(args.disable_lua) + run_all_benchmarks(args.no_lua) end
Use `memmove` for character insertions and deletions
#include <stdbool.h> +#include <string.h> #include "edit_field.h" #include "game/camera.h" @@ -46,9 +47,8 @@ static void edit_field_insert_char(Edit_field *edit_field, char c) return; } - for (int64_t i = (int64_t) edit_field->buffer_size - 1; i >= (int64_t) edit_field->cursor; --i) { - edit_field->buffer[i + 1] = edit_field->buffer[i]; - } + char *dest = edit_field->buffer + edit_field->cursor + 1; + memmove(dest, dest - 1, edit_field->buffer_size - edit_field->cursor); edit_field->buffer[edit_field->cursor++] = c; edit_field->buffer[++edit_field->buffer_size] = 0; @@ -138,9 +138,8 @@ static void delete_char(Edit_field *edit_field) return; } - for (size_t i = edit_field->cursor; i < edit_field->buffer_size; ++i) { - edit_field->buffer[i] = edit_field->buffer[i + 1]; - } + char *dest = edit_field->buffer + edit_field->cursor; + memmove(dest, dest + 1, edit_field->buffer_size - edit_field->cursor - 1); edit_field->buffer[--edit_field->buffer_size] = 0; } @@ -152,9 +151,8 @@ static void delete_backward_char(Edit_field *edit_field) return; } - for (size_t i = edit_field->cursor; i < edit_field->buffer_size; ++i) { - edit_field->buffer[i - 1] = edit_field->buffer[i]; - } + char *dest = edit_field->buffer + edit_field->cursor - 1; + memmove(dest, dest + 1, edit_field->buffer_size - edit_field->cursor); edit_field->cursor--; edit_field->buffer[--edit_field->buffer_size] = 0;
Pin NDK to 21.1.6352462
@@ -210,7 +210,7 @@ jobs: java-version: 1.8 - name: Install NDK run: | - ${ANDROID_HOME}/tools/bin/sdkmanager --install ndk-bundle + sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.1.6352462" - name: Build run: | cd platforms/android
Changed categorization of requests containing CFNetwork to iOS when applicable.
@@ -75,6 +75,7 @@ static const char *os[][2] = { {"iPad", "iOS"}, {"iPod", "iOS"}, {"iPhone", "iOS"}, + {"CFNetwork", "iOS"}, {"AppleTV", "iOS"}, {"iTunes", "Macintosh"}, {"OS X", "Macintosh"}, @@ -353,6 +354,11 @@ parse_os (const char *str, char *tkn, char *os_type, int idx) { return conf.real_os ? get_real_android (tkn) : xstrdup (tkn); } /* iOS */ + if ((strstr (tkn, "CFNetwork")) != NULL) { + if ((b = strchr (str, ' '))) + *b = 0; + return xstrdup (str); + } if (strstr (tkn, "iPad") || strstr (tkn, "iPod")) return xstrdup (parse_ios (tkn, 4)); if (strstr (tkn, "iPhone"))
sdl/pixels: add BGR565Model and BGR555Model
@@ -356,6 +356,8 @@ var ( RGB332Model color.Model = color.ModelFunc(rgb332Model) RGB565Model color.Model = color.ModelFunc(rgb565Model) RGB555Model color.Model = color.ModelFunc(rgb555Model) + BGR565Model color.Model = color.ModelFunc(bgr565Model) + BGR555Model color.Model = color.ModelFunc(bgr555Model) ) func rgb444Model(c color.Color) color.Color { @@ -422,3 +424,41 @@ func rgb555Model(c color.Color) color.Color { r, g, b, _ := c.RGBA() return RGB555{uint8(r >> 11), uint8(g >> 11), uint8(b >> 11)} } + +type BGR565 struct { + B, G, R byte +} + +func (c BGR565) RGBA() (r, g, b, a uint32) { + r = uint32(c.R) << 11 + g = uint32(c.G) << 10 + b = uint32(c.B) << 11 + return +} + +func bgr565Model(c color.Color) color.Color { + if _, ok := c.(color.RGBA); ok { + return c + } + r, g, b, _ := c.RGBA() + return BGR565{uint8(b >> 11), uint8(g >> 10), uint8(r >> 11)} +} + +type BGR555 struct { + B, G, R byte +} + +func (c BGR555) RGBA() (r, g, b, a uint32) { + r = uint32(c.R) << 11 + g = uint32(c.G) << 11 + b = uint32(c.B) << 11 + return +} + +func bgr555Model(c color.Color) color.Color { + if _, ok := c.(color.RGBA); ok { + return c + } + r, g, b, _ := c.RGBA() + return BGR555{uint8(b >> 11), uint8(g >> 11), uint8(r >> 11)} +}
Ditto for 2nd part of least squares
@@ -58,11 +58,17 @@ void count_coeffs(const int16_t *buf, uint32_t size, uint64_t *buckets, uint64_t } } -void process_rdcosts(FILE *in, FILE *out, const double *mat) +static inline int is_power_of_two(uint32_t u) +{ + return (u & (u - 1)) == 0; +} + +int process_rdcosts(FILE *in, FILE *out, const double *mat) { void *buf = malloc(BUFSZ); uint32_t *u32buf = (uint32_t *)buf; int16_t *i16buf = (int16_t *)buf; + int rv = 0; double res[NUM_TOTAL_BUCKETS] = {0.0}; @@ -70,14 +76,36 @@ void process_rdcosts(FILE *in, FILE *out, const double *mat) uint32_t size, ccc, size_sqrt; uint64_t cg_buckets[NUM_TOTAL_BUCKETS] = {0}; uint64_t cg_num_signs = 0; + size_t n_read; - fread(buf, sizeof(uint32_t), 2, in); + n_read = fread(buf, sizeof(uint32_t), 2, in); size = u32buf[0]; ccc = u32buf[1]; + // Can't rely on feof() alone when reading from a pipe that might only get + // closed long after the last data has been poured in + if (n_read == 0) { + break; + } + if (feof(in) || n_read < sizeof(uint32_t) * 2) { + fprintf(stderr, "Unexpected EOF when reading header, managed still to read %u bytes\n", n_read); + rv = 1; + goto out; + } + if (!is_power_of_two(size)) { + fprintf(stderr, "Errorneous block size %u\n", size); + rv = 1; + goto out; + } + size_sqrt = 1 << (ilog2(size) >> 1); - fread(buf, sizeof(int16_t), size, in); + n_read = fread(buf, sizeof(int16_t), size, in); + if (n_read != size * sizeof(int16_t)) { + fprintf(stderr, "Unexpected EOF when reading block, managed still to read %u bytes\n", n_read); + rv = 1; + goto out; + } count_coeffs(i16buf, size, cg_buckets, &cg_num_signs); update_result(cg_buckets, ccc, mat, res); @@ -86,7 +114,9 @@ void process_rdcosts(FILE *in, FILE *out, const double *mat) for (int y = 0; y < NUM_TOTAL_BUCKETS; y++) fprintf(out, "%g\n", (float)(res[y])); +out: free(buf); + return rv; } int main(int ar, char **av) @@ -97,6 +127,6 @@ int main(int ar, char **av) return 1; } read_matrix(av[1], mat); - process_rdcosts(stdin, stdout, mat); + return process_rdcosts(stdin, stdout, mat); }
fix compile error for disabled multistreaming
@@ -2271,7 +2271,9 @@ void uvpollable_cb(uv_poll_t *handle, int status, int events) { struct neat_pollable_socket *pollable_socket = handle->data; neat_flow *flow = NULL; +#ifdef SCTP_MULTISTREAMING neat_flow *next_flow = NULL; +#endif neat_ctx *ctx = NULL; int result = NEAT_OK;
Added useful comment to document how log tailing works.
@@ -782,6 +782,8 @@ perform_tail_follow (uint64_t * size1, const char *fn) { size2 = file_size (fn); /* file hasn't changed */ + /* ###NOTE: This assumes the log file being read can be of less size, e.g., + * rotated/truncated file or greater when data is appended */ if (size2 == *size1) return;
Simplify get_mvd_coding_cost(), only include golomb coding
@@ -315,23 +315,8 @@ static uint32_t get_mvd_coding_cost(const encoder_state_t *state, unsigned bitcost = 0; const vector2d_t abs_mvd = { abs(mvd_hor), abs(mvd_ver) }; - bitcost += CTX_ENTROPY_BITS(&cabac->ctx.cu_mvd_model[0], abs_mvd.x > 0); - if (abs_mvd.x > 0) { - bitcost += CTX_ENTROPY_BITS(&cabac->ctx.cu_mvd_model[1], abs_mvd.x > 1); - if (abs_mvd.x > 1) { - bitcost += get_ep_ex_golomb_bitcost(abs_mvd.x - 2) << CTX_FRAC_BITS; - } - bitcost += CTX_FRAC_ONE_BIT; // sign - } - - bitcost += CTX_ENTROPY_BITS(&cabac->ctx.cu_mvd_model[0], abs_mvd.y > 0); - if (abs_mvd.y > 0) { - bitcost += CTX_ENTROPY_BITS(&cabac->ctx.cu_mvd_model[1], abs_mvd.y > 1); - if (abs_mvd.y > 1) { - bitcost += get_ep_ex_golomb_bitcost(abs_mvd.y - 2) << CTX_FRAC_BITS; - } - bitcost += CTX_FRAC_ONE_BIT; // sign - } + bitcost += get_ep_ex_golomb_bitcost(abs_mvd.x) << CTX_FRAC_BITS; + bitcost += get_ep_ex_golomb_bitcost(abs_mvd.y) << CTX_FRAC_BITS; // Round and shift back to integer bits. return (bitcost + CTX_FRAC_HALF_BIT) >> CTX_FRAC_BITS;
update formatting of statistics
@@ -301,11 +301,8 @@ static void _mi_stats_print(mi_stats_t* stats, mi_output_fun* out0, void* arg0) mi_stat_print(&total, "total", 1, out, arg); #endif #if MI_STAT>1 - mi_stat_print(&stats->malloc, "malloc total", 1, out, arg); - - _mi_fprintf(out, arg, "malloc requested: "); - mi_print_amount(stats->malloc.allocated, 1, out, arg); - _mi_fprintf(out, arg, "\n\n"); + mi_stat_print(&stats->malloc, "malloc req", 1, out, arg); + _mi_fprintf(out, arg, "\n"); #endif mi_stat_print(&stats->reserved, "reserved", 1, out, arg); mi_stat_print(&stats->committed, "committed", 1, out, arg);
Add LV_INDEV_DRAG_THROW checker to lv_conf_templ.h
/************************* * Non-user section *************************/ + +#if LV_INDEV_DRAG_THROW <= 0 +#warning "LV_INDEV_DRAG_THROW must be greater than 0" +#undef LV_INDEV_DRAG_THROW +#define LV_INDEV_DRAG_THROW 1 +#endif + #if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/ # define _CRT_SECURE_NO_WARNINGS #endif
maybe someday I will learn md
Build and install from sources is possible with spack. Source build requires build dependencies. These dependencies are not yet provided with the spack configuration file. So if you are using spack to build aomp, you must install the prerequisites listed below. -##Source Build Prerequisites: +## Source Build Prerequisites ### Required Distribution Packages @@ -82,7 +82,6 @@ Create a /etc/yum.repos.d/rocm.repo file with the following contents: ``` sudo yum install rock-dkms ``` - ### Create the Unix Video Group Regardless of Linux distribution, you must create a video group to contain the users authorized to use the GPU. ```
travis: try to use addons to install deps
@@ -16,16 +16,28 @@ matrix: - COVERITY_SCAN_BUILD_COMMAND="make" - compiler: clang os: osx + env: + - LDFLAGS="-L$(brew --prefix)/opt/libressl/lib" + - CPPFLAGS="-I$(brew --prefix)/opt/libressl/include" # gcc is actually clang on OSX, so pointless to test twice +addons: + apt: + packages: + - libonig-dev + - libpcre3-dev + - zlib1g-dev + homebrew: + packages: + - lz4 + - oniguruma + - pcre + - pcre2 + - libressl + update: true # working around unknown bundle command + script: - | - if [ $TRAVIS_OS_NAME = osx ]; then - brew update > /dev/null - brew install lz4 openssl oniguruma pcre pcre2 - else - sudo apt-get install libonig-dev libpcre3-dev zlib1g-dev - fi # workaround git not retaining mtimes and bison/flex not being uptodate - touch conffile.yy.c conffile.tab.c conffile.tab.h - touch configure.ac Makefile.am aclocal.m4 configure Makefile.in config.h.in
FIX: tokenizing string block in kv mget.
@@ -1674,6 +1674,7 @@ static int build_complete_strings(conn *c, segtok_t *segtoks, int segcnt, mblck_list_t add_blcks; mblck_node_t *blckptr; char *dataptr; + char *saveptr; token_t *tok_ptr; uint32_t bodylen = MBLCK_GET_BODYLEN(&c->str_blcks); uint32_t numblks = 1; @@ -1712,12 +1713,14 @@ static int build_complete_strings(conn *c, segtok_t *segtoks, int segcnt, datalen = 0; } + saveptr = &dataptr[datalen]; + memcpy(dataptr + datalen, segtoks[i].value, segtoks[i].length); datalen += segtoks[i].length; memcpy(dataptr + datalen, tok_ptr->value, tok_ptr->length); datalen += tok_ptr->length; - tok_ptr->value = dataptr; + tok_ptr->value = saveptr; tok_ptr->length = complen; }
lyb printer REFACTOR moved functions opaq, anydata
@@ -1017,20 +1017,15 @@ lyb_print_schema_hash(struct ly_out *out, struct lysc_node *schema, struct hash_ static LY_ERR lyb_print_node(struct ly_out *out, const struct lyd_node *node, struct lyd_lyb_ctx *lybctx) { - /* write node content */ - if (!node->schema) { - LY_CHECK_RET(lyb_print_node_opaq(out, (struct lyd_node_opaq *)node, lybctx)); - } else if (node->schema->nodetype & LYD_NODE_INNER) { /* write necessary basic data */ LY_CHECK_RET(lyb_print_node_header(out, node, lybctx)); + /* write node content */ + if (node->schema->nodetype & LYD_NODE_INNER) { /* recursively write all the descendants */ LY_CHECK_RET(lyb_print_siblings(out, lyd_child(node), lybctx)); } else if (node->schema->nodetype & LYD_NODE_TERM) { - LY_CHECK_RET(lyb_print_node_header(out, node, lybctx)); LY_CHECK_RET(lyb_print_term_value((struct lyd_node_term *)node, out, lybctx->lybctx)); - } else if (node->schema->nodetype & LYD_NODE_ANY) { - LY_CHECK_RET(lyb_print_node_any(out, (struct lyd_node_any *)node, lybctx)); } else { LOGINT_RET(lybctx->lybctx->ctx); } @@ -1082,7 +1077,13 @@ lyb_print_siblings(struct ly_out *out, const struct lyd_node *node, struct lyd_l /* write schema hash */ LY_CHECK_RET(lyb_print_schema_hash(out, (struct lysc_node *)node->schema, &sibling_ht, lybctx->lybctx)); + if (!node->schema) { + LY_CHECK_RET(lyb_print_node_opaq(out, (struct lyd_node_opaq *)node, lybctx)); + } else if (node->schema->nodetype & LYD_NODE_ANY) { + LY_CHECK_RET(lyb_print_node_any(out, (struct lyd_node_any *)node, lybctx)); + } else { LY_CHECK_RET(lyb_print_node(out, node, lybctx)); + } if (top_level && !(lybctx->print_options & LYD_PRINT_WITHSIBLINGS)) { break;
Eliminate a warning about an unused variable.
@@ -1877,7 +1877,9 @@ static int nsh_parse_cmdparm(FAR struct nsh_vtbl_s *vtbl, FAR char *cmdline, FAR char *argv[MAX_ARGV_ENTRIES]; FAR char *saveptr; FAR char *cmd; +#ifndef CONFIG_NSH_DISABLEBG bool bgsave; +#endif bool redirsave; int argc; int ret;
ames: check if we have a flow for a nax ack bone
:: if it received a nack on a backward bone :: =+ backward-bone=(mix 0b10 bone) - :: not a naxplanation ack bone + :: the backward bone is a naxplanation ack bone and we have a flow for it :: ?. =(2 (mod backward-bone 4)) | + ?~ (~(get by rcv.peer-state) backward-bone) + | %. & (trace &(dry odd.veb) ship |.((weld "failed %watch plea " log))) :: +on-take-wake: receive wakeup or error notification from behn
Fixed errors & warnings when compiling on linux I added header files with #include to prevent the implicit declaration warnings and fixed a typo in function size_t lovrPlatformGetExecutablePath(char* buffer, size_t size).
#include "os.h" #include <string.h> #include <time.h> +#include <unistd.h> +#include <stdlib.h> +#include <sys/types.h> +#include <pwd.h> #include "os_glfw.h" @@ -97,7 +101,7 @@ size_t lovrPlatformGetWorkingDirectory(char* buffer, size_t size) { } size_t lovrPlatformGetExecutablePath(char* buffer, size_t size) { - ssize_t length = readlink("/proc/self/exe", buffer, size - 1); + size_t length = readlink("/proc/self/exe", buffer, size - 1); if (length >= 0) { buffer[length] = '\0'; return length;
maps: good riddance to maps/contrib/libpqxx
@@ -38,9 +38,6 @@ DENY contrib/python -> contrib/python/django/django-2.2 ALLOW maps -> maps/contrib ALLOW devtools/experimental/mapsmobi -> maps/contrib -# maps/contrib/libpqxx is used by maps/libs/pgpool, a client-side connection pool for PostgrSQL -# This rule can be removed upon completion of https://st.yandex-team.ru/HEREBEDRAGONS-123 -ALLOW .* -> maps/contrib/libpqxx DENY .* -> maps/contrib # contrib/libs/boost is just a proxy towards contrib/deprecated/boost - hence all the rules are duplicated
Add missing tests for realm object type via jerry_object_get_type JerryScript-DCO-1.0-Signed-off-by: Peter Gal
@@ -123,6 +123,21 @@ main (void) jerry_release_value (entries[idx].value); } + if (jerry_is_feature_enabled (JERRY_FEATURE_REALM)) + { + jerry_value_t new_realm = jerry_create_realm (); + jerry_object_type_t new_realm_object_type = jerry_object_get_type (new_realm); + TEST_ASSERT (new_realm_object_type == JERRY_OBJECT_TYPE_GENERIC); + + jerry_value_t old_realm = jerry_set_realm (new_realm); + jerry_object_type_t old_realm_object_type = jerry_object_get_type (old_realm); + TEST_ASSERT (old_realm_object_type == JERRY_OBJECT_TYPE_GENERIC); + + jerry_set_realm (old_realm); + + jerry_release_value (new_realm); + } + jerry_cleanup (); return 0;
BQ25710 : Change Voltage Step Voltage Step of MAX voltage is 8mV. BRANCH=None TEST=None
@@ -63,7 +63,7 @@ static const struct charger_info bq25710_charger_info = { .name = "bq25710", .voltage_max = 19200, .voltage_min = 1024, - .voltage_step = 16, + .voltage_step = 8, .current_max = 8128 / CHARGING_RESISTOR_RATIO, .current_min = 64 / CHARGING_RESISTOR_RATIO, .current_step = 64 / CHARGING_RESISTOR_RATIO,
Fix lock leak in evp_keymgmt_util_export_to_provider() Fixes
@@ -197,6 +197,7 @@ void *evp_keymgmt_util_export_to_provider(EVP_PKEY *pk, EVP_KEYMGMT *keymgmt) /* Add the new export to the operation cache */ if (!evp_keymgmt_util_cache_keydata(pk, keymgmt, import_data.keydata)) { + CRYPTO_THREAD_unlock(pk->lock); evp_keymgmt_freedata(keymgmt, import_data.keydata); return NULL; }
tcp: add ACK flag to RST packet According to RFC 793, the ACK control bit is always sent once the connection is established. Type: fix
@@ -766,7 +766,7 @@ tcp_send_reset (tcp_connection_t * tc) tc->snd_opts_len = tcp_make_options (tc, &tc->snd_opts, tc->state); tcp_hdr_opts_len = tc->snd_opts_len + sizeof (tcp_header_t); advertise_wnd = tc->rcv_wnd >> tc->rcv_wscale; - flags = TCP_FLAG_RST; + flags = TCP_FLAG_RST | TCP_FLAG_ACK; th = vlib_buffer_push_tcp (b, tc->c_lcl_port, tc->c_rmt_port, tc->snd_nxt, tc->rcv_nxt, tcp_hdr_opts_len, flags, advertise_wnd);
Update README for latest help info
@@ -84,9 +84,9 @@ the astcenc encoder program, like this on Linux or macOS: astcenc -Invoking the tool with no arguments gives an extensive help message, including -usage instructions, and details of all the available command line options. A -summary of the main encoder options are shown below. +Invoking `astcenc -help` gives an extensive help message, including usage +instructions and details of all available command line options. A summary of +the main encoder options are shown below. ## Compressing an image
[autobuild] improve openssl
@@ -547,53 +547,62 @@ AC_ARG_WITH([openssl], AC_MSG_RESULT([$WITH_OPENSSL]) if test "$WITH_OPENSSL" != no; then - use_openssl=yes if test "$WITH_OPENSSL" != yes; then - CPPFLAGS="$CPPFLAGS -I$WITH_OPENSSL/include" - LDFLAGS="$LDFLAGS -L$WITH_OPENSSL/lib" + openssl_append_CPPFLAGS=" -I$WITH_OPENSSL/include" + openssl_append_LDFLAGS=" -L$WITH_OPENSSL/lib" fi -else - use_openssl=no fi -AM_CONDITIONAL([BUILD_WITH_OPENSSL], [test "$WITH_OPENSSL" != no]) +AC_MSG_CHECKING([custom include directory for openssl]) AC_ARG_WITH([openssl-includes], [AC_HELP_STRING([--with-openssl-includes=DIR], [OpenSSL includes])], [ - use_openssl=yes - CPPFLAGS="$CPPFLAGS -I$withval" - ] + if test "$WITH_OPENSSL" = no; then + AC_MSG_ERROR([build --with-openssl to use --with-openssl-includes]) + fi + openssl_append_CPPFLAGS=" -I$withval" + AC_MSG_RESULT([$withval]) + ], + [AC_MSG_RESULT([no])] ) +AC_MSG_CHECKING([custom lib directory for openssl]) AC_ARG_WITH([openssl-libs], [AC_HELP_STRING([--with-openssl-libs=DIR], [OpenSSL libraries])], [ - use_openssl=yes - LDFLAGS="$LDFLAGS -L$withval" - ] + if test "$WITH_OPENSSL" = no; then + AC_MSG_ERROR([build --with-openssl to use --with-openssl-libs]) + fi + openssl_append_LDFLAGS=" -L$withval" + AC_MSG_RESULT([$withval]) + ], + [AC_MSG_RESULT([no])] ) -if test "$use_openssl" = yes; then +AM_CONDITIONAL([BUILD_WITH_OPENSSL], [test "$WITH_OPENSSL" != no]) + +if test "$WITH_OPENSSL" != no; then if test "$WITH_KRB5" != no; then AC_DEFINE([USE_OPENSSL_KERBEROS], [1], [with kerberos]) fi - AC_CHECK_HEADERS([openssl/ssl.h]) - OLDLIBS="$LIBS" + CPPFLAGS="${CPPFLAGS}${openssl_append_CPPFLAGS}" + LDFLAGS="${LDFLAGS}${openssl_append_LDFLAGS}" + + AC_CHECK_HEADERS([openssl/ssl.h], [], [ + AC_MSG_ERROR([openssl headers not found. install them or build without --with-openssl]) + ]) AC_CHECK_LIB([crypto], [BIO_f_base64], - [AC_CHECK_LIB([ssl], [SSL_new], - [ - SSL_LIB="-lssl -lcrypto" - CRYPTO_LIB="-lcrypto" - AC_DEFINE([HAVE_LIBSSL], [], [Have libssl]) - ], - [], + [CRYPTO_LIB="-lcrypto"], + [AC_MSG_ERROR([openssl crypto library not found. install it or build without --with-openssl])] + ) + AC_CHECK_LIB([ssl], [SSL_new], + [SSL_LIB="-lssl -lcrypto"], + [AC_MSG_ERROR([openssl ssl library not found. install it or build without --with-openssl])], [ -lcrypto "$DL_LIB" ] - )], - [], - [] ) - LIBS="$OLDLIBS" + + AC_DEFINE([HAVE_LIBSSL], [], [Have libssl]) AC_SUBST([SSL_LIB]) AC_SUBST([CRYPTO_LIB]) fi
Add C++ CxPlat Improvements
@@ -52,6 +52,22 @@ struct CxPlatEvent { bool WaitTimeout(uint32_t TimeoutMs) { return CxPlatEventWaitWithTimeout(Handle, TimeoutMs); } }; +struct CxPlatLock { + CXPLAT_LOCK Handle; + CxPlatLock() noexcept { CxPlatLockInitialize(&Handle); } + ~CxPlatLock() noexcept { CxPlatLockUninitialize(&Handle); } + void Acquire() noexcept { CxPlatLockAcquire(&Handle); } + void Release() noexcept { CxPlatLockRelease(&Handle); } +}; + +struct CxPlatPool { + CXPLAT_POOL Handle; + CxPlatPool(uint32_t Size, uint32_t Tag = 0, bool IsPaged = false) noexcept { CxPlatPoolInitialize(IsPaged, Size, Tag, &Handle); } + ~CxPlatPool() noexcept { CxPlatPoolUninitialize(&Handle); } + void* Alloc() noexcept { return CxPlatPoolAlloc(&Handle); } + void Free(void* Ptr) noexcept { CxPlatPoolFree(&Handle, Ptr); } +}; + #ifdef CXPLAT_HASH_MIN_SIZE struct HashTable { @@ -409,6 +425,14 @@ public: } }; +class MsQuicCertificateHash : public QUIC_CERTIFICATE_HASH { +public: + MsQuicCertificateHash(_In_reads_(20) const uint8_t* Thumbprint) { + QUIC_CERTIFICATE_HASH* thisStruct = this; + memcpy(thisStruct->ShaHash, Thumbprint, sizeof(thisStruct->ShaHash)); + } +}; + #ifndef QUIC_DEFAULT_CLIENT_CRED_FLAGS #define QUIC_DEFAULT_CLIENT_CRED_FLAGS QUIC_CREDENTIAL_FLAG_CLIENT #endif @@ -424,6 +448,13 @@ public: memset(thisStruct, 0, sizeof(QUIC_CREDENTIAL_CONFIG)); Flags = _Flags; } + MsQuicCredentialConfig(QUIC_CREDENTIAL_FLAGS _Flags, const QUIC_CERTIFICATE_HASH* _CertificateHash) { + QUIC_CREDENTIAL_CONFIG* thisStruct = this; + memset(thisStruct, 0, sizeof(QUIC_CREDENTIAL_CONFIG)); + Type = QUIC_CREDENTIAL_TYPE_CERTIFICATE_HASH; + Flags = _Flags; + CertificateHash = (QUIC_CERTIFICATE_HASH*)_CertificateHash; + } }; class MsQuicConfiguration {
build/configs: Modify I2C default SDA pin. Pin IO5 is used in LCD. Thus, I2C SDA is changed to pin IO2 in wrover kit board.
@@ -95,7 +95,7 @@ CONFIG_ESP32_I2C0_MODE_MASTER=y # CONFIG_ESP32_I2C0_MODE_SLAVE is not set CONFIG_ESP32_I2C0_SCLK_PIN=4 # CONFIG_ESP32_I2C0_SCLK_PULLUP_EN is not set -CONFIG_ESP32_I2C0_SDA_PIN=5 +CONFIG_ESP32_I2C0_SDA_PIN=2 # CONFIG_ESP32_I2C0_SDA_PULLUP_EN is not set #
yajl: Add type plugin as "needs" dependency
- infos/author = Markus Raab <[email protected]> - infos/licence = BSD - infos/provides = storage/json -- infos/needs = directoryvalue -- infos/recommends = rebase comment type +- infos/needs = directoryvalue type +- infos/recommends = rebase comment - infos/placements = getstorage setstorage - infos/status = maintained coverage unittest - infos/description = JSON using YAJL @@ -200,12 +200,13 @@ sudo kdb umount user/tests/yajl ### Booleans The YAJL plugin maps "1" and "true" to its true bool type, and "0" and "false" to its false bool type. -However, it always returns 1 and 0. +However, it always returns 1 or 0. You can take advantage of the [type](../type/README.md) plugin to map arbitrary values to true and false. ```sh -kdb mount conf.json user/tests/yajl yajl type +# Type plugin is automatically mounted since yajl depends on it +kdb mount conf.json user/tests/yajl yajl kdb set user/tests/yajl 1 kdb get user/tests/yajl #> 1 @@ -223,28 +224,6 @@ kdb rm -r user/tests/yajl sudo kdb umount user/tests/yajl ``` -Without the type plugin - -```sh -kdb mount conf.json user/tests/yajl yajl -kdb set user/tests/yajl 1 -kdb getmeta user/tests/yajl type -#> boolean -kdb set user/tests/yajl false -kdb getmeta user/tests/yajl type -#> boolean -kdb get user/tests/yajl -#> 0 - -# Without the type plugin, 'on' is mapped to a string and a warning is emitted. -kdb set user/tests/yajl on -#> RET: 2 - -# Undo modifications to the database -kdb rm -r user/tests/yajl -sudo kdb umount user/tests/yajl -``` - ## OpenICC Device Config This plugin was specifically designed and tested for the
Added serial load option to da1469x download script.
@@ -109,13 +109,27 @@ if [ -z $JLINK_TARGET_HOST ]; then JLINK_SERVER_CMD="shell sh -c \"trap '' 2; $JLINK_GDB_SERVER -device cortex-m33 -speed 4000 -if SWD -port $PORT -singlerun $EXTRA_JTAG_CMD > $JLINK_LOG_FILE 2>&1 &\"" fi +if [ -n "$UART_PROTO_DEV" ]; then + ${CORE_PATH}/hw/mcu/dialog/da1469x/scripts/da1469x_serial.py load ${FLASH_LOADER}.bin \ + -u ${UART_PROTO_DEV} -r ${CORE_PATH}/hw/mcu/dialog/da1469x/scripts/reset.sh + if [ $? != 0 ]; then + exit 1 + fi +fi + cat > $GDB_CMD_FILE <<EOF set pagination off $JLINK_SERVER_CMD $JLINK_TARGET_CMD mon reset mon halt -restore $FLASH_LOADER.bin binary 0x20000000 +EOF + +if [ ! -n "$UART_PROTO_DEV" ]; then + echo "restore $FLASH_LOADER.bin binary 0x20000000" >> $GDB_CMD_FILE +fi + +cat >> $GDB_CMD_FILE <<EOF symbol-file $FLASH_LOADER # Configure QSPI controller so it can read flash in automode (values
edit diff BUGFIX attr value prefixes are in JSON format Refs
@@ -337,7 +337,7 @@ sr_edit_create_meta_attr(struct lyd_node *edit_node, const char *mod_name, const } } else { /* create a new attribute */ - if (lyd_new_attr2(edit_node, mod->ns, name, value, NULL)) { + if (lyd_new_attr(edit_node, mod->name, name, value, NULL)) { sr_errinfo_new_ly(&err_info, LYD_CTX(edit_node), NULL); return err_info; }
Make specifying schemaClassLabels optional in case target data is passed as raw strings
@@ -1277,11 +1277,7 @@ namespace NCB { TConstArrayRef<NJson::TJsonValue> schemaClassLabels = poolQuantizationSchema.ClassLabels; - if (metaInfo.TargetType == ERawTargetType::String) { - CB_ENSURE( - !schemaClassLabels.empty(), - "poolQuantizationSchema must have class labels when target data type is String" - ); + if (metaInfo.TargetType == ERawTargetType::String && !schemaClassLabels.empty()) { CB_ENSURE( schemaClassLabels[0].GetType() == NJson::JSON_STRING, "poolQuantizationSchema must have string class labels when target data type is String"
Fixed the crash problem caused by not initialized when applying for globalCmpFeedback memory. Invalid test cases will be generated due to the crash in the program being tested.
@@ -123,6 +123,7 @@ static void initializeCmpFeedback(void) { _HF_CMP_BITMAP_FD, sizeof(cmpfeedback_t)); return; } + memset(ret, 0, sizeof(cmpfeedback_t)); ATOMIC_SET(globalCmpFeedback, ret); }
fixed PPP-chap via 802.11 mac frame detection
@@ -2340,12 +2340,10 @@ if((macf->subtype == IEEE80211_STYPE_DATA) || (macf->subtype == IEEE80211_STYPE_ } else if(((ntohs(llc->type)) == LLC_TYPE_IPV4) && (llc->dsap == LLC_SNAP)) { - packet_ptr += MAC_SIZE_NORM +LLC_SIZE; processipv4packet(tv_sec, tv_usec, caplen -MAC_SIZE_NORM -LLC_SIZE, packet_ptr); } else if(((ntohs(llc->type)) == LLC_TYPE_IPV6) && (llc->dsap == LLC_SNAP)) { - packet_ptr += MAC_SIZE_NORM +LLC_SIZE; processipv6packet(tv_sec, tv_usec, caplen -MAC_SIZE_NORM -LLC_SIZE, packet_ptr); } }
zephyr/machine_i2c: Use stdint.h types. Zephyr migrated to use uint8_t, etc. instead of u8_t, etc.
@@ -97,7 +97,7 @@ STATIC int machine_hard_i2c_transfer_single(mp_obj_base_t *self_in, uint16_t add struct i2c_msg msg; int ret; - msg.buf = (u8_t *)buf; + msg.buf = (uint8_t *)buf; msg.len = len; msg.flags = 0;
add __install_only__
#!/bin/bash # xmake getter -# usage: bash <(curl -s <my location>) [branch] [commit] +# usage: bash <(curl -s <my location>) [branch] [commit/__install_only__] # print a LOGO! echo ' _ ' @@ -71,7 +71,10 @@ then else cp -r "$(git rev-parse --show-toplevel 2>/dev/null || hg root 2>/dev/null || echo "$PWD")" /tmp/$$xmake_getter || my_exit 'Clone Fail' fi +if [ 'x__install_only__' != "x$2" ] +then make -C /tmp/$$xmake_getter --no-print-directory build || my_exit 'Build Fail' +fi IFS=':' patharr=($PATH) prefix=
doc: add pg_prewarm example Discussion: Author: Dong Wook Lee Backpatch-through: 11
@@ -121,6 +121,19 @@ autoprewarm_dump_now() RETURNS int8 </listitem> </varlistentry> </variablelist> + <para> + These parameters must be set in <filename>postgresql.conf</filename>. + Typical usage might be: + </para> + +<programlisting> +# postgresql.conf +shared_preload_libraries = 'pg_prewarm' + +pg_prewarm.autoprewarm = true +pg_prewarm.autoprewarm_interval = 300s + +</programlisting> </sect2>
fix build of libjpeg-turbo for armv7a maps-mobile platform
@@ -6100,7 +6100,7 @@ when ($MAPSMOBI_BUILD_TARGET && $OS_ANDROID) { } when ($ARCH_ARM7) { - CFLAGS+=-mfpu=vfpv3-d16 -mfloat-abi=softfp + CFLAGS+=-mfloat-abi=softfp } elsewhen ($ARCH_ARM64) { }
bricks/primehub: add make target
@@ -4,9 +4,9 @@ help: .PHONY: doc -all: movehub cityhub cplushub nxt ev3dev-armel +all: movehub cityhub cplushub primehub nxt ev3dev-armel -clean-all: clean-movehub clean-cityhub clean-cplushub clean-nxt clean-ev3dev-armel +clean-all: clean-movehub clean-cityhub clean-cplushub clean-primehub clean-nxt clean-ev3dev-armel ev3dev-host: @$(MAKE) -C bricks/ev3dev CROSS_COMPILE= @@ -63,5 +63,11 @@ nxt: clean-nxt: clean-mpy-cross @$(MAKE) -C bricks/nxt clean +primehub: + @$(MAKE) -C bricks/primehub + +clean-primehub: clean-mpy-cross + @$(MAKE) -C bricks/primehub clean + clean-mpy-cross: @$(MAKE) -C ../../mpy-cross clean
cleanup osd_menu_maps
@@ -249,9 +249,6 @@ const char stick_wizard_labels_2[3][21] = {{"RECORDING"}, {"MOVE STICKS"}, {"TO const uint8_t stick_wizard_positions_2[3][2] = {{10, 3}, {9, 5}, {9, 7}}; //stick wizard map 3 - move sticks to test -//const char stick_wizard_labels_3[3][21] = {{"TESTING CALIBRATION"}, {"MOVE STICKS"}, {"TO ALL 4 CORNERS"}}; -//const uint8_t stick_wizard_positions_3[3][2] = {{6, 3}, {9, 5}, {7, 7}}; - const char stick_wizard_labels_3[3][21] = {{"TESTING CALIBRATION"}, {"MOVE STICKS AGAIN"}, {"TO EXTENTS"}}; const uint8_t stick_wizard_positions_3[3][2] = {{5, 3}, {6, 5}, {9, 7}};
vif.c: Fallback on routing table for neighbor checks Falling back on the routing table allows for a dynamic routing protocol to provide adjacency with PIM routers that would otherwise fail the subnet check.
@@ -590,6 +590,7 @@ vifi_t find_vif_direct(uint32_t src) vifi_t vifi; struct uvif *v; struct phaddr *p; + struct rpfctl rpf; for (vifi = 0, v = uvifs; vifi < numvifs; ++vifi, ++v) { if (v->uv_flags & (VIFF_DISABLED | VIFF_DOWN | VIFF_REGISTER | VIFF_TUNNEL)) @@ -613,6 +614,13 @@ vifi_t find_vif_direct(uint32_t src) return vifi; } + /* Check if the routing table has a direct route (no gateway). */ + if (k_req_incoming(src, &rpf)) { + if (rpf.source.s_addr == rpf.rpfneighbor.s_addr) { + return rpf.iif; + } + } + return NO_VIF; } @@ -650,6 +658,7 @@ vifi_t find_vif_direct_local(uint32_t src) vifi_t vifi; struct uvif *v; struct phaddr *p; + struct rpfctl rpf; for (vifi = 0, v = uvifs; vifi < numvifs; ++vifi, ++v) { /* TODO: XXX: what about VIFF_TUNNEL? */ @@ -674,6 +683,13 @@ vifi_t find_vif_direct_local(uint32_t src) return vifi; } + /* Check if the routing table has a direct route (no gateway). */ + if (k_req_incoming(src, &rpf)) { + if (rpf.source.s_addr == rpf.rpfneighbor.s_addr) { + return rpf.iif; + } + } + return NO_VIF; }
vrapi: cleanup; fix getPose for non-head/hands devices;
@@ -195,6 +195,10 @@ static const float* vrapi_getBoundsGeometry(uint32_t* count) { } static bool vrapi_getPose(Device device, float* position, float* orientation) { + if (device != DEVICE_HAND_LEFT && device != DEVICE_HAND_RIGHT && device != DEVICE_HEAD) { + return false; + } + ovrPosef* pose; bool valid; @@ -211,9 +215,9 @@ static bool vrapi_getPose(Device device, float* position, float* orientation) { vec3_set(position, pose->Position.x, pose->Position.y + state.offset, pose->Position.z); quat_init(orientation, &pose->Orientation.x); - // make tracked hands face -Z + // Make tracked hands face -Z if (index < 2 && state.hands[index].Type == ovrControllerType_Hand) { - float rotation[4] = {0,0,0,1}; + float rotation[4]; if (device == DEVICE_HAND_LEFT) { float q[4]; quat_fromAngleAxis(rotation, (float) M_PI, 0.f, 0.f, 1.f); @@ -224,7 +228,6 @@ static bool vrapi_getPose(Device device, float* position, float* orientation) { quat_mul(orientation, orientation, rotation); } - return valid; }
gall: skip nonce in pre-nonce subs wires
%. $(moves t.moves) %^ trace odd.veb.bug.state leaf/"gall: {<agent-name>} missing subscription, got %leave" ~ - =/ have=[nonce=@ acked=? =path] - :- (~(got by beat.watches.yoke) sub-wire dock) - (~(got by boat.watches.yoke) sub-wire dock) + =/ nonce=@ (~(got by beat.watches.yoke) sub-wire dock) =. p.move.move - (weld sys-wire [(scot %ud nonce.have) sub-wire]) + %+ weld sys-wire + ?: =(nonce 0) + :: skip adding nonce to pre-nonce subscription wires + :: + sub-wire + [(scot %ud nonce) sub-wire] =: boat.watches.yoke (~(del by boat.watches.yoke) [sub-wire dock]) beat.watches.yoke (~(del by beat.watches.yoke) [sub-wire dock]) ==
configs/artik053: Enable Fault Manager Add fault manager configs under configs/artik053/elf
@@ -22,6 +22,8 @@ CONFIG_FRAMEWORK_DIR="../framework" CONFIG_TOOLS_DIR="../tools" # CONFIG_BUILD_FLAT is not set CONFIG_BUILD_PROTECTED=y +CONFIG_APP_BINARY_SEPARATION=y +CONFIG_NUM_APPS=2 CONFIG_BUILD_2PASS=y CONFIG_PASS1_TARGET="all" CONFIG_PASS1_OBJECT="" @@ -228,7 +230,7 @@ CONFIG_ARCH_BOARD="artik05x" # Common Board Options # # CONFIG_BOARD_CRASHDUMP is not set -# CONFIG_BOARD_ASSERT_AUTORESET is not set +CONFIG_BOARD_ASSERT_AUTORESET=y CONFIG_LIB_BOARDCTL=y CONFIG_BOARDCTL_RESET=y # CONFIG_BOARDCTL_UNIQUEID is not set @@ -366,6 +368,11 @@ CONFIG_SCHED_HPWORKPERIOD=50000 CONFIG_SCHED_HPWORKSTACKSIZE=2048 # CONFIG_SCHED_LPWORK is not set +# +# fault Manager +# +CONFIG_FAULT_MGR=y + # # Stack size information # @@ -397,6 +404,7 @@ CONFIG_I2C_POLLED=y # CONFIG_I2C_TRACE is not set # CONFIG_I2C_WRITEREAD is not set CONFIG_SPI=y +CONFIG_SPI_USERIO=y # CONFIG_SPI_OWNBUS is not set # CONFIG_SPI_EXCHANGE is not set # CONFIG_SPI_CMDDATA is not set