message
stringlengths
6
474
diff
stringlengths
8
5.22k
Make pg_rewind test case more stable. If replication is exceptionally slow for some reason, pg_rewind might run before the test row has been replicated. Add an explicit wait for it. Reported-by: Andres Freund Discussion:
@@ -89,6 +89,10 @@ $node_c->safe_psql('postgres', "checkpoint"); $node_a->safe_psql('postgres', "INSERT INTO tbl1 VALUES ('in A, after C was promoted')"); +# make sure it's replicated to B before we continue +$lsn = $node_a->lsn('insert'); +$node_a->wait_for_catchup('node_b', 'replay', $lsn); + # Also insert a new row in the standby, which won't be present in the # old primary. $node_c->safe_psql('postgres',
Added polyfill.js in index.jsp
<script type ="text/javascript" src ="js/main.js"></script> <script type ="text/javascript" src ="js/searchBar.js"></script> + <script type ="text/javascript" src ="js/polyfill.js"></script> <jsp:include page="header-index.jsp" />
update provisioning and removed-components for migration-guides
@@ -14,7 +14,8 @@ Wi-Fi Provisioning ------------------ .. list:: - * The ``pop`` field in the :cpp:func:`wifi_prov_mgr_start_provisioning` API is now deprecated. For backward compatibility, ``pop`` can be still passed as a string for security1. However for Security2 the ``wifi_prov_sec_params`` argument needs to be passed instead of ``pop``. This parameter should contain the structure (containing the security parameters) as required by the protocol version used. For example, when using security version 2, the ``wifi_prov_sec_params`` parameter should contain the pointer to the structure of type :cpp:type:`wifi_prov_security2_params_t`. For security 1 the behaviour and the usage of the API remains same. + * The ``pop`` field in the :cpp:func:`wifi_prov_mgr_start_provisioning` API is now deprecated. For backward compatibility, ``pop`` can be still passed as a string for security version 1. However, for security version 2, the ``wifi_prov_sec_params`` argument needs to be passed instead of ``pop``. This parameter should contain the structure (containing the security parameters) as required by the protocol version used. For example, when using security version 2, the ``wifi_prov_sec_params`` parameter should contain the pointer to the structure of type :cpp:type:`wifi_prov_security2_params_t`. For security 1, the behaviour and the usage of the API remain the same. + * The API :cpp:func:`wifi_prov_mgr_is_provisioned` does not return :c:macro:`ESP_ERR_INVALID_STATE` error any more. This API now works without any dependency on provisioning manager initialization state. ESP Local Control
acl-plugin: multicore: send the interrupts to thread0 too The thread0 in some configurations can handle the traffic. Some of the previous fixes accomodated for that, but the interrupt sending for connection clearing was not adapted to that, resulting in a deadlock during clearing of all connections...
@@ -1516,7 +1516,7 @@ send_interrupts_to_workers (vlib_main_t * vm, acl_main_t *am) int i; /* Can't use vec_len(am->per_worker_data) since the threads might not have come up yet; */ int n_threads = vec_len(vlib_mains); - for (i = n_threads > 1 ? 1 : 0; i < n_threads; i++) { + for (i = 0; i < n_threads; i++) { send_one_worker_interrupt(vm, am, i); } }
graph-store: make validation work properly with type change
%+ roll (tap:orm graph) |= [[=atom =node:store] out=?] ^- ? - ?& ?=(^ (vale:dais [atom post.node])) + ?& ?| ?=(%| -.post.node) + ?=(^ (vale:dais [atom p.post.node])) + == + :: ?- -.children.node %empty %.y %graph ^$(graph p.children.node)
docs: explains why we have this continue
@@ -40,7 +40,9 @@ json_escape_string (size_t * output_len_p, char * input, size_t input_len) if (escaped) { int i; for (i = 0; escaped[i]; i++) { - if (NULL == output_start) continue; + if (NULL == output_start) + // count how many extra bytes are needed + continue; *output = escaped[i]; output ++;
vfio-plugin: close vfio pair on errors
@@ -418,7 +418,8 @@ int walk(pci_device_t *p) // look for legacy FME guids in BAR 0 if (opae_vfio_region_get(v, 0, (uint8_t**)&mmio, &size)) { OPAE_ERR("error getting BAR 0"); - return 1; + res = 2; + goto close; } // get the GUID at offset 0x8 @@ -426,7 +427,7 @@ int walk(pci_device_t *p) res = get_guid(((uint64_t*)mmio)+1, b0_guid); if (res) { OPAE_ERR("error reading guid"); - return 1; + goto close; } // walk our known list of FME guids @@ -436,7 +437,7 @@ int walk(pci_device_t *p) res = uuid_parse(*u, uuid); if (res) { OPAE_ERR("error parsing uuid: %s", *u); - return 1; + goto close; } if (!uuid_compare(uuid, b0_guid)) { // we found a legacy FME in BAR0, walk it
Change ECHO output syntax
@@ -1187,11 +1187,7 @@ espi_process_sub_cmd(esp_msg_t* msg, uint8_t is_ok, uint8_t is_error, uint8_t is esp_cmd_t n_cmd = ESP_CMD_IDLE; switch (msg->cmd) { case ESP_CMD_RESET: { -#if ESP_CFG_AT_ECHO - n_cmd = ESP_CMD_ATE1; /* Enable ECHO mode */ -#else - n_cmd = ESP_CMD_ATE0; /* Disable ECHO mode */ -#endif /* !ESP_CFG_AT_ECHO */ + n_cmd = ESP_CFG_AT_ECHO ? ESP_CMD_ATE1 : ESP_CMD_ATE0; /* Set ECHO mode */ break; } case ESP_CMD_ATE0:
bsp/hifive1: Add uart0 device
#include <os/os_dev.h> #include <bsp/bsp.h> #include <env/freedom-e300-hifive1/platform.h> + +#if MYNEWT_VAL(UART_0) +static struct uart_dev os_bsp_uart0; +static const struct fe310_uart_cfg os_bsp_uart0_cfg = { + .suc_pin_tx = HIFIVE_UART0_TX, + .suc_pin_rx = HIFIVE_UART0_RX, +}; +#endif + /* * What memory to include in coredump. */ @@ -72,4 +81,11 @@ hal_bsp_init(void) int rc; (void)rc; + +#if MYNEWT_VAL(UART_0) + rc = os_dev_create((struct os_dev *) &os_bsp_uart0, "uart0", + OS_DEV_INIT_PRIMARY, 0, uart_hal_init, (void *)&os_bsp_uart0_cfg); + assert(rc == 0); +#endif + }
Change ordering of members in Overlay
@@ -42,6 +42,8 @@ private: void SetActiveWidget(WidgetID aNewActive); + VKBindInfo m_VKBIOverlay{ { "cet.overlay_key", "Overlay Key", [this](){ Toggle(); } }, 0, 0, false }; + Console m_console; Bindings m_bindings; Settings m_settings; @@ -56,7 +58,6 @@ private: std::atomic_bool m_enabled{ false }; std::atomic_bool m_toggled{ false }; bool m_initialized{ false }; - VKBindInfo m_VKBIOverlay; std::atomic_bool m_showFirstTimeModal{ false };
py/modbuiltins: For builtin_chr, use uint8_t instead of char for array. The array should be of type unsigned byte because that is the type of the values being stored. And changing to uint8_t helps to prevent warnings from some static analysers.
@@ -137,7 +137,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(mp_builtin_callable_obj, mp_builtin_callable); STATIC mp_obj_t mp_builtin_chr(mp_obj_t o_in) { #if MICROPY_PY_BUILTINS_STR_UNICODE mp_uint_t c = mp_obj_get_int(o_in); - char str[4]; + uint8_t str[4]; int len = 0; if (c < 0x80) { *str = c; len = 1; @@ -159,12 +159,12 @@ STATIC mp_obj_t mp_builtin_chr(mp_obj_t o_in) { } else { mp_raise_ValueError("chr() arg not in range(0x110000)"); } - return mp_obj_new_str_via_qstr(str, len); + return mp_obj_new_str_via_qstr((char*)str, len); #else mp_int_t ord = mp_obj_get_int(o_in); if (0 <= ord && ord <= 0xff) { - char str[1] = {ord}; - return mp_obj_new_str_via_qstr(str, 1); + uint8_t str[1] = {ord}; + return mp_obj_new_str_via_qstr((char*)str, 1); } else { mp_raise_ValueError("chr() arg not in range(256)"); }
Remove useless call to super in PrevisualizeResult.widget
@@ -20,7 +20,6 @@ AjaxFranceLabs.PrevisualizeResultWidget = AjaxFranceLabs.ResultWidget.extend({ elm.find('.doc_list .bar-loader').remove(); var querySolr = getParamValue('query', decodeURIComponent(window.location.search)); - this._super(); var self = this; var docs = self.manager.response.response.docs; var preview_content = "";
pack: do not pack JSON string as binary
@@ -113,8 +113,8 @@ static char *tokens_to_msgpack(char *js, msgpack_pack_array(&pck, t->size); break; case JSMN_STRING: - msgpack_pack_bin(&pck, flen); - msgpack_pack_bin_body(&pck, js + t->start, flen); + msgpack_pack_str(&pck, flen); + msgpack_pack_str_body(&pck, js + t->start, flen); break; case JSMN_PRIMITIVE: p = js + t->start;
debian: try to fix build on stretch
# Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +# see FEATURE AREAS in dpkg-buildflags(1) +export DEB_BUILD_MAINT_OPTIONS = reproducible=-timeless +export DEB_BUILD_OPTIONS = noopt + # This has to be exported to make some magic below work. export DH_OPTIONS
OpenCoreKernel: Fix lapic patch logic closes acidanthera/bugtracker#370
@@ -310,10 +310,6 @@ OcKernelApplyPatches ( if (Config->Kernel.Quirks.CustomSmbiosGuid) { PatchCustomSmbiosGuid (Context); } - - if (Config->Kernel.Quirks.LapicKernelPanic) { - PatchLapicKernelPanic (&Patcher); - } } else { if (Config->Kernel.Quirks.AppleXcpmCfgLock) { PatchAppleXcpmCfgLock (&Patcher); @@ -338,6 +334,10 @@ OcKernelApplyPatches ( Config->Kernel.Emulate.Cpuid1Mask ); } + + if (Config->Kernel.Quirks.LapicKernelPanic) { + PatchLapicKernelPanic (&Patcher); + } } }
Notify compiler that cryptoErrorCode() does not return.
@@ -36,7 +36,7 @@ void cryptoInit(void); bool cryptoIsInit(void); void cryptoError(bool error, const char *description); -void cryptoErrorCode(unsigned long code, const char *description); +void cryptoErrorCode(unsigned long code, const char *description) __attribute__((__noreturn__)); CipherType cipherType(const String *name); const String *cipherTypeName(CipherType type);
iirdes/autotest: testing bessel filter design
@@ -384,3 +384,38 @@ void autotest_iirdes_ellip_bandstop() { iirfilt_crcf_destroy(q); } +// check Bessel filter design +// TODO: check group delay +void autotest_iirdes_bessel() { + unsigned int n = 9; // filter order + float fc = 0.1; // filter cut-off + unsigned int nfft = 960; // number of points to evaluate + + // design filter from prototype + iirfilt_crcf q = iirfilt_crcf_create_prototype(LIQUID_IIRDES_BESSEL, + LIQUID_IIRDES_LOWPASS, LIQUID_IIRDES_SOS,n,fc,0,1,60); + if (liquid_autotest_verbose) + iirfilt_crcf_print(q); + + // compute response and compare to expected or mask + unsigned int i; + float H[nfft]; // filter response + for (i=0; i<nfft; i++) { + float f = (float)i / (float)nfft - 0.5f; + float complex h; + iirfilt_crcf_freqresponse(q, f, &h); + H[i] = 10.*log10f(crealf(h*conjf(h))); + } + // verify result + autotest_psd_s regions[] = { + {.fmin=-0.500, .fmax=-0.305,.pmin= 0, .pmax=-60, .test_lo=0, .test_hi=1}, + {.fmin=-0.095, .fmax=+0.095,.pmin=-3, .pmax= 0.1, .test_lo=1, .test_hi=1}, + {.fmin=+0.305, .fmax=+0.500,.pmin= 0, .pmax=-60, .test_lo=0, .test_hi=1}, + }; + liquid_autotest_validate_spectrum(H, nfft, regions, 3, + liquid_autotest_verbose ? "autotest_iirdes_bessel.m" : NULL); + + // destroy filter object + iirfilt_crcf_destroy(q); +} +
TLS: Server Name Indication (SNI) support
@@ -395,6 +395,8 @@ neat_security_install(neat_ctx *ctx, neat_flow *flow) // authenticate the server.. todo an option to skip X509_VERIFY_PARAM *param = SSL_get0_param(private->ssl); X509_VERIFY_PARAM_set1_host(param, flow->name, 0); + // support Server Name Indication (SNI) + SSL_set_tlsext_host_name(private->ssl, flow->name); } private->inputBIO = BIO_new(BIO_s_mem());
cpu_start: fix warnings with CONFIG_PM_DFS_INIT_AUTO option Closes
@@ -393,11 +393,10 @@ void start_cpu0_default(void) #ifdef CONFIG_PM_ENABLE esp_pm_impl_init(); #ifdef CONFIG_PM_DFS_INIT_AUTO - rtc_cpu_freq_t max_freq; - rtc_clk_cpu_freq_from_mhz(CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ, &max_freq); + int xtal_freq = (int) rtc_clk_xtal_freq_get(); esp_pm_config_esp32_t cfg = { - .max_cpu_freq = max_freq, - .min_cpu_freq = RTC_CPU_FREQ_XTAL + .max_freq_mhz = CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ, + .min_freq_mhz = xtal_freq, }; esp_pm_configure(&cfg); #endif //CONFIG_PM_DFS_INIT_AUTO
crypto: fix fcrypt benchmark
@@ -41,7 +41,7 @@ kdb::KeySet toWrite; template <enum PluginVariant VARIANT> kdb::Key getMountpointForIteration (int iteration) { - return kdb::Key ("user/iterate/" + plugin_variant_names[VARIANT] + std::to_string (iteration), KEY_END); + return kdb::Key ("user/benchmark_" + plugin_variant_names[VARIANT] + std::to_string (iteration), KEY_END); } template <enum PluginVariant VARIANT> @@ -52,7 +52,7 @@ kdb::Key mountBackend (int iteration) Key mp = getMountpointForIteration<VARIANT> (iteration); std::string cf = "benchmark_" + plugin_variant_names[VARIANT] + "_" + std::to_string (iteration) + ".ecf"; - // unlink (cf.c_str ()); + unlink (cf.c_str ()); KDB kdb; KeySet mountConfig; @@ -61,15 +61,17 @@ kdb::Key mountBackend (int iteration) MountBackendBuilder b; b.setMountpoint (mp, KeySet (0, KS_END)); b.addPlugin (PluginSpec ("resolver")); + b.useConfigFile (cf); + b.addPlugin (PluginSpec ("dump")); if (VARIANT != NO_CRYPTO) { KeySet pluginConfig; - pluginConfig.append (Key ("/gpg/key", KEY_VALUE, GPG_TEST_KEY_ID, KEY_END)); - pluginConfig.append (Key ("/gpg/unit_test", KEY_VALUE, "1", KEY_END)); + pluginConfig.append (Key ("user/gpg/key", KEY_VALUE, GPG_TEST_KEY_ID, KEY_END)); + pluginConfig.append (Key ("user/gpg/unit_test", KEY_VALUE, "1", KEY_END)); b.addPlugin (PluginSpec (plugin_variant_names[VARIANT], pluginConfig)); } - b.useConfigFile (cf); + b.validated (); b.serialize (mountConfig); kdb.set (mountConfig, "system/elektra/mountpoints"); @@ -94,7 +96,7 @@ __attribute__ ((noinline)) void benchmark_crypto_set (int iteration) for (int i = 0; i < nr_keys; ++i) { // clang-format off - ks.append (Key ("user/iterate/" + plugin_variant_names[VARIANT] + std::to_string(iteration) + "/k" + std::to_string (i), + ks.append (Key (mp.getName () + "/k" + std::to_string (i), KEY_VALUE, "value", KEY_META, "crypto/encrypt", "1", KEY_END));
added new tools
@@ -4,10 +4,11 @@ hcxtools Small set of tools to capture and convert packets from wlan devices for the use with latest hashcat. The tools are 100% compatible to hashcat and recommended by hashcat (that means hcxtools 3.6.0 working with -hashcat 3.6.0). After capturing, upload the "uncleaned" cap -here (http://wpa-sec.stanev.org/?submit) to see if your ap is vulnerable +hashcat 3.6.0). Support for hashcat hash-modes (2500, 2501, 4800, 5500). +After capturing, upload the "uncleaned" cap here +(http://wpa-sec.stanev.org/?submit) to see if your ap is vulnerable by using common wordlists. Convert the cap to hccapx and check if wlan-key -was transmitted unencrypted (wlancap2hcx -e option). +or plainmasterkey was transmitted unencrypted. Brief description -------------- @@ -36,6 +37,8 @@ Detailed description | wlanhcxinfo | Shows detailed info from contents of hccapxfile | | wlanhcxmnc | Manually do nonce correction on byte number xx of a nonce | | wlancap2wpasec | Upload multiple caps to http://wpa-sec.stanev.org | +| wlancow2hcxpmk | Converts pre-computed cowpatty hashfiles for use with hashcat hash-mode 2501 | +| wlangenpmk | Generates plainmasterkey from essid and password | | whoismac | Show vendor information | | pwhash | Generate hash of a word by using a given charset |
fixed sprite copying when palette editing is enabled
@@ -1497,12 +1497,6 @@ static void cutToClipboard(Sprite* sprite) static void copyFromClipboard(Sprite* sprite) { - if(sprite->palette.edit) - { - pasteColor(sprite); - return; - } - s32 size = sprite->size * sprite->size * TIC_PALETTE_BPP / BITS_IN_BYTE; DEFER(u8* buffer = malloc(size), free(buffer))
DOC: added compilation FAQ page.
@@ -56,6 +56,8 @@ The use of ZooKeeper based clustering is optional. To enable it, use `--enable-zk-integration` along with `--with-zookeeper` when running configure. Make sure to use the ZooKeeper library with Arcus modifications. +To test arcus-memcached, you can execute `make test`. If any problem exists in compilation, please refer to [compilation FAQ](/doc/compilation_faq.md). + ## Run arcus-memcached has a pluggable engine structure.
apps/examples/nxterm: Remove duplicated fflush() call. fflush(stdout) was called twice to back-to-back.
/**************************************************************************** * examples/nxterm/nxterm_main.c * - * Copyright (C) 2012, 2016-2017, 2019 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt <[email protected]> + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. * ****************************************************************************/ @@ -402,7 +387,6 @@ int main(int argc, FAR char *argv[]) */ printf("nxterm_main: Starting the console task\n"); - fflush(stdout); fflush(stdout); fflush(stderr); @@ -440,6 +424,7 @@ errout_with_nx: /* Disconnect from the server */ nx_disconnect(g_nxterm_vars.hnx); + errout: return EXIT_FAILURE; }
zephyr/shim/src/panic.c: Format with clang-format BRANCH=none TEST=none
@@ -99,8 +99,9 @@ static void copy_esf_to_panic_data(const z_arch_esf_t *esf, { pdata->arch = PANIC_ARCH; pdata->struct_version = 2; - pdata->flags = (PANIC_ARCH == PANIC_ARCH_CORTEX_M) - ? PANIC_DATA_FLAG_FRAME_VALID : 0; + pdata->flags = (PANIC_ARCH == PANIC_ARCH_CORTEX_M) ? + PANIC_DATA_FLAG_FRAME_VALID : + 0; pdata->reserved = 0; pdata->struct_size = sizeof(*pdata); pdata->magic = PANIC_DATA_MAGIC;
dyna_tools: Add a _ prefix for functions. Otherwise, loaders will use lily_$package_$func, which is wrong. This puts in an extra underscore so that loaders and the interpreter both agree on how to find a function.
@@ -450,6 +450,9 @@ def run_loader_entry(e, i, accum, package_name): name += "_new" elif e.e_type in ["class", "enum", "native"]: what = "" + elif e.e_type == "define": + # Add a _ prefix because there's no class name. + name = "_" + name elif e.e_type == "var": prefix = "" what = "load_var_"
ebuild: Add MAKE_PARALLEL_FLAGS to VPP build Align with other packages. Type: make
@@ -47,7 +47,7 @@ vpp_configure = \ cd $(PACKAGE_BUILD_DIR) && \ $(CMAKE) -G Ninja $(vpp_cmake_args) $(call find_source_fn,$(PACKAGE_SOURCE)) #vpp_make_args = --no-print-directory -vpp_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR) +vpp_build = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- $(MAKE_PARALLEL_FLAGS) vpp_install = $(CMAKE) --build $(PACKAGE_BUILD_DIR) -- install | grep -v 'Set runtime path' vpp-package-deb: vpp-install
cmp_mock_srv.c: Fix polling mode such that it can be done multiple times
@@ -26,6 +26,7 @@ typedef struct OSSL_CMP_MSG *certReq; /* ir/cr/p10cr/kur remembered while polling */ int certReqId; /* id of last ir/cr/kur, used for polling */ int pollCount; /* number of polls before actual cert response */ + int curr_pollCount; /* number of polls so far for current request */ int checkAfterTime; /* time the client should wait between polling */ } mock_srv_ctx; @@ -195,13 +196,22 @@ static OSSL_CMP_PKISI *process_cert_request(OSSL_CMP_SRV_CTX *srv_ctx, *chainOut = NULL; *caPubs = NULL; ctx->certReqId = certReqId; - if (ctx->pollCount > 0) { - ctx->pollCount--; - OSSL_CMP_MSG_free(ctx->certReq); + + if (ctx->pollCount > 0 && ctx->curr_pollCount == 0) { + /* start polling */ + if (ctx->certReq != NULL) { + /* already in polling mode */ + ERR_raise(ERR_LIB_CMP, CMP_R_UNEXPECTED_PKIBODY); + return NULL; + } if ((ctx->certReq = OSSL_CMP_MSG_dup(cert_req)) == NULL) return NULL; return OSSL_CMP_STATUSINFO_new(OSSL_CMP_PKISTATUS_waiting, 0, NULL); } + if (ctx->curr_pollCount >= ctx->pollCount) + /* give final response after polling */ + ctx->curr_pollCount = 0; + if (ctx->certOut != NULL && (*certOut = X509_dup(ctx->certOut)) == NULL) goto err; @@ -369,18 +379,24 @@ static int process_pollReq(OSSL_CMP_SRV_CTX *srv_ctx, ERR_raise(ERR_LIB_CMP, CMP_R_NULL_ARGUMENT); return 0; } - if (ctx->sendError || ctx->certReq == NULL) { + if (ctx->sendError) { *certReq = NULL; ERR_raise(ERR_LIB_CMP, CMP_R_ERROR_PROCESSING_MESSAGE); return 0; } + if (ctx->certReq == NULL) { + /* not currently in polling mode */ + *certReq = NULL; + ERR_raise(ERR_LIB_CMP, CMP_R_UNEXPECTED_PKIBODY); + return 0; + } - if (ctx->pollCount == 0) { + if (++ctx->curr_pollCount >= ctx->pollCount) { + /* end polling */ *certReq = ctx->certReq; ctx->certReq = NULL; *check_after = 0; } else { - ctx->pollCount--; *certReq = NULL; *check_after = ctx->checkAfterTime; }
Added queries for generic address space and work-group collective functions support
@@ -152,6 +152,13 @@ POname(clGetDeviceInfo)(cl_device_id device, case CL_DEVICE_MAX_SAMPLERS: POCL_RETURN_DEVICE_INFO_WITH_IMG_CHECK (cl_uint, device->max_samplers); + case CL_DEVICE_IMAGE_PITCH_ALIGNMENT: + /* Creating a 2D image from a buffer is not supported */ + POCL_RETURN_GETINFO(cl_uint, 0); + case CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT: + /* Creating a 2D image from a buffer is not supported */ + POCL_RETURN_GETINFO(cl_uint, 0); + case CL_DEVICE_MAX_PARAMETER_SIZE: POCL_RETURN_DEVICE_INFO_WITH_IMPL_CHECK(size_t, device->max_parameter_size); case CL_DEVICE_MEM_BASE_ADDR_ALIGN : @@ -321,6 +328,10 @@ POname(clGetDeviceInfo)(cl_device_id device, case CL_DEVICE_DEVICE_ENQUEUE_CAPABILITIES: POCL_RETURN_GETINFO(cl_uint, 0); + case CL_DEVICE_WORK_GROUP_COLLECTIVE_FUNCTIONS_SUPPORT: + POCL_RETURN_GETINFO(cl_bool, CL_FALSE); + case CL_DEVICE_GENERIC_ADDRESS_SPACE_SUPPORT: + POCL_RETURN_GETINFO(cl_bool, CL_FALSE); case CL_DEVICE_QUEUE_ON_DEVICE_PROPERTIES: POCL_RETURN_GETINFO(cl_command_queue_properties, device->on_dev_queue_props); case CL_DEVICE_QUEUE_ON_HOST_PROPERTIES:
bq25710: add IADP_GAIN configuration BRANCH=none TEST=make -j BOARD=gimble
#define BQ25710_CHARGE_OPTION_0_LOW_POWER_MODE BIT(15) #define BQ25710_CHARGE_OPTION_0_IDPM_AUTO_DIS BIT(12) #define BQ25710_CHARGE_OPTION_0_EN_LEARN BIT(5) +#define BQ25710_CHARGE_OPTION_0_IADP_GAIN BIT(4) #define BQ25710_CHARGE_OPTION_0_EN_IDPM BIT(1) #define BQ25710_CHARGE_OPTION_0_CHRG_INHIBIT BIT(0)
[numerics] remove problem info computation by default in fc3d_admm
@@ -1002,10 +1002,13 @@ void fc3d_admm(FrictionContactProblem* restrict problem, double* restrict reacti double norm_q = cblas_dnrm2(m , problem->q , 1); + if (options->iparam[SICONOS_FRICTION_3D_ADMM_IPARAM_GET_PROBLEM_INFO] == + SICONOS_FRICTION_3D_ADMM_GET_PROBLEM_INFO_YES) + { numerics_printf_verbose(1,"---- FC3D - ADMM - Problem information"); numerics_printf_verbose(1,"---- FC3D - ADMM - 1-norm of M = %g norm of q = %g ", NM_norm_1(problem->M), norm_q); numerics_printf_verbose(1,"---- FC3D - ADMM - inf-norm of M = %g ", NM_norm_inf(problem->M)); - +} int internal_allocation=0; if(!(Fc3d_ADMM_data *)options->solverData) {
Increase Callback Error Time
@@ -240,7 +240,7 @@ QUIC_STATIC_ASSERT(IS_POWER_OF_TWO(QUIC_MAX_RANGE_DECODE_ACKS), L"Must be power // long running app callbacks. // #define QUIC_MAX_CALLBACK_TIME_WARNING MS_TO_US(10) -#define QUIC_MAX_CALLBACK_TIME_ERROR MS_TO_US(200) +#define QUIC_MAX_CALLBACK_TIME_ERROR MS_TO_US(1000) // // The number of milliseconds that must elapse before a connection is
Add stack overflow to the readme
@@ -28,5 +28,6 @@ Find out more: Engage with the community: +* Contiki-NG tag on Stack Overflow: https://stackoverflow.com/questions/tagged/contiki-ng * Gitter: https://gitter.im/contiki-ng * Twitter: https://twitter.com/contiki_ng
Implement PEEK_USER and POKE_USER These ptrace calls are used by lldb to fetch GPRs.
@@ -256,6 +256,61 @@ static int64_t sgx_single_step_handler(pid_t pid, void* addr, void* data) return g_system_ptrace(PTRACE_SINGLESTEP, pid, addr, data); } +static int64_t sgx_peek_user_handler(pid_t pid, void* addr, void* data) +{ + // Get the gpr from host thread. + struct user_regs_struct regs; + if (g_system_ptrace(PTRACE_GETREGS, pid, 0, &regs) == -1) + { + return -1; + } + + // Fetch xstate values of the enclave thread if the pc is an AEP. + if (sgx_is_aep(pid, &regs)) + { + uint64_t offset = (uint64_t)addr; + if (offset < sizeof(regs)) + { + // Fetch actual registers + if (sgx_get_enclave_thread_gpr(pid, (void*)regs.rbx, &regs) == 0) + { + return *(int64_t*)((int8_t*)&regs + offset); + } + } + } + + return g_system_ptrace(PTRACE_PEEKUSER, pid, addr, data); +} + +static int64_t sgx_poke_user_handler(pid_t pid, void* addr, void* data) +{ + // Get the gpr from host thread. + struct user_regs_struct regs; + if (g_system_ptrace(PTRACE_GETREGS, pid, 0, &regs) == -1) + { + return -1; + } + + uint64_t rbx = regs.rbx; + // Set xstate values of the enclave thread if the pc is an AEP. + if (sgx_is_aep(pid, &regs)) + { + uint64_t offset = (uint64_t)addr; + if (offset < sizeof(regs)) + { + // Fetch actual registers + if (sgx_get_enclave_thread_gpr(pid, (void*)rbx, &regs) == 0) + { + *(int64_t*)((int8_t*)&regs + offset) = (int64_t)data; + if (sgx_set_enclave_thread_gpr(pid, (void*)rbx, &regs) == 0) + return 0; + } + } + } + + return g_system_ptrace(PTRACE_POKEUSER, pid, addr, data); +} + // Customized ptrace request handler table. typedef int64_t (*sgx_ptrace_request_handler)(pid_t, void*, void*); typedef int sgx_ptrace_request_type; @@ -282,6 +337,10 @@ struct {PTRACE_GETREGSET, sgx_get_reg_set_handler}, {PTRACE_SETREGSET, sgx_set_reg_set_handler}, + // User area request to access registers + {PTRACE_PEEKUSER, sgx_peek_user_handler}, + {PTRACE_POKEUSER, sgx_poke_user_handler}, + // Single step request. {PTRACE_SINGLESTEP, sgx_single_step_handler}, };
build: wamrc: Search homebrewed LLVM automatically
@@ -77,6 +77,20 @@ if (NOT MSVC) endif () endif () +# Searching homebrewed LLVM automatically on macOS. +if(FLB_SYSTEM_MACOS) + execute_process( + COMMAND brew --prefix llvm + RESULT_VARIABLE HOMEBREW_LLVM + OUTPUT_VARIABLE HOMEBREW_LLVM_PREFIX + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if (HOMEBREW_LLVM EQUAL 0 AND EXISTS "${HOMEBREW_LLVM_PREFIX}") + message(STATUS "Using llvm keg installed by Homebrew at ${HOMEBREW_LLVM_PREFIX}") + set(ENV{LLVM_DIR} "${HOMEBREW_LLVM_PREFIX}") + endif() +endif() + # Enable LLVM set (WAMR_BUILD_WITH_SYSTEM_LLVM 1) if (NOT WAMR_BUILD_WITH_SYSTEM_LLVM)
fix LNK2019 unresolved external symbol qInitResources_xxxx
@@ -91,7 +91,7 @@ rule("qt.qrc") end -- compile qrc - os.vrunv(rcc, {"-name", "qml", sourcefile_qrc, "-o", sourcefile_cpp}) + os.vrunv(rcc, {"-name", path.basename(sourcefile_qrc), sourcefile_qrc, "-o", sourcefile_cpp}) -- trace if option.get("verbose") then
rust/api/ethereum/pubrequest: test confirm title
@@ -237,6 +237,7 @@ mod tests { })), keystore_secp256k1_pubkey_uncompressed: Some(Box::new(|_| Ok(PUBKEY))), ui_confirm_create: Some(Box::new(|params| { + assert_eq!(params.title, "Ethereum"); assert_eq!(params.body, "0xF4C21710Ef8b5a5Ec4bd3780A687FE083446e67B"); true })), @@ -350,6 +351,7 @@ mod tests { })) ); + const TOKEN_NAME: &str = "ERC20 token"; // All good, with display. mock(Data { eth_params_get: Some(Box::new(|_| { @@ -362,13 +364,14 @@ mod tests { eth_erc20_params_get: Some(Box::new(|_, _| { Some(bitbox02::app_eth::ERC20Params { unit: "ETH", - name: "ERC20 token", + name: TOKEN_NAME, contract_address: CONTRACT_ADDRESS, decimals: 6, }) })), keystore_secp256k1_pubkey_uncompressed: Some(Box::new(|_| Ok(PUBKEY))), ui_confirm_create: Some(Box::new(|params| { + assert_eq!(params.title, TOKEN_NAME); assert_eq!(params.body, "0xF4C21710Ef8b5a5Ec4bd3780A687FE083446e67B"); true })),
Set safe defaults for scan config
@@ -1158,8 +1158,9 @@ static int wifi_station_listap( lua_State* L ) { return luaL_error( L, "Can't list ap in SOFTAP mode" ); } - struct scan_config scan_cfg; - memset(&scan_cfg, 0, sizeof(scan_cfg)); + // set safe defaults for scan time, all other members are initialized with 0 + // source: https://github.com/espressif/ESP8266_NONOS_SDK/issues/103 + struct scan_config scan_cfg = {.scan_time = {.passive=120, .active = {.max=120, .min=60}}}; getap_output_format=0;
chip/npcx/sha256_chip.c: Format with clang-format BRANCH=none TEST=none
@@ -57,7 +57,8 @@ struct ncl_sha { enum ncl_status (*finish)(void *ctx, uint8_t *hashDigest); /* Perform a complete SHA calculation */ enum ncl_status (*calc)(void *ctx, enum ncl_sha_type type, - const uint8_t *data, uint32_t Len, uint8_t *hashDigest); + const uint8_t *data, uint32_t Len, + uint8_t *hashDigest); /* Power on/off the SHA module. */ enum ncl_status (*power)(void *ctx, uint8_t enable); /* Reset the SHA hardware and terminate any in-progress operations. */ @@ -95,9 +96,9 @@ uint8_t *SHA256_final(struct sha256_ctx *ctx) return ctx->buf; } -static void hmac_SHA256_step(uint8_t *output, uint8_t mask, - const uint8_t *key, const int key_len, - const uint8_t *data, const int data_len) +static void hmac_SHA256_step(uint8_t *output, uint8_t mask, const uint8_t *key, + const int key_len, const uint8_t *data, + const int data_len) { struct sha256_ctx hmac_ctx; uint8_t *key_pad = hmac_ctx.buf;
speed.c: simplify aggregation of ecdsa --multi results CLA: trivial
@@ -2519,7 +2519,7 @@ int speed_main(int argc, char **argv) mr ? "+R5:%ld:%d:%.2f\n" : "%ld %d bit ECDSA signs in %.2fs \n", count, test_curves_bits[testnum], d); - ecdsa_results[testnum][0] = d / (double)count; + ecdsa_results[testnum][0] = (double)count / d; rsa_count = count; } @@ -2547,7 +2547,7 @@ int speed_main(int argc, char **argv) mr ? "+R6:%ld:%d:%.2f\n" : "%ld %d bit ECDSA verify in %.2fs\n", count, test_curves_bits[testnum], d); - ecdsa_results[testnum][1] = d / (double)count; + ecdsa_results[testnum][1] = (double)count / d; } if (rsa_count <= 1) { @@ -2829,8 +2829,8 @@ int speed_main(int argc, char **argv) printf("%4u bit ecdsa (%s) %8.4fs %8.4fs %8.1f %8.1f\n", test_curves_bits[k], test_curves_names[k], - ecdsa_results[k][0], ecdsa_results[k][1], - 1.0 / ecdsa_results[k][0], 1.0 / ecdsa_results[k][1]); + 1.0 / ecdsa_results[k][0], 1.0 / ecdsa_results[k][1], + ecdsa_results[k][0], ecdsa_results[k][1]); } testnum = 1; @@ -3068,16 +3068,10 @@ static int do_multi(int multi) sstrsep(&p, sep); d = atof(sstrsep(&p, sep)); - if (n) - ecdsa_results[k][0] = 1 / (1 / ecdsa_results[k][0] + 1 / d); - else - ecdsa_results[k][0] = d; + ecdsa_results[k][0] += d; d = atof(sstrsep(&p, sep)); - if (n) - ecdsa_results[k][1] = 1 / (1 / ecdsa_results[k][1] + 1 / d); - else - ecdsa_results[k][1] = d; + ecdsa_results[k][1] += d; } else if (strncmp(buf, "+F5:", 4) == 0) { int k; double d;
Allow Lua computations to fail The Lua type contains now contains an additional `ExceptT` wrapper which allows us to fail a lua computation.
@@ -64,6 +64,7 @@ module Foreign.Lua.Types.Core ( ) where import Control.Monad.Reader (ReaderT (..), MonadReader, MonadIO, ask, liftIO) +import Control.Monad.Except (ExceptT (..), runExceptT) import Data.Int import Foreign.C import Foreign.Ptr @@ -74,7 +75,7 @@ import Foreign.Ptr newtype LuaState = LuaState (Ptr ()) -- | Lua computation -newtype Lua a = Lua { unLua :: ReaderT LuaState IO a } +newtype Lua a = Lua { unLua :: ReaderT LuaState (ExceptT String IO) a } deriving (Functor, Applicative, Monad, MonadReader LuaState, MonadIO) -- | Turn a function of typ @LuaState -> IO a@ into a monadic lua operation. @@ -91,7 +92,7 @@ luaState = ask -- | Run lua computation with custom lua state. runLuaWith :: LuaState -> Lua a -> IO a -runLuaWith = flip $ runReaderT . unLua +runLuaWith l s = either fail return =<< runExceptT (runReaderT (unLua s) l) -- | Synonym for @lua_Alloc@. See <https://www.lua.org/manual/5.3/#lua_Alloc lua_Alloc>. type LuaAlloc = Ptr () -> Ptr () -> CSize -> CSize -> IO (Ptr ())
zephyr/shim/src/led_driver/led_pwm.c: Format with clang-format BRANCH=none TEST=none
@@ -34,31 +34,27 @@ const uint32_t period_ns = { \ .pwm = DEVICE_DT_GET( \ DT_PWMS_CTLR(DT_PHANDLE_BY_IDX(node_id, prop, i))), \ - .channel = DT_PWMS_CHANNEL( \ - DT_PHANDLE_BY_IDX(node_id, prop, i)), \ + .channel = \ + DT_PWMS_CHANNEL(DT_PHANDLE_BY_IDX(node_id, prop, i)), \ .flags = DT_PWMS_FLAGS(DT_PHANDLE_BY_IDX(node_id, prop, i)), \ .pulse_ns = DIV_ROUND_NEAREST( \ - period_ns * DT_PHA_BY_IDX(node_id, prop, i, value), 100), \ + period_ns * DT_PHA_BY_IDX(node_id, prop, i, value), \ + 100), \ }, #define SET_PWM_PIN(node_id) \ -{ \ - DT_FOREACH_PROP_ELEM(node_id, led_pins, SET_PIN) \ -}; + { DT_FOREACH_PROP_ELEM(node_id, led_pins, SET_PIN) }; -#define GEN_PINS_ARRAY(id) \ -struct pwm_pin_t PINS_ARRAY(id)[] = SET_PWM_PIN(id) +#define GEN_PINS_ARRAY(id) struct pwm_pin_t PINS_ARRAY(id)[] = SET_PWM_PIN(id) DT_FOREACH_CHILD(PWM_LED_PINS_NODE, GEN_PINS_ARRAY) #define SET_PIN_NODE(node_id) \ -{ \ - .led_color = GET_PROP(node_id, led_color), \ + { .led_color = GET_PROP(node_id, led_color), \ .led_id = GET_PROP(node_id, led_id), \ .br_color = GET_PROP_NVE(node_id, br_color), \ .pwm_pins = PINS_ARRAY(node_id), \ - .pins_count = DT_PROP_LEN(node_id, led_pins) \ -}; + .pins_count = DT_PROP_LEN(node_id, led_pins) }; /* * Initialize led_pins_node_t struct for each pin node defined @@ -72,9 +68,8 @@ DT_FOREACH_CHILD(PWM_LED_PINS_NODE, GEN_PINS_NODES) * Array of pointers to each pin node */ #define PINS_NODE_PTR(id) &PINS_NODE(id), -const struct led_pins_node_t *pins_node[] = { - DT_FOREACH_CHILD(PWM_LED_PINS_NODE, PINS_NODE_PTR) -}; +const struct led_pins_node_t *pins_node[] = { DT_FOREACH_CHILD( + PWM_LED_PINS_NODE, PINS_NODE_PTR) }; /* * Set all the PWM channels defined in the node to the defined value, @@ -84,10 +79,8 @@ const struct led_pins_node_t *pins_node[] = { void led_set_color_with_node(const struct led_pins_node_t *pins_node) { for (int j = 0; j < pins_node->pins_count; j++) { - pwm_set( - pins_node->pwm_pins[j].pwm, - pins_node->pwm_pins[j].channel, - period_ns, + pwm_set(pins_node->pwm_pins[j].pwm, + pins_node->pwm_pins[j].channel, period_ns, pins_node->pwm_pins[j].pulse_ns, pins_node->pwm_pins[j].flags); }
types plugins FEATURE print non-matching pattern
@@ -351,6 +351,7 @@ ly_type_validate_patterns(struct lysc_pattern **patterns, const char *str, size_ LY_CHECK_ARG_RET(NULL, str, err, LY_EINVAL); LY_ARRAY_FOR(patterns, u) { + /* match_data needs to be allocated each time because of possible multi-threaded evaluation */ match_data = pcre2_match_data_create_from_pattern(patterns[u]->code, NULL); if (!match_data) { *err = ly_err_new(LY_LLERR, LY_EMEM, 0, "Memory allocation failed.", NULL, NULL); @@ -359,8 +360,7 @@ ly_type_validate_patterns(struct lysc_pattern **patterns, const char *str, size_ rc = pcre2_match(patterns[u]->code, (PCRE2_SPTR)str, str_len, 0, PCRE2_ANCHORED | PCRE2_ENDANCHORED, match_data, NULL); if (rc == PCRE2_ERROR_NOMATCH) { - asprintf(&errmsg, "String \"%.*s\" does not conform to the %" LY_PRI_ARRAY_SIZE_TYPE ". pattern restriction of its type.", - (int)str_len, str, u + 1); + asprintf(&errmsg, "String \"%.*s\" does not conform to the pattern \"%s\".", (int)str_len, str, patterns[u]->expr); *err = ly_err_new(LY_LLERR, LY_ESYS, 0, errmsg, NULL, NULL); ret = LY_EVALID; goto cleanup;
Remove unw_handle_signal_frame from header.
@@ -240,7 +240,6 @@ unw_save_loc_t; #define unw_set_fpreg UNW_OBJ(set_fpreg) #define unw_get_save_loc UNW_OBJ(get_save_loc) #define unw_is_signal_frame UNW_OBJ(is_signal_frame) -#define unw_handle_signal_frame UNW_OBJ(handle_signal_frame) #define unw_get_proc_name UNW_OBJ(get_proc_name) #define unw_set_caching_policy UNW_OBJ(set_caching_policy) #define unw_set_cache_size UNW_OBJ(set_cache_size) @@ -273,7 +272,6 @@ extern int unw_get_fpreg (unw_cursor_t *, int, unw_fpreg_t *); extern int unw_set_fpreg (unw_cursor_t *, int, unw_fpreg_t); extern int unw_get_save_loc (unw_cursor_t *, int, unw_save_loc_t *); extern int unw_is_signal_frame (unw_cursor_t *); -extern int unw_handle_signal_frame (unw_cursor_t *); extern int unw_get_proc_name (unw_cursor_t *, char *, size_t, unw_word_t *); extern const char *unw_strerror (int); extern int unw_backtrace (void **, int);
Prepare client extensions at last moment
@@ -1240,8 +1240,6 @@ int picoquic_tlscontext_create(picoquic_quic_t* quic, picoquic_cnx_t* cnx, uint6 ctx->handshake_properties.client.negotiated_protocols.list = &ctx->alpn_vec; } - picoquic_tls_set_extensions(cnx, ctx); - if (cnx->sni != NULL && cnx->alpn != NULL && (cnx->quic->flags&picoquic_context_client_zero_share) == 0) { uint8_t* ticket = NULL; @@ -1513,6 +1511,8 @@ int picoquic_initialize_tls_stream(picoquic_cnx_t* cnx) ctx->handshake_properties.client.negotiate_before_key_exchange = 0; } + picoquic_tls_set_extensions(cnx, ctx); + ptls_buffer_init(&sendbuf, "", 0); ret = ptls_handle_message(ctx->tls, &sendbuf, epoch_offsets, 0, NULL, 0, &ctx->handshake_properties);
Add a test for the problem fixed by the previous commit Make sure the server can write normal data after earlier writing early data.
@@ -1544,7 +1544,8 @@ static int test_set_sigalgs(int idx) #define MSG3 "This" #define MSG4 "is" #define MSG5 "a" -#define MSG6 "test." +#define MSG6 "test" +#define MSG7 "message." /* * Helper method to setup objects for early data test. Caller frees objects on @@ -1775,6 +1776,19 @@ static int test_early_data_read_write(int idx) goto end; } + /* Server should be able to write normal data */ + if (!SSL_write_ex(serverssl, MSG7, strlen(MSG7), &written) + || written != strlen(MSG7)) { + printf("Failed writing normal data message 7\n"); + goto end; + } + if (!SSL_read_ex(clientssl, buf, sizeof(buf), &readbytes) + || readbytes != strlen(MSG7) + || memcmp(MSG7, buf, strlen(MSG7))) { + printf("Failed reading message 7\n"); + goto end; + } + SSL_SESSION_free(sess); sess = SSL_get1_session(clientssl);
Fix Array Unnecessary memory allocation
@@ -773,7 +773,7 @@ namespace Miningcore } .Concat(clusterConfig.CoinTemplates != null ? clusterConfig.CoinTemplates.Where(x => x != defaultTemplates) : - new string[0]) + Array.Empty<string>()) .ToArray(); return CoinTemplateLoader.Load(container, clusterConfig.CoinTemplates);
BugID:24039335:Move not exposed uMesh APIs to internal API header file
@@ -86,7 +86,7 @@ static void netmgr_connect_fail_event(hal_wifi_module_t *m, int err, void *arg) #ifdef CONFIG_AOS_MESH static void mesh_delayed_action(void *arg) { - umesh_set_mode((node_mode_t)arg); + umesh_set_mode((uint8_t)arg); umesh_stop(); umesh_start(NULL); }
Install `ZydisExportConfig.h`
@@ -139,6 +139,9 @@ install(TARGETS "Zydis" ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +install(FILES + "${PROJECT_BINARY_DIR}/ZydisExportConfig.h" + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") install(DIRECTORY "include/" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) # =============================================================================================== #
Fix warning in lv_table.c
@@ -495,6 +495,7 @@ static bool lv_table_design(lv_obj_t * table, const lv_area_t * mask, lv_design_ format.format_byte = ext->cell_data[cell][0]; switch(format.align) { + default: case LV_LABEL_ALIGN_LEFT: txt_flags = LV_TXT_FLAG_NONE; break;
Disallow ASN.1 enumerated types to be treated as strings. They are actually integers. Problem reported by: Scott McPeak
@@ -66,7 +66,7 @@ static const unsigned long tag2bit[32] = { /* tags 4- 7 */ B_ASN1_OCTET_STRING, 0, 0, B_ASN1_UNKNOWN, /* tags 8-11 */ - B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, + B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, 0, B_ASN1_UNKNOWN, /* tags 12-15 */ B_ASN1_UTF8STRING, B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, /* tags 16-19 */
in_tail: fix inode overflow in 32-bit OS for DB statement SQL_GET_FILE
@@ -108,7 +108,7 @@ int flb_tail_db_file_set(struct flb_tail_file *file, /* Check if the file exists */ snprintf(query, sizeof(query) - 1, SQL_GET_FILE, - file->name, file->inode); + file->name, (uint64_t) file->inode); memset(&qs, '\0', sizeof(qs)); ret = flb_sqldb_query(ctx->db,
dev-tools/hwloc: license distributed with hwloc in COPYING; remove extra duplicate ref to LICENSE
@@ -20,8 +20,6 @@ License: BSD-3-Clause Group: %{PROJ_NAME}/dev-tools Url: http://www.open-mpi.org/projects/hwloc/ Source0: https://download.open-mpi.org/release/hwloc/v2.0/%{pname}-%{version}.tar.bz2 -Source2: LICENSE - BuildRequires: autoconf BuildRequires: automake
[python] support all types of PY_MAIN in :repl entry point Behaviour is synced with importer.
@@ -6,7 +6,15 @@ def repl(): py_main = __res.find('PY_MAIN') if py_main: - mod_name, func_name = py_main.split(':', 1) + py_main_split = py_main.split(':', 1) + if len(py_main_split) == 2: + mod_name, func_name = py_main_split + else: + mod_name, func_name = py_main_split[0], 'main' + + if not mod_name: + mod_name = 'library.python.runtime.entry_points' + try: import importlib mod = importlib.import_module(mod_name)
powerlog: Don't hijack logger when import as module BRANCH=master TEST=No log spam when import as module from autotest Commit-Ready: ChromeOS CL Exonerator Bot
@@ -848,12 +848,14 @@ def main(argv=None): args = parser.parse_args(argv) - root_logger = logging.getLogger() + root_logger = logging.getLogger(__name__) if args.verbose: root_logger.setLevel(logging.DEBUG) else: root_logger.setLevel(logging.INFO) - # if powerlog is used through main log to sys.stdout + + # if powerlog is used through main, log to sys.stdout + if __name__ == "__main__": stdout_handler = logging.StreamHandler(sys.stdout) stdout_handler.setFormatter(logging.Formatter('%(levelname)s: %(message)s')) root_logger.addHandler(stdout_handler)
Update CHANGES.md Add 'Issue' word to keep the style
@@ -12,7 +12,7 @@ CUPS v2.4-b1 (Pending) - Added several features and improvements to `ipptool` (Issue #153) - The `ipptool` command now correctly reports an error when a test file cannot be found. -- CUPS library now uses thread safe `getpwnam_r` and `getpwuid_r` functions (#274) +- CUPS library now uses thread safe `getpwnam_r` and `getpwuid_r` functions (Issue #274) - Fixed Kerberos authentication for the web interface (Issue #19) - The ZPL sample driver now supports more "standard" label sizes (Issue #70) - Fixed reporting of printer instances when enumerating and when no options are
[CI] fix yml [CI] new attempt
@@ -10,32 +10,54 @@ before_install: matrix: include: - - env: - - TASK=siconos_default:docker=false:distrib=ubuntu,14.04:targets=all, + + - env: TYPE=travis os: linux addons: apt: sources: - ubuntu-toolchain-r-test + - george-edison55-precise-backports # cmake 3.2.3 / doxygen 1.8.3 + packages: + - blas + - lapack + - cmake + - cmake-data + - libboost-dev + - libgmp-dev + - swig + - libcppunit-dev + - libblas-dev + - liblapack-dev + - libatlas-base-dev + - libatlas-dev + - python + - python-dev + - python-lxml + - python-pytest + - python-scipy + - python-matplotlib + - env: + TASK=siconos_default:docker=false:distrib=ubuntu,14.04:targets=all, + addons: + apt: packages: - g++-4.9 - gfortran-4.9 - env: + - TYPE=docker - TASK=siconos_openblas_lapacke +matrix: + exclude: + env: + - TYPE=travis + - TYPE=docker + before_script: - mkdir -p build - cd build - - case $TASK in - *docker=false*) - ../CI/driver.py --root-dir=.. --task=$TASK --print=script > /tmp/install_pkgs; - chmod 755 /tmp/install_pkgs; - cat /tmp/install_pkgs; - /tmp/install_pkgs;; - esac - - script: - if test "$TRAVIS" = true; then
options/ansi: return nullptr for bad align in alloc_aligned
@@ -185,7 +185,11 @@ void srand(unsigned int s) { void *aligned_alloc(size_t alignment, size_t size) { void *ptr; - // posix_memalign requires that the alignment is a multiple of sizeof(void *). + // alignment must be a power of two, and size % alignment must be 0 + if (alignment & (alignment - 1) || size & (alignment - 1)) + return nullptr; + + // posix_memalign requires that the alignment is a multiple of sizeof(void *) if (alignment < sizeof(void *)) alignment = sizeof(void *);
vm/map: Fix syspage progs being executed in place This causes original elf file residint in the memory to be modified by it's execution. Regresion: forking process with mapped physical memory will cause bad behaviour - pages with physical memory will be copied insted of being shared. JIRA:
@@ -622,7 +622,7 @@ static int _map_force(vm_map_t *map, map_entry_t *e, void *paddr, int prot) if (e->amap == NULL) p = vm_objectPage(map, NULL, e->object, paddr, (e->offs < 0) ? e->offs : e->offs + offs); - else if (e->object != (void *)-1) + else /* if (e->object != (void *)-1) FIXME disabled until memory objects are created for syspage progs */ p = amap_page(map, e->amap, e->object, paddr, e->aoffs + offs, (e->offs < 0) ? e->offs : e->offs + offs, prot); if (prot & PROT_WRITE)
Fix static analyzer warning in checkSensorButtonEvent() In theory item pointer should never be null, the explicit check prevents false positive warnings for clang scan-build.
@@ -4252,7 +4252,6 @@ void DeRestPluginPrivate::checkSensorButtonEvent(Sensor *sensor, const deCONZ::A if (ind.dstAddressMode() == deCONZ::ApsGroupAddress && ind.dstAddress().group() != 0) { - QStringList gids; ResourceItem *item = sensor->addItem(DataTypeString, RConfigGroup); quint16 groupId = ind.dstAddress().group(); @@ -4272,18 +4271,19 @@ void DeRestPluginPrivate::checkSensorButtonEvent(Sensor *sensor, const deCONZ::A } } - QString gid = QString::number(groupId); + QStringList gids; + const QString gid = QString::number(groupId); if (item) { gids = item->toString().split(','); } - if (sensor->manufacturer() == QLatin1String("ubisys")) + if (!item) // should always be non null, this check is here to keep static analizer happy { - // TODO + } - if (sensor->modelId().startsWith(QLatin1String("RC 110"))) // innr remote + else if (sensor->modelId().startsWith(QLatin1String("RC 110"))) // innr remote { // 7 controller endpoints: 0x01, 0x03, 0x04, ..., 0x08 if (gids.length() != 7)
Updated wording of ulTaskNotifyTakeIndexed fix
@@ -3,8 +3,9 @@ Documentation and download available at https://www.FreeRTOS.org/ Changes between FreeRTOS V10.4.0 and FreeRTOS V10.4.1 released September 17 2020 See https://www.FreeRTOS.org/FreeRTOS-V10.4.x.html - + An incorrectly named parameter in the macro ulTaskNotifyTakeIndexed that - caused a compilation error when using this macro has been fixed. + + Fixed an incorrectly named parameter that prevented the + ulTaskNotifyTakeIndexed macro compiling, and the name space clash in the + test code that prevented this error causing test failures. Changes between FreeRTOS V10.3.1 and FreeRTOS V10.4.0 released September 10 2020
util win
@@ -91,7 +91,7 @@ namespace NFsPrivate { if (linkDir) { TString fullTarget(tName); - resolvepath(fullTarget, linkDir.ToString()); + resolvepath(fullTarget, TString{linkDir}); TUtf16String fullTargetW; LPCWSTR ptrFullTarget = UTF8ToWCHAR(fullTarget, fullTargetW); attr = ::GetFileAttributesW(ptrFullTarget);
OpenLinuxBoot: Fix null deref when autodetect with no user arguments
@@ -368,6 +368,7 @@ AutodetectBootOptions ( EFI_STATUS Status; UINTN Index; UINTN InsertIndex; + UINTN OptionCount; OC_PARSED_VAR *Option; EFI_GUID Guid; CHAR8 *AsciiStrValue; @@ -375,6 +376,11 @@ AutodetectBootOptions ( BOOLEAN FoundOptions; BOOLEAN PlusOpts; + OptionCount = 0; + if (gParsedLoadOptions != NULL) { + OptionCount = gParsedLoadOptions->Count; + } + FoundOptions = FALSE; // @@ -382,7 +388,7 @@ AutodetectBootOptions ( // Remember that although args are ASCII in the OC config file, they are // Unicode by the time they get passed as UEFI LoadOptions. // - for (Index = 0; Index < gParsedLoadOptions->Count; Index++) { + for (Index = 0; Index < OptionCount; Index++) { Option = OcFlexArrayItemAt (gParsedLoadOptions, Index); // // partuuidopts:{partuuid}[+]="...": user options for specified partuuid. @@ -427,7 +433,7 @@ AutodetectBootOptions ( // // Use global defaults, if user has defined any. // - for (Index = 0; Index < gParsedLoadOptions->Count; Index++) { + for (Index = 0; Index < OptionCount; Index++) { Option = OcFlexArrayItemAt (gParsedLoadOptions, Index); // // Don't use autoopts if partition specific partuuidopts already found. @@ -462,6 +468,7 @@ AutodetectBootOptions ( } // + // Code only reaches here and below if has been nothing or only += options above. // Use options from GRUB default location. // if (mEtcDefaultGrubOptions != NULL) { @@ -514,8 +521,8 @@ AutodetectBootOptions ( } // - // It might be valid to have no options except "ro", but at least empty - // (not missing) user specified options, or GRUB_CMDLINE_LINUX_... needs + // It might be valid to have no options for some kernels or distros, but at least + // empty (not missing) user specified options or GRUB_CMDLINE_LINUX[_DEFAULT] needs // to be present in that case or we stop. // if (!FoundOptions) { @@ -524,9 +531,9 @@ AutodetectBootOptions ( } // - // Basic attached drives on OVMF appear as MBR, so it can be more convenient when - // debugging e.g. save and load default entry to allow entries with incorrect - // (i.e. specifies no drive) root= on NOOPT debugging build. + // Standard attached drives on OVMF appear as MBR, so it can be convenient when + // debugging to allow entries with incorrect (i.e. specifies no/every drive) + // root=... on NOOPT debugging build. // //#if !defined(OC_TARGET_NOOPT) if (CompareGuid (&gPartuuid, &gEfiPartTypeUnusedGuid)) {
test: add ethereum test case test_004ParametersInit_0008TxInitFailureRecipientErrorHexFormat
@@ -256,6 +256,19 @@ START_TEST(test_004ParametersInit_0007TxInitSuccessGasLimitHexNullOx) } END_TEST +START_TEST(test_004ParametersInit_0008TxInitFailureRecipientErrorHexFormat) +{ + BSINT32 rtnVal; + BoatEthTx tx_ptr; + rtnVal = ethereumWalletPrepare(); + ck_assert_int_eq(rtnVal, BOAT_SUCCESS); + + rtnVal = BoatEthTxInit(g_ethereum_wallet_ptr, &tx_ptr, TEST_IS_SYNC_TX, TEST_GAS_PRICE, + TEST_GAS_LIMIT, "0xABCDG"); + ck_assert(rtnVal == BOAT_ERROR_COMMON_INVALID_ARGUMENT); +} +END_TEST + START_TEST(test_005ParametersSet_0001GetNonceFromNetworkSuccess) { BSINT32 rtnVal; @@ -307,6 +320,7 @@ START_TEST(test_005ParametersSet_0003SetNonceFailureNullTx) rtnVal = BoatEthTxInit(g_ethereum_wallet_ptr, &tx_ptr, TEST_IS_SYNC_TX, TEST_GAS_PRICE, TEST_GAS_LIMIT, TEST_RECIPIENT_ADDRESS); ck_assert(rtnVal == BOAT_SUCCESS); + rtnVal = BoatEthTxSetNonce(NULL, 0xA1); ck_assert(rtnVal == BOAT_ERROR_COMMON_INVALID_ARGUMENT); } @@ -333,6 +347,7 @@ Suite *make_parameters_suite(void) tcase_add_test(tc_param_api, test_004ParametersInit_0005TxInitSuccessGasPriceHexNullOx); tcase_add_test(tc_param_api, test_004ParametersInit_0006TxInitFailureGasLimitErrorHexFormat); tcase_add_test(tc_param_api, test_004ParametersInit_0007TxInitSuccessGasLimitHexNullOx); + tcase_add_test(tc_param_api, test_004ParametersInit_0008TxInitFailureRecipientErrorHexFormat); tcase_add_test(tc_param_api, test_005ParametersSet_0001GetNonceFromNetworkSuccess); tcase_add_test(tc_param_api, test_005ParametersSet_0002SetNonceSuccess); tcase_add_test(tc_param_api, test_005ParametersSet_0003SetNonceFailureNullTx);
protect against negative sized tiles
@@ -377,7 +377,7 @@ readTileData (InputStreamMutex *streamData, if (levelY != ly) throw IEX_NAMESPACE::InputExc ("Unexpected tile y level number coordinate."); - if (dataSize > (int) ifd->tileBufferSize) + if (dataSize < 0 || dataSize > static_cast<int>(ifd->tileBufferSize) ) throw IEX_NAMESPACE::InputExc ("Unexpected tile block length."); //
Fix buffer overflow when file ends with \
@@ -145,7 +145,7 @@ YY_BUFFER_STATE yy_create_buffer(FILE *f) size = ftell(f); fseek(f, 0, SEEK_SET); - pBuffer->pBufferRealStart = malloc(size + 2 + SAFETYMARGIN); + pBuffer->pBufferRealStart = malloc(size + 3 + SAFETYMARGIN); if (pBuffer->pBufferRealStart == NULL) fatalerror("%s: Out of memory for buffer!", __func__); @@ -156,8 +156,9 @@ YY_BUFFER_STATE yy_create_buffer(FILE *f) size = fread(pBuffer->pBuffer, sizeof(uint8_t), size, f); pBuffer->pBuffer[size] = '\n'; - pBuffer->pBuffer[size + 1] = 0; - pBuffer->nBufferSize = size + 1; + pBuffer->pBuffer[size + 1] = '\n'; /* in case the file ends with \ */ + pBuffer->pBuffer[size + 2] = 0; + pBuffer->nBufferSize = size + 2; /* Convert all line endings to LF and spaces */
Add workaround for find nodejs headers.
@@ -352,6 +352,30 @@ if(NOT NODEJS_LIBRARY) endif() if(NOT NODEJS_INCLUDE_DIR) + # TODO: Headers are not properly installed, instead of placing all of them in the same folder + # they are placed in different folders after install (deps/{v8,uv}), this workaround will solve + # the include dependency problem, but this needs to be refactored in the future for properly handling headers, + # meanwhile we will install them manually + + # NodeJS download and output path (workaround to compile node as a shared library) + set(NODEJS_DOWNLOAD_URL "https://nodejs.org/dist/v${NODEJS_VERSION}/node-v${NODEJS_VERSION}-headers.tar.gz") + set(NODEJS_DOWNLOAD_FILE "${CMAKE_CURRENT_BINARY_DIR}/node-v${NODEJS_VERSION}-headers.tar.gz") + set(NODEJS_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}/node-v${NODEJS_VERSION}-headers") + + # Download node if needed + if(NOT EXISTS "${NODEJS_DOWNLOAD_FILE}") + message(STATUS "Downloading NodeJS headers") + file(DOWNLOAD ${NODEJS_DOWNLOAD_URL} ${NODEJS_DOWNLOAD_FILE}) + endif() + + # Decompress node if needed + if(NOT EXISTS "${NODEJS_OUTPUT_PATH}") + message(STATUS "Extract NodeJS headers") + execute_process(COMMAND ${CMAKE_COMMAND} -E tar "xvf" "${NODEJS_DOWNLOAD_FILE}" WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" OUTPUT_QUIET) + endif() + + set(NODEJS_INCLUDE_PATHS ${NODEJS_OUTPUT_PATH}) + # Find NodeJS includes find_path(NODEJS_INCLUDE_DIR ${NODEJS_HEADERS} PATHS ${NODEJS_INCLUDE_PATHS}
Remove ocf_cleaning_init_cache_block() from metadata rebuild Cleaning policy initializaton initializes metadata for all cache lines anyway, so this step is not needed.
@@ -494,8 +494,6 @@ static void ocf_mngt_cline_reset_metadata(ocf_cache_t cache, ocf_metadata_set_partition_id(cache, cline, PARTITION_FREELIST); ocf_lru_add_free(cache, cline); - - ocf_cleaning_init_cache_block(cache, cline); } static void ocf_mngt_cline_rebuild_metadata(ocf_cache_t cache,
Add max scale support for CPU History column
@@ -3735,6 +3735,35 @@ BOOLEAN NTAPI PhpProcessTreeNewCallback( node->CpuGraphBuffers.Data1, drawInfo.LineDataCount); PhCopyCircularBuffer_FLOAT(&processItem->CpuUserHistory, node->CpuGraphBuffers.Data2, drawInfo.LineDataCount); + + if (PhCsEnableGraphMaxScale) + { + FLOAT max = 0; + + for (ULONG i = 0; i < drawInfo.LineDataCount; i++) + { + FLOAT data = node->CpuGraphBuffers.Data1[i] + + node->CpuGraphBuffers.Data2[i]; // HACK + + if (max < data) + max = data; + } + + if (max != 0) + { + PhDivideSinglesBySingle( + node->CpuGraphBuffers.Data1, + max, + drawInfo.LineDataCount + ); + PhDivideSinglesBySingle( + node->CpuGraphBuffers.Data2, + max, + drawInfo.LineDataCount + ); + } + } + node->CpuGraphBuffers.Valid = TRUE; } }
apps/builtin: Use shell default values of priority and stacksize When builtin feature is enabled and priority and stacksize is not configured in each application, let's use default values of priority and stacksize which is defined in shell Kconfig instead of hard-coded in apps/Make.defs.
# ############################################################################ +include $(TOPDIR)/.config + # Builtin Registration BUILTIN_REGISTRY = $(APPDIR)$(DELIM)builtin$(DELIM)registry DEPCONFIG = $(TOPDIR)$(DELIM).config +CONFIG_TASH_CMDTASK_PRIORITY ?= 100 +CONFIG_TASH_CMDTASK_STACKSIZE ?= 4096 + ifeq ($(CONFIG_WINDOWS_NATIVE),y) define REGISTER $(Q) echo Register: $1 $(Q) if [ -z $5 ]; then \ - $(Q) echo { "$1", $2, $3, 100, 1024 }, > "$(BUILTIN_REGISTRY)$(DELIM)$2.mdat"; \ + $(Q) echo { "$1", $2, $3, ${CONFIG_TASH_CMDTASK_PRIORITY}, ${CONFIG_TASH_CMDTASK_STACKSIZE} }, > "$(BUILTIN_REGISTRY)$(DELIM)$2.mdat"; \ else \ $(Q) echo { "$1", $2, $3, $4, $5 }, > "$(BUILTIN_REGISTRY)$(DELIM)$2.mdat"; \ fi @@ -72,7 +77,7 @@ else define REGISTER $(Q) echo "Register: $1" $(Q) if [ -z $5 ]; then \ - echo { \"$1\", $2, $3, 100, 1024 }, > "$(BUILTIN_REGISTRY)$(DELIM)$2.mdat"; \ + echo { \"$1\", $2, $3, ${CONFIG_TASH_CMDTASK_PRIORITY}, ${CONFIG_TASH_CMDTASK_STACKSIZE} }, > "$(BUILTIN_REGISTRY)$(DELIM)$2.mdat"; \ else \ echo { \"$1\", $2, $3, $4, $5 }, > "$(BUILTIN_REGISTRY)$(DELIM)$2.mdat"; \ fi
idf.py hints: add build error hints when legacy adc calibration driver is used
re: "fatal error: trax.h: No such file or directory" hint: "The Trax API (functions/types/macros prefixed with 'trax_') has been made into a private API. If users still require usage of the Trax API (though this is not recommended), it can be included via '#include \"esp_private/trax.h\"'." +- + re: "fatal error: esp_adc_cal.h: No such file or directory" + hint: "``esp_adc_cal`` component is no longer supported. New adc calibration driver is in ``esp_adc``. Legacy adc calibration driver has been moved into ``esp_adc`` component. To use legacy ``esp_adc_cal`` driver APIs, you should add ``esp_adc`` component to the list of component requirements in CMakeLists.txt. For more information run 'idf.py docs -sp migration-guides/release-5.x/peripherals.html'." + - re: "fatal error: [\\w/]+\\.h: No such file or directory" hint: "Please check if you've specified all component dependencies with 'idf_component_register(REQUIRES ...)'. If the component is not present then it should be added by the IDF Component Manager. For more information run 'idf.py docs -sp api-guides/build-system.html'.\nAlso, please check if the header file has been removed, renamed or relocated - refer to the migration guide for more information."
add notice about TCounter in TLockFreeQueue Note: mandatory check (NEED_CHECK) was skipped
@@ -18,6 +18,11 @@ struct TDefaultLFCounter { } }; +// @brief lockfree queue +// @tparam T - the queue element, should be movable +// @tparam TCounter, a observer class to count number of items in queue +// be carifull, IncCount and DecCount can be called on a moved object and +// it is TCounter class responsibility to check validity of passed object template <class T, class TCounter> class TLockFreeQueue: public TNonCopyable { struct TListNode {
Docs: Clarity on Kext Order
@@ -1875,18 +1875,18 @@ blocking. \textbf{Description}: Load selected kernel extensions (kexts) from the \texttt{OC/Kexts} directory. To be filled with \texttt{plist\ dict} values, describing each kext. Refer to - the \hyperref[kernelpropsadd]{Add Properties} section below. + the \hyperref[kernelpropsadd]{Add Properties} section below for details. \emph{Note 1}: The load order is based on the order in which the kexts appear in the array. Hence, dependencies must appear before kexts that depend on them. \emph{Note 2}: To track the dependency order, inspect the \texttt{OSBundleLibraries} key in the \texttt{Info.plist} file of the kext being added. Any kext included - in the \texttt{OSBundleLibraries} key is a dependency that must precede - the kext being added. + under the key is a dependency that must appear before the kext being added. - \emph{Note 3}: Kexts may have inner kexts (\texttt{Plugins}) included - in the bundle and each such plugin must be added separately. + \emph{Note 3}: Kexts may have inner kexts (\texttt{Plugins}) included in the bundle. + Such \texttt{Plugins} must be added separately and follow the same global ordering + rules as other kexts. \item \texttt{Block}\\
Fix jsonptr whitespace and commas for CBOR tags
@@ -338,6 +338,8 @@ struct { uint64_t detail; } g_token_extension; +bool g_previous_token_was_cbor_tag; + uint32_t g_depth; enum class context { @@ -819,6 +821,8 @@ initialize_globals(int argc, char** argv) { g_token_extension.category = 0; g_token_extension.detail = 0; + g_previous_token_was_cbor_tag = false; + g_depth = 0; g_ctx = context::none; @@ -1593,8 +1597,10 @@ handle_token(wuffs_base__token t, bool start_of_token_chain) { } // Write preceding whitespace and punctuation, if it wasn't ']', '}' or a - // continuation of a multi-token chain. - if (start_of_token_chain) { + // continuation of a multi-token chain or a CBOR tagged data item. + if (g_previous_token_was_cbor_tag) { + g_previous_token_was_cbor_tag = false; + } else if (start_of_token_chain) { if (g_flags.output_format != file_format::json) { // No-op. } else if (g_ctx == context::in_dict_after_key) { @@ -1747,6 +1753,7 @@ handle_token(wuffs_base__token t, bool start_of_token_chain) { g_token_extension.detail = 0; goto after_value; case CATEGORY_CBOR_TAG: + g_previous_token_was_cbor_tag = true; TRY(write_cbor_tag(x, tok)); g_token_extension.category = 0; g_token_extension.detail = 0; @@ -1763,6 +1770,7 @@ handle_token(wuffs_base__token t, bool start_of_token_chain) { TRY(write_cbor_simple_value(vbd, tok)); goto after_value; } else if (value_minor & WUFFS_CBOR__TOKEN_VALUE_MINOR__TAG) { + g_previous_token_was_cbor_tag = true; if (t.continued()) { if (tok.len != 0) { return "main: internal error: unexpected to-be-extended length";
Silence MSVC warning.
@@ -285,7 +285,7 @@ static Janet ta_view_next(void *p, Janet key) { } } if (!janet_checksize(key)) janet_panic("expected size as key"); - size_t index = janet_unwrap_number(key); + size_t index = (size_t) janet_unwrap_number(key); index++; if (index < view->size) { return janet_wrap_number((double) index);
ish/heci: initialize msg.payload before using it BRANCH=none TEST=one class of error less with gcc 11 Tested-by: Patrick Georgi
@@ -280,7 +280,7 @@ static int ipc_send_reset_notify(const ipc_handle_t handle) static int ipc_send_cmpl_indication(struct ipc_if_ctx *ctx) { - struct ipc_msg msg; + struct ipc_msg msg = {0}; msg.drbl = IPC_BUILD_MNG_DB(MNG_RX_CMPL_INDICATION, 0); ipc_write_raw(ctx, msg.drbl, msg.payload, IPC_DB_MSG_LENGTH(msg.drbl));
Use Vcpkg by default in CMake scripts. The dependency on VCPKG_ROOT is outdated and was no longer the intended way to find the vcpkg directory.
cmake_minimum_required (VERSION 3.13...3.21) if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) - if(DEFINED ENV{VCPKG_ROOT}) - message(STATUS "Using Vcpkg: $ENV{VCPKG_ROOT}") set(CMAKE_TOOLCHAIN_FILE - "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" - CACHE STRING "" - ) - else() - message(STATUS "Vcpkg not being used.") - endif() + "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake" + CACHE STRING "Vcpkg toolchain file") endif() file(STRINGS src/libtcod/version.h LIBTCOD_VERSION_LINE REGEX "TCOD_STRVERSION")
posix/spawn: add POSIX_SPAWN macros
@@ -16,7 +16,14 @@ typedef struct { } posix_spawn_file_actions_t; struct sched_param; -// MISSING: POSIX_SPAWN macros +#define POSIX_SPAWN_RESETIDS 1 +#define POSIX_SPAWN_SETPGROUP 2 +#define POSIX_SPAWN_SETSIGDEF 4 +#define POSIX_SPAWN_SETSIGMASK 8 +#define POSIX_SPAWN_SETSCHEDPARAM 16 +#define POSIX_SPAWN_SETSCHEDULER 32 +#define POSIX_SPAWN_USEVFORK 64 +#define POSIX_SPAWN_SETSID 128 int posix_spawn(pid_t *__restrict pid, const char *__restrict path, const posix_spawn_file_actions_t *file_actions,
docker: add dependencies for draw-all-plugins script on opensuse
@@ -21,7 +21,9 @@ RUN zypper update -y && zypper install -y \ gzip \ gpgme-devel \ graphviz \ + graphviz-gd \ java-11-openjdk-devel \ + lato-fonts \ libcurl-devel \ libdrm-devel \ libev-devel \
This fixes the versioning when compiling from the repo checked out with git.
@@ -6,7 +6,7 @@ if (GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") # Working off a git repo, using git versioning # Check if HEAD is pointing to a tag execute_process ( - COMMAND "${GIT_EXECUTABLE}" describe --always + COMMAND "${GIT_EXECUTABLE}" describe --always --tag WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" OUTPUT_VARIABLE PROJECT_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE) @@ -21,6 +21,9 @@ if (GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") set (PROJECT_VERSION "${PROJECT_VERSION}-dirty") endif() + # strip a leading v off of the version as proceeding code expectes just the version numbering. + string(REGEX REPLACE "^v" "" PROJECT_VERSION ${PROJECT_VERSION}) + string(REGEX REPLACE "^(0|[1-9][0-9]*)[.](0|[1-9][0-9]*)[.](0|[1-9][0-9]*)(-[.0-9A-Za-z-]+)?([+][.0-9A-Za-z-]+)?$" "\\1;\\2;\\3" PROJECT_VERSION_LIST ${PROJECT_VERSION}) list(LENGTH PROJECT_VERSION_LIST len)
Correct if in mapping example We want to know if the memory is mappable, which means that the memory properties should include the `VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT`.
@@ -478,7 +478,7 @@ vmaCreateBuffer(allocator, &bufCreateInfo, &allocCreateInfo, &buf, &alloc, &allo VkMemoryPropertyFlags memFlags; vmaGetMemoryTypeProperties(allocator, allocInfo.memoryType, &memFlags); -if((memFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) == 0) +if((memFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) != 0) { // Allocation ended up in mappable memory. You can map it and access it directly. void* mappedData;
Allow disabling GSO
using namespace ngtcp2; +#ifndef NGTCP2_ENABLE_UDP_GSO # ifdef UDP_SEGMENT # define NGTCP2_ENABLE_UDP_GSO 1 -#endif // UDP_SEGMENT +# else // !UDP_SEGMENT +# define NGTCP2_ENABLE_UDP_GSO 0 +# endif // !UDP_SEGMENT +#endif // NGTCP2_ENABLE_UDP_GSO namespace { constexpr size_t NGTCP2_SV_SCIDLEN = 18; @@ -1726,7 +1730,7 @@ int Handler::write_streams() { } } -#ifdef NGTCP2_ENABLE_UDP_GSO +#if NGTCP2_ENABLE_UDP_GSO if (pktcnt == 0) { update_endpoint(&path.path.local); update_remote_addr(&path.path.remote); @@ -2732,7 +2736,7 @@ int Server::send_packet(Endpoint &ep, const Address &remote_addr, msg.msg_iov = &msg_iov; msg.msg_iovlen = 1; -#ifdef NGTCP2_ENABLE_UDP_GSO +#if NGTCP2_ENABLE_UDP_GSO std::array<uint8_t, CMSG_SPACE(sizeof(uint16_t))> msg_ctrl{}; if (gso_size && datalen > gso_size) { msg.msg_control = msg_ctrl.data();
doc: prettify OPAL_CHECK_ASYNC_COMPLETION
+.. _OPAL_CHECK_ASYNC_COMPLETION: + OPAL_CHECK_ASYNC_COMPLETION =========================== -OPAL_CHECK_ASYNC_COMPLETION checks if an async OPAL pending message was completed. (see :ref:`opal-messages`). +:ref:`OPAL_CHECK_ASYNC_COMPLETION` checks if an async OPAL pending message was +completed. (see :ref:`opal-messages`). .. code-block:: c + #define OPAL_CHECK_ASYNC_COMPLETION 86 + int64_t opal_check_completion(uint64_t *buffer, uint64_t size, uint64_t token); Parameters: @@ -16,15 +21,15 @@ size token async message token +Currently unused by Linux, but it is used by FreeBSD. + Return values ------------- -OPAL_PARAMETER +:ref:`OPAL_PARAMETER` buffer parameter is an invalid pointer (NULL or > top of RAM). - -OPAL_SUCCESS +:ref:`OPAL_SUCCESS` message successfully copied to buffer. - -OPAL_BUSY +:ref:`OPAL_BUSY` message is still pending and should be re-checked later.
fake_random: Do not overwrite the callback on instatiation
@@ -33,7 +33,6 @@ static OSSL_FUNC_rand_enable_locking_fn fake_rand_enable_locking; static void *fake_rand_newctx(void *provctx, void *parent, const OSSL_DISPATCH *parent_dispatch) { - fake_rand.cb = NULL; fake_rand.state = EVP_RAND_STATE_UNINITIALISED; return &fake_rand; }
doc: update in release todo
@@ -65,7 +65,7 @@ And now commit everything: git-commit -a Clean up the mess left over: - git-clean -df + git-clean -dfx Make an empty builddirectory: mkdir ~build @@ -86,7 +86,7 @@ If version numbers are correct in mkdir ~elektra/$VERSION && kdb --version > ~elektra/$VERSION/version Rebuild cleanly, run all tests and also check for memleaks: - cd ~build && ~e/scripts/configure-debian ~e && make -j5 && make run_all && make run_memcheck + cd ~build && ~e/scripts/configure-debian ~e && make -j5 && make run_all -j5 && make run_memcheck -j5 Check if there are really >=135 or >=95 tests
Add failing blueprint tests to the skip list.
{"category":"simulation","file":"zerocopy.py","cases":["zerocopy02"]}, {"category":"quickrecipes","file":"how_to_start.py"}, {"category":"quickrecipes","file":"opening_compute_engine.py"}, + {"category":"databases","file":"blueprint.py", "cases":["bp_strided_struct_2d_ele_vals","bp_strided_struct_2d_vert_vals","bp_strided_struct_3d_ele_vals","bp_strided_struct_3d_vert_vals"]}, {"platform":"win", "category":"databases","file":"ffp.py","cases":["ffp_03"]}, {"platform":"win", "category":"databases","file":"silo.py","cases":["silo_26","silo_36","silo_37","silo_38","silo_39"]}, {"platform":"win", "category":"hybrid","file":"field_operators.py","cases":["field_op_04"]}, {"category":"simulation","file":"zerocopy.py","cases":["zerocopy02"]}, {"category":"quickrecipes","file":"how_to_start.py"}, {"category":"quickrecipes","file":"opening_compute_engine.py"}, + {"category":"databases","file":"blueprint.py", "cases":["bp_strided_struct_2d_ele_vals","bp_strided_struct_2d_vert_vals","bp_strided_struct_3d_ele_vals","bp_strided_struct_3d_vert_vals"]}, {"platform":"win", "category":"databases","file":"ffp.py","cases":["ffp_03"]}, {"platform":"win","category":"databases","file":"silo.py","cases":["silo_26","silo_36","silo_37","silo_38","silo_39"]}, {"platform":"win", "category":"databases","file":"tecplot.py","cases":["tecplot_27"]}, {"category":"simulation","file":"zerocopy.py","cases":["zerocopy02"]}, {"category":"quickrecipes","file":"how_to_start.py"}, {"category":"quickrecipes","file":"opening_compute_engine.py"}, + {"category":"databases","file":"blueprint.py", "cases":["bp_strided_struct_2d_ele_vals","bp_strided_struct_2d_vert_vals","bp_strided_struct_3d_ele_vals","bp_strided_struct_3d_vert_vals"]}, {"platform":"win","category":"databases","file":"silo.py","cases":["silo_26"]}, {"platform":"win","category":"databases","file":"silo.py","cases":["silo_36"]}, {"platform":"win","category":"databases","file":"silo.py","cases":["silo_37"]},
driver/accel_kx022.h: Format with clang-format BRANCH=none TEST=none
#define KX022_SELF_TEST 0x60 #define KX022_INTERNAL 0x7f - #define KX022_CNTL1_PC1 BIT(7) #define KX022_CNTL1_WUFE BIT(1) #define KX022_CNTL1_TPE BIT(0) #define KX022_ORIENT_INVERT_PORTRAIT BIT(3) #define KX022_ORIENT_LANDSCAPE BIT(4) #define KX022_ORIENT_INVERT_LANDSCAPE BIT(5) -#define KX022_ORIENT_MASK (KX022_ORIENT_PORTRAIT | \ - KX022_ORIENT_INVERT_PORTRAIT | \ - KX022_ORIENT_LANDSCAPE | \ - KX022_ORIENT_INVERT_LANDSCAPE) +#define KX022_ORIENT_MASK \ + (KX022_ORIENT_PORTRAIT | KX022_ORIENT_INVERT_PORTRAIT | \ + KX022_ORIENT_LANDSCAPE | KX022_ORIENT_INVERT_LANDSCAPE) #define KX022_CNTL2_SRST BIT(7)
[numerics] add verbose on test
#include <stdlib.h> // for free #include "SolverOptions.h" // for solver_options_id_to_name, SolverOptions #include <time.h> - +#include "numerics_verbose.h" /* Auxiliary routine: printing a matrix */ void print_matrix(const char* desc, int m, int n, double* a, int lda) { @@ -82,6 +82,13 @@ void print_test_info(int test_id, TestCase* current, const char* msg) void print_tests_collection_report(TestCase * collection, int n_failed, int * failed_tests, int n_succeeded, int * succeeded_tests) { + + + printf("\n Succeeded tests ids: [ "); + for(int t =0; t < n_succeeded; t++) + printf("%i, ", succeeded_tests[t]); + printf("] :\n"); + printf("\n Failed tests ids: [ "); for(int t =0; t < n_failed; t++) printf("%i, ", failed_tests[t]); @@ -143,6 +150,9 @@ int run_test_collection(TestCase * collection, int number_of_tests, int (*test_f printf("\n################# start of test # %i #######################\n", test_num); printf("Solver : %s (id: %d) \n", solver_options_id_to_name(collection[test_num].options->solverId), collection[test_num].options->solverId); + /* verbose=1; */ + solver_options_print(collection[test_num].options); + /* verbose=0; */ for(size_t i=0; i<collection[test_num].options->numberOfInternalSolvers; ++i) { int sid = collection[test_num].options->internalSolvers[i]->solverId;
Yajl: Dirty impl of removing empty parent keys
@@ -269,6 +269,31 @@ static void elektraYajlParseSuppressEmpty (KeySet * returned, Key * parentKey) } keyDel (lookupKey); } + + ksRewind (returned); + Key * cur; + while ((cur = ksNext (returned)) != NULL) + { + // Not sure atm if checking for dirdata is needed or the responsibility of yajl + Key * dirdata = keyDup (cur); + keySetBaseName (dirdata, "___dirdata"); + ELEKTRA_LOG_DEBUG ("Searching for %s", keyName (dirdata)); + Key * foundKey = ksLookup (returned, dirdata, 0); + + if (foundKey == NULL) + { + ELEKTRA_LOG_DEBUG ("Did not find dirdata"); + // I wonder if there's a better way for this check + if (keyGetValueSize (cur) < 2) + { + ELEKTRA_LOG_DEBUG ("Key has no value, delete %s", keyName (cur)); + // Is this even a good idea considering the cursor still points at this key? + keyDel (ksLookup (returned, cur, KDB_O_POP)); + } + } + + keyDel (dirdata); + } } static inline KeySet * elektraGetModuleConfig (void)
Document that the script must be run from the root
#!/usr/bin/env python3 """Check or fix the code style by running Uncrustify. + +This script must be run from the root of a Git work tree containing Mbed TLS. """ # Copyright The Mbed TLS Contributors # SPDX-License-Identifier: Apache-2.0
web-ui: fix search not re-filtering when data updated
@@ -19,10 +19,19 @@ const NAMESPACES_ORDER = [ 'spec', 'dir', 'user', 'system' ] export default class TreeView extends React.Component { constructor (props, ...args) { super(props, ...args) - this.state = { selection: [], unfolded: [] } + this.state = { selection: [], unfolded: [], data: props.data } } componentWillReceiveProps = (nextProps) => { + if (this.props.data !== nextProps.data) { + this.setState({ data: nextProps.data }) + } + + if (this.props.kdb !== nextProps.kdb) { // kdb updated + // force re-render of tree view + this.setState({ data: this.state.data.slice() }) + } + const { unfolded } = this.state if (unfolded.length <= 0) { const { instance } = nextProps @@ -174,8 +183,7 @@ export default class TreeView extends React.Component { } render () { - const { data } = this.props - const { selection, unfolded } = this.state + const { data, selection, unfolded } = this.state const tree = this const strategies = { click: [ function unfoldOnSelectionByPath (item) {
zephyr/shim/src/host_command.c: Format with clang-format BRANCH=none TEST=none
struct host_command *zephyr_find_host_command(int command) { - STRUCT_SECTION_FOREACH(host_command, cmd) { + STRUCT_SECTION_FOREACH(host_command, cmd) + { if (cmd->command == command) return cmd; }
[io] fix bug in selecting data at a given time for static objects
@@ -969,7 +969,15 @@ class IOReader(VTKPythonAlgorithmBase): self._index = id_t self.pos_data = self._idpos_data[self._id_t_m, :] self.velo_data = self._ivelo_data[self._id_t_m, :] - self.pos_static_data = self._ispos_data[self._id_t_m, :] + + static_id_t = max(0, numpy.searchsorted(self._static_times, t, side='right') - 1) + if static_id_t < len(self._static_indices)-1: + self._static_id_t_m = list(range(self._static_indices[static_id_t], + self._static_indices[static_id_t+1])) + else: + self._static_id_t_m = [self._static_indices[static_id_t]] + + self.pos_static_data = self._ispos_data[self._static_id_t_m, :] vtk_pos_data = dsa.numpyTovtkDataArray(self.pos_data) vtk_pos_data.SetName('pos_data') @@ -1152,6 +1160,12 @@ class IOReader(VTKPythonAlgorithmBase): # build times steps self._times, self._indices = numpy.unique(self._raw_times, return_index=True) + # all times as hdf5 slice for static objects + self._static_raw_times = self._ispos_data[:, 0] + + # build times steps for static objects + self._static_times, self._static_indices = numpy.unique(self._static_raw_times, + return_index=True) dcf = self._times[1:]-self._times[:-1] self._avg_timestep = numpy.mean(dcf) self._min_timestep = numpy.min(dcf)
Not modify reltuple and relpages in utility mode on QD
@@ -1664,13 +1664,19 @@ vac_update_relstats(Relation relation, /* Apply statistical updates, if any, to copied tuple */ + /* GPDB-specific not allow change relpages and reltuples when vacuum in utility mode on QD + * Because there's a chance that we overwrite perfectly good stats with zeros + */ + + bool ifUpdate = ! (IS_QUERY_DISPATCHER() && Gp_role == GP_ROLE_UTILITY); + dirty = false; - if (pgcform->relpages != (int32) num_pages) + if (pgcform->relpages != (int32) num_pages && ifUpdate) { pgcform->relpages = (int32) num_pages; dirty = true; } - if (pgcform->reltuples != (float4) num_tuples) + if (pgcform->reltuples != (float4) num_tuples && ifUpdate) { pgcform->reltuples = (float4) num_tuples; dirty = true;
invert vibration check predicate to improve computational cost
@@ -1756,7 +1756,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p); //White Dragon: vibrator - if ( SDLActivity.isTouchArea(action, x, y) && SDLActivity.isVibrationEnabled() ) { + if ( SDLActivity.isVibrationEnabled() && SDLActivity.isTouchArea(action, x, y) ) { int vibrationTime = 3; Vibrator vibrator = (Vibrator) getContext().getSystemService(Context.VIBRATOR_SERVICE); if (vibrator.hasVibrator()) {
fix(platone): adapts the new Platone interface issue
@@ -189,7 +189,7 @@ BCHAR *web3_eth_call_getNodesManagerAddr(Web3IntfContext *web3intf_context_ptr, // return entire RESPONSE content // return_value_ptr = rpc_response_str; - web3_parse_json_result(rpc_response_str, "result", &prase_result); + BoatPlatonePraseRpcResponseResult(rpc_response_str, "result", &prase_result); nodeManagerAddr = BoatMalloc(strlen((BCHAR*)(prase_result.field_ptr))/2); memset(nodeManagerAddr,0x00,strlen((BCHAR*)(prase_result.field_ptr))/2); // hex2array(prase_result.field_ptr+2,strlen((BCHAR*)(prase_result.field_ptr))-2,(BUINT8*)nodeManagerAddr); @@ -249,7 +249,7 @@ BCHAR *web3_eth_call_getNodesManagerAddr(Web3IntfContext *web3intf_context_ptr, // return entire RESPONSE content return_value_ptr = rpc_response_str; - web3_parse_json_result(rpc_response_str, "data", &prase_result); + BoatPlatonePraseRpcResponseResult(rpc_response_str, "data", &prase_result); nodeManagerAddr = BoatMalloc(strlen((BCHAR*)(prase_result.field_ptr))/2); memset(nodeManagerAddr,0x00,strlen((BCHAR*)(prase_result.field_ptr))/2);
Delete unused variable acquireResult from AOCSDrop()
@@ -436,7 +436,6 @@ AOCSDrop(Relation aorel, AOCSFileSegInfo **segfile_array; int i, segno; - LockAcquireResult acquireResult; AOCSFileSegInfo *fsinfo; Snapshot appendOnlyMetaDataSnapshot = RegisterSnapshot(GetCatalogSnapshot(InvalidOid));
removal of unnecessary line
@@ -187,7 +187,6 @@ void Cycle_Perform(long currentTime) { ProcessEvent(goal, currentTime); Decision_Making(goal, currentTime); - goal->processed = true; } } //process spikes
[mechanics] correct compiler warning
@@ -43,13 +43,13 @@ CouplerJointR::CouplerJointR(SP::NewtonEulerJointR joint1, unsigned int dof1, : NewtonEulerJointR() , _joint1(joint1) , _joint2(joint2) - , _dof1(dof1) - , _dof2(dof2) , _ref1(ref1) , _ref2(ref2) - , _ratio(ratio) + , _dof1(dof1) + , _dof2(dof2) , _ref1_index(ref1_index) , _ref2_index(ref2_index) + , _ratio(ratio) , _offset(0.0) { assert( _dof1 < _joint1->numberOfDoF() ); @@ -71,13 +71,13 @@ CouplerJointR::CouplerJointR(SP::NewtonEulerJointR joint1, unsigned int dof1, : NewtonEulerJointR() , _joint1(joint1) , _joint2(joint2) - , _dof1(dof1) - , _dof2(dof2) - , _ratio(ratio) , _ref1(refds1->q()) , _ref2(refds2->q()) + , _dof1(dof1) + , _dof2(dof2) , _ref1_index(ref1_index) , _ref2_index(ref2_index) + , _ratio(ratio) , _offset(0.0) { assert( _dof1 < _joint1->numberOfDoF() );
Add preliminary support for Cppcheck.
@@ -132,16 +132,6 @@ doc: codedoc $(DOCFLAGS) --title "pappl system functions" --man pappl-system --section 3 --body ../man/pappl-system-body.man --footer ../man/pappl-footer.man system.h system*.c >../man/pappl-system.3 -# Analyze code using Frama-C <https://www.frama-c.com/index.html> -# -# Note: This isn't yet working - seems to have a LOT of trouble parsing the -# default C headers supplied on Ubuntu Linux (at least)... -frama-c: - echo Analyzing code with Frama-C... - echo 'frama-c -cpp-extra-args="$(CPPFLAGS)" -c11 -no-frama-c-stdlib ...' - frama-c -cpp-extra-args="$(CPPFLAGS)" -c11 -no-frama-c-stdlib $(OBJS:.o=.c) - - # Install everything install: $(TARGETS) echo Installing pappl-makeresheader in $(BUILDROOT)$(bindir)... @@ -211,5 +201,22 @@ resheader: $(RESOURCES) ./makeresheader.sh $(RESOURCES) >resource-private.h +# Analyze code using cppcheck <http://cppcheck.sourceforge.net> +cppcheck: + echo Analyzing code with Cppcheck... + echo 'cppcheck -I.. --template=gcc --addon=cert.py --addon=y2038.py --addon=threadsafety ...' + cppcheck -I.. --template=gcc --addon=cert.py --addon=y2038.py --addon=threadsafety $(OBJS:.o=.c) + + +# Analyze code using Frama-C <https://www.frama-c.com/index.html> +# +# Note: This isn't yet working - seems to have a LOT of trouble parsing the +# default C headers supplied on Ubuntu Linux (at least)... +frama-c: + echo Analyzing code with Frama-C... + echo 'frama-c -cpp-extra-args="$(CPPFLAGS)" -c11 -no-frama-c-stdlib ...' + frama-c -cpp-extra-args="$(CPPFLAGS)" -c11 -no-frama-c-stdlib $(OBJS:.o=.c) + + # Dependencies include Dependencies