message
stringlengths
6
474
diff
stringlengths
8
5.22k
Remove obsolete UWP
@@ -1974,14 +1974,6 @@ class MSVCCompiler(MSVC, Compiler): else: masm_io = '/nologo /c /Fo${output;suf=${OBJECT_SUF}:SRC} ${input;msvs_source:SRC}' - if is_positive('USE_UWP'): - flags_cxx += ['/ZW', '/AI{vc_root}/lib/store/references'.format(vc_root=self.tc.vc_root)] - if self.tc.kit_includes: - flags.append('/I{kit_includes}/winrt'.format(kit_includes=self.tc.kit_includes)) - win32_winnt = self.WIN32_WINNT.Windows8 - defines.append('WINAPI_FAMILY=WINAPI_FAMILY_APP') - winapi_unicode = True - emit('OBJECT_SUF', '$OBJ_SUF.obj') emit('WIN32_WINNT', '{value}'.format(value=win32_winnt)) defines.append('{name}=$WIN32_WINNT'.format(name=self.WIN32_WINNT.Macro)) @@ -2131,8 +2123,6 @@ class MSVCLinker(MSVC, Linker): if self.tc.kit_libs: libpaths.extend([os.path.join(self.tc.kit_libs, name, arch) for name in ('um', 'ucrt')]) libpaths.append(os.path.join(self.tc.vc_root, 'lib', arch)) - if is_positive('USE_UWP'): - libpaths.append(os.path.join(self.tc.vc_root, 'lib', 'store', 'references')) ignored_errors = [ 4221
ci: install rcc from fixed branch
@@ -3,12 +3,7 @@ echo "Installing Rhoconnect client" set -e -if [ $TRAVIS_BRANCH == "CI" ] -then BRANCH="master" -else - BRANCH=$TRAVIS_BRANCH -fi git clone -b $BRANCH https://github.com/rhomobile/rhoconnect-client.git $HOME/rhoconnect-client cd $HOME/rhoconnect-client
mackerel: don't generate read functions for write only registers
@@ -1018,10 +1018,15 @@ register_rawread_fn r = (RT.name r) n) ] else + if RT.is_readable r then [ decl, C.StaticInline rtn n args [ C.Return (loc_read r) ] ] + else + [ + C.Comment $ printf "Register %s is not readale" (RT.name r) + ] -- -- Read from the register, or from a shadow copy if it's not readable.
Fix (regression from
@@ -125,7 +125,9 @@ void lv_init(void) void lv_deinit(void) { lv_gc_clear_roots(); +#if LV_USE_LOG lv_log_register_print_cb(NULL); +#endif lv_disp_set_default(NULL); lv_mem_deinit(); lv_initialized = false;
stm32/boards/NUCLEO_F091RC: Enable with default pins.
#define MICROPY_HW_UART1_RX (pin_B7) #define MICROPY_HW_UART2_TX (pin_A2) #define MICROPY_HW_UART2_RX (pin_A3) +#define MICROPY_HW_UART3_TX (pin_C10) +#define MICROPY_HW_UART3_RX (pin_C11) +#define MICROPY_HW_UART4_TX (pin_A0) +#define MICROPY_HW_UART4_RX (pin_A1) +#define MICROPY_HW_UART5_TX (pin_B3) +#define MICROPY_HW_UART5_RX (pin_B4) +#define MICROPY_HW_UART6_TX (pin_C0) +#define MICROPY_HW_UART6_RX (pin_C1) +#define MICROPY_HW_UART7_TX (pin_C6) +#define MICROPY_HW_UART7_RX (pin_C7) +#define MICROPY_HW_UART8_TX (pin_C2) +#define MICROPY_HW_UART8_RX (pin_C3) // USART2 is connected to the ST-LINK USB VCP #define MICROPY_HW_UART_REPL PYB_UART_2
board/dirinboz/board.c: Format with clang-format BRANCH=none TEST=none
@@ -167,8 +167,7 @@ void ppc_interrupt(enum gpio_signal signal) int board_set_active_charge_port(int port) { - int is_valid_port = (port >= 0 && - port < CONFIG_USB_PD_PORT_MAX_COUNT); + int is_valid_port = (port >= 0 && port < CONFIG_USB_PD_PORT_MAX_COUNT); int i; if (port == CHARGE_PORT_NONE) { @@ -189,7 +188,6 @@ int board_set_active_charge_port(int port) return EC_ERROR_INVAL; } - /* Check if the port is sourcing VBUS. */ if (ppc_is_sourcing_vbus(port)) { CPRINTFUSB("Skip enable C%d", port); @@ -291,7 +289,6 @@ static void reset_nct38xx_port(int port) msleep(NCT3807_RESET_POST_DELAY_MS); } - void board_reset_pd_mcu(void) { /* Reset TCPC0 */ @@ -362,11 +359,9 @@ int board_pd_set_frs_enable(int port, int enable) /* Use the TCPC to enable fast switch when FRS included */ if (port == USBC_PORT_C0) { - rv = ioex_set_level(IOEX_USB_C0_TCPC_FASTSW_CTL_EN, - !!enable); + rv = ioex_set_level(IOEX_USB_C0_TCPC_FASTSW_CTL_EN, !!enable); } else { - rv = ioex_set_level(IOEX_USB_C1_TCPC_FASTSW_CTL_EN, - !!enable); + rv = ioex_set_level(IOEX_USB_C1_TCPC_FASTSW_CTL_EN, !!enable); } return rv; @@ -434,11 +429,10 @@ int usb_port_enable[USBA_PORT_COUNT] = { * The connector has 24 pins total, and there is no pin 0. */ const int keyboard_factory_scan_pins[][2] = { - {0, 5}, {1, 1}, {1, 0}, {0, 6}, {0, 7}, - {1, 4}, {1, 3}, {1, 6}, {1, 7}, {3, 1}, - {2, 0}, {1, 5}, {2, 6}, {2, 7}, {2, 1}, - {2, 4}, {2, 5}, {1, 2}, {2, 3}, {2, 2}, - {3, 0}, {-1, -1}, {-1, -1}, {-1, -1}, + { 0, 5 }, { 1, 1 }, { 1, 0 }, { 0, 6 }, { 0, 7 }, { 1, 4 }, + { 1, 3 }, { 1, 6 }, { 1, 7 }, { 3, 1 }, { 2, 0 }, { 1, 5 }, + { 2, 6 }, { 2, 7 }, { 2, 1 }, { 2, 4 }, { 2, 5 }, { 1, 2 }, + { 2, 3 }, { 2, 2 }, { 3, 0 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, }; const int keyboard_factory_scan_pins_used = ARRAY_SIZE(keyboard_factory_scan_pins);
build-tester: check if we run in a tag github workflow
@@ -23,7 +23,11 @@ BUILD_FOLDER="$SOURCE_FOLDER/.pio/build" CONFIG_FILE="$SOURCE_FOLDER/src/config/config.h" TARGETS_FILE="$SCRIPT_FOLDER/targets.json" +if [ "$GITHUB_REF_TYPE" == "tag" ]; then + BRANCH="" +else BRANCH="$(git rev-parse --abbrev-ref HEAD)" +fi COMMIT=$GITHUB_SHA if [ -z "$COMMIT" ]; then
log: Fix crash in `cr_log_info()` on empty string Fixes The issue was caused by an unchecked dereferencing of the first token returned by `strtok_r()`, which is NULL if the message is empty. Now the `normal_log_message()` function does an early return if the messages is empty, instead of trying to extract tokens.
@@ -427,6 +427,9 @@ void normal_log_test_abort(CR_UNUSED struct criterion_test_stats *stats, const c void normal_log_message(enum criterion_severity severity, const char *msg) { + if (*msg == '\0') + return; + char *dup = strdup(msg); char *saveptr = NULL; char *line = strtok_r(dup, "\n", &saveptr);
help: support deprecated property
@@ -80,6 +80,9 @@ int pack_config_map_entry(msgpack_packer *mp_pck, struct flb_config_map *m) if (m->type == FLB_CONFIG_MAP_STR) { pack_str(mp_pck, "string"); } + else if (m->type == FLB_CONFIG_MAP_DEPRECATED) { + pack_str(mp_pck, "deprecated"); + } else if (m->type == FLB_CONFIG_MAP_INT) { pack_str(mp_pck, "integer"); }
stm32/Makefile: Print info messages about use of mboot/QSPI flash.
@@ -513,6 +513,12 @@ $(BUILD)/firmware.elf: $(OBJ) $(ECHO) "LINK $@" $(Q)$(LD) $(LDFLAGS) -o $@ $^ $(LDFLAGS_MOD) $(LIBS) $(Q)$(SIZE) $@ +ifneq ($(TEXT0_ADDR),0x08000000) + $(ECHO) "INFO: this build requires mboot to be installed first" +endif +ifeq ($(TEXT1_ADDR),0x90000000) + $(ECHO) "INFO: this build places firmware in external QSPI flash" +endif PLLVALUES = boards/pllvalues.py MAKE_PINS = boards/make-pins.py
add aikonf7 to targets.json
} } ] + }, + { + "name": "aikon_f7", + "configurations": [ + { + "name": "brushless.serial", + "defines": { + "BRUSHLESS_TARGET": "", + "RX_UNIFIED_SERIAL": "" + } + } + ] + } } ] \ No newline at end of file
cmsapitest.c: add test case for CMS_EnvelopedData_decrypt()
#include <openssl/bio.h> #include <openssl/x509.h> #include <openssl/pem.h> -#include "../crypto/cms/cms_local.h" /* for access to cms->d.signedData */ +#include "../crypto/cms/cms_local.h" /* for d.signedData and d.envelopedData */ #include "testutil.h" @@ -29,6 +29,7 @@ static int test_encrypt_decrypt(const EVP_CIPHER *cipher) BIO *msgbio = BIO_new_mem_buf(msg, strlen(msg)); BIO *outmsgbio = BIO_new(BIO_s_mem()); CMS_ContentInfo* content = NULL; + BIO *contentbio = NULL; char buf[80]; if (!TEST_ptr(certstack) || !TEST_ptr(msgbio) || !TEST_ptr(outmsgbio)) @@ -45,6 +46,12 @@ static int test_encrypt_decrypt(const EVP_CIPHER *cipher) CMS_TEXT))) goto end; + if (!TEST_ptr(contentbio = + CMS_EnvelopedData_decrypt(content->d.envelopedData, + NULL, privkey, cert, NULL, + CMS_TEXT, NULL, NULL))) + goto end; + /* Check we got the message we first started with */ if (!TEST_int_eq(BIO_gets(outmsgbio, buf, sizeof(buf)), strlen(msg)) || !TEST_int_eq(strcmp(buf, msg), 0)) @@ -52,6 +59,7 @@ static int test_encrypt_decrypt(const EVP_CIPHER *cipher) testresult = 1; end: + BIO_free(contentbio); sk_X509_free(certstack); BIO_free(msgbio); BIO_free(outmsgbio);
apps: examples: powermonitor: nxstyle fixes fix for errors reported by the nxstyle tool
/**************************************************************************** + * apps/examples/powermonitor/powermonitor_main.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * ****************************************************************************/ -/****************************************************************************** +/**************************************************************************** * Included Files - ******************************************************************************/ + ****************************************************************************/ #include <nuttx/config.h> #include <nuttx/sensors/ltc4151.h> -/****************************************************************************** +/**************************************************************************** * Pre-processor Definitions - ******************************************************************************/ + ****************************************************************************/ #define DECIMAL_PLACES3(x) abs(((int)(((x)-((int)x))*1000))) -/****************************************************************************** +/**************************************************************************** * Public Functions - ******************************************************************************/ + ****************************************************************************/ int main(int argc, char *argv[]) {
android: travis another version try
@@ -61,8 +61,8 @@ android: - extra-google-google_play_services - extra-google-m2repository - extra-android-m2repository - - android-${RHO_ANDROID_LEVEL:-19} - - addon-google_apis-google-${RHO_ANDROID_LEVEL:-19} + - android-${RHO_ANDROID_LEVEL:-21} + - addon-google_apis-google-${RHO_ANDROID_LEVEL:-21} env: global: @@ -86,7 +86,7 @@ matrix: - language: android os: linux - env: RHO_TARGET="android" RHO_APP="auto_common_spec" RHO_ANDROID_LEVEL="21" + env: RHO_TARGET="android" RHO_APP="auto_common_spec" RHO_ANDROID_LEVEL="-21" #- language: android # os: linux @@ -94,7 +94,7 @@ matrix: - language: android os: linux - env: RHO_TARGET="android" RHO_APP="framework_spec" RHO_ANDROID_LEVEL="24" + env: RHO_TARGET="android" RHO_APP="framework_spec" RHO_ANDROID_LEVEL="-24" #- language: android # os: linux
oic; return observer option even updating existing observer with a new token.
@@ -410,6 +410,9 @@ oc_ri_invoke_coap_entity_handler(struct coap_packet_rx *request, oc_response_buffer_t response_buffer; oc_response_t response_obj; struct os_mbuf *m = NULL; +#ifdef OC_SERVER + int rc; +#endif response_buffer.buffer = NULL; response_buffer.block_offset = offset; @@ -598,33 +601,30 @@ oc_ri_invoke_coap_entity_handler(struct coap_packet_rx *request, * requesting client as an observer. */ if (observe == 0) { - if (coap_observe_handler(request, response, cur_resource, endpoint) == - 0) { + rc = coap_observe_handler(request, response, cur_resource, endpoint); + if (rc >= 0) { + coap_set_header_observe(response, 0); + } + if (rc == 0) { /* If the resource is marked as periodic observable it means * it must be polled internally for updates (which would lead to * notifications being sent). If so, add the resource to a list of * periodic GET callbacks to utilize the framework's internal * polling mechanism. */ - bool set_observe_option = true; if (cur_resource->properties & OC_PERIODIC) { os_callout_reset(&cur_resource->callout, (cur_resource->observe_period_mseconds * OS_TICKS_PER_SEC)/1000); } - - if (set_observe_option) { - coap_set_header_observe(response, 0); - } - } } + } else if (observe == 1) { /* If the observe option is set to 1, make an attempt to remove * the requesting client from the list of observers. In addition, * remove the resource from the list periodic GET callbacks if it * is periodic observable, and this was the only observer. */ - else if (observe == 1) { - if (coap_observe_handler(request, response, cur_resource, endpoint) > - 0) { + rc = coap_observe_handler(request, response, cur_resource, endpoint); + if (rc > 0) { if (!cur_resource->num_observers && cur_resource->properties & OC_PERIODIC) { os_callout_stop(&cur_resource->callout);
schema compile BUGFIX compiled exts array from several parsed exts Fixes
@@ -182,11 +182,12 @@ struct lysc_unres_dflt { #define DUP_EXTS(CTX, PMOD, PARENT, PARENT_STMT, ORIG_ARRAY, NEW_ARRAY, DUP_FUNC) \ if (ORIG_ARRAY) { \ - LY_ARRAY_COUNT_TYPE __u; \ + LY_ARRAY_COUNT_TYPE __u, __new_start; \ + __new_start = LY_ARRAY_COUNT(NEW_ARRAY); \ LY_ARRAY_CREATE_RET(CTX, NEW_ARRAY, LY_ARRAY_COUNT(ORIG_ARRAY), LY_EMEM); \ LY_ARRAY_FOR(ORIG_ARRAY, __u) { \ LY_ARRAY_INCREMENT(NEW_ARRAY); \ - LY_CHECK_RET(DUP_FUNC(CTX, PMOD, PARENT, PARENT_STMT, &(ORIG_ARRAY)[__u], &(NEW_ARRAY)[__u])); \ + LY_CHECK_RET(DUP_FUNC(CTX, PMOD, PARENT, PARENT_STMT, &(ORIG_ARRAY)[__u], &(NEW_ARRAY)[__new_start + __u])); \ } \ }
in_event_type: do not set event_type
@@ -384,15 +384,12 @@ static int cb_event_type_init(struct flb_input_instance *ins, if (tmp) { if (strcasecmp(tmp, "logs") == 0) { ctx->type = FLB_EVENT_TYPE_LOGS; - ins->event_type = FLB_INPUT_LOGS; } else if (strcasecmp(tmp, "metrics") == 0) { ctx->type = FLB_EVENT_TYPE_METRICS; - ins->event_type = FLB_INPUT_METRICS; } else if (strcasecmp(tmp, "traces") == 0) { ctx->type = FLB_EVENT_TYPE_TRACES; - ins->event_type = FLB_INPUT_TRACES; } }
Fix an HRR bug Ensure that after an HRR we can only negotiate TLSv1.3
@@ -1655,6 +1655,10 @@ int ssl_choose_server_version(SSL *s, CLIENTHELLO_MSG *hello, DOWNGRADE *dgrd) suppversions = &hello->pre_proc_exts[TLSEXT_IDX_supported_versions]; + /* If we did an HRR then supported versions is mandatory */ + if (!suppversions->present && s->hello_retry_request) + return SSL_R_UNSUPPORTED_PROTOCOL; + if (suppversions->present && !SSL_IS_DTLS(s)) { unsigned int candidate_vers = 0; unsigned int best_vers = 0; @@ -1699,10 +1703,10 @@ int ssl_choose_server_version(SSL *s, CLIENTHELLO_MSG *hello, DOWNGRADE *dgrd) } if (best_vers > 0) { - if (SSL_IS_TLS13(s)) { + if (s->hello_retry_request) { /* - * We get here if this is after a HelloRetryRequest. In this - * case we just check that we still negotiated TLSv1.3 + * This is after a HelloRetryRequest so we better check that we + * negotiated TLSv1.3 */ if (best_vers != TLS1_3_VERSION) return SSL_R_UNSUPPORTED_PROTOCOL;
imx6ull.c: added missing pointer test
@@ -274,7 +274,7 @@ static int _imx6ull_getIOpad(int pad, char *hys, char *pus, char *pue, char *pke u32 t; volatile u32 *base = imx6ull_common.iomux; - if (hys == NULL || pus == NULL || pue == NULL || ode == NULL || speed == NULL || dse == NULL || sre == NULL) + if (hys == NULL || pus == NULL || pue == NULL || pke == NULL || ode == NULL || speed == NULL || dse == NULL || sre == NULL) return -EINVAL; if (pad >= pctl_pad_test_mode && pad <= pctl_pad_tamper9) {
Disable legacy ProcessHacker_CreateTabPage
@@ -104,8 +104,8 @@ PhPluginInvokeWindowCallback( ((HFONT)PhPluginInvokeWindowCallback(PH_MAINWINDOW_CALLBACK_TYPE_GET_FONT, 0, 0)) #define ProcessHacker_Invoke(Function, Parameter) \ PhPluginInvokeWindowCallback(PH_MAINWINDOW_CALLBACK_TYPE_INVOKE, (PVOID)(ULONG_PTR)(Parameter), (PVOID)(ULONG_PTR)(Function)) -#define ProcessHacker_CreateTabPage(Template) \ - PhPluginInvokeWindowCallback(PH_MAINWINDOW_CALLBACK_TYPE_CREATE_TAB_PAGE, 0, (PVOID)(ULONG_PTR)(Template)) +//#define ProcessHacker_CreateTabPage(Template) \ +// PhPluginInvokeWindowCallback(PH_MAINWINDOW_CALLBACK_TYPE_CREATE_TAB_PAGE, 0, (PVOID)(ULONG_PTR)(Template)) #define ProcessHacker_Refresh() \ PhPluginInvokeWindowCallback(PH_MAINWINDOW_CALLBACK_TYPE_REFRESH, 0, 0) #define ProcessHacker_GetUpdateAutomatically() \
Dsiable flags 1 and reduction_teams temporarily for mainline-closed
@@ -36,7 +36,6 @@ extern_init famd-opt-279975 firstprivate firstprivate2 -flags 1 flags 2 flags 3 flags 4 @@ -163,7 +162,6 @@ reduction_array reduction_array_section reduction_issue_16 reduction_shared_array -reduction_teams reduction_teams_distribute_parallel schedule simd
ble_mesh: stack: Add two application macros for TTL
@@ -61,6 +61,12 @@ typedef uint8_t esp_ble_mesh_octet8_t[ESP_BLE_MESH_OCTET8_LEN]; /*!< Invalid Company ID */ #define ESP_BLE_MESH_CID_NVAL 0xFFFF +/*!< Special TTL value to request using configured default TTL */ +#define ESP_BLE_MESH_TTL_DEFAULT 0xFF + +/*!< Maximum allowed TTL value */ +#define ESP_BLE_MESH_TTL_MAX 0x7F + #define ESP_BLE_MESH_ADDR_UNASSIGNED 0x0000 #define ESP_BLE_MESH_ADDR_ALL_NODES 0xFFFF #define ESP_BLE_MESH_ADDR_PROXIES 0xFFFC @@ -522,7 +528,7 @@ typedef struct { /** Force sending reliably by using segment acknowledgement */ uint8_t send_rel: 1; - /** TTL, or BLE_MESH_TTL_DEFAULT for default TTL. */ + /** TTL, or ESP_BLE_MESH_TTL_DEFAULT for default TTL. */ uint8_t send_ttl; /** Opcode of a received message. Not used for sending message. */
plugins: out_cloudwatch_logs: updated the code to use the new base stream type
@@ -352,7 +352,7 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins, * CW output runs in sync mode; because the CW API currently requires * PutLogEvents requests to a log stream to be made serially */ - upstream->flags &= ~(FLB_IO_ASYNC); + flb_stream_disable_async_mode(&upstream->base); ctx->cw_client->upstream = upstream; flb_output_upstream_set(upstream, ctx->ins);
ATExecAddColumn: resolve FIXME and remove old JIRA references Unfortunately we can't remove the code referenced by the FIXME yet, but we've pulled the existing context into the comment and moved to GitHub for tracking. [ci skip]
@@ -6618,17 +6618,18 @@ ATExecAddColumn(AlteredTableInfo *tab, Relation rel, } /* - * MPP-14367/MPP-19664 - Handling of default NULL for AO/CO tables. + * Handling of default NULL for AO/CO tables. + * * Currently memtuples cannot deal with the scenario where the number of * attributes in the tuple data don't match the attnum. We will generate an * explicit NULL default value and force a rewrite of the table below. - * Note: This is inefficient and there is already another JIRA MPP-5419 - * open to track adding columns without default values to AO tables - * efficiently. When that JIRA is fixed, the following piece of code may - * be removed * - * GPDB_84_MERGE_FIXME according to Jira 5419 is resolved, can we remove - * this code now? + * At one point there were plans to restructure memtuples so that this + * rewrite did not have to occur. An optimization was added to + * column-oriented tables to avoid the rewrite, but it does not apply to + * row-oriented tables. Eventually it would be nice to remove this + * workaround; see GitHub issue + * https://github.com/greenplum-db/gpdb/issues/3756 */ if (!defval && (RelationIsAoRows(rel) || RelationIsAoCols(rel))) defval = (Expr *) makeNullConst(typeOid, -1);
import: add hex/raw binary support Generate raw binary file
@@ -52,6 +52,14 @@ $(APPDIR)$(DELIM)nuttx$(EXEEXT): $(wildcard $(APPDIR)$(DELIM)*$(LIBEXT)) $(Q) $(LD) --entry=__start $(LDFLAGS) -T$(LDSCRIPT) $(LIBPATHS) \ $(LDLIBPATH) -L$(CURDIR)$(DELIM)scripts -o $@ $(HEAD_OBJ) \ $(EXTRA_OBJS) $(LDSTARTGROUP) $^ $(LDLIBS) $(EXTRA_LIBS) $(LDENDGROUP) +ifeq ($(CONFIG_INTELHEX_BINARY),y) + $(Q) echo "CP: nuttx.hex" + $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O ihex $@ nuttx.hex +endif +ifeq ($(CONFIG_RAW_BINARY),y) + $(Q) echo "CP: nuttx.bin" + $(Q) $(OBJCOPY) $(OBJCOPYARGS) -O binary $@ nuttx.bin +endif install: $(APPDIR)$(DELIM)nuttx$(EXEEXT)
engine: dispatch: reduce noise of trace message
@@ -131,7 +131,6 @@ int flb_engine_dispatch(uint64_t id, struct flb_input_instance *in, mk_list_foreach_safe(d_head, tmp, &in->dyntags) { dt = mk_list_entry(d_head, struct flb_input_dyntag, _head); - flb_trace("[dyntag %s] %p tag=%s", dt->in->name, dt, dt->tag); if (dt->busy == FLB_TRUE) { continue; } @@ -148,6 +147,7 @@ int flb_engine_dispatch(uint64_t id, struct flb_input_instance *in, continue; } + flb_trace("[dyntag %s] %p tag=%s", dt->in->name, dt, dt->tag); task = flb_task_create(id, buf, size, dt->in, dt, dt->tag, config); if (!task) { flb_free(buf);
doc: add v2.7 docs to version menu Also cleaned out older versions from list, keeping v1.0, v1.6.1, v2.0, v2.5, and v2.6. The documentation for previous releases is still available (by editing the URL to mention that release (e.g., /2.1/ ).
@@ -192,17 +192,11 @@ html_context = { 'docs_title': docs_title, 'is_release': is_release, 'versions': ( ("latest", "/latest/"), + ("2.7", "/2.7/"), ("2.6", "/2.6/"), ("2.5", "/2.5/"), - ("2.4", "/2.4/"), - ("2.3", "/2.3/"), - ("2.2", "/2.2/"), - ("2.1", "/2.1/"), ("2.0", "/2.0/"), ("1.6.1", "/1.6.1/"), - ("1.6", "/1.6/"), - ("1.5", "/1.5/"), - ("1.4", "/1.4/"), ("1.0", "/1.0/"), # keep 1.0 ) }
Monero groundwork
@@ -53,15 +53,15 @@ namespace MiningForce.Blockchain.Bitcoin { switch (request.Method) { - case StratumMethod.Subscribe: + case BitcoinStratumMethods.Subscribe: OnSubscribe(client, tsRequest); break; - case StratumMethod.Authorize: + case BitcoinStratumMethods.Authorize: OnAuthorize(client, tsRequest); break; - case StratumMethod.SubmitShare: + case BitcoinStratumMethods.SubmitShare: OnSubmitShare(client, tsRequest); break; @@ -95,8 +95,8 @@ namespace MiningForce.Blockchain.Bitcoin { new object[] { - new object[] { StratumMethod.SetDifficulty, client.ConnectionId }, - new object[] { StratumMethod.MiningNotify, client.ConnectionId } + new object[] { BitcoinStratumMethods.SetDifficulty, client.ConnectionId }, + new object[] { BitcoinStratumMethods.MiningNotify, client.ConnectionId } }, } .Concat(manager.GetSubscriberData(client)) @@ -106,11 +106,11 @@ namespace MiningForce.Blockchain.Bitcoin // setup worker context client.Context.IsSubscribed = true; - client.Context.UserAgent = requestParams?.Length > 0 ? requestParams[0] : null; + client.Context.UserAgent = requestParams?.Length > 0 ? requestParams[0].Trim() : null; // send intial update - client.Notify(StratumMethod.SetDifficulty, new object[] { client.Context.Difficulty }); - client.Notify(StratumMethod.MiningNotify, currentJobParams); + client.Notify(BitcoinStratumMethods.SetDifficulty, new object[] { client.Context.Difficulty }); + client.Notify(BitcoinStratumMethods.MiningNotify, currentJobParams); } private async void OnAuthorize(StratumClient<BitcoinWorkerContext> client, Timestamped<JsonRpcRequest> tsRequest) @@ -193,7 +193,7 @@ namespace MiningForce.Blockchain.Bitcoin { currentJobParams = jobParams; - BroadcastNotification(StratumMethod.MiningNotify, currentJobParams, client => + BroadcastNotification(BitcoinStratumMethods.MiningNotify, currentJobParams, client => { if (client.Context.IsSubscribed) { @@ -208,11 +208,11 @@ namespace MiningForce.Blockchain.Bitcoin { logger.Debug(() => $"[{LogCat}] [{client.ConnectionId}] VarDiff update to {client.Context.Difficulty}"); - client.Notify(StratumMethod.SetDifficulty, new object[] { client.Context.Difficulty }); + client.Notify(BitcoinStratumMethods.SetDifficulty, new object[] { client.Context.Difficulty }); } // send job - client.Notify(StratumMethod.MiningNotify, currentJobParams); + client.Notify(BitcoinStratumMethods.MiningNotify, currentJobParams); } else
DM USB: clean-up: change name of function usb_dev_comp_req Change it to usb_dev_comp_cb, which is more accurate for what it does. This patch doesn't change original program logic. Acked-by: Yu Wang
@@ -170,7 +170,7 @@ libusb_speed_to_usb_speed(int libusb_speed) } static void -usb_dev_comp_req(struct libusb_transfer *trn) +usb_dev_comp_cb(struct libusb_transfer *trn) { struct usb_dev_req *r; struct usb_data_xfer *xfer; @@ -255,6 +255,7 @@ usb_dev_comp_req(struct libusb_transfer *trn) done = trn->actual_length; while (i < r->blk_count) { + if (trn->type == LIBUSB_TRANSFER_TYPE_ISOCHRONOUS) { buf_idx = 0; buf = libusb_get_iso_packet_buffer_simple(trn, j); @@ -885,16 +886,16 @@ usb_dev_data(void *pdata, struct usb_data_xfer *xfer, int dir, int epctx) if (type == USB_ENDPOINT_BULK) { libusb_fill_bulk_transfer(r->trn, udev->handle, epid, - r->buffer, data_size, usb_dev_comp_req, r, 0); + r->buffer, data_size, usb_dev_comp_cb, r, 0); } else if (type == USB_ENDPOINT_INT) { libusb_fill_interrupt_transfer(r->trn, udev->handle, epid, - r->buffer, data_size, usb_dev_comp_req, r, 0); + r->buffer, data_size, usb_dev_comp_cb, r, 0); } else if (type == USB_ENDPOINT_ISOC) { libusb_fill_iso_transfer(r->trn, udev->handle, epid, r->buffer, data_size, framecnt, - usb_dev_comp_req, r, 0); + usb_dev_comp_cb, r, 0); } else { UPRINTF(LFTL, "%s: wrong endpoint type %d\r\n", __func__, type);
mmapstorage: fix file opening mode
@@ -36,7 +36,7 @@ static FILE * elektraMmapstorageOpenFile (Key * parentKey, int errnosave) FILE * fp; ELEKTRA_LOG ("opening file %s", keyString (parentKey)); - if ((fp = fopen (keyString (parentKey), "rw+")) == 0) { + if ((fp = fopen (keyString (parentKey), "r+")) == 0) { ELEKTRA_SET_ERROR_GET (parentKey); errno = errnosave; ELEKTRA_LOG_WARNING ("error opening file %s", keyString (parentKey));
Fix compiler warnings in lv_draw_img.c
#include "lv_draw_img.h" #include "lv_img_cache.h" #include "../lv_misc/lv_log.h" +#include "../lv_misc/lv_mem.h" /********************* * DEFINES @@ -447,7 +448,7 @@ lv_img_dsc_t *lv_img_buf_alloc(lv_coord_t w, lv_coord_t h, lv_img_cf_t cf) lv_mem_free(dsc); return NULL; } - memset(dsc->data, 0, dsc->data_size); + memset((uint8_t *)dsc->data, 0, dsc->data_size); /* Fill in header */ dsc->header.always_zero = 0;
hark-graph-hook: fix face
== =/ cor=(unit _handle-update) (abed:handle-update:ha rid) ?~ cor `state - abet:(add-nodes:u.cor updates) + abet:(add-nodes:u.cor nodes) -- :: ++ on-peek on-peek:def
Make serial optional to find USB devices If no serial is provided, then list all available USB devices (which can be open and having a serial). PR <https://github.com/Genymobile/scrcpy/pull/2974>
@@ -53,12 +53,15 @@ accept_device(libusb_device *device, const char *serial, return false; } + if (serial) { + // Filter by serial bool matches = !strcmp(serial, device_serial); if (!matches) { free(device_serial); libusb_close(handle); return false; } + } out->device = libusb_ref_device(device); out->serial = device_serial; @@ -90,8 +93,6 @@ sc_usb_device_destroy_all(struct sc_usb_device *usb_devices, size_t count) { ssize_t sc_usb_find_devices(struct sc_usb *usb, const char *serial, struct sc_usb_device *devices, size_t len) { - assert(serial); - libusb_device **list; ssize_t count = libusb_get_device_list(usb->context, &list); if (count < 0) {
OpenCorePkg: make explicit conversion to CHAR8
@@ -142,7 +142,7 @@ OcKernelReadDarwinVersion ( DarwinVersion[Index] = (CHAR8) Kernel[Offset]; } DarwinVersion[Index] = '\0'; - DarwinVersionInteger = OcParseDarwinVersion (DarwinVersion); + DarwinVersionInteger = (CHAR8) OcParseDarwinVersion (DarwinVersion); DEBUG (( DEBUG_INFO,
Configurations/unix-Makefile.tmpl: not -v for rm Not all Unixen know the -v option
@@ -422,7 +422,7 @@ uninstall_sw: uninstall_runtime uninstall_engines uninstall_dev install_docs: install_man_docs install_html_docs uninstall_docs: uninstall_man_docs uninstall_html_docs - $(RM) -r -v $(DESTDIR)$(DOCDIR) + $(RM) -r $(DESTDIR)$(DOCDIR) install_ssldirs: @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(OPENSSLDIR)/certs
pujjo: Charger limit for 45w/65w adapter. Charger limit for 45w/65w adapter. Requested by power team. TEST=zmake build pujjo BRANCH=none
@@ -26,6 +26,10 @@ CONFIG_PLATFORM_EC_USB_PD_TCPM_RAA489000=y CONFIG_PLATFORM_EC_USB_PD_DISCHARGE_TCPC=y CONFIG_PLATFORM_EC_USB_PD_VBUS_DETECT_TCPC=y CONFIG_PLATFORM_EC_USB_PD_TCPC_LPM_EXIT_DEBOUNCE_US=100000 +CONFIG_PLATFORM_EC_PD_MAX_POWER_MW=65000 +CONFIG_PLATFORM_EC_PD_MAX_CURRENT_MA=3250 +CONFIG_PLATFORM_EC_PD_MAX_VOLTAGE_MV=20000 +CONFIG_PLATFORM_EC_PD_OPERATING_POWER_MW=15000 # RAA489000 uses TCPCI but not a separate PPC, so custom function is required CONFIG_PLATFORM_EC_USB_PD_5V_EN_CUSTOM=y # type C port 1 redriver
Remove remnant from simulated join process implementation.
//=========================== defines ========================================= /// inter-packet period (in ms) -#define NUMBER_OF_EXCHANGES 6 #define TIMEOUT 60000 const uint8_t cjoin_path0[] = "j";
ts: Make check_function easier to read.
@@ -245,23 +245,20 @@ static int check_function(lily_type_system *ts, lily_type *left, } } - if (right->subtype_count < left->subtype_count) { - /* It could be that the left side is only a scoop type and the right - side is empty. Setup the left side just in case. */ - if (left_type == NULL && left->subtype_count == 2) - left_type = left->subtypes[1]; - + if (left->subtype_count == right->subtype_count) + ; + /* The left can't have more unless the last is scoop. */ + else if (left->subtype_count > right->subtype_count) { + if (left->subtypes[i]->cls->id == LILY_ID_SCOOP && + (flags & T_UNIFY) == 0 && + ret == 1) + ret = 1; + else ret = 0; } - - /* Allow it if the last type was a scoop type (and not trying to unify - scoop types). */ - if (left_type && - left_type->cls->id == LILY_ID_SCOOP && - (flags & T_UNIFY) == 0) - ret = 1; - else if (right->subtype_count > left->subtype_count && - right->subtypes[i]->cls->id != LILY_ID_OPTARG) + /* The right side can have more as long as they're optional. Required + cannot follow optional, so only one needs to be tested. */ + else if (right->subtypes[i]->cls->id != LILY_ID_OPTARG) ret = 0; if (ret && flags & T_UNIFY)
Fix in->is typo in error message.
@@ -3218,7 +3218,7 @@ IotHttpsReturnCode_t IotHttpsClient_ReadHeader( IotHttpsResponseHandle_t respHan HTTPS_ON_NULL_ARG_GOTO_CLEANUP( pValue ); HTTPS_ON_ARG_ERROR_MSG_GOTO_CLEANUP( valueLen > 0, IOT_HTTPS_INVALID_PARAMETER, - "pValue has insufficient space to store a value string (length in 0)" ); + "pValue has insufficient space to store a value string (length is 0)" ); /* The buffer processing state is changed to searching the header buffer in this function. The parser state is * changed in the response to wherever the parser is currently located in the response. If this function is called
ocvalidate: Fix inverted check for AudioDxe
@@ -241,7 +241,7 @@ CheckUEFI ( if (OcAsciiStriStr (Driver, "hfs") != NULL) { HasHfsEfiDriver = TRUE; } - if (AsciiStrCmp (Driver, "AudioDxe.efi")) { + if (AsciiStrCmp (Driver, "AudioDxe.efi") == 0) { HasAudioDxeEfiDriver = TRUE; } }
test-tasty-lua.hs: remove unnecessary dollar
@@ -46,8 +46,9 @@ tests = testGroup "HsLua tasty module" assertEqual' "loading the module fails " Lua.OK =<< Lua.dostring "require 'tasty'" - , testGroup "testFileWith" $ - [testLuaFile Lua.run "test-tasty.lua" ("test" </> "test-tasty.lua")] + , testGroup "testFileWith" + [ testLuaFile Lua.run "test-tasty.lua" ("test" </> "test-tasty.lua") + ] ] assertEqual' :: (Show a, Eq a) => String -> a -> a -> Lua ()
Removes and modifies tests Removal and modification of tests relating to mbedtls_rsa_rsaes_pkcs1_v15_encrypt.
@@ -117,25 +117,19 @@ void rsa_invalid_param( ) TEST_INVALID_PARAM_RET( MBEDTLS_ERR_RSA_BAD_INPUT_DATA, mbedtls_rsa_rsaes_pkcs1_v15_encrypt( NULL, NULL, NULL, - valid_mode, - sizeof( buf ), buf, - buf ) ); - TEST_INVALID_PARAM_RET( MBEDTLS_ERR_RSA_BAD_INPUT_DATA, - mbedtls_rsa_rsaes_pkcs1_v15_encrypt( &ctx, NULL, - NULL, - invalid_mode, + MBEDTLS_RSA_PUBLIC, sizeof( buf ), buf, buf ) ); TEST_INVALID_PARAM_RET( MBEDTLS_ERR_RSA_BAD_INPUT_DATA, mbedtls_rsa_rsaes_pkcs1_v15_encrypt( &ctx, NULL, NULL, - valid_mode, + MBEDTLS_RSA_PUBLIC, sizeof( buf ), NULL, buf ) ); TEST_INVALID_PARAM_RET( MBEDTLS_ERR_RSA_BAD_INPUT_DATA, mbedtls_rsa_rsaes_pkcs1_v15_encrypt( &ctx, NULL, NULL, - valid_mode, + MBEDTLS_RSA_PUBLIC, sizeof( buf ), buf, NULL ) ); @@ -605,34 +599,6 @@ void rsa_pkcs1_sign_raw( data_t * hash_result, TEST_ASSERT( mbedtls_test_hexcmp( output, result_str->x, ctx.len, result_str->len ) == 0 ); -#if defined(MBEDTLS_PKCS1_V15) - /* For PKCS#1 v1.5, there is an alternative way to generate signatures */ - if( padding_mode == MBEDTLS_RSA_PKCS_V15 ) - { - int res; - memset( output, 0x00, sizeof( output) ); - - res = mbedtls_rsa_rsaes_pkcs1_v15_encrypt( &ctx, - &mbedtls_test_rnd_pseudo_rand, &rnd_info, - MBEDTLS_RSA_PRIVATE, hash_result->len, - hash_result->x, output ); - -#if !defined(MBEDTLS_RSA_ALT) - TEST_ASSERT( res == 0 ); -#else - TEST_ASSERT( ( res == 0 ) || - ( res == MBEDTLS_ERR_PLATFORM_FEATURE_UNSUPPORTED ) ); -#endif - - if( res == 0 ) - { - TEST_ASSERT( mbedtls_test_hexcmp( output, result_str->x, - ctx.len, - result_str->len ) == 0 ); - } - } -#endif /* MBEDTLS_PKCS1_V15 */ - exit: mbedtls_mpi_free( &N ); mbedtls_mpi_free( &P ); mbedtls_mpi_free( &Q ); mbedtls_mpi_free( &E );
options/linux-headers: Define two ioctls
#include <sys/ioctl.h> +#define BLKROSET _IO(0x12, 93) #define BLKROGET _IO(0x12, 94) #define BLKRRPART _IO(0x12, 95) +#define BLKGETSIZE64 _IOR(0x12, 114, size_t) #define BLKIOMIN _IO(0x12, 120) #define BLKIOOPT _IO(0x12, 121) #define BLKALIGNOFF _IO(0x12, 122)
[bug] fix tim bug
@@ -212,7 +212,7 @@ static void timer_init(struct rt_hwtimer_device *timer, rt_uint32_t state) #if defined(APBPERIPH_BASE) prescaler_value = (uint32_t)(HAL_RCC_GetPCLK1Freq() * pclk1_doubler / 10000) - 1; #elif defined(APB1PERIPH_BASE) || defined(APB2PERIPH_BASE) - if ((rt_uint32_t)htim->Instance >= APB2PERIPH_BASE) + if ((rt_uint32_t)tim->Instance >= APB2PERIPH_BASE) { prescaler_value = (uint32_t)(HAL_RCC_GetPCLK2Freq() * pclk2_doubler / 10000) - 1; }
Fix : Special characters issue with Likes and Favorites
@@ -238,7 +238,7 @@ public class DocumentDataService { public void addLike(final String username, final String idDocument) throws DatafariServerException { try { final String query = "insert into " + LIKECOLLECTION + " (" + USERNAMECOLUMN + "," + DOCUMENTIDCOLUMN + ")" - + " values ('" + username + "','" + idDocument + "')"; + + " values ('" + username + "',$$" + idDocument + "$$)"; session.execute(query); } catch (final DriverException e) { logger.warn("Unable to add like : " + e.getMessage()); @@ -262,7 +262,7 @@ public class DocumentDataService { public void unlike(final String username, final String idDocument) throws DatafariServerException { try { final String query = "DELETE FROM " + LIKECOLLECTION + " WHERE " + USERNAMECOLUMN + " = '" + username + "'" - + " AND " + DOCUMENTIDCOLUMN + " = '" + idDocument + "'"; + + " AND " + DOCUMENTIDCOLUMN + " = $$" + idDocument + "$$"; session.execute(query); } catch (final DriverException e) { logger.warn("Unable to unlike : " + e.getMessage()); @@ -294,7 +294,7 @@ public class DocumentDataService { for (final String documentID : documentIDs) { final ResultSet results = session.execute( "SELECT " + DOCUMENTIDCOLUMN + " FROM " + LIKECOLLECTION + " where " + USERNAMECOLUMN + "='" - + username + "' AND " + DOCUMENTIDCOLUMN + "='" + documentID + "'"); + + username + "' AND " + DOCUMENTIDCOLUMN + "=$$" + documentID + "$$"); for (final Row row : results) { likes.add(row.getString(DOCUMENTIDCOLUMN)); } @@ -342,7 +342,7 @@ public class DocumentDataService { try { final String query = "insert into " + FAVORITECOLLECTION + " (" + USERNAMECOLUMN + "," + DOCUMENTIDCOLUMN - + ")" + " values ('" + username + "','" + idDocument + "')"; + + ")" + " values ('" + username + "',$$" + idDocument + "$$)"; session.execute(query); } catch (final DriverException e) { logger.warn("Unable add favorite " + username + " : " + e.getMessage()); @@ -362,8 +362,8 @@ public class DocumentDataService { */ public void deleteFavorite(final String username, final String idDocument) throws DatafariServerException { try { - final String query = "DELETE FROM " + FAVORITECOLLECTION + " WHERE " + DOCUMENTIDCOLUMN + " = '" - + idDocument + "' AND " + USERNAMECOLUMN + " = '" + username + "'"; + final String query = "DELETE FROM " + FAVORITECOLLECTION + " WHERE " + DOCUMENTIDCOLUMN + " = $$" + + idDocument + "$$ AND " + USERNAMECOLUMN + " = '" + username + "'"; session.execute(query); } catch (final DriverException e) { logger.warn("Unable delete favorite " + username + " : " + e.getMessage()); @@ -396,7 +396,7 @@ public class DocumentDataService { for (final String documentID : documentIDs) { final ResultSet results = session.execute( "SELECT " + DOCUMENTIDCOLUMN + " FROM " + FAVORITECOLLECTION + " where " + USERNAMECOLUMN - + "='" + username + "' AND " + DOCUMENTIDCOLUMN + "='" + documentID + "'"); + + "='" + username + "' AND " + DOCUMENTIDCOLUMN + "=$$" + documentID + "$$"); for (final Row row : results) { favorites.add(row.getString(DOCUMENTIDCOLUMN)); }
u3: fixes compile-time conditionals around guard page impl
@@ -840,6 +840,7 @@ _ce_loom_protect_north(c3_w pgs_w, c3_w old_w) c3_assert(0); } +#ifdef U3_GUARD_PAGE // protect guard page if clobbered // // NB: < pgs_w is precluded by assertion in _ce_patch_compose() @@ -852,6 +853,7 @@ _ce_loom_protect_north(c3_w pgs_w, c3_w old_w) c3_assert(0); } } +#endif _ce_loom_track_north(pgs_w, dif_w); } @@ -888,6 +890,7 @@ _ce_loom_protect_south(c3_w pgs_w, c3_w old_w) c3_assert(0); } +#ifdef U3_GUARD_PAGE // protect guard page if clobbered // // NB: > pgs_w is precluded by assertion in _ce_patch_compose() @@ -900,6 +903,7 @@ _ce_loom_protect_south(c3_w pgs_w, c3_w old_w) c3_assert(0); } } +#endif _ce_loom_track_south(pgs_w, dif_w); } @@ -949,6 +953,7 @@ _ce_loom_mapf_north(c3_i fid_i, c3_w pgs_w, c3_w old_w) c3_assert(0); } +#ifdef U3_GUARD_PAGE // protect guard page if clobbered // // NB: < pgs_w is precluded by assertion in _ce_patch_compose() @@ -961,6 +966,7 @@ _ce_loom_mapf_north(c3_i fid_i, c3_w pgs_w, c3_w old_w) c3_assert(0); } } +#endif _ce_loom_track_north(pgs_w, dif_w); } @@ -1369,11 +1375,13 @@ u3e_yolo(void) return c3n; } +#ifdef U3_GUARD_PAGE if ( 0 != mprotect(u3a_into(gar_pag_p), pag_siz_i, PROT_NONE) ) { fprintf(stderr, "loom: failed to protect guard page: %s\r\n", strerror(errno)); c3_assert(0); } +#endif // mark all pages dirty //
it8xxx2: Remove label attribute The label attribute for GPIO DTS configs is no longer required, so remove it. TEST=zmake configure -b drawcia_riscv BRANCH=none
cros_kb_raw: cros-kb-raw@f01d00 { compatible = "ite,it8xxx2-cros-kb-raw"; reg = <0x00f01d00 0x29>; - label = "CROS_KB_RAW_0"; interrupt-parent = <&intc>; interrupts = <13 IRQ_TYPE_LEVEL_HIGH>; };
Fixed issue with Windows build when project only uses one music track
@@ -282,6 +282,7 @@ const compile = async ( `\n` + `const unsigned char * music_tracks[] = {\n` + (music.map(track => track.dataName + "_Data").join(", ") || "0, 0") + + (music.length === 1 ? "," + music.map(track => track.dataName + "_Data").join(", ") : "") + // Needed for windows?? `\n};\n\n` + `const unsigned char music_banks[] = {\n` + (music.map(track => track.bank).join(", ") || "0, 0") +
Fix guard of ecjpake.h include in crypto_extra.h
@@ -1903,7 +1903,7 @@ static inline void psa_pake_cs_set_hash( psa_pake_cipher_suite_t *cipher_suite, cipher_suite->hash = hash; } -#if defined(MBEDTLS_PSA_BUILTIN_PAKE) +#if defined(MBEDTLS_PSA_BUILTIN_ALG_ECJPAKE) #include <mbedtls/ecjpake.h> #endif
board/volmar/keyboard.c: Format with clang-format BRANCH=none TEST=none
@@ -40,8 +40,8 @@ static const struct ec_response_keybd_config volmar_kb = { }, .capabilities = KEYBD_CAP_SCRNLOCK_KEY, }; -__override const struct ec_response_keybd_config -*board_vivaldi_keybd_config(void) +__override const struct ec_response_keybd_config * +board_vivaldi_keybd_config(void) { return &volmar_kb; }
(543) fix the attach-* integ tests I neglected to adjust the new attach-* integration tests after removing the http-metrics event. Working now.
@@ -86,9 +86,6 @@ ERR+=$? grep -q http-resp $EVT_FILE > /dev/null ERR+=$? -grep -q http-metric $EVT_FILE > /dev/null -ERR+=$? - kill -9 `pidof python3` > /dev/null endtest @@ -118,8 +115,6 @@ if [[ $(grep Ubuntu /etc/os-release) ]]; then grep -q http-resp $EVT_FILE > /dev/null ERR+=$? -grep -q http-metric $EVT_FILE > /dev/null -ERR+=$? fi grep -q fs.open $EVT_FILE > /dev/null
hslua-core: fix ref/unref test
@@ -294,12 +294,12 @@ tests = testGroup "Core module" Just "Berlin" `shouldBeResultOf` do Lua.pushstring "Berlin" cityref <- Lua.ref Lua.registryindex - Lua.pushnil -- dummy op + Lua.settop 0 -- remove all elements from stack Lua.getref Lua.registryindex cityref Lua.tostring Lua.top , "references become invalid after unref" =: - Nothing `shouldBeResultOf` do + (Just "Heidelberg" /=) `shouldHoldForResultOf` do Lua.pushstring "Heidelberg" cityref <- Lua.ref Lua.registryindex Lua.unref Lua.registryindex cityref
Update contact e-mail
@@ -137,7 +137,7 @@ class AboutTableViewController: UITableViewController, UIDocumentPickerDelegate, case .contact: let controller = MFMailComposeViewController() controller.setSubject("Pyto - Contact") - controller.setToRecipients(["[email protected]"]) + controller.setToRecipients(["[email protected]"]) controller.mailComposeDelegate = self viewControllerToPresent = controller case .acknowledgments:
External socket binding
@@ -158,7 +158,7 @@ namespace MiningCore.Mining using (var subSocket = new SubscriberSocket()) { //subSocket.Options.ReceiveHighWatermark = 1000; - subSocket.Connect(poolConfig.ExternalStratumZmqSocket); + subSocket.Bind(poolConfig.ExternalStratumZmqSocket); subSocket.Subscribe(poolConfig.ExternalStratumZmqTopic); logger.Info($"Monitoring external stratum {poolConfig.ExternalStratumZmqSocket}/{poolConfig.ExternalStratumZmqTopic}");
[Makefile] Add benchmark target
@@ -65,15 +65,18 @@ questa_args += -sv_lib $(dpi_library)/mempool_dpi # DPI source files dpi := $(patsubst tb/dpi/%.cpp,$(buildpath)/$(dpi_library)/%.o,$(wildcard tb/dpi/*.cpp)) # Traces -trace := $(patsubst $(buildpath)/%.dasm,$(buildpath)/%.trace,$(wildcard $(buildpath)/*.dasm)) +trace = $(patsubst $(buildpath)/%.dasm,$(buildpath)/%.trace,$(wildcard $(buildpath)/*.dasm)) tracepath ?= $(buildpath)/traces traceresult ?= $(tracepath)/results.csv +ifndef result_dir + result_dir := $(resultpath)/$(shell date +"%Y%m%d_%H%M%S_$(app)_$$(git rev-parse --short HEAD)") +endif vlog_args += -suppress vlog-2583 -suppress vlog-13314 -suppress vlog-13233 -ifdef num_cores +# Defines vlog_args += +define+NUM_CORES=$(num_cores) -endif +# Simulation build: bender lib $(buildpath)/$(dpi_library)/mempool_dpi.so mkdir -p $(buildpath) ./bender script vsim --vlog-arg="$(vlog_args)" -t rtl -t asic -t mempool_test\ @@ -96,18 +99,34 @@ simc: clean-dasm build $(questa_cmd) vsim -c $(questa_args) $(library).$(top_level) -do "run -a" ./scripts/return_status.sh $(buildpath)/transcript +# Benchmarking +benchmark: log simc + # Call `make` again to get variable extension with all traces + result_dir=$(result_dir) $(MAKE) trace + trace: pre_trace $(trace) post_trace +log: + mkdir -p "$(result_dir)/original" + [ -e "$(preload)" ] && cp "$(preload)"* "$(result_dir)" || \ + ([ -e "$(buildpath)/transcript" ] && \ + cp "$$(grep -oP '(?<=\+PRELOAD=)[^ \"]*' $(buildpath)/transcript)"* "$(result_dir)" || \ + echo "No application specified") + env > "$(result_dir)/env" + cp $(MEMPOOL_DIR)/config/config.mk $(result_dir)/config + git rev-parse HEAD > "$(result_dir)/git-info.diff" + git show --oneline -s >> "$(result_dir)/git-info.diff" + git diff >> "$(result_dir)/git-info.diff" + pre_trace: rm -rf $(tracepath) post_trace: - RESULT_DIR=$(resultpath)/$$(date +"%F-%T-$$(git rev-parse --abbrev-ref HEAD)-$$(git rev-parse HEAD)"); \ - mkdir -p "$$RESULT_DIR"; mkdir -p "$$RESULT_DIR/original"; \ - cp $(traceresult) "$$RESULT_DIR"; \ - cp $(trace) "$$RESULT_DIR"; cp $(wildcard $(buildpath)/*.dasm) "$$RESULT_DIR/original"; \ - cp "$$(grep -oP '(?<=\+PRELOAD=)[^ \"]*' build/transcript)"* "$$RESULT_DIR"; \ - git diff > "$$RESULT_DIR/git-diff" + mkdir -p "$(result_dir)/original" + cp $(buildpath)/transcript "$(result_dir)/" + cp $(traceresult) "$(result_dir)" + cp $(trace) "$(result_dir)" + cp $(wildcard $(buildpath)/*.dasm) "$(result_dir)/original" $(buildpath)/%.trace: $(buildpath)/%.dasm mkdir -p $(tracepath)
Fix Apache conf file for Docker
@@ -148,8 +148,6 @@ AuthUserFile /opt/datafari/apache/password/htpasswd Require user apacheadmin elkadmin </Location> -<Location /Datafari> -Header set X-Frame-Options SAMEORIGIN ErrorDocument 400 /error400.html ErrorDocument 403 /error403.html
apps/system/utils : Increase the stack size of stackmonitor to 4096bytes Stack monitor requires more stacks for supporting protected build.
@@ -193,9 +193,9 @@ config ENABLE_STACKMONITOR if ENABLE_STACKMONITOR config STACKMONITOR_STACKSIZE int "Stack monitor daemon stack size" - default 2048 + default 4096 ---help--- - The stack size of the stack monitor daemon. Default: 2048 bytes + The stack size of the stack monitor daemon. Default: 4096 bytes config STACKMONITOR_PRIORITY int "Stack monitor daemon priority"
PR # 1012: fixed the bug with --soloCellFiltering TopCells option.
@@ -21,7 +21,7 @@ void SoloFeature::cellFiltering() nUMImax = nUMIperCBsorted[min(nCB-1,pSolo.cellFilter.cr2maxCellInd)];//robust estimate of the max UMI nUMImin = int(nUMImax/pSolo.cellFilter.cr2maxMinRatio+0.5); } else if (pSolo.cellFilter.type[0]=="TopCells") { - nUMImin = nUMIperCBsorted[max(nCB-1,pSolo.cellFilter.topCells)]; + nUMImin = nUMIperCBsorted[min(nCB-1,pSolo.cellFilter.topCells)]; }; nUMImin=max(nUMImin,(uint32) 1);//cannot be zero
stm32/uart: Add support for 7-bit modes: 7N1 and 7N2.
@@ -500,7 +500,14 @@ STATIC void pyb_uart_print(const mp_print_t *print, mp_obj_t self_in, mp_print_k if (!self->is_enabled) { mp_printf(print, "UART(%u)", self->uart_id); } else { - mp_int_t bits = (self->uart.Init.WordLength == UART_WORDLENGTH_8B ? 8 : 9); + mp_int_t bits; + switch (self->uart.Init.WordLength) { + #ifdef UART_WORDLENGTH_7B + case UART_WORDLENGTH_7B: bits = 7; break; + #endif + case UART_WORDLENGTH_8B: bits = 8; break; + case UART_WORDLENGTH_9B: default: bits = 9; break; + } if (self->uart.Init.Parity != UART_PARITY_NONE) { bits -= 1; } @@ -580,6 +587,10 @@ STATIC mp_obj_t pyb_uart_init_helper(pyb_uart_obj_t *self, size_t n_args, const init->WordLength = UART_WORDLENGTH_8B; } else if (bits == 9) { init->WordLength = UART_WORDLENGTH_9B; + #ifdef UART_WORDLENGTH_7B + } else if (bits == 7) { + init->WordLength = UART_WORDLENGTH_7B; + #endif } else { mp_raise_ValueError("unsupported combination of bits and parity"); }
Extra init for 240x240 ST7789 displays
@@ -27,6 +27,7 @@ namespace pimoroni { enum reg { SWRESET = 0x01, + TEOFF = 0x34, TEON = 0x35, MADCTL = 0x36, COLMOD = 0x3A, @@ -95,9 +96,23 @@ namespace pimoroni { sleep_ms(150); - command(reg::TEON, 1, "\x00"); // enable frame sync signal if used + command(reg::TEON); // enable frame sync signal if used command(reg::COLMOD, 1, "\x05"); // 16 bits per pixel + if(width == 240 && height == 240) { + command(reg::FRMCTR2, 5, "\x0c\x0c\x00\x33\x33"); + command(reg::GCTRL, 1, "\x14"); + command(reg::VCOMS, 1, "\x37"); + command(reg::LCMCTRL, 1, "\x2c"); + command(reg::VDVVRHEN, 1, "\x01"); + command(reg::VRHS, 1, "\x12"); + command(reg::VDVS, 1, "\x20"); + command(0xd0, 2, "\xa4\xa1"); + command(reg::FRMCTR2, 1, "\x0f"); + command(reg::GMCTRP1, 14, "\xD0\x04\x0D\x11\x13\x2B\x3F\x54\x4C\x18\x0D\x0B\x1F\x23"); + command(reg::GMCTRN1, 14, "\xD0\x04\x0C\x11\x13\x2C\x3F\x44\x51\x2F\x1F\x1F\x20\x23"); + } + command(reg::INVON); // set inversion mode command(reg::SLPOUT); // leave sleep mode command(reg::DISPON); // turn display on @@ -202,7 +217,7 @@ namespace pimoroni { } void ST7789::update(bool dont_block) { - ST7789::command(reg::RAMWR, width * height * sizeof(uint16_t), (const char*)frame_buffer); + command(reg::RAMWR, width * height * sizeof(uint16_t), (const char*)frame_buffer); /*if(dma_channel_is_busy(dma_channel) && dont_block) { return;
`make clean` should clean up fips provider shared object.
@@ -582,7 +582,7 @@ clean: libclean $(RM) $(MANDOCS3) $(RM) $(MANDOCS5) $(RM) $(MANDOCS7) - $(RM) $(PROGRAMS) $(TESTPROGS) $(MODULES) $(SCRIPTS) + $(RM) $(PROGRAMS) $(TESTPROGS) $(MODULES) $(FIPSMODULE) $(SCRIPTS) $(RM) $(GENERATED_MANDATORY) $(GENERATED) -find . -name '*{- platform->depext() -}' \! -name '.*' \! -type d -exec $(RM) {} \; -find . -name '*{- platform->objext() -}' \! -name '.*' \! -type d -exec $(RM) {} \;
imgtool: Fix ECDSA references in
""" -ECDSA key management +ED25519 key management """ from cryptography.hazmat.backends import default_backend @@ -58,7 +58,7 @@ class Ed25519Public(KeyClass): class Ed25519(Ed25519Public): """ - Wrapper around an ECDSA private key. + Wrapper around an ED25519 private key. """ def __init__(self, key):
Fix a race condition in drbg_add
@@ -1079,6 +1079,7 @@ static int drbg_add(const void *buf, int num, double randomness) if (num < 0 || randomness < 0.0) return 0; + rand_drbg_lock(drbg); seedlen = rand_drbg_seedlen(drbg); buflen = (size_t)num; @@ -1090,10 +1091,13 @@ static int drbg_add(const void *buf, int num, double randomness) * inevitably. So we use a trick to mix the buffer contents into * the DRBG state without forcing a reseeding: we generate a * dummy random byte, using the buffer content as additional data. + * Note: This won't work with RAND_DRBG_FLAG_CTR_NO_DF. */ unsigned char dummy[1]; - return RAND_DRBG_generate(drbg, dummy, sizeof(dummy), 0, buf, buflen); + ret = RAND_DRBG_generate(drbg, dummy, sizeof(dummy), 0, buf, buflen); + rand_drbg_unlock(drbg); + return ret; #else /* * If an os entropy source is avaible then we declare the buffer content @@ -1117,7 +1121,6 @@ static int drbg_add(const void *buf, int num, double randomness) randomness = (double)seedlen; } - rand_drbg_lock(drbg); ret = rand_drbg_restart(drbg, buf, buflen, (size_t)(8 * randomness)); rand_drbg_unlock(drbg);
Release clang7 with clang7-lsan-fork.patch.
}, "clang7": { "formula": { - "sandbox_id": [289278316, 288974506], + "sandbox_id": [290050315, 290144580], "match": "CLANG" }, "executable": {
anx7447: support tcpc_get_bist_test_mode Support tcpc_get_bist_test_mode for anx7447. BRANCH=none TEST=ensure the BIST status is reported correctly
@@ -36,6 +36,7 @@ static int anx7447_mux_set(const struct usb_mux *me, mux_state_t mux_state, static struct anx_state anx[CONFIG_USB_PD_PORT_MAX_COUNT]; static struct anx_usb_mux mux[CONFIG_USB_PD_PORT_MAX_COUNT]; +static bool anx7447_bist_test_mode[CONFIG_USB_PD_PORT_MAX_COUNT]; #ifdef CONFIG_USB_PD_FRS_TCPC /* an array to indicate which port is waiting for FRS disablement. */ @@ -978,6 +979,15 @@ enum ec_error_list anx7447_set_bist_test_mode(const int port, const bool enable) RETURN_ERROR(tcpc_write(port, ANX7447_REG_CC_DEBOUNCE_TIME, enable ? 2 : 10)); + anx7447_bist_test_mode[port] = enable; + + return EC_SUCCESS; +} + +enum ec_error_list anx7447_get_bist_test_mode(const int port, bool *enable) +{ + *enable = anx7447_bist_test_mode[port]; + return EC_SUCCESS; } @@ -1024,6 +1034,7 @@ const struct tcpm_drv anx7447_tcpm_drv = { .set_frs_enable = &anx7447_set_frs_enable, #endif .set_bist_test_mode = &anx7447_set_bist_test_mode, + .get_bist_test_mode = &anx7447_get_bist_test_mode, #ifdef CONFIG_CMD_TCPC_DUMP .dump_registers = &anx7447_dump_registers, #endif
INCLUDE: clap/ext/draft/file-reference.h: document set_dirty()
@@ -78,6 +78,7 @@ typedef struct clap_host_file_reference { // [main-thread] void (*changed)(const clap_host_t *host); + // Informs the host that file contents have changed, a call to save_resources() is needed. // [main-thread] void (*set_dirty)(const clap_host_t *host, clap_id resource_id); } clap_host_file_reference;
replace scope_guard too
@@ -15,7 +15,7 @@ use POSIX ":sys_wait_h"; use Path::Tiny; use Protocol::HTTP2::Connection; use Protocol::HTTP2::Constants; -use Scope::Guard qw(scope_guard); +use Scope::Guard; use Test::More; use Time::HiRes qw(sleep gettimeofday tv_interval); use Carp; @@ -193,7 +193,7 @@ sub spawn_server { sleep 0.1; } } - my $guard = scope_guard(sub { + my $guard = guard(sub { return if $$ != $ppid; print STDERR "killing $args{argv}->[0]... "; my $sig = 'TERM'; @@ -453,7 +453,7 @@ sub one_shot_http_upstream { die "fork failed" unless defined $pid; if ($pid != 0) { close $listen; - my $guard = scope_guard(sub { + my $guard = guard(sub { kill 'KILL', $pid; while (waitpid($pid, WNOHANG) != $pid) {} });
Ignore Misra 5.4 until cppcheck bug (?) is fixed
# Advisory: union types can be used misra.19.2 +# FIXME: add it back when fixed in cppcheck. Macro identifiers are unique but it false triggers on defines in #ifdef..#else conditions +misra.5.4
tests: run formatting check in serial, refs
@@ -109,8 +109,7 @@ function (add_scripttest testname) set_tests_properties (testscr_${testname_we} PROPERTIES TIMEOUT 2400) endif (${testname_we} STREQUAL "check_kdb_internal_suite") - set (parallel_tests check_bashisms check_doc check_formatting check_oclint check_plugins - check_posix) + set (parallel_tests check_bashisms check_doc check_oclint check_plugins check_posix) list (FIND parallel_tests "${testname_we}" index_parallel) if (index_parallel EQUAL -1) set_property (TEST testscr_${testname_we} PROPERTY RUN_SERIAL TRUE)
debug code only
@@ -655,7 +655,8 @@ int main(int argc, char *argv[]) } rc = action_count(dn, delay, timeout_ms); if (0 != rc) break; - sleep(2); + VERBOSE0("Sleep 10 sec...\n"); + sleep(10); } rc = 0; break;
[snitch] Replace isochronous crossing register module by the default common_cells' version
@@ -379,16 +379,18 @@ module snitch_icache #( // We need to propagate the handshake into the other // clock domain in case we operate w/ different clocks. if (ISO_CROSSING) begin : gen_flush_crossing - isochronous_4phase_handshake + isochronous_spill_register i_isochronous_4phase_handshake ( .src_clk_i ( clk_d2_i ), .src_rst_ni ( rst_ni ), .src_valid_i ( flush_valid_i ), .src_ready_o ( flush_ready_o ), + .src_data_i ( '0 ), .dst_clk_i ( clk_i ), .dst_rst_ni ( rst_ni ), .dst_valid_o ( flush_valid ), - .dst_ready_i ( flush_ready ) + .dst_ready_i ( flush_ready ), + .dst_data_o ( /* Unused */ ) ); end else begin : gen_no_flush_crossing assign flush_valid = flush_valid_i;
Don't enforce content-type for dynamic content
@@ -342,7 +342,7 @@ int http_send_body(http_s *r, void *data, uintptr_t length) { return 0; } add_content_length(r, length); - add_content_type(r); + // add_content_type(r); add_date(r); return ((http_vtable_s *)r->private_data.vtbl) ->http_send_body(r, data, length);
Add tests for ACL command error cases
@@ -7,6 +7,11 @@ start_server {tags {"acl external:skip"}} { r ACL setuser newuser } + test {Usernames can not contain spaces or null characters} { + catch {r ACL setuser "a a"} err + set err + } {*Usernames can't contain spaces or null characters*} + test {New users start disabled} { r ACL setuser newuser >passwd1 catch {r AUTH newuser passwd1} err @@ -699,6 +704,23 @@ start_server {tags {"acl external:skip"}} { catch {[r ping]} e assert_match "*I/O error*" $e } + + test {ACL GENPASS command failed test} { + catch {r ACL genpass -236} err1 + catch {r ACL genpass 5000} err2 + assert_match "*ACL GENPASS argument must be the number*" $err1 + assert_match "*ACL GENPASS argument must be the number*" $err2 + } + + test {Default user can not be removed} { + catch {r ACL deluser default} err + set err + } {ERR The 'default' user cannot be removed} + + test {ACL load non-existing configured ACL file} { + catch {r ACL load} err + set err + } {*Redis instance is not configured to use an ACL file*} } set server_path [tmpdir "server.acl"]
Add Down license
<key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>5.3</string> + <string>6.0</string> <key>CFBundleURLTypes</key> <array> <dict>
Move first-responder logic into task_small
@@ -414,3 +414,60 @@ void* sbrk(int increment) { int brk(void* addr) { NotImplemented(); return 0; +} + +task_small_t* get_first_responder() { + return _current_first_responder; +} + +void become_first_responder_pid(int pid) { + task_small_t* task = tasking_get_task_with_pid(pid); + if (!task) { + printk("become_first_responder_pid(%d) failed\n", pid); + return; + } + + _current_first_responder = task; + + /* + //check if this task already exists in stack of responders + for (int i = 0; i < responder_stack->size; i++) { + task_t* tmp = array_m_lookup(responder_stack, i); + if (tmp == first_responder_task) { + //remove task so we can add it again + //this is to ensure responder stack only has unique tasks + array_m_remove(responder_stack, i); + } + } + + //append this task to stack of responders + array_m_insert(responder_stack, first_responder_task); + */ +} + +void become_first_responder() { + become_first_responder_pid(getpid()); +} + +void resign_first_responder() { + Deprecated(); + /* + if (!first_responder_task) return; + //if (current_task != first_responder_task) return; + + //remove current first responder from stack of responders + int last_idx = responder_stack->size - 1; + task_t* removed = array_m_lookup(responder_stack, last_idx); + ASSERT(removed == first_responder_task, "top of responder stack wasn't first responder!"); + + array_m_remove(responder_stack, last_idx); + + if (responder_stack->size) { + //set first responder to new head of stack + first_responder_task = array_m_lookup(responder_stack, responder_stack->size - 1); + } + else { + first_responder_task = NULL; + } + */ +}
runtime: fix bug resulting from rcu_detach
@@ -184,6 +184,12 @@ done: STAT(THREADS_STOLEN)++; } else if (r->parked) { kthread_detach(r); + + if (l->rq_head != l->rq_tail) { + /* handle the case where kthread_detach -> rcu_detach leads to a + * thread being added to the runqueue (but not returned above) */ + th = l->rq[l->rq_head]; + } } spin_unlock(&r->lock);
monitor: return NULL_CAP on error
@@ -686,6 +686,7 @@ static void new_monitor_binding(struct monitor_blocking_binding *b, out_err3: monitor_lmp_destroy(lmpb); out_err2: + retcap = NULL_CAP; free(lmpb); goto out; }
correct stm32f4xx flash vector table base location
@@ -143,7 +143,7 @@ void rt_hw_board_init() SCB->VTOR = (0x10000000 & NVIC_VTOR_MASK); #else /* VECT_TAB_FLASH */ /* Set the Vector Table base location at 0x00000000 */ - SCB->VTOR = (0x00000000 & NVIC_VTOR_MASK); + SCB->VTOR = (0x08000000 & NVIC_VTOR_MASK); #endif HAL_Init();
move from DDR3/4_USED to BRAM/SDRAM_USED
done done done - if [[ "$DDR3_USED" == "TRUE" || "$DDR4_USED" == "TRUE" || "$SDRAM_USED" == "TRUE" ]]; then echo -e "$del\ntesting DDR" + if [[ "$DDR3_USED" == "TRUE" || "$DDR4_USED" == "TRUE" || "$BRAM_USED" == "TRUE" || "$SDRAM_USED" == "TRUE" ]]; then echo -e "$del\ntesting DDR" for num64 in 1 5 63 64;do # 1..64 for align in 4096 1024 256 64; do # must be mult of 64 for num4k in 0 1 3 7; do # 1=6sec, 7=20sec
tls: don't add listen to lookup table Type: fix
@@ -834,6 +834,7 @@ tls_start_listen (u32 app_listener_index, transport_endpoint_t * tep) lctx->tls_ctx_engine = engine_type; lctx->tls_type = sep->transport_proto; lctx->ckpair_index = ccfg->ckpair_index; + lctx->c_flags |= TRANSPORT_CONNECTION_F_NO_LOOKUP; if (tls_vfts[engine_type].ctx_start_listen (lctx)) {
Fix qmlplugin output directory
@@ -40,7 +40,7 @@ rule("qt.qmltyperegistrar") local importname = target:values("qt.qmlplugin.import_name") assert(importname, "QML plugin import name not set") - local targetdir = path.join(target:targetdir(), "imports") + local targetdir = target:targetdir() for _, dir in pairs(importname:split(".", { plain = true })) do targetdir = path.join(targetdir, dir) end
[chainmaker][#483]modify chain_id and org_id str name
@@ -94,12 +94,12 @@ BOAT_RESULT hlchainmakerTransactionPacked(BoatHlchainmakerTx *tx_ptr, BCHAR* met return BOAT_ERROR; } - sender.org_id = tx_ptr->client_para.org_id; + sender.org_id = tx_ptr->wallet_ptr->node_info.org_id_info; sender.member_info.len = tx_ptr->wallet_ptr->user_cert_info.cert.field_len; sender.member_info.data = tx_ptr->wallet_ptr->user_cert_info.cert.field_ptr; sender.is_full_cert = true; - tx_header.chain_id = tx_ptr->client_para.chain_id; + tx_header.chain_id = tx_ptr->wallet_ptr->node_info.chain_id_info; tx_header.tx_type = tx_type; tx_header.tx_id = tx_id; tx_header.timestamp = BoatGetTimes();
virtio: fix the buffer array index Type: fix Fixes:
@@ -723,7 +723,7 @@ VNET_DEVICE_CLASS_TX_FN (virtio_device_class) (vlib_main_t * vm, } if (n_left) virtio_interface_drop_inline (vm, node->node_index, - buffers, n_left, + buffers + frame->n_vectors - n_left, n_left, VIRTIO_TX_ERROR_NO_FREE_SLOTS); clib_spinlock_unlock_if_init (&vring->lockp);
Python: added a missing slash in the path to "pyenv.cfg". This closes issue on GitHub.
@@ -210,7 +210,7 @@ nxt_python_init(nxt_task_t *task, nxt_common_app_conf_t *conf) size_t size; nxt_int_t pep405; - static const char pyvenv[] = "pyvenv.cfg"; + static const char pyvenv[] = "/pyvenv.cfg"; static const char bin_python[] = "/bin/python"; #endif
OcDebugLogLib: Increase log size to 256 KB Reference acidanthera/bugtracker#445
#include <Protocol/OcLog.h> #include <Protocol/DataHub.h> -#define OC_LOG_BUFFER_SIZE BASE_128KB +#define OC_LOG_BUFFER_SIZE BASE_256KB #define OC_LOG_LINE_BUFFER_SIZE BASE_1KB #define OC_LOG_NVRAM_BUFFER_SIZE BASE_32KB #define OC_LOG_FILE_PATH_BUFFER_SIZE 256
raa489000: support FRS function Support Fast-Role Swap function on Raa489000 driver. BRANCH=none TEST=zmake build pujjo Code-Coverage: Zoss
@@ -375,4 +375,7 @@ const struct tcpm_drv raa489000_tcpm_drv = { #ifdef CONFIG_CMD_TCPC_DUMP .dump_registers = &raa489000_dump_registers, #endif +#ifdef CONFIG_USB_PD_FRS + .set_frs_enable = &tcpci_tcpc_fast_role_swap_enable, +#endif };
rms/slurm: update to v18.08.5-2; include options from latest release .spec
# $Id$ # Name: %{pname}%{PROJ_DELIM} -Version: 17.11.10 -%global rel 1 +Version: 18.08.5 +%global rel 2 Release: %{rel}%{?dist} Summary: Slurm Workload Manager @@ -51,6 +51,7 @@ Source: https://download.schedmd.com/slurm/%{slurm_source_dir}.tar.bz2 # --with openssl %_with_openssl 1 require openssl RPM to be installed # ensures auth/openssl and crypto/openssl are built # --without pam %_without_pam 1 don't require pam-devel RPM to be installed +# --without x11 %_without_x11 1 disable internal X11 support # Options that are off by default (enable with --with <opt>) %bcond_with cray @@ -63,6 +64,7 @@ Source: https://download.schedmd.com/slurm/%{slurm_source_dir}.tar.bz2 %bcond_with mysql %bcond_with hdf5 %bcond_with numa +%bcond_with x11 # Build with OpenSSL by default on all platforms (disable using --without openssl) %bcond_without openssl @@ -365,12 +367,17 @@ notifies slurm about failed nodes. %{?_with_freeipmi} \ %{?_with_hdf5} \ %{?_with_shared_libslurm} \ + %{?_without_x11:--disable-x11} \ %{?_with_cflags} make %{?_smp_mflags} %install +# Ignore redundant standard rpaths and insecure relative rpaths, +# for RHEL based distros which use "check-rpaths" tool. +export QA_RPATHS=0x5 + # Strip out some dependencies cat > find-requires.sh <<'EOF'
[libgui] Flesh out a few trait methods in std window
+use core::cmp::max; use core::fmt::{Display, Formatter}; use std::{ cell::RefCell, @@ -56,7 +57,9 @@ impl LikeLayerSlice for PixelLayerSlice { } fn fill_rect(&self, raw_rect: Rect, color: Color, thickness: StrokeThickness) { - let rect = self.frame.constrain(raw_rect); + let mut rect = self.frame.constrain(raw_rect); + rect.size.width = max(rect.size.width, 0); + rect.size.height = max(rect.size.height, 0); //println!("PixelLayerSlice.fill_rect({rect}, {color:?})"); let bpp = 4; @@ -163,7 +166,6 @@ impl LikeLayerSlice for PixelLayerSlice { fn blit2(&self, source_layer: &Box<dyn LikeLayerSlice>) { assert!(self.frame().size == source_layer.frame().size); - //let pixel_data = source_layer.pixel_data(); let bpp = 4; let parent_size = self.parent_size; @@ -180,13 +182,6 @@ impl LikeLayerSlice for PixelLayerSlice { let mut dst_row_slice = &mut fb[off..off + ((self.frame.width() * bpp) as usize)]; let row_slice = source_layer.get_pixel_row(y as _); dst_row_slice.copy_from_slice(&row_slice); - - /* - for x in 0..self.frame().width() { - let p = Point::new(x, y); - self.putpixel(p, source_layer.getpixel(p)); - } - */ } } @@ -219,14 +214,14 @@ impl LikeLayerSlice for PixelLayerSlice { } } -struct PixelLayer { +pub struct PixelLayer { size: Size, window: Window, - pixel_buffer: Rc<RefCell<Pixels>>, + pub pixel_buffer: Rc<RefCell<Pixels>>, } impl PixelLayer { - fn new(title: &str, event_loop: &EventLoop<()>, size: Size) -> Self { + pub fn new(title: &str, event_loop: &EventLoop<()>, size: Size) -> Self { let window = { let size = LogicalSize::new(size.width as f64, size.height as f64); let scaled_size = size; @@ -270,16 +265,16 @@ impl Display for PixelLayer { impl LikeLayerSlice for PixelLayer { fn frame(&self) -> Rect { - todo!() + Rect::with_size(self.size) } fn fill_rect(&self, raw_rect: Rect, color: Color, thickness: StrokeThickness) { - todo!() + self.get_slice(Rect::with_size(self.size)) + .fill_rect(raw_rect, color, thickness) } fn fill(&self, color: Color) { - self.get_slice(Rect::from_parts(Point::zero(), self.size)) - .fill(color) + self.get_slice(Rect::with_size(self.size)).fill(color) } fn putpixel(&self, loc: Point, color: Color) {
Fix appresolver type
@@ -71,7 +71,7 @@ static BOOL (WINAPI* AppContainerFreeMemory_I)( static HRESULT (WINAPI* AppPolicyGetWindowingModel_I)( _In_ HANDLE ProcessTokenHandle, _Out_ AppPolicyWindowingModel *ProcessWindowingModelPolicy - ); + ) = NULL; typedef enum _START_MENU_APP_ITEMS_FLAGS { @@ -494,8 +494,8 @@ DECLARE_INTERFACE_IID(IResourceMap, IUnknown) ((This)->lpVtbl->GetNamedResourceCount(This, Count)) #define IResourceMap_GetNamedResourceUri(This, Index, Name) \ ((This)->lpVtbl->GetNamedResourceUri(This, Index, Name)) -#define IResourceMap_GetNamedResource(This) \ - ((This)->lpVtbl->GetNamedResource(This)) +#define IResourceMap_GetNamedResource(This, Name, rrid, ppvObject) \ + ((This)->lpVtbl->GetNamedResource(This, Name, rrid, ppvObject)) #define IResourceMap_GetFullyQualifiedReference(This) \ ((This)->lpVtbl->GetFullyQualifiedReference(This)) #define IResourceMap_GetFilePathByUri(This) \
process comments v3
@@ -670,7 +670,7 @@ static int rdata_svcparam_ipv4hint_to_string(buffer_type *output, uint16_t val_len, uint16_t *data) { - char ip_str[INET_ADDRSTRLEN]; + char ip_str[INET_ADDRSTRLEN + 1]; assert(val_len > 0); /* Guaranteed by rdata_svcparam_to_string */ @@ -697,7 +697,7 @@ static int rdata_svcparam_ipv6hint_to_string(buffer_type *output, uint16_t val_len, uint16_t *data) { - char ip_str[INET6_ADDRSTRLEN]; + char ip_str[INET6_ADDRSTRLEN + 1]; assert(val_len > 0); /* Guaranteed by rdata_svcparam_to_string */
extmod/pupdevices/UltrasonicSensor: bind to 2000 Although higher values appear theoretically possible, they are not very accurate so we limit values to 2000 mm.
@@ -370,7 +370,7 @@ STATIC mp_obj_t pupdevices_UltrasonicSensor_distance(mp_obj_t self_in) { pupdevices_UltrasonicSensor_obj_t *self = MP_OBJ_TO_PTR(self_in); int32_t distance; pbdevice_get_values(self->pbdev, PBIO_IODEV_MODE_PUP_ULTRASONIC_SENSOR__DISTL, &distance); - return mp_obj_new_int(distance < 0 ? 3000 : distance); + return mp_obj_new_int(distance < 0 || distance >= 2000 ? 2000 : distance); } STATIC MP_DEFINE_CONST_FUN_OBJ_1(pupdevices_UltrasonicSensor_distance_obj, pupdevices_UltrasonicSensor_distance);
doc: document issue when updating both max_statement_mem and statement_mem
<title>max_statement_mem</title> <body> <p>Sets the maximum memory limit for a query. Helps avoid out-of-memory errors on a segment - host during query processing as a result of setting <xref href="#statement_mem" - format="dita"/> too high. When <xref href="#gp_resqueue_memory_policy" format="dita" - />=auto, statement_mem and resource queue memory limits control query memory usage. Taking - into account the configuration of a single segment host, calculate this setting as - follows:</p> + host during query processing as a result of setting <codeph><xref href="#statement_mem" + format="dita"/> + </codeph>too high. When <codeph><xref href="#gp_resqueue_memory_policy" format="dita" + />=auto</codeph>, <codeph>statement_mem</codeph> and resource queue memory limits control + query memory usage. Taking into account the configuration of a single segment host, + calculate this setting as follows:</p> <p> <codeph>(seghost_physical_memory) / (average_number_concurrent_queries)</codeph> </p> + <p>When changing both <codeph>max_statement_mem</codeph> and <codeph>statement_mem</codeph>, + <codeph>max_statement_mem</codeph> must be changed first, or listed first in the + <systemoutput>postgresql.conf</systemoutput> file.</p> <table id="max_statement_mem_table"> <tgroup cols="3"> <colspec colnum="1" colname="col1" colwidth="1*"/> <title>statement_mem</title> <body> <p>Allocates segment host memory per query. The amount of memory allocated with this parameter - cannot exceed <xref href="#max_statement_mem" format="dita"/> or the memory limit on the - resource queue through which the query was submitted. When <xref - href="#gp_resqueue_memory_policy" format="dita"/> =auto, <codeph>statement_mem</codeph> - and resource queue memory limits control query memory usage. </p> + cannot exceed <codeph><xref href="#max_statement_mem" format="dita"/></codeph> or the memory + limit on the resource queue through which the query was submitted. When <codeph><xref + href="#gp_resqueue_memory_policy" format="dita"/> =auto</codeph>, + <codeph>statement_mem</codeph> and resource queue memory limits control query memory + usage. </p> <p>If additional memory is required for a query, temporary spill files on disk are used.</p> <p>This calculation can be used to estimate a reasonable value for a wide variety of situations.</p> <p> <codeblock>(8GB * .9) / 40 = .18GB = 184MB</codeblock> </p> + <p>When changing both <codeph>max_statement_mem</codeph> and <codeph>statement_mem</codeph>, + <codeph>max_statement_mem</codeph> must be changed first, or listed first in the + <systemoutput>postgresql.conf</systemoutput> file.</p> <table id="statement_mem_table"> <tgroup cols="3"> <colspec colnum="1" colname="col1" colwidth="1*"/>
Write output to the unused UI intents extension
@@ -39,7 +39,16 @@ fileprivate extension ConsoleViewController { @objc class PyOutputHelper: NSObject { /// All output from the last executed Shortcut. - @objc static var output = "" + @objc static var output = "" { + didSet { + + guard !output.isEmpty else { + return + } + + try? output.write(toFile: FileManager.default.sharedDirectory?.appendingPathComponent("UIIntentsOutput").path ?? "", atomically: false, encoding: .utf8) + } + } #if !WIDGET /// Sends `output` to the current running Shortcut.
docs: updata BoAT_User_Guide_en.md change "Or when compiling the SDK" to "Or while compiling the SDK".
@@ -162,7 +162,7 @@ BOAT_PROTOCOL_USE_FISCOBCOS ?= 1 BOAT_PROTOCOL_USE_HLFABRIC ?= 1 ```` -As needed, change the value of the corresponding variable to `1` or `0` to enable or disable the corresponding blockchain protocol. Or when compiling the SDK, use make \<BOAT_PROTOCOL_USE_XXX\>=<1|0> to enable or disable the corresponding blockchain protocol. +As needed, change the value of the corresponding variable to `1` or `0` to enable or disable the corresponding blockchain protocol. Or while compiling the SDK, use make \<BOAT_PROTOCOL_USE_XXX\>=<1|0> to enable or disable the corresponding blockchain protocol. -Log printing level adjustment If necessary, adjust the value of `BOAT_LOG_LEVEL` in the path \<SDKRoot\>/vendor/platform/\<platform_name\>/src/log/boatlog.h to adjust the printer type of the log.
apps/graphics/pdcurs34: Fixes calculation of the final byte position of the case of BPP < 8.
@@ -237,7 +237,7 @@ static inline void PDC_set_bg(FAR struct pdc_fbstate_s *fbstate, /* If the first or last bytes may require read, modify, write operations. */ #if PDCURSES_BPP == 1 - /* Get the start and end colum in pixels (relative to the start position) */ + /* Get the start and end column in pixels (relative to the start position) */ startcol = col & 7; endcol = startcol + fbstate->fwidth - 1; @@ -254,9 +254,11 @@ static inline void PDC_set_bg(FAR struct pdc_fbstate_s *fbstate, rmask = 0xff << (endcol & 7); #endif - /* Convert endcol to a byte offset */ + /* Convert endcol to a byte offset (taking the ceiling so that includes + * the final byte than may have fewer than 8 pixels in it). + */ - endcol >>= 3; + endcol = (endcol + 7) >> 3; #elif PDCURSES_BPP == 2 /* Get the start and end colum in pixels (relative to the start position) */ @@ -276,9 +278,11 @@ static inline void PDC_set_bg(FAR struct pdc_fbstate_s *fbstate, rmask = 0xff << ((endcol & 3) << 1); #endif - /* Convert endcol to a byte offset */ + /* Convert endcol to a byte offset (taking the ceiling so that includes + * the final byte than may have fewer than 4 pixels in it). + */ - endcol >>= 2; + endcol = (endcol + 3) >> 3; #elif PDCURSES_BPP == 4 /* Get the start and end colum in pixels (relative to the start position) */ @@ -298,9 +302,11 @@ static inline void PDC_set_bg(FAR struct pdc_fbstate_s *fbstate, rmask = ((endcol & 1) == 0) ? 0x00 ? 0xf0; #endif - /* Convert endcol to a byte offset */ + /* Convert endcol to a byte offset (taking the ceiling so that includes + * the final byte than may have only one pixels in it). + */ - endcol >>= 1; + endcol = (endcol + 1) >> 3; #endif /* Now copy the color into the entire glyph region */
config-tools: allow to configure guest flag for post-launched VM Remove the if statement that block guest flag configuration for post-launched VM.
</xsl:template> <xsl:template match="guest_flags"> - <xsl:if test="not(acrn:is-post-launched-vm(../vm_type))"> <xsl:if test="guest_flag"> <xsl:choose> <xsl:when test="guest_flag = '' or guest_flag = '0' or guest_flag = '0UL'"> </xsl:otherwise> </xsl:choose> </xsl:if> - </xsl:if> </xsl:template> <xsl:template match="clos">
update alpine version of `make docker-run`
@@ -15,18 +15,30 @@ FROM $IMAGE # --- # Install packages. # -RUN apk add --no-cache go gdb git make vim emacs strace tcpdump +RUN apk add --no-cache bash go gdb git make vim emacs strace tcpdump # --- -# Extra setup for use with `make docker-run` -# -COPY ./docker/builder/gdbinit /root/.gdbinit +# Add the "builder" user +# +RUN adduser -h /home/builder -D builder && \ + \ + echo "alias ll='ls -alF'" >> /home/builder/.bashrc && \ + echo "alias la='ls -A'" >> /home/builder/.bashrc && \ + echo "alias l='ls -CF'" >> /home/builder/.bashrc && \ + echo "alias h='history'" >> /home/builder/.bashrc && \ + \ + echo "#set environment LD_PRELOAD=/home/builder/appscope/lib/linux/libscope.so" >> /home/builder/.gdbinit && \ + echo "set follow-fork-mode child" >> /home/builder/.gdbinit && \ + echo "set breakpoint pending on" >> /home/builder/.gdbinit && \ + echo "set directories /home/builder/appscope" >> /home/builder/.gdbinit && \ + \ + mkdir /home/builder/appscope # --- -# The local git clone of the project is mounted as /root/appscope. See Makefile. +# The local git clone of the project is mounted as /home/builder/appscope. See Makefile. # -# docker run -v $(pwd):/root/appscope ... +# docker run -v $(pwd):/home/builder/appscope ... # -WORKDIR /root/appscope +WORKDIR /home/builder/appscope # fini
Docs: update gpssh.config option sync_retries
<codeblock>[gpssh] delaybeforesend = 0.05 prompt_validation_timeout = 1.0 -sync_retries = 3</codeblock> +sync_retries = 5</codeblock> <p>These are the <codeph>gpssh.conf</codeph> parameters.</p> <parml> <plentry> @@ -169,18 +169,18 @@ sync_retries = 3</codeblock> </plentry> <plentry> <pt>sync_retries = <varname>attempts</varname></pt> - <pd>A non-negative integer that specifies the maximum - number of retry attempts that <codeph>gpssh</codeph> - performs to try connecting to a Greenplum Database - remote host. The default is 3. If the value is 0, - <codeph>gpssh</codeph> returns an error if the initial - connection attempt fails. This parameter cannot be - configured with a command-line option.</pd> - <pd>Increasing this value compensates for slow network - performance or performance issues such as heavy CPU or - I/O load on the segment host. However, when a - connection cannot be established, an increased value - also increases the delay when an error is returned.</pd> + <pd>A non-negative integer that specifies the maximum number of times that + <codeph>gpssh</codeph> attempts to connect to a remote Greenplum + Database host. The default is 3. If the value is 0, <codeph>gpssh</codeph> + returns an error if the initial connection attempt fails. Increasing the + number of attempts also increases the time between retry attempts. This + parameter cannot be configured with a command-line option. </pd> + <pd>The <codeph>-t</codeph> option also affects the time between retry + attempts.</pd> + <pd>Increasing this value can compensate for slow network performance or segment + host performance issues such as heavy CPU or I/O load. However, when a + connection cannot be established, an increased value also increases the + delay when an error is retuned.</pd> </plentry> </parml> </section>
GPU: check for const target on load
@@ -37,6 +37,16 @@ namespace NCatboostCuda { CB_ENSURE(hasNonZero, "Error: all weights are zero"); } + template <class T> + static inline bool IsConstant(const TVector<T>& vec) { + for (const auto& elem : vec) { + if (!(elem == vec[0])) { + return false; + } + } + return true; + } + void TDataProviderBuilder::StartNextBlock(ui32 blockSize) { Cursor = DataProvider.Targets.size(); const auto newDataSize = Cursor + blockSize; @@ -286,6 +296,14 @@ namespace NCatboostCuda { } ValidateWeights(DataProvider.Weights); + + const bool isConstTarget = IsConstant(DataProvider.Targets); + if (isConstTarget && IsConstant(Pairs)) { + CB_ENSURE(false, "Error: input target is constant and there are no pairs. No way you could learn on such dataset"); + } + if (isConstTarget) { + MATRIXNET_WARNING_LOG << "Labels column is constant. You could learn only pairClassification (if you provided pairs) on such dataset" << Endl; + } IsDone = true; }
[Components][SDIO][MMC] fix null point check
@@ -198,6 +198,12 @@ static int mmc_get_ext_csd(struct rt_mmcsd_card *card, rt_uint8_t **new_ext_csd) */ static int mmc_parse_ext_csd(struct rt_mmcsd_card *card, rt_uint8_t *ext_csd) { + if(RT_NULL == card || RT_NULL == ext_csd) + { + LOG_E("emmc parse ext csd fail, invaild args"); + return -1; + } + card->flags |= CARD_FLAG_HIGHSPEED; card->hs_max_data_rate = 200000000;