message
stringlengths
6
474
diff
stringlengths
8
5.22k
Don't call conn_call_recv_pkt when ignoring a handshake packet
@@ -3491,6 +3491,19 @@ static int conn_recv_pkt(ngtcp2_conn *conn, const uint8_t *pkt, size_t pktlen, if (conn->version != hd.version) { return 0; } + + switch (hd.type) { + case NGTCP2_PKT_INITIAL: + case NGTCP2_PKT_HANDSHAKE: + /* TODO This is not much useful if client, and server are silent + after handshake established. It might be also potentially + bad if peer keeps retransmitting Handshake messages because + their ACKs are all lost. */ + if (conn->flags & NGTCP2_CONN_FLAG_RECV_PROTECTED_PKT) { + return 0; + } + break; + } } else { nread = ngtcp2_pkt_decode_hd_short(&hd, pkt, pktlen); if (nread < 0) { @@ -3536,13 +3549,6 @@ static int conn_recv_pkt(ngtcp2_conn *conn, const uint8_t *pkt, size_t pktlen, switch (hd.type) { case NGTCP2_PKT_INITIAL: case NGTCP2_PKT_HANDSHAKE: - /* TODO This is not much useful if client, and server are silent - after handshake established. It might be also potentially - bad if peer keeps retransmitting Handshake messages because - their ACKs are all lost. */ - if (conn->flags & NGTCP2_CONN_FLAG_RECV_PROTECTED_PKT) { - return 0; - } return conn_recv_delayed_handshake_pkt(conn, &hd, payload, payloadlen, hdpkt, hdpktlen, ts); case NGTCP2_PKT_0RTT_PROTECTED:
Use [[:blank:]] instead of \s for leading space matching in restore. This is more accurate since we don't really want lf/cr anyway, though the lines have already been split so that's not possible in this code for lf. Found on MacOS M1. FreeBSD also seems to be fine with the new expression.
@@ -1556,9 +1556,9 @@ restoreRecoveryWriteAutoConf(unsigned int pgVersion, const String *restoreLabel) RegExp *recoveryExp = regExpNew( STRDEF( - "^\\s*(" RECOVERY_TARGET "|" RECOVERY_TARGET_ACTION "|" RECOVERY_TARGET_INCLUSIVE "|" RECOVERY_TARGET_LSN - "|" RECOVERY_TARGET_NAME "|" RECOVERY_TARGET_TIME "|" RECOVERY_TARGET_TIMELINE "|" RECOVERY_TARGET_XID - ")\\s*=")); + "^[[:blank:]]*(" RECOVERY_TARGET "|" RECOVERY_TARGET_ACTION "|" RECOVERY_TARGET_INCLUSIVE "|" + RECOVERY_TARGET_LSN "|" RECOVERY_TARGET_NAME "|" RECOVERY_TARGET_TIME "|" RECOVERY_TARGET_TIMELINE "|" + RECOVERY_TARGET_XID ")[[:blank:]]*=")); // Check each line for recovery settings const StringList *contentList = strLstNewSplit(strNewBuf(autoConf), LF_STR);
virtio: fix the error return Type: fix
@@ -673,7 +673,8 @@ virtio_pci_read_caps (vlib_main_t * vm, virtio_if_t * vif, void **bar) if ((error = vlib_pci_read_config_u8 (vm, h, PCI_CAPABILITY_LIST, &pos))) { virtio_log_error (vif, "error in reading capabilty list position"); - clib_error_return (error, "error in reading capabilty list position"); + return clib_error_return (error, + "error in reading capabilty list position"); } while (pos) { @@ -683,8 +684,9 @@ virtio_pci_read_caps (vlib_main_t * vm, virtio_if_t * vif, void **bar) { virtio_log_error (vif, "%s [%2x]", "error in reading the capability at", pos); - clib_error_return (error, - "error in reading the capability at [%2x]", pos); + return clib_error_return (error, + "error in reading the capability at [%2x]", + pos); } if (cap.cap_vndr == PCI_CAP_ID_MSIX) @@ -694,7 +696,7 @@ virtio_pci_read_caps (vlib_main_t * vm, virtio_if_t * vif, void **bar) if ((error = vlib_pci_read_write_config (vm, h, VLIB_READ, pos + 2, &flags, sizeof (flags)))) - clib_error_return (error, + return clib_error_return (error, "error in reading the capability at [%2x]", pos + 2); @@ -805,14 +807,14 @@ virtio_pci_device_init (vlib_main_t * vm, virtio_if_t * vif, { args->rv = VNET_API_ERROR_UNSUPPORTED; virtio_log_error (vif, "Device is not supported"); - clib_error_return (error, "Device is not supported"); + return clib_error_return (error, "Device is not supported"); } if (virtio_pci_reset_device (vm, vif) < 0) { args->rv = VNET_API_ERROR_INIT_FAILED; virtio_log_error (vif, "Failed to reset the device"); - clib_error_return (error, "Failed to reset the device"); + return clib_error_return (error, "Failed to reset the device"); } /* * read device features and negotiate (user) requested features @@ -842,7 +844,8 @@ virtio_pci_device_init (vlib_main_t * vm, virtio_if_t * vif, args->rv = VNET_API_ERROR_UNSUPPORTED; virtio_log_error (vif, "error encountered: Device doesn't support requested features"); - clib_error_return (error, "Device doesn't support requested features"); + return clib_error_return (error, + "Device doesn't support requested features"); } vif->status = status;
Provide openssl location for osx travis build.
@@ -71,13 +71,6 @@ jobs: arch: ppc64le dist: bionic -before_install: - - | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then - brew update - brew install openssl - fi - script: - | if [ "$TEST_UBSAN" = "yes" ]; then @@ -86,6 +79,8 @@ script: elif [ "$TEST_ASAN" = "yes" ]; then export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=address" ./configure + elif [ "$TRAVIS_OS_NAME" = "osx" ]; then + ./configure --enable-debug --disable-flto --with-ssl=/usr/local/opt/openssl/ else ./configure --enable-debug --disable-flto fi
Added missing compileas values to docs
@@ -10,6 +10,11 @@ compileas "value" * `Default` - Compile based on file extensions that have been built into premake. * `C` - Compile as a C source file. * `C++` - Compile as a C++ source file. +* `Objective-C` - Compile as an Objective-C source file. +* `Objective-C++` - Compile as an Objective-C++ source file. +* `Module` - Needs documentation +* `ModulePartition` - Needs documentation +* `HeaderUnit` - Needs documentation ### Applies To ###
enforces fake/not domain invariants in %jael
:: [%turf ~] :: %turf + :: ships with real keys must have domains, + :: those with fake keys must not + :: + ?< =(fak.urb ?=(^ tuf.urb)) +>.$(moz [[hen %give %turf tuf.urb] moz]) :: :: watch private keys
Add generated copyright messages
+/* Copyright (C) 2015-2021 Swift Navigation Inc. + * Contact: https://support.swiftnav.com + * + * This source is subject to the license found in the file 'LICENSE' which must + * be be distributed together with this source. All other rights reserved. + * + * THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, + * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. + */ package com.swiftnav.sbp.examples; @@ -19,7 +29,6 @@ public class TCPExample { new TCPExample().start(server, port); } - public void start(String server, int port) { SBPFramer framer = new SBPFramer(new SBPDriverTCP(server, port)); SBPHandler handler = new SBPHandler(framer);
chip/stm32/usart_tx_dma.c: Format with clang-format BRANCH=none TEST=none
@@ -41,8 +41,8 @@ static void usart_tx_dma_start(struct usart_config const *config, struct dma_option options = { .channel = dma_config->channel, .periph = (void *)&STM32_USART_TDR(base), - .flags = (STM32_DMA_CCR_MSIZE_8_BIT | - STM32_DMA_CCR_PSIZE_8_BIT), + .flags = + (STM32_DMA_CCR_MSIZE_8_BIT | STM32_DMA_CCR_PSIZE_8_BIT), }; /*
Syntax error in pyldns
@@ -315,7 +315,7 @@ specified in the (16-bit) type field with a value from ldns_rdf_type." """ rr = _ldns.ldns_rdf_new_frm_str(rr_type, string) if (not rr) and raiseException: - raise Exception("Can't create query packet")) + raise Exception("Can't create query packet") return rr #
chat-cli: set sane display width, if zero Under mysterious conditions, chat-cli might get into a state where its rendering width is set to zero. This makes sure we set it back to 80 if that's the case. This commit is mostly just precaution.
:: ^- state-1 ?- -.u.old - %1 u.old(bound (~(gas by *(map target glyph)) ~(tap by bound.u.old))) + %1 + =? width.u.old =(0 width.u.old) 80 + u.old(bound (~(gas by *(map target glyph)) ~(tap by bound.u.old))) :: ?(~ ^) :- %1
feat(venachain):Add venachain support in sdk/protocol
@@ -4,9 +4,9 @@ SOURCES = $(wildcard *.c) OBJECTS_DIR = $(BOAT_BUILD_DIR)/sdk/protocol OBJECTS = $(patsubst %.c,$(OBJECTS_DIR)/%.o,$(SOURCES)) -.PHONY: all rotocol_common protocol_ethereum protocol_platon protocol_platone protocol_fiscobcos protocol_hlfabric protocol_hw_bcs protocol_chainmaker +.PHONY: all rotocol_common protocol_ethereum protocol_platon protocol_platone protocol_fiscobcos protocol_hlfabric protocol_hw_bcs protocol_chainmaker protocol_venachain -all: protocol_common protocol_ethereum protocol_platon protocol_platone protocol_fiscobcos protocol_hlfabric protocol_hw_bcs protocol_chainmaker $(OBJECTS_DIR) $(OBJECTS) +all: protocol_common protocol_ethereum protocol_platon protocol_platone protocol_fiscobcos protocol_hlfabric protocol_hw_bcs protocol_chainmaker protocol_venachain $(OBJECTS_DIR) $(OBJECTS) protocol_common: @@ -47,6 +47,11 @@ ifeq ($(BOAT_PROTOCOL_USE_CHAINMAKER), 1) make -C boatchainmaker all endif +protocol_venachain: +ifeq ($(BOAT_PROTOCOL_USE_VENACHAIN), 1) + make -C boatvenachain all +endif + $(OBJECTS_DIR): $(BOAT_MKDIR) -p $(OBJECTS_DIR) @@ -61,6 +66,7 @@ clean: make -C boatplaton clean make -C boatplatone clean make -C boatfiscobcos clean + make -c boatvenachain clean ifeq ($(BOAT_PROTOCOL_USE_HLFABRIC), 1) make -C boathlfabric clean endif
Remove README line about outdated documentation
@@ -81,7 +81,5 @@ Pull the latest code and run make:cli again, yarn link is only needed for the fi ## Documentation -Documentation is not yet available for version 3.0, for previous builds refer to the following: - [GB Studio Documentation](https://www.gbstudio.dev/docs)
tools/gen-cpydiff: Clean output of CPython/uPy from memory addresses. To avoid spurious changes in generated content on each run.
@@ -86,6 +86,12 @@ def uimports(code): code = code.replace(uimport, b'u' + uimport) return code + +def clean_output(output): + """ remove unimport, transient details from output, like memory addresses """ + return re.sub(r"at 0x[0-9a-f]+", "at 0x7fffffff", output) + + def run_tests(tests): """ executes all tests """ results = [] @@ -95,10 +101,10 @@ def run_tests(tests): input_upy = uimports(input_cpy) process = subprocess.Popen(CPYTHON3, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE) - output_cpy = [com.decode('utf8') for com in process.communicate(input_cpy)] + output_cpy = [clean_output(com.decode('utf8')) for com in process.communicate(input_cpy)] process = subprocess.Popen(MICROPYTHON, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE, stderr=subprocess.PIPE) - output_upy = [com.decode('utf8') for com in process.communicate(input_upy)] + output_upy = [clean_output(com.decode('utf8')) for com in process.communicate(input_upy)] if output_cpy[0] == output_upy[0] and output_cpy[1] == output_upy[1]: status = 'Supported'
Fix transform depth in early skip
@@ -1572,7 +1572,7 @@ static void search_pu_inter(encoder_state_t * const state, cur_cu->inter.mv[0][1] = info.merge_cand[merge_idx].mv[0][1]; cur_cu->inter.mv[1][0] = info.merge_cand[merge_idx].mv[1][0]; cur_cu->inter.mv[1][1] = info.merge_cand[merge_idx].mv[1][1]; - kvz_lcu_set_trdepth(lcu, x, y, depth, depth); + kvz_lcu_set_trdepth(lcu, x, y, depth, MAX(1, depth)); kvz_inter_recon_cu(state, lcu, x, y, width); kvz_quantize_lcu_residual(state, true, false, x, y, depth, cur_cu, lcu);
i2ctrace: add safety check Prevent NULL dereference coming from get_i2c_port BRANCH=none TEST=none Code-Coverage: Zoss
@@ -67,7 +67,7 @@ static int command_i2ctrace_list(void) i2c_port = get_i2c_port(trace_entries[i].port); ccprintf("%-2zd %d %-8s 0x%X", i, trace_entries[i].port, #ifndef CONFIG_ZEPHYR - i2c_port->name, + i2c_port ? i2c_port->name : "invalid", #else "", #endif /* CONFIG_ZEPHYR */
ansi: Implement strtoimax()
+#include <ctype.h> #include <inttypes.h> +#include <string.h> + #include <mlibc/ensure.h> +static const char *__mlibc_digits = "0123456789abcdefghijklmnopqrstuvwxyz"; + intmax_t imaxabs(intmax_t) { __ensure(!"Not implemented"); __builtin_unreachable(); @@ -10,9 +15,56 @@ imaxdiv_t imaxdiv(intmax_t, intmax_t) { __ensure(!"Not implemented"); __builtin_unreachable(); } -intmax_t strtoimax(const char *__restrict, char **__restrict, int) { - __ensure(!"Not implemented"); - __builtin_unreachable(); +intmax_t strtoimax(const char *__restrict it, char **__restrict out, int base) { + // TODO: This function has to check for overflow! + intmax_t v = 0; + bool negate = false; + + // TODO: In this case we have to detect the base based on the prefix. + __ensure(base); + + if(*it == '+') { + it++; + }else if(*it == '-') { + negate = true; + it++; + } + + if(base == 8) { + if(*it != 0) + goto parse_digits; + it++; + }else if(base == 16) { + if(*it != 0) + goto parse_digits; + it++; + if(*it != 'x' && *it != 'X') + goto parse_digits; + it++; + } + +parse_digits: + while(*it) { + if(isspace(*it)) { + it++; + continue; + } + + __ensure(base <= 10); // TODO: For base > 10 we need to implement tolower(). + //auto c = strchr(__mlibc_digits, tolower(*it)); + auto c = strchr(__mlibc_digits, *it); + if(!c || (__mlibc_digits - c) >= base) + break; + v = v * base + (__mlibc_digits - c); + it++; + } + + if(negate) + v = -v; + + if(out) + *out = const_cast<char *>(it); + return v; } uintmax_t strtoumax(const char *__restrict, char **__restrict, int) { __ensure(!"Not implemented");
[Release] Update website to v0.5.0
<section class="page-header"> <h1 class="project-name">libcbor</h1> <h2 class="project-tagline">CBOR format implementation for C &amp; others</h2> - <h2 class="project-tagline">Latest release: v0.4.0</h2> + <h2 class="project-tagline">Latest release: v0.5.0</h2> <a href="https://github.com/PJK/libcbor" class="btn">View on GitHub</a> - <a href="https://github.com/PJK/libcbor/archive/v0.4.0.tar.gz" class="btn">Download source</a> - <a href="http://libcbor.readthedocs.io/en/v0.4.0/using.html" class="btn">Get started</a> + <a href="https://github.com/PJK/libcbor/archive/v0.5.0.tar.gz" class="btn">Download source</a> + <a href="http://libcbor.readthedocs.io/en/v0.5.0/using.html" class="btn">Get started</a> </section> <section class="main-content"> @@ -77,7 +77,7 @@ brew install libcbor <ul> <li>User documentation is available online from <a href="http://libcbor.readthedocs.org/en/latest/">http://libcbor.readthedocs.org/en/latest/</a></li> <li>Detailed build instructions are a part of the documentation</li> - <li>API reference is available either <a href="doxygen/index.html">online</a> or <a href="https://github.com/PJK/libcbor/releases/download/v0.4.0/libcbor_api_docs.tar.gz">as a part of the release</a></li> + <li>API reference is available either <a href="doxygen/index.html">online</a> or <a href="https://github.com/PJK/libcbor/releases/download/v0.5.0/libcbor_api_docs.tar.gz">as a part of the release</a></li> <li><a href="https://github.com/PJK/libcbor/issues">Bug tracker</a> <li><a href="https://github.com/PJK/libcbor/blob/master/CHANGELOG.md">Changelog</a> <li><a href="https://github.com/PJK/libcbor/releases">Older releases</a>
gimble: modify ectool control battery led We will use ectool led battery <amber | white> to test if led is working for factory automated testing. BRANCH=none TEST=make -j BOARD=gimble
@@ -78,6 +78,7 @@ __override void led_set_color_battery(enum ec_led_colors color) /* Check which port is the charging port, * and turn on the corresponding led. */ + if (led_auto_control_is_enabled(EC_LED_ID_BATTERY_LED)) { port = charge_manager_get_active_charge_port(); switch (port) { case LED_SIDESEL_MB_PORT: @@ -107,6 +108,20 @@ __override void led_set_color_battery(enum ec_led_colors color) default: /* Unknown charging port */ break; } + } else { + switch (color) { + case EC_LED_COLOR_AMBER: + led1_duty = BAT_LED_ON_LVL; + led3_duty = BAT_LED_ON_LVL; + break; + case EC_LED_COLOR_WHITE: + led2_duty = BAT_LED_ON_LVL; + led4_duty = BAT_LED_ON_LVL; + break; + default: /* LED_OFF and other unsupported colors */ + break; + } + } pwm_set_duty(PWM_CH_LED1, led1_duty); pwm_set_duty(PWM_CH_LED2, led2_duty); @@ -141,8 +156,12 @@ int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness) led_set_color_battery(EC_LED_COLOR_AMBER); else if (brightness[EC_LED_COLOR_WHITE] != 0) led_set_color_battery(EC_LED_COLOR_WHITE); - else + else if (brightness[LED_OFF] != 0) led_set_color_battery(LED_OFF); + else { + led_auto_control(led_id, 1); + led_set_color_battery(LED_OFF); + } } else if (led_id == EC_LED_ID_POWER_LED) { if (brightness[EC_LED_COLOR_WHITE] != 0) led_set_color_power(EC_LED_COLOR_WHITE);
scripts: rephrase as suggested by
@@ -10,8 +10,8 @@ then exit 0 fi echo "The release notes were not extended correctly (with $linesChanged lines changed)." - echo "Please make sure you added at least one line which says *(your name)* to" - echo "make sure that your contribution is correctly attributed in the release notes." + echo "Please make sure you add at least one line describing you contribution followed" + echo "by the text *(your name)*." echo "" echo "For example, if Sandra Power fixed a typo, she adds to doc/news/_preparation_next_release.md:" echo "- typo fixed *(Sandra Power)*"
servo_micro: Increase maximum I2C-over-USB write and read sizes. BRANCH=none TEST=This makes block_write_size up to 254B in iteflash work, and makes 256B verification reads work.
#define CONFIG_USB_I2C #define CONFIG_I2C #define CONFIG_I2C_MASTER +/* + * iteflash requires 256 byte reads for verifying ITE EC firmware. Without this + * the limit is CONFIG_I2C_CHIP_MAX_READ_SIZE which is 255 for STM32F0 due to an + * 8 bit field, per src/platform/ec/include/config.h comment. + */ +#define CONFIG_I2C_XFER_LARGE_READ #define I2C_PORT_MASTER 0 +/* + * As of 2018-11-27 the default for both is 60 bytes. These larger values allow + * for reflashing of ITE EC chips over I2C + * (https://issuetracker.google.com/79684405) in reasonably speedy fashion. If + * the EC firmware defaults are ever raised significantly, consider removing + * these overrides. + * + * As of 2018-11-27 the actual maximum write size supported by the I2C-over-USB + * protocol is (1<<12)-1, and the maximum read size supported is + * (1<<15)-1. However compile time assertions require that these values be + * powers of 2 after overheads are included. Thus, the write limit set here + * /should/ be (1<<12)-4 and the read limit should be (1<<15)-6, however those + * ideal limits are not actually possible because servo_micro lacks sufficient + * spare memory for them. With symmetrical limits, the maximum that currently + * fits is (1<<11)-4 write limit and (1<<11)-6 read limit, leaving 1404 bytes of + * RAM available. + * + * However even with a sufficiently large write value here, the maximum that + * actually works as of 2018-12-03 is 255 bytes. Additionally, ITE EC firmware + * image verification requires exactly 256 byte reads. Thus the only useful + * powers-of-2-minus-overhead limits to set here are (1<<9)-4 writes and + * (1<<9)-6 reads, leaving 6012 bytes of RAM available, down from 7356 bytes of + * RAM available with the default 60 byte limits. + */ +#undef CONFIG_USB_I2C_MAX_WRITE_COUNT +#undef CONFIG_USB_I2C_MAX_READ_COUNT +#define CONFIG_USB_I2C_MAX_WRITE_COUNT ((1<<9) - 4) +#define CONFIG_USB_I2C_MAX_READ_COUNT ((1<<9) - 6) + /* * Allow dangerous commands all the time, since we don't have a write protect * switch.
Get rid of unnecessary memory allocation in jsonb_subscript_assign() Current code allocates memory for JsonbValue, but it could be placed locally.
@@ -283,7 +283,7 @@ jsonb_subscript_assign(ExprState *state, */ if (*op->resnull) { - JsonbValue *newSource = (JsonbValue *) palloc(sizeof(JsonbValue)); + JsonbValue newSource; /* * To avoid any surprising results, set up an empty jsonb array in @@ -292,17 +292,17 @@ jsonb_subscript_assign(ExprState *state, */ if (workspace->expectArray) { - newSource->type = jbvArray; - newSource->val.array.nElems = 0; - newSource->val.array.rawScalar = false; + newSource.type = jbvArray; + newSource.val.array.nElems = 0; + newSource.val.array.rawScalar = false; } else { - newSource->type = jbvObject; - newSource->val.object.nPairs = 0; + newSource.type = jbvObject; + newSource.val.object.nPairs = 0; } - jsonbSource = JsonbValueToJsonb(newSource); + jsonbSource = JsonbValueToJsonb(&newSource); *op->resnull = false; } else
Android: Add global scene solver target
@@ -86,6 +86,18 @@ endif include $(BUILD_SHARED_LIBRARY) +# driver_global_scene_solver +include $(CLEAR_VARS) +LOCAL_MODULE := libsurvive-plugin-driver_global_scene_solver +LOCAL_MODULE_CLASS := SHARED_LIBRARIES +LOCAL_CFLAGS := $(COMMON_CFLAGS) +LOCAL_C_INCLUDES := $(COMMON_C_INCLUDES) +LOCAL_SHARED_LIBRARIES := libsurvive libz +LOCAL_SRC_FILES := src/driver_global_scene_solver.c +LOCAL_PROPRIETARY_MODULE := true +LOCAL_MODULE_RELATIVE_PATH := libsurvive/plugins +include $(BUILD_SHARED_LIBRARY) + # driver_playback include $(CLEAR_VARS) LOCAL_MODULE := libsurvive-plugin-driver_playback
net/lwip: modify rflag=0 handles in nd6, type NA This commit fixes nd6(rflag) handling routine in NA message. Removing a default router, we don't need to clean up neighbor cache entry.
@@ -372,23 +372,12 @@ void nd6_input(struct pbuf *p, struct netif *inp) neighbor_cache[i].isrouter = 0; tmp = nd6_get_router(&neighbor_cache[i].next_hop_address, inp); - if (tmp == 0) { - /* TODO: error */ - } + if (tmp >= 0) { /* RFC 4861, 6.3.5. Timing out Prefixes and Default Routers */ + if (default_router_list[tmp].neighbor_entry) { nd6_free_expired_router_in_destination_cache(&(default_router_list[tmp].neighbor_entry->next_hop_address)); - - s8_t j; /* Neighbor cache index */ - j = nd6_find_neighbor_cache_entry(&(default_router_list[tmp].neighbor_entry->next_hop_address)); - if (j < 0) { - LWIP_DEBUGF(ND6_DEBUG, ("Failed to find matched negighbor entry to default router list\n")); - /* @todo should we do initialize NCE manually?*/ - } else { - LWIP_DEBUGF(ND6_DEBUG, ("Neighbor cache entry (index %d) will be freed\n", j)); - nd6_free_neighbor_cache_entry(j); } - default_router_list[tmp].neighbor_entry = NULL; default_router_list[tmp].invalidation_timer = 0; default_router_list[tmp].flags = 0; @@ -396,6 +385,7 @@ void nd6_input(struct pbuf *p, struct netif *inp) } } } + } break; /* ICMP6_TYPE_NA */ }
testcase/task_manager: Fix strncpy size which can lead to buffer overflow when copying string value, the size should include null terminator.
@@ -80,7 +80,7 @@ static void sync_test_cb(tm_msg_t *info) tm_msg_t reply_msg; if (strncmp(info->msg, TM_SYNC_SEND_MSG, info->msg_size) == 0) { - reply_msg.msg = malloc(strlen(TM_SYNC_RECV_MSG)); + reply_msg.msg = malloc(strlen(TM_SYNC_RECV_MSG) + 1); if (reply_msg.msg != NULL) { reply_msg.msg_size = strlen(TM_SYNC_RECV_MSG) + 1; memcpy(reply_msg.msg, TM_SYNC_RECV_MSG, reply_msg.msg_size); @@ -407,8 +407,8 @@ static void utc_task_manager_unicast_n(void) { int ret; tm_msg_t send_msg; - send_msg.msg_size = strlen(TM_SAMPLE_MSG); - send_msg.msg = malloc(strlen(TM_SAMPLE_MSG)); + send_msg.msg_size = strlen(TM_SAMPLE_MSG) + 1; + send_msg.msg = malloc(send_msg.msg_size); TC_ASSERT_NEQ("task_manager_unicast", send_msg.msg, NULL); strncpy(send_msg.msg, TM_SAMPLE_MSG, send_msg.msg_size); @@ -438,7 +438,7 @@ static void utc_task_manager_unicast_p(void) cb_flag = false; send_msg.msg_size = strlen(TM_SAMPLE_MSG) + 1; - send_msg.msg = malloc(strlen(TM_SAMPLE_MSG)); + send_msg.msg = malloc(send_msg.msg_size); TC_ASSERT_NEQ("task_manager_unicast", send_msg.msg, NULL); strncpy(send_msg.msg, TM_SAMPLE_MSG, send_msg.msg_size); @@ -495,8 +495,8 @@ static void utc_task_manager_broadcast_p(void) broad_undefined_cnt = 0; broadcast_data_flag = -1; - user_data.msg = malloc(strlen("WIFI_ON")); user_data.msg_size = strlen("WIFI_ON") + 1; + user_data.msg = malloc(user_data.msg_size); strncpy(user_data.msg, "WIFI_ON", user_data.msg_size); (void)task_manager_broadcast(TM_BROADCAST_WIFI_ON, &user_data, TM_NO_RESPONSE);
Add buffer/fill. Address
@@ -182,6 +182,19 @@ static Janet cfun_buffer_new_filled(int32_t argc, Janet *argv) { return janet_wrap_buffer(buffer); } +static Janet cfun_buffer_fill(int32_t argc, Janet *argv) { + janet_arity(argc, 1, 2); + JanetBuffer *buffer = janet_getbuffer(argv, 0); + int32_t byte = 0; + if (argc == 2) { + byte = janet_getinteger(argv, 1) & 0xFF; + } + if (buffer->count) { + memset(buffer->data, byte, buffer->count); + } + return argv[0]; +} + static Janet cfun_buffer_u8(int32_t argc, Janet *argv) { int32_t i; janet_arity(argc, 1, -1); @@ -345,8 +358,8 @@ static const JanetReg buffer_cfuns[] = { { "buffer/new", cfun_buffer_new, JDOC("(buffer/new capacity)\n\n" - "Creates a new, empty buffer with enough memory for capacity bytes. " - "Returns a new buffer.") + "Creates a new, empty buffer with enough backing memory for capacity bytes. " + "Returns a new buffer of length 0.") }, { "buffer/new-filled", cfun_buffer_new_filled, @@ -354,6 +367,12 @@ static const JanetReg buffer_cfuns[] = { "Creates a new buffer of length count filled with byte. By default, byte is 0. " "Returns the new buffer.") }, + { + "buffer/fill", cfun_buffer_fill, + JDOC("(buffer/fill buffer &opt byte)\n\n" + "Fill up a buffer with bytes, defaulting to 0s. Does not change the buffer's length. " + "Returns the modified buffer.") + }, { "buffer/push-byte", cfun_buffer_u8, JDOC("(buffer/push-byte buffer x)\n\n"
examples/modbus: Fix endianess, it was inverted
@@ -458,8 +458,8 @@ eMBErrorCode eMBRegInputCB(uint8_t *buffer, uint16_t address, uint16_t nregs) index = (int)(address - CONFIG_EXAMPLES_MODBUS_REG_INPUT_START); while (nregs > 0) { - *buffer++ = (uint8_t)(g_modbus.reginput[index] >> 8); *buffer++ = (uint8_t)(g_modbus.reginput[index] & 0xff); + *buffer++ = (uint8_t)(g_modbus.reginput[index] >> 8); index++; nregs--; } @@ -498,8 +498,8 @@ eMBErrorCode eMBRegHoldingCB(uint8_t *buffer, uint16_t address, uint16_t nregs, case MB_REG_READ: while (nregs > 0) { - *buffer++ = (uint8_t)(g_modbus.regholding[index] >> 8); *buffer++ = (uint8_t)(g_modbus.regholding[index] & 0xff); + *buffer++ = (uint8_t)(g_modbus.regholding[index] >> 8); index++; nregs--; } @@ -512,8 +512,8 @@ eMBErrorCode eMBRegHoldingCB(uint8_t *buffer, uint16_t address, uint16_t nregs, case MB_REG_WRITE: while (nregs > 0) { - g_modbus.regholding[index] = *buffer++ << 8; - g_modbus.regholding[index] |= *buffer++; + g_modbus.regholding[index] = *buffer++; + g_modbus.regholding[index] |= *buffer++ << 8; index++; nregs--; }
threads: Fixed potential division by zero JIRA:
@@ -766,7 +766,6 @@ void threads_canaryInit(thread_t *t, void *ustack) int proc_threadCreate(process_t *process, void (*start)(void *), unsigned int *id, unsigned int priority, size_t kstacksz, void *stack, size_t stacksz, void *arg) { - /* TODO - save user stack and it's size in thread_t */ thread_t *t; spinlock_ctx_t sc; @@ -1491,7 +1490,10 @@ int proc_threadsList(int n, threadinfo_t *info) hal_spinlockSet(&threads_common.spinlock, &sc); now = TIMER_CYC2US(hal_getTimer()); + if (now != t->startTime) info[i].load = (t->cpuTime * 1000) / (now - t->startTime); + else + info[i].load = 0; info[i].cpuTime = t->cpuTime; if (t->state == READY && t->maxWait < now - t->readyTime)
vere: removed unnecessary exit(1) call Previously exit(1) was called after calling u3_king_bail() which was unnecessary, so removed it.
@@ -578,7 +578,6 @@ _boothack_doom(void) if ( u3_nul == whu ) { u3l_log("boot: malformed -F ship %s\r\n", u3_Host.ops_u.fak_c); u3_king_bail(); - exit(1); } bot = u3nc(c3__fake, u3k(u3t(whu)));
[drivers/wlan] Fix the problem that the password is empty
@@ -117,7 +117,18 @@ int rt_wlan_softap(struct rt_wlan_device *device, struct rt_wlan_info *info, cha rt_wlan_set_info(device, info); } + if (password == NULL) + { + memset(device->key, 0, sizeof(device->key)); + } + else + { + if (rt_strlen(password) > sizeof(device->key) - 1) + { + rt_kprintf("WARN input password is longer than %d bytes.", sizeof(device->key) - 1); + } rt_strncpy((char *)device->key, (char *)password, sizeof(device->key) - 1); + } result = rt_device_control(RT_DEVICE(device), WIFI_SOFTAP, (void *)password);
Removed ugly size_t less than zero check. CLA: trivial.
@@ -162,7 +162,7 @@ void *CRYPTO_malloc(size_t num, const char *file, int line) if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc) return malloc_impl(num, file, line); - if (num <= 0) + if (num == 0) return NULL; FAILTEST();
sensors/ioctl: add common cmd for accelerators
#define SNIOC_READROMCODE _SNIOC(0x0067) /* Arg: uint64_t* pointer */ #define SNIOC_SETALARM _SNIOC(0x0068) /* Arg: struct ds18b20_alarm_s* */ +/* IOCTL commands for accelerators */ + +#define SNIOC_SIMPLE_CHECK _SNIOC(0x0069) /* Simple check */ +#define SNIOC_FULL_CHECK _SNIOC(0x006a) /* Full check */ +#define SNIOC_FEAT_MANAGE _SNIOC(0x006b) /* Feature manage command */ +#define SNIOC_SET_SCALE_XL _SNIOC(0x006c) /* Set accelerator scale command */ + /* Command: SNIOC_GET_STATE * Description: Get state for all subscribers, include min_interval, * min_latency and the number of subscribers.
chat: add exports to gulpfile Added exports so that indigo-react can be integrated into our workflow without error.
@@ -56,8 +56,9 @@ gulp.task('js-imports', function(cb) { plugins: [ commonjs({ namedExports: { - 'node_modules/react/index.js': [ 'Component' ], - 'node_modules/react-is/index.js': [ 'isValidElementType' ], + 'node_modules/react/index.js': ['Component', 'cloneElement', 'createContext', 'createElement', 'useState', 'useRef', 'useLayoutEffect', 'useMemo', 'useEffect', 'forwardRef', 'useContext', 'Children' ], + 'node_modules/react-is/index.js': [ 'isValidElementType', 'isElement', 'ForwardRef' ], + 'node_modules/react-dom/index.js': [ 'createPortal' ] } }), rootImport({
filter_kubernetes: fix memory leak on Pod record exclusion
@@ -480,6 +480,7 @@ static int cb_kube_filter(void *data, size_t bytes, if (props.exclude == FLB_TRUE) { *out_buf = NULL; *out_bytes = 0; + flb_kube_meta_release(&meta); flb_kube_prop_destroy(&props); return FLB_FILTER_MODIFIED; }
change the vq count and vendor id Acked-by: Yu Wang
* Queue definitions. * Audio mediator uses two queues: one for interrupt and the other for messages. */ -#define VIRTIO_AUDIO_VQ_NUM 2 +#define VIRTIO_AUDIO_VQ_NUM 4 /*2 currently we use 4 vq, may change later*/ const char *vbs_k_audio_dev_path = "/dev/vbs_k_audio"; @@ -334,11 +334,11 @@ virtio_audio_init(struct vmctx *ctx, struct pci_vdev *dev, char *opts) /* initialize config space */ pci_set_cfgdata16(dev, PCIR_DEVICE, VIRTIO_DEV_AUDIO); - pci_set_cfgdata16(dev, PCIR_VENDOR, VIRTIO_VENDOR); + pci_set_cfgdata16(dev, PCIR_VENDOR, INTEL_VENDOR_ID); pci_set_cfgdata8(dev, PCIR_CLASS, PCIC_MULTIMEDIA); pci_set_cfgdata8(dev, PCIR_SUBCLASS, PCIS_MULTIMEDIA_AUDIO); pci_set_cfgdata16(dev, PCIR_SUBDEV_0, VIRTIO_TYPE_AUDIO); - pci_set_cfgdata16(dev, PCIR_SUBVEND_0, VIRTIO_VENDOR); + pci_set_cfgdata16(dev, PCIR_SUBVEND_0, INTEL_VENDOR_ID); if (virtio_interrupt_init(&virt_audio->base, virtio_uses_msix())) { free(virt_audio);
Add the missing CMake LIBRESSL option
@@ -13,7 +13,7 @@ endfunction() set (ENABLE_SSL AUTO CACHE STRING "Enable TLS connections and SCRAM-SHA-1 authentication.\ Options are \"DARWIN\" to use Apple's Secure Transport, \"WINDOWS\" to use Windows - Secure Channel, \"OPENSSL\", \"AUTO\",\ or \"OFF\". These options are + Secure Channel, \"OPENSSL\", \"LIBRESSL\", \"AUTO\",\ or \"OFF\". These options are case-sensitive. The default is \"AUTO\". Note\ that SCRAM-SHA-1 is required for authenticating to MongoDB 3.0 and later.") @@ -100,10 +100,11 @@ endif () if (NOT (ENABLE_SSL STREQUAL DARWIN OR ENABLE_SSL STREQUAL WINDOWS OR ENABLE_SSL STREQUAL OPENSSL + OR ENABLE_SSL STREQUAL LIBRESSL OR ENABLE_SSL STREQUAL AUTO OR ENABLE_SSL STREQUAL OFF)) message (FATAL_ERROR - "ENABLE_SSL option must be DARWIN, WINDOWS, OPENSSL, AUTO, or OFF") + "ENABLE_SSL option must be DARWIN, WINDOWS, OPENSSL, LIBRESSL, AUTO, or OFF") endif() if (NOT ENABLE_SSL STREQUAL OFF)
Fix gd32f4xx_dma.c:223:26: error: unused function 'gd32_dma_channel_get' [-Werror,-Wunused-function]
@@ -211,42 +211,6 @@ static void gd32_dma_clock_enable(uint32_t dmabase) modifyreg32(regaddr, 0, rcu_en); } -/**************************************************************************** - * Name: gd32_dma_channel_get - * - * Description: - * Get the g_dmachan table entry associated with a DMA controller and - * a channel number - ****************************************************************************/ - -static inline struct gd32_dma_channel_s - *gd32_dma_channel_get(uint32_t channelx, - uint32_t dma_periph) -{ - int index; - - DEBUGASSERT(channelx < DMA0_NCHANNELS); - - DEBUGASSERT(dma_periph == GD32_DMA0_BASE && dma_periph == GD32_DMA1_BASE); - - /* Convert the dma_periph + chan_num based on the fact that there are - * 8 channel per dma_periph. - */ - - if (dma_periph == GD32_DMA0_BASE) - { - index = channelx; - } - else - { - index = channelx + DMA0_NCHANNELS; - } - - /* Then return the chan_num structure associated with the chan_num index */ - - return &g_dmachan[index]; -} - /**************************************************************************** * Name: gd32_channel_enable *
remove int_en_wire from axi_bram_reader
@@ -45,7 +45,7 @@ module axi_bram_reader # localparam integer ADDR_LSB = clogb2(AXI_DATA_WIDTH/8 - 1); - wire int_arvalid_wire, int_rready_wire, int_en_wire; + wire int_arvalid_wire, int_rready_wire; wire [AXI_ADDR_WIDTH-1:0] int_araddr_wire; wire [AXI_ADDR_WIDTH-1:0] int_addr_wire;
Minor fix for VB header file type is a reserved keyword in VB
@@ -234,12 +234,12 @@ Public Const EN_G_CURVE = 4 ' General\default curve Declare Function ENgetcurve Lib "epanet2.dll" (ByVal curveIndex As Long, ByVal CurveID As String, nValues As Long, xValues As Any, yValues As Any) As Long Declare Function ENgetheadcurveindex Lib "epanet2.dll" (ByVal pumpIndex As Long, curveIndex As Long) As Long Declare Function ENgetpumptype Lib "epanet2.dll" (ByVal index As Long, PumpType As Long) As Long - Declare Function ENgetcurvetype Lib "epanet2.dll" (ByVal curveindex As Long, CurveType As Long) As Long + Declare Function ENgetcurvetype Lib "epanet2.dll" (ByVal curveIndex As Long, CurveType As Long) As Long Declare Function ENgetversion Lib "epanet2.dll" (value As Long) As Long - Declare Function ENgetdemandmodel Lib "epanet2.dll" (type as long, pmin as Single, preq as Single, pexp as Single) As Long - Declare Function ENsetdemandmodel Lib "epanet2.dll" (ByVal type as long, ByVal pmin as Single, ByVal preq as Single, ByVal pexp as Single) As Long + Declare Function ENgetdemandmodel Lib "epanet2.dll" (mtype As Long, pmin As Single, preq As Single, pexp As Single) As Long + Declare Function ENsetdemandmodel Lib "epanet2.dll" (ByVal mtype As Long, ByVal pmin As Single, ByVal preq As Single, ByVal pexp As Single) As Long Declare Function ENsetflowunits Lib "epanet2.dll" (ByVal code As Long) As Long Declare Function ENsetcontrol Lib "epanet2.dll" (ByVal Cindex As Long, ByVal Ctype As Long, ByVal Lindex As Long, ByVal setting As Single, ByVal Nindex As Long, ByVal Level As Single) As Long @@ -254,7 +254,7 @@ Public Const EN_G_CURVE = 4 ' General\default curve Declare Function ENsetqualtype Lib "epanet2.dll" (ByVal QualCode As Long, ByVal ChemName As String, ByVal ChemUnits As String, ByVal TraceNode As String) As Long Declare Function ENgetqualinfo Lib "epanet2.dll" (QualCode As Long, ByVal ChemName As String, ByVal ChemUnits As String, TraceNode As Long) As Long Declare Function ENsetbasedemand Lib "epanet2.dll" (ByVal nodeIndex As Long, ByVal DemandIndex As Long, ByVal BaseDemand As Single) As Long - Declare Function ENsetdemandpattern Lib "epanet2.dll" (ByVal Index As Long, ByVal DemandIndex As Long, ByVal PatIndex As Long) As Long + Declare Function ENsetdemandpattern Lib "epanet2.dll" (ByVal index As Long, ByVal DemandIndex As Long, ByVal PatIndex As Long) As Long Declare Function ENgetcurveindex Lib "epanet2.dll" (ByVal id As String, index As Long) As Long Declare Function ENgetcurveid Lib "epanet2.dll" (ByVal index As Long, ByVal id As String) As Long
Kconfig.debug: Populate USB Debug Features in menuconfig
@@ -736,6 +736,38 @@ config DEBUG_TTRACE ---help--- Enable T-trace debug Feature. +config DEBUG_USB + bool "USB Debug Features" + default n + depends on USBDEV || USBHOST + ---help--- + Enable USB debug features. + +if DEBUG_USB + +config DEBUG_USB_ERROR + bool "USB Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable USB error output to SYSLOG. + +config DEBUG_USB_WARN + bool "USB Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable USB warning output to SYSLOG. + +config DEBUG_USB_INFO + bool "USB Informational Output" + default n + depends on DEBUG_VERBOSE + ---help--- + Enable USB informational output to SYSLOG. + +endif # DEBUG_USB + config DEBUG_WATCHDOG bool "Watchdog Timer Debug Feature" default n
Shell Recorder: Remove unnecessary export
@@ -29,7 +29,7 @@ if (ENABLE_KDB_TESTING) endif (list_index EQUAL -1) endif () - set (INCLUDE_COMMON "${INCLUDE_COMMON_FILE}export KDB=\"${KDB_COMMAND_BASENAME}\" PATH=\"${CMAKE_BINARY_DIR}/bin:$PATH\"") + set (INCLUDE_COMMON "${INCLUDE_COMMON_FILE}export PATH=\"${CMAKE_BINARY_DIR}/bin:$PATH\"") configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/shell_recorder.sh" "${CMAKE_CURRENT_BINARY_DIR}/shell_recorder.sh" @ONLY) configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/tutorial_wrapper/markdown_shell_recorder.sh"
hark-group-hook: add type checking to vase sent to %hark-store, fix
|= [=index:store =notification:store] ^- card =- [%pass / %agent [our.bowl %hark-store] %poke -] - hark-action+!>([%add index notification]) + :- %hark-action + !> ^- action:store + [%add-note index notification] -- :: ++ on-peek on-peek:def
Support of custom QML2_IMPORT_PATH and auto-add output path to import custom qmlplugins
@@ -30,13 +30,18 @@ rule("qt.env") qt = assert(find_qt(nil, {verbose = true}), "Qt SDK not found!") target:data_set("qt", qt) end + + local qmlimportpath = target:get("qt.env.qmlimportpath") or {} if target:is_plat("windows") or (target:is_plat("mingw") and is_host("windows")) then target:add("runenvs", "PATH", qt.bindir) - target:set("runenv", "QML2_IMPORT_PATH", qt.qmldir) + table.append(qmlimportpath, qt.qmldir) + -- add targetdir in QML2_IMPORT_PATH in case of the user have qml plugins + table.append(qmlimportpath, target:targetdir()) target:set("runenv", "QML_IMPORT_TRACE", "1") elseif target:is_plat("msys", "cygwin") then raise("please run `xmake f -p mingw --mingw=/mingw64` to support Qt/Mingw64 on Msys!") end + target:set("runenv", "QML2_IMPORT_PATH", qmlimportpath) end)
wsman-soap-envelope: fix potential NULL pointer dereference Bail out if strdup failed.
@@ -955,6 +955,8 @@ void wsman_get_fragment_type(char *fragstr, int *fragment_flag, char **element, *index = 0; if(fragstr == NULL) return; dupstr = u_strdup(fragstr); + if (dupstr == NULL) + return; p = strstr(dupstr, "/text()"); if(p) { *p = '\0';
Separating out method to check if stlink is usable. Adding a log macro. Adding logs with stlink list.
#define APP_RESULT_INVALID_PARAMS 1 #define APP_RESULT_STLINK_NOT_FOUND 2 +#define LOG(SETTINGS, LEVEL, ARGS...) if (settings->logging_level >= LEVEL) printf(ARGS) + struct _st_settings_t { @@ -111,27 +113,36 @@ bool parse_options(int argc, char** argv, st_settings_t *settings) { return true; } +static bool CompareStlink(const st_settings_t* settings, const stlink_t* link) { + if (!settings->serial_number) { + return true; + } + + if (strncmp(link->serial, settings->serial_number, link->serial_size) == 0) { + return true; + } + + return false; +} + static bool FindStLink(const st_settings_t* settings, stlink_t* link) { stlink_t **stdevs; size_t size; bool result = false; size = stlink_probe_usb(&stdevs); - if (settings->logging_level >= UDEBUG) { - printf("Found %u stlink programmers\n", (unsigned int)size); - } + LOG(settings, UDEBUG, "Found %u stlink programmers\n", (unsigned int)size); - if (!settings->serial_number && size > 0) { - *link = *stdevs[0]; - result = true; - } else { for (size_t n = 0; n < size; n++) { - if (strncmp(stdevs[n]->serial, settings->serial_number, stdevs[n]->serial_size) == 0) { + if (CompareStlink(settings, stdevs[n])) { + LOG(settings, UDEBUG, "Matching stlink '%*s'\n", stdevs[n]->serial_size, stdevs[n]->serial); + if (result) { + LOG(settings, UWARN, "WARNING: Multiple matching stlinks\n"); + } *link = *stdevs[n]; result = true; } } - } stlink_probe_usb_free(&stdevs, size);
num/ops.c: make gpu-wrapper spam less
@@ -1186,7 +1186,7 @@ static void gpuwrp_fun(const operator_data_t* _data, unsigned int N, void* args[ assert(N == operator_nr_args(op)); - debug_printf(DP_DEBUG1, "GPU start.\n"); + debug_printf(DP_DEBUG3, "GPU start.\n"); int nr_cuda_devices = MIN(cuda_num_devices(), MAX_CUDA_DEVICES); int gpun = omp_get_thread_num() % nr_cuda_devices; @@ -1226,7 +1226,7 @@ static void gpuwrp_fun(const operator_data_t* _data, unsigned int N, void* args[ md_free(gpu_ptr[i]); } - debug_printf(DP_DEBUG1, "GPU end.\n"); + debug_printf(DP_DEBUG3, "GPU end.\n"); #else UNUSED(_data); UNUSED(N); UNUSED(args);
phb4: Simplify calling phb4_retry_state() phb4_retry_state() returns a good error code, so just use that rather than complicating the caller.
@@ -2188,7 +2188,6 @@ static int64_t phb4_poll_link(struct pci_slot *slot) { struct phb4 *p = phb_to_phb4(slot->phb); uint64_t reg; - int64_t rc; switch (slot->state) { case PHB4_SLOT_NORMAL: @@ -2220,12 +2219,7 @@ static int64_t phb4_poll_link(struct pci_slot *slot) if (slot->retries-- == 0) { PHBERR(p, "LINK: Timeout waiting for electrical link\n"); PHBDBG(p, "LINK: DLP train control: 0x%016llx\n", reg); - rc = phb4_retry_state(slot); - if (rc >= OPAL_SUCCESS) - return rc; - - pci_slot_set_state(slot, PHB4_SLOT_NORMAL); - return OPAL_SUCCESS; + return phb4_retry_state(slot); } return pci_slot_set_sm_timeout(slot, msecs_to_tb(100)); case PHB4_SLOT_LINK_WAIT: @@ -2241,9 +2235,7 @@ static int64_t phb4_poll_link(struct pci_slot *slot) if (slot->retries-- == 0) { PHBERR(p, "LINK: Timeout waiting for link up\n"); PHBDBG(p, "LINK: DLP train control: 0x%016llx\n", reg); - rc = phb4_retry_state(slot); - if (rc >= OPAL_SUCCESS) - return rc; + return phb4_retry_state(slot); pci_slot_set_state(slot, PHB4_SLOT_NORMAL); return OPAL_SUCCESS;
Fix compile_cuda for g++-7
@@ -66,6 +66,16 @@ def main(): for prefix in skip_prefix_list: cflags = [i for i in cflags if not i.startswith(prefix)] + if not is_clang(command): + def good(arg): + if arg.startswith('--target='): + return False + if arg in ('-Wno-exceptions', + '-Wno-inconsistent-missing-override'): + return False + return True + cflags = filter(good, cflags) + cpp_args = [] compiler_args = [] @@ -103,6 +113,7 @@ def main(): compiler_args.append(arg) command += cpp_args + if compiler_args: command += ['--compiler-options', ','.join(compiler_args)] if dump_args:
web-ui: allow restrict/write and restrict/remove for binary keys
@@ -300,6 +300,26 @@ export default class SettingsDialog extends Component { /> <SavedIcon saved={this.getSaved('restrict/binary')} /> </div> + <div style={{ display: 'initial', marginLeft: 24 }}> + <Checkbox + checked={fromElektraBool(this.getMeta('restrict/write', false))} + onCheck={(e, val) => this.handleEdit('restrict/write')(toElektraBool(val))} + label="restrict/write" + /> + </div> + <div style={{ flex: 'initial' }}> + <SavedIcon saved={this.getSaved('restrict/write')} /> + </div> + <div style={{ flex: 'initial', marginLeft: 24 }}> + <Checkbox + checked={fromElektraBool(this.getMeta('restrict/remove', false))} + onCheck={(e, val) => this.handleEdit('restrict/remove')(toElektraBool(val))} + label="restrict/remove" + /> + </div> + <div style={{ flex: 'initial' }}> + <SavedIcon saved={this.getSaved('restrict/remove')} /> + </div> </div> {!isBinary && <div> @@ -339,26 +359,6 @@ export default class SettingsDialog extends Component { <div style={{ flex: 'initial' }}> <SavedIcon saved={this.getSaved('check/type')} style={{ paddingBottom: 16 }} /> </div> - <div style={{ display: 'initial', marginLeft: 24 }}> - <Checkbox - checked={fromElektraBool(this.getMeta('restrict/write', false))} - onCheck={(e, val) => this.handleEdit('restrict/write')(toElektraBool(val))} - label="restrict/write" - /> - </div> - <div style={{ flex: 'initial' }}> - <SavedIcon saved={this.getSaved('restrict/write')} /> - </div> - <div style={{ flex: 'initial', marginLeft: 24 }}> - <Checkbox - checked={fromElektraBool(this.getMeta('restrict/remove', false))} - onCheck={(e, val) => this.handleEdit('restrict/remove')(toElektraBool(val))} - label="restrict/remove" - /> - </div> - <div style={{ flex: 'initial' }}> - <SavedIcon saved={this.getSaved('restrict/remove')} /> - </div> </div> {this.getMeta('check/type', false) === 'enum' ? this.renderEnum() : null} {isNumberType(this.getMeta('check/type', false)) ? this.renderNumber() : null}
build BUGFIX properly get libssh version
@@ -189,7 +189,7 @@ endif() if(ENABLE_SSH) find_package(LibSSH 0.7.0 REQUIRED) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNC_ENABLED_SSH") - if(LibSSH_PACKAGE_FIND_VERSION LESS 0.8.0) + if(LibSSH_VERSION VERSION_LESS 0.8.0) target_link_libraries(netconf2 "-L${LIBSSH_LIBRARY_DIR}" -lssh -lssh_threads -lcrypt) else() target_link_libraries(netconf2 "-L${LIBSSH_LIBRARY_DIR}" -lssh -lcrypt)
Add gas signal for hyundai EV
@@ -29,9 +29,10 @@ const int HYUNDAI_RX_CHECK_LEN = sizeof(hyundai_rx_checks) / sizeof(hyundai_rx_c // older hyundai models have less checks due to missing counters and checksums AddrCheckStruct hyundai_legacy_rx_checks[] = { - {.msg = {{608, 0, 8, .check_checksum = true, .max_counter = 3U, .expected_timestep = 10000U}}}, - {.msg = {{902, 0, 8, .check_checksum = false, .max_counter = 0U, .expected_timestep = 10000U}}}, - {.msg = {{916, 0, 8, .check_checksum = false, .max_counter = 0U, .expected_timestep = 10000U}}}, + {.msg = {{608, 0, 8, .check_checksum = true, .max_counter = 3U, .expected_timestep = 10000U}, + {881, 0, 8, .expected_timestep = 10000U}}}, + {.msg = {{902, 0, 8, .expected_timestep = 10000U}}}, + {.msg = {{916, 0, 8, .expected_timestep = 10000U}}}, {.msg = {{1057, 0, 8, .check_checksum = true, .max_counter = 15U, .expected_timestep = 20000U}}}, }; const int HYUNDAI_LEGACY_RX_CHECK_LEN = sizeof(hyundai_legacy_rx_checks) / sizeof(hyundai_legacy_rx_checks[0]); @@ -127,8 +128,14 @@ static int hyundai_rx_hook(CAN_FIFOMailBox_TypeDef *to_push) { } // exit controls on rising edge of gas press + if ((addr == 608) || (hyundai_legacy && (addr == 881))) { + bool gas_pressed; if (addr == 608) { - bool gas_pressed = (GET_BYTE(to_push, 7) >> 6) != 0; + gas_pressed = (GET_BYTE(to_push, 7) >> 6) != 0; + } else { + gas_pressed = (((GET_BYTE(to_push, 4) & 0x7F) << 1) | GET_BYTE(to_push, 3) >> 7) != 0; + } + if (!unsafe_allow_gas && gas_pressed && !gas_pressed_prev) { controls_allowed = 0; }
linux-cp: fix infinite loop in CLI lcp default CLI lcp default clear or lcp default netns hangs in an infinite while loop. Type: fix
@@ -215,6 +215,7 @@ lcp_default_netns_command_fn (vlib_main_t *vm, unformat_input_t *input, unformat_input_t _line_input, *line_input = &_line_input; u8 *ns; int r; + clib_error_t *error = NULL; if (!unformat_user (input, unformat_line_input, line_input)) return 0; @@ -227,9 +228,14 @@ lcp_default_netns_command_fn (vlib_main_t *vm, unformat_input_t *input, ; else if (unformat (line_input, "clear netns")) ; + else + { + vec_free (ns); + error = clib_error_return (0, "unknown input `%U'", + format_unformat_error, line_input); + goto done; + } } - - unformat_free (line_input); vlib_cli_output (vm, "lcp set default netns '%s'\n", (char *) ns); @@ -238,7 +244,10 @@ lcp_default_netns_command_fn (vlib_main_t *vm, unformat_input_t *input, if (r) return clib_error_return (0, "linux-cp set default netns failed (%d)", r); - return 0; +done: + unformat_free (line_input); + + return error; } VLIB_CLI_COMMAND (lcp_default_netns_command, static) = {
gppkg: add behave test for install/uninstall Ensure that we can run install and uninstall gppkg on any gppkg filenames.
@gppkg Feature: gppkg tests + @gppkg_setup + Scenario: gppkg environment does not have any gppkg + Given the database is running + Then the user runs "gppkg --remove sample" Scenario: gppkg -u should prompt user when package is updated with -a option Given the database is running @@ -44,3 +48,45 @@ Feature: gppkg tests When the user runs "gppkg --query --all" Then gppkg should return a return code of 0 And gppkg should print "Starting gppkg with args: --query --all" to stdout + + @gppkg_install_remove + Scenario: gppkg --install should report success because the package is not yet installed + Given the database is running + When the user runs "gppkg --install test/behave/mgmt_utils/steps/data/sample.gppkg" + Then gppkg should return a return code of 0 + And gppkg should print "This is a sample message shown after successful installation" to stdout + And gppkg should print "Completed local installation of sample" to stdout + + @gppkg_install_remove + Scenario: gppkg --install should report failure because the package is already installed + Given the database is running + When the user runs "gppkg --install test/behave/mgmt_utils/steps/data/sample.gppkg" + Then gppkg should return a return code of 2 + And gppkg should print "sample.gppkg is already installed." to stdout + + @gppkg_install_remove + Scenario: gppkg --remove should report success when the package is already installed + Given the database is running + When the user runs "gppkg --remove sample" + Then gppkg should return a return code of 0 + And gppkg should print "Uninstalling package sample.gppkg" to stdout + And gppkg should print "Completed local uninstallation of sample.gppkg" to stdout + And gppkg should print "sample.gppkg successfully uninstalled" to stdout + + @gppkg_install_remove + Scenario: gppkg --remove should report failure when the package is not installed + Given the database is running + When the user runs "gppkg --remove sample" + Then gppkg should return a return code of 2 + And gppkg should print "Package sample has not been installed" to stdout + + @gppkg_query_list + Scenario: gppkg --query should report installed packages + Given the database is running + # to be idempotent, potentially reinstalling if the above test just ran, + # which will result in an error result code, so don't check result code of install + When the user runs "gppkg --install test/behave/mgmt_utils/steps/data/sample.gppkg" + When the user runs "gppkg --query --all" + Then gppkg should return a return code of 0 + And gppkg should print "Starting gppkg with args: --query --all" to stdout + And gppkg should print "sample" to stdout
Move variable definition to start of function
@@ -493,6 +493,7 @@ publish(void) int len; int remaining = APP_BUFFER_SIZE; int i; + char def_rt_str[64]; seq_nr_value++; @@ -519,7 +520,6 @@ publish(void) buf_ptr += len; /* Put our Default route's string representation in a buffer */ - char def_rt_str[64]; memset(def_rt_str, 0, sizeof(def_rt_str)); ipaddr_sprintf(def_rt_str, sizeof(def_rt_str), uip_ds6_defrt_choose());
Removed un-necessary return check.
@@ -143,10 +143,6 @@ fcb_getnext_sector_nolock(struct fcb *fcb, struct fcb_entry *loc) if (rc == 0) { return 0; } - - if (rc != FCB_ERR_CRC) { - return FCB_ERR_NEXT_SECT; - } } return FCB_ERR_NEXT_SECT;
Use actual notation for tickets
!> =- -(network *uode) %- full-wallet-from-ticket :+ ~nec :: 1 - 4^0x1.0102 ::TODO .~doznec-marbud + 4^.~doznec-marbud [0 ~] :: ++ test-generate-wallet-1 =- -(voting *node) %- full-wallet-from-ticket :+ ~matbyr :: 65.012 - 8^0x102.af04.0506.0798 ::TODO .~marbud-tidsev-litsut-hidfep + 8^.~marbud-tidsev-litsut-hidfep [0 ~] :: ++ test-generate-wallet-2 %- full-wallet-from-ticket :+ ~zod :- 48 - 0xc5a.b5ba.ea8e.e798.21d3.fc9f.8876.6da1. - 95bd.d4a6.3375.32fe.8f7f.d92f.d5f4.446a. - f9bf.0006.a211.823b.fbc9.a701.01e6.6f1f - ::TODO .~wacfus-dabpex-danted-mosfep-pasrud-lavmer- - :: nodtex-taslus-pactyp-milpub-pildeg-fornev- - :: ralmed-dinfeb-fopbyr-sanbet-sovmyl-dozsut- - :: mogsyx-mapwyc-sorrup-ricnec-marnys-lignex + .~wacfus-dabpex-danted-mosfep-pasrud-lavmer- + nodtex-taslus-pactyp-milpub-pildeg-fornev- + ralmed-dinfeb-fopbyr-sanbet-sovmyl-dozsut- + mogsyx-mapwyc-sorrup-ricnec-marnys-lignex [6 `'froot loops'] :: ++ test-derive-network-seed-rev-0
Improve the family/socktype/protocol-related docs a bit
@@ -1939,7 +1939,7 @@ Gets the current Window width and height. Controls whether console virtual terminal sequences are processed by libuv or console. Useful in particular for enabling ConEmu support of ANSI X3.64 and Xterm 256 colors. Otherwise Windows10 consoles are usually detected -automatically. State may be a family string: `"supported"` or `"unsupported"`. +automatically. State should be one of: `"supported"` or `"unsupported"`. This function is only meaningful on Windows systems. On Unix it is silently ignored. @@ -3086,9 +3086,9 @@ called in the main loop thread. - `host`: `string` or `nil` - `service`: `string` or `nil` - `hints`: `table` or `nil` - - `family`: `integer` or `string` or `nil` - - `socktype`: `integer` or `string` or `nil` - - `protocol`: `integer` or `string` or `nil` + - `family`: `string` or `integer` or `nil` + - `socktype`: `string` or `integer` or `nil` + - `protocol`: `string` or `integer` or `nil` - `addrconfig`: `boolean` or `nil` - `v4mapped`: `boolean` or `nil` - `all`: `boolean` or `nil` @@ -3103,6 +3103,13 @@ called in the main loop thread. Equivalent to `getaddrinfo(3)`. Either `node` or `service` may be `nil` but not both. +Valid hint strings for the keys that take a string: +- `family`: `"unix"`, `"inet"`, `"inet6"`, `"ipx"`, +`"netlink"`, `"x25"`, `"ax25"`, `"atmpvc"`, `"appletalk"`, or `"packet"` +- `socktype`: `"stream"`, `"dgram"`, `"raw"`, +`"rdm"`, or `"seqpacket"` +- `protocol`: will be looked up using the `getprotobyname(3)` function (examples: `"ip"`, `"icmp"`, `"tcp"`, `"udp"`, etc) + **Returns (sync version):** `table` or `fail` - `[1, 2, 3, ..., n]` : `table` - `addr` : `string` @@ -3128,6 +3135,9 @@ both. Equivalent to `getnameinfo(3)`. +When specified, `family` must be one of `"unix"`, `"inet"`, `"inet6"`, `"ipx"`, +`"netlink"`, `"x25"`, `"ax25"`, `"atmpvc"`, `"appletalk"`, or `"packet"`. + **Returns (sync version):** `string, string` or `fail` **Returns (async version):** `uv_getnameinfo_t userdata` or `fail`
Fix bug by casting to unsigned char. Higher unciode codepoints where being read as negative char values. We need to cast to unsigned char before comparing to 0x20 to check for unprintable characters.
@@ -763,6 +763,7 @@ static int line() { switch (c) { default: + if ((unsigned char) c < 0x20) break; if (insert(c, 1)) return -1; break; case 1: /* ctrl-a */
fixes On error the daos_read and daos_write call should set errno then return negative one.
@@ -790,7 +790,7 @@ ssize_t daos_read(const char* file, void* buf, size_t size, mfu_file_t* mfu_file MFU_LOG(MFU_LOG_ERR, "dfs_read %s failed (%d %s)", file, rc, strerror(rc)); errno = rc; - rc = -1; + return -1; } mfu_file->offset += (daos_off_t)got_size; return (ssize_t)got_size; @@ -892,7 +892,7 @@ ssize_t daos_write(const char* file, const void* buf, size_t size, mfu_file_t* m MFU_LOG(MFU_LOG_ERR, "dfs_write %s failed (%d %s)", file, rc, strerror(rc)); errno = rc; - rc = -1; + return -1; } mfu_file->offset += (daos_off_t)size; return (ssize_t)size;
xive: Don't touch ESB masks unless masking/unmasking Otherwise this can have the side effect of losing a queued interrupt.
@@ -2296,6 +2296,7 @@ static int64_t xive_source_set_xive(struct irq_source *is, uint32_t isn, uint16_t server, uint8_t prio) { struct xive_src *s = container_of(is, struct xive_src, is); + uint8_t old_prio; int64_t rc; /* @@ -2316,18 +2317,24 @@ static int64_t xive_source_set_xive(struct irq_source *is, uint32_t isn, /* Unmangle server */ server >>= 2; + /* Grab existing prio/mask */ + if (!xive_get_irq_targetting(isn, NULL, &old_prio, NULL)) + return OPAL_PARAMETER; + /* Let XIVE configure the EQ synchronously */ rc = xive_set_irq_targetting(isn, server, prio, isn, true); if (rc) return rc; /* The source has special variants of masking/unmasking */ + if (old_prio != prio && (old_prio == 0xff || prio == 0xff)) { if (s->orig_ops && s->orig_ops->set_xive) rc = s->orig_ops->set_xive(is, isn, server, prio); else /* Ensure it's enabled/disabled in the source controller */ - xive_update_irq_mask(s, isn - s->esb_base, prio == 0xff); - + xive_update_irq_mask(s, isn - s->esb_base, + prio == 0xff); + } return OPAL_SUCCESS; }
added warning (monitor mode on Realtek driver in combination with NETLINK)
@@ -5580,11 +5580,14 @@ printf("%s %s (C) %s ZeroBeat\n" "\n" "short options:\n" "-i <interface> : interface (monitor mode will be enabled by hcxdumptool)\n" - " can also be done manually:\n" + " some Realtek interfaces require NETLINK to set monitor mode\n" + " in this case try iw:\n" " ip link set <interface> down\n" " iw dev <interface> set type monitor\n" " ip link set <interface> up\n" - " WARNING: iw use NETLINK (libnl) and hcxdumptool will not work on pure NETLINK interfaces\n" + " WARNING:\n" + " hcxdumptool may not work as expected on virtual NETLINK interfaces\n" + " do not report issues related to iw\n" "-o <dump file> : output file in pcapng format\n" " including radiotap header (LINKTYPE_IEEE802_11_RADIOTAP)\n" "-f <frames> : frames to save\n"
NVIDIA compiler does not yet support POWER10
@@ -10,9 +10,11 @@ USE_OPENMP = 1 endif ifeq ($(CORE), POWER10) +ifneq ($(C_COMPILER), PGI) CCOMMON_OPT += -Ofast -mcpu=power10 -mtune=power10 -mvsx -fno-fast-math FCOMMON_OPT += -O2 -frecursive -mcpu=power10 -mtune=power10 -fno-fast-math endif +endif ifeq ($(CORE), POWER9) ifneq ($(C_COMPILER), PGI)
chore(my_bot/Makefile): no need to include -lpthread
@@ -27,9 +27,8 @@ CFLAGS := -O0 -g -Wall -pthread \ # -ldiscord links against libdiscord.a # -lcurl links against libcurl, a orca dependency # -lcrypto links against OpenSSL, a libcurl dependency -# -lpthread links against POSIX threads, a orca dependency # -lm links against math.h, a orca dependency -LDFLAGS := -L$(LIBDIR) -ldiscord -lcurl -lcrypto -lpthread -lm +LDFLAGS := -L$(LIBDIR) -ldiscord -lcurl -lcrypto -lm # This will match each .out to a .c and compile the executable # ex: 'foo.out: foo.c'
jna/plugins: added plugin name and meta key definitions
@@ -6,12 +6,22 @@ import org.libelektra.KeySet; import org.libelektra.Plugin; import javax.annotation.Nonnull; +import java.util.regex.Pattern; public class SortedPlugin implements Plugin { + + private static final String PLUGIN_NAME = "Sorted"; + private static final Pattern META_SORTED = Pattern.compile("meta:/check/sorted"); + private static final Pattern META_SORTED_DIRECTION = Pattern.compile("meta:/check/sorted/direction"); + + private enum Direction { + ASC, DESC + } + @Nonnull @Override public String getName() { - return null; + return PLUGIN_NAME; } @Override
updated on-peek for s3-store
-- :: ++ on-leave on-leave:def -++ on-peek on-peek:def +++ on-peek + ~/ %s3-peek + |= =path + ^- (unit (unit cage)) + ?> (team:title our.bowl src.bowl) + ?+ path (on-watch:def path) + [%x %credentials ~] + [~ ~ %s3-update !>(`noun`[%credentials credentials])] + [%x %configuration ~] + [~ ~ %s3-update !>(`noun`[%configuration configuration])] + == ++ on-agent on-agent:def ++ on-arvo on-arvo:def ++ on-fail on-fail:def
Fix protocol error caused by redis-benchmark The protocol error was caused by the buggy `writeHandler` in `redis-benchmark.c`, which didn't handle one of the cases, thereby repeating data, leading to protocol errors when the values being sent are very long. This PR fixes issue introduced by
@@ -632,6 +632,9 @@ static void writeHandler(aeEventLoop *el, int fd, void *privdata, int mask) { fprintf(stderr, "Error writing to the server: %s\n", strerror(errno)); freeClient(c); return; + } else if (nwritten > 0) { + c->written += nwritten; + return; } } else { aeDeleteFileEvent(el,c->context->fd,AE_WRITABLE);
%check breaks the build, try using %build
@@ -87,6 +87,7 @@ twamp server %build %configure --with-I2util=no make +make check %install %makeinstall @@ -104,9 +105,6 @@ make %{__install} -D -p -m 0644 conf/twampd.limits %{buildroot}%{_sysconfdir}/twamp-server/twamp-server.limits %{__install} -D -p -m 0644 conf/twampd.limits %{buildroot}%{_sysconfdir}/twamp-server/twamp-server.limits.default -%check -make check - %clean rm -rf $RPM_BUILD_ROOT
sys/log: Add storage info support to log_cbmem
@@ -206,6 +206,31 @@ err: return (rc); } +#if MYNEWT_VAL(LOG_STORAGE_INFO) +static int +log_cbmem_storage_info(struct log *log, struct log_storage_info *info) +{ + struct cbmem *cbmem; + uint32_t size; + uint32_t used; + + cbmem = (struct cbmem *)log->l_arg; + + size = cbmem->c_buf_end - cbmem->c_buf; + + used = (uint32_t)cbmem->c_entry_end + cbmem->c_entry_end->ceh_len - + (uint32_t)cbmem->c_entry_start; + if ((int32_t)used < 0) { + used += size; + } + + info->size = size; + info->used = used; + + return 0; +} +#endif + const struct log_handler log_cbmem_handler = { .log_type = LOG_TYPE_MEMORY, .log_read = log_cbmem_read, @@ -216,4 +241,7 @@ const struct log_handler log_cbmem_handler = { .log_append_mbuf_body = log_cbmem_append_mbuf_body, .log_walk = log_cbmem_walk, .log_flush = log_cbmem_flush, +#if MYNEWT_VAL(LOG_STORAGE_INFO) + .log_storage_info = log_cbmem_storage_info, +#endif };
test(ethereum): Add 006GetBalance_0002GetSuccessNullAddress
@@ -42,6 +42,34 @@ START_TEST(test_006GetBalance_0001GetSuccess) ck_assert_int_eq(result, BOAT_SUCCESS); + cur_balance_wei = BoatEthWalletGetBalance(g_ethereum_wallet_ptr, TEST_RECIPIENT_ADDRESS); + result = BoatEthParseRpcResponseStringResult(cur_balance_wei, &parse_result); + + ck_assert_ptr_nonnull(parse_result.field_ptr); + ck_assert_int_eq(result, BOAT_SUCCESS); + + BoatFree(parse_result.field_ptr); + + BoatIotSdkDeInit(); +} + +START_TEST(test_006GetBalance_0002GetSuccessNullAddress) +{ + BOAT_RESULT result; + BoatEthTx tx_ctx; + BCHAR *cur_balance_wei = NULL; + BoatFieldVariable parse_result = {NULL, 0}; + + BoatIotSdkInit(); + + ethereumWalletPrepare(); + + result = BoatEthTxInit(g_ethereum_wallet_ptr, &tx_ctx, BOAT_TRUE, NULL, + "0x333333", + (BCHAR *)TEST_RECIPIENT_ADDRESS); + ck_assert_int_eq(result, BOAT_SUCCESS); + + cur_balance_wei = BoatEthWalletGetBalance(g_ethereum_wallet_ptr, NULL); result = BoatEthParseRpcResponseStringResult(cur_balance_wei, &parse_result); @@ -53,6 +81,8 @@ START_TEST(test_006GetBalance_0001GetSuccess) BoatIotSdkDeInit(); } + + START_TEST(test_007Transfer_0001TransferSuccess) { BOAT_RESULT result; @@ -110,6 +140,7 @@ Suite *make_transactions_suite(void) /* Test cases are added to the test set */ tcase_add_test(tc_transaction_api, test_006GetBalance_0001GetSuccess); + tcase_add_test(tc_transaction_api, test_006GetBalance_0002GetSuccessNullAddress); tcase_add_test(tc_transaction_api, test_007Transfer_0001TransferSuccess); tcase_add_test(tc_transaction_api, test_007Transfer_0002TransferFailureNullParam);
Ensure we excluse ec2m curves if ec2m is disabled
@@ -97,26 +97,34 @@ static const TLS_GROUP_CONSTANTS group_list[35] = { static const OSSL_PARAM param_group_list[][10] = { #ifndef OPENSSL_NO_EC +# ifndef OPENSSL_NO_EC2M TLS_GROUP_ENTRY("sect163k1", "sect163k1", "EC", 0), +# endif # ifndef FIPS_MODULE TLS_GROUP_ENTRY("sect163r1", "sect163r1", "EC", 1), # endif +# ifndef OPENSSL_NO_EC2M TLS_GROUP_ENTRY("sect163r2", "sect163r2", "EC", 2), +# endif # ifndef FIPS_MODULE TLS_GROUP_ENTRY("sect193r1", "sect193r1", "EC", 3), TLS_GROUP_ENTRY("sect193r2", "sect193r2", "EC", 4), # endif +# ifndef OPENSSL_NO_EC2M TLS_GROUP_ENTRY("sect233k1", "sect233k1", "EC", 5), TLS_GROUP_ENTRY("sect233r1", "sect233r1", "EC", 6), +# endif # ifndef FIPS_MODULE TLS_GROUP_ENTRY("sect239k1", "sect239k1", "EC", 7), # endif +# ifndef OPENSSL_NO_EC2M TLS_GROUP_ENTRY("sect283k1", "sect283k1", "EC", 8), TLS_GROUP_ENTRY("sect283r1", "sect283r1", "EC", 9), TLS_GROUP_ENTRY("sect409k1", "sect409k1", "EC", 10), TLS_GROUP_ENTRY("sect409r1", "sect409r1", "EC", 11), TLS_GROUP_ENTRY("sect571k1", "sect571k1", "EC", 12), TLS_GROUP_ENTRY("sect571r1", "sect571r1", "EC", 13), +# endif # ifndef FIPS_MODULE TLS_GROUP_ENTRY("secp160k1", "secp160k1", "EC", 14), TLS_GROUP_ENTRY("secp160r1", "secp160r1", "EC", 15),
doc: add link to book
"APP.HOME.LABEL.ORIENTATION.1.HEADLINE": "Develop Custom Plugins", "APP.HOME.LABEL.ORIENTATION.2.DETAILS": "Of course you can use Elektra also outside a C or C++ environment. Have a look at our <a href=\"/bindings/readme\">language bindings</a>! You can even write plugins in <a href=\"/plugins/jni\">Java</a>, <a href=\"/plugins/ruby\">Ruby</a>, <a href=\"/plugins/python\">Python</a>, and <a href=\"/plugins/lua\">Lua</a>.", "APP.HOME.LABEL.ORIENTATION.2.HEADLINE": "Use Elektra outside C/C++", - "APP.HOME.LABEL.ORIENTATION.3.DETAILS": "Of course we can! An initiative like Elektra asks periodically for <a href=\"/decisions/readme\">decisions</a>! We welcome everyone to join the <a href=\"https://github.com/ElektraInitiative/libelektra/issues\">discussions</a>!", + "APP.HOME.LABEL.ORIENTATION.3.DETAILS": "Of course we can! An initiative like Elektra asks periodically for <a href=\"/decisions/readme\">decisions</a>. We wrote a <a href=\"https://book.libelektra.org\">book</a> explaining all the scientific background. We welcome everyone to join the <a href=\"https://github.com/ElektraInitiative/libelektra/issues\">discussions</a>!", "APP.HOME.LABEL.ORIENTATION.3.HEADLINE": "Can you Elaborate on the Why?", "APP.HOME.LABEL.ORIENTATION.4.DETAILS": "This website does not only contain the news and documentation around Elektra. It does also comprise a service that allows for sharing, searching, converting and downloading of configuration snippets in various formats. To search for a snippet, navigate to <a href=\"https://www.libelektra.org/entries/search\">snippet search</a>. Uploading new snippets requires an account, which you can register <a href=\"/auth/login\">here</a>. All snippets have the <a href=\"/devgettingstarted/license\">BSD license</a> and are available in different formats in a <a href=\"https://snippets.libelektra.org\">git repository</a>.", "APP.HOME.LABEL.ORIENTATION.4.HEADLINE": "Sharing of Configuration Snippets",
Fixed alignment assumptions in SHA2 update. Unaligned loads are a no-no on many architectures, the ESP8266 included.
* */ +/* ESP8266-specific tweaks by Johny Mattsson <[email protected]> */ + #include "user_config.h" #ifdef SHA2_ENABLE @@ -491,6 +493,13 @@ void ICACHE_FLASH_ATTR SHA256_Update(SHA256_CTX* context, const sha2_byte *data, } while (len >= SHA256_BLOCK_LENGTH) { /* Process as many complete blocks as we can */ + if ((int)data & (sizeof(sha2_word32)-1)) + { + // have to bounce via buffer, otherwise we'll hit unaligned load exception + MEMCPY_BCOPY(context->buffer, data, SHA256_BLOCK_LENGTH); + SHA256_Transform(context, (sha2_word32*)context->buffer); + } + else SHA256_Transform(context, (sha2_word32*)data); context->bitcount += SHA256_BLOCK_LENGTH << 3; len -= SHA256_BLOCK_LENGTH; @@ -782,6 +791,13 @@ void ICACHE_FLASH_ATTR SHA512_Update(SHA512_CTX* context, const sha2_byte *data, } while (len >= SHA512_BLOCK_LENGTH) { /* Process as many complete blocks as we can */ + if ((int)data & (sizeof(sha2_word64)-1)) + { + // have to bounce via buffer, otherwise we'll hit unaligned load exception + MEMCPY_BCOPY(context->buffer, data, SHA512_BLOCK_LENGTH); + SHA512_Transform(context, (sha2_word64*)context->buffer); + } + else SHA512_Transform(context, (sha2_word64*)data); ADDINC128(context->bitcount, SHA512_BLOCK_LENGTH << 3); len -= SHA512_BLOCK_LENGTH;
tests CHANGE use barriers instead of usleep to timeout
struct state { sr_conn_ctx_t *conn; volatile int cb_called, cb_called2; - pthread_barrier_t barrier; + pthread_barrier_t barrier, barrier2; }; static int @@ -113,6 +113,7 @@ setup_f(void **state) st->cb_called = 0; st->cb_called2 = 0; pthread_barrier_init(&st->barrier, NULL, 2); + pthread_barrier_init(&st->barrier2, NULL, 2); return 0; } @@ -122,6 +123,7 @@ teardown_f(void **state) struct state *st = (struct state *)*state; pthread_barrier_destroy(&st->barrier); + pthread_barrier_destroy(&st->barrier2); return 0; } @@ -2869,7 +2871,7 @@ module_change_timeout_cb(sr_session_ctx_t *session, const char *module_name, con assert_int_equal(event, SR_EV_CHANGE); /* time out */ - usleep(10000); + pthread_barrier_wait(&st->barrier2); break; case 1: assert_int_equal(event, SR_EV_CHANGE); @@ -2908,6 +2910,7 @@ apply_change_timeout_thread(void *arg) /* perform the change, it will time out */ ret = sr_apply_changes(sess, 1); assert_int_equal(ret, SR_ERR_CALLBACK_FAILED); + pthread_barrier_wait(&st->barrier2); /* signal that we have tried first time */ pthread_barrier_wait(&st->barrier);
deprecate windows 2016 packaging ci jobs
@@ -54,12 +54,7 @@ try{ "1804 SGX1FLC Package Release" : { LinuxPackaging('1804', 'Release') }, "1804 SGX1FLC Package Release LVI" : { LinuxPackaging('1804', 'Release', 'ControlFlow') }, "1804 SGX1FLC Package RelWithDebInfo" : { LinuxPackaging('1804', 'RelWithDebInfo') }, - "1804 SGX1FLC Package RelWithDebInfo LVI" : { LinuxPackaging('1804', 'RelWithDebInfo', 'ControlFlow') }, - "Windows 2016 Debug" : { WindowsPackaging('2016','Debug') }, - "Windows 2016 Debug LVI" : { WindowsPackaging('2016','Debug', 'ControlFlow') }, - "Windows 2016 Release" : { WindowsPackaging('2016','Release') }, - "Windows 2016 Release LVI" : { WindowsPackaging('2016','Release', 'ControlFlow') }, - "Windows 2019 Debug" : { WindowsPackaging('2019','Debug') }, + "1804 SGX1FLC Package RelWithDebInfo LVI" : { LinuxPackaging('1804', 'RelWithDebInfo', 'ControlFlow') },"Windows 2019 Debug" : { WindowsPackaging('2019','Debug') }, "Windows 2019 Debug LVI" : { WindowsPackaging('2019','Debug', 'ControlFlow') }, "Windows 2019 Release" : { WindowsPackaging('2019','Release') }, "Windows 2019 Release LVI" : { WindowsPackaging('2019','Release', 'ControlFlow') }
Run Valgrind on more tests and generate suppressions.
#!/bin/bash set -e +export VALGRIND="" +if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then + VALGRIND="PYTHONMALLOC='malloc' valgrind --show-leak-kinds=definite --gen-suppressions=all --error-exitcode=0" +fi + if [[ "$BUILD_TOOL" == "autotools" ]]; then echo "#include <libtcod.h>" | $CC -xc -c -I$HOME/.local/include/libtcod - echo "#include <libtcod.hpp>" | $CC -xc++ -std=c++14 -c -I$HOME/.local/include/libtcod - echo "#include <gui/gui.hpp>" | $CC -xc++ -std=c++14 -c -I$HOME/.local/include/libtcod - (cd buildsys/autotools && make check) elif [[ "$BUILD_TOOL" == "scons" ]]; then - LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR ./unittest ~[!nonportable] + env LD_LIBRARY_PATH="$TRAVIS_BUILD_DIR" $VALGRIND ./unittest ~[!nonportable] elif [[ "$BUILD_TOOL" == "conan" ]]; then .ci/conan_build.py fi if [[ "$BUILD_TOOL" != "conan" ]]; then - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then - (cd python && pytest -v) - else - (cd python && PYTHONMALLOC=malloc valgrind --show-leak-kinds=definite pytest -v) - fi + (cd python && env $VALGRIND pytest -v) fi
Correct English Spelling permision -> permission
@@ -420,7 +420,7 @@ error: things_free(svrdb); return OIC_SEC_ERROR; } else { - THINGS_LOG_E(TAG, "Can not open the [%s], Please make sure the access permision of file system.", SVR_DB_PATH); + THINGS_LOG_E(TAG, "Can not open the [%s], Please make sure the access permission of file system.", SVR_DB_PATH); } return res; // return 0 when failed, 1 otherwise..
Add debian 8 support in extras/vagrant/build.sh
@@ -26,6 +26,12 @@ elif [ -f /etc/redhat-release ];then DISTRIB_RELEASE=`lsb_release -sr` DISTRIB_CODENAME=`lsb_release -sc` DISTRIB_DESCRIPTION=`lsb_release -sd` +elif [ -f /etc/os-release ];then + . /etc/os-release + DISTRIB_ID=$ID + DISTRIB_RELEASE=$VERSION_ID + DISTRIB_CODENAME=$VERSION + DISTRIB_DESCRIPTION=$PRETTY_NAME fi KERNEL_OS=`uname -o` KERNEL_MACHINE=`uname -m` @@ -65,8 +71,11 @@ fi # Build and install packaging $SUDOCMD make bootstrap + if [ $DISTRIB_ID == "Ubuntu" ]; then $SUDOCMD make pkg-deb +elif [ $DISTRIB_ID == "debian" ]; then + $SUDOCMD make pkg-deb elif [ $DISTRIB_ID == "CentOS" ]; then (cd $VPP_DIR/vnet ;$SUDOCMD aclocal;$SUDOCMD automake -a) $SUDOCMD make pkg-rpm
Reflect special `DEFAULT` behavior in ciphers(1) Actual behavior of DEFAULT is different than currently described. Rather than actinf as cipher string, DEFAULT cannot be combined using logical operators, etc. Fixes
@@ -168,19 +168,20 @@ The cipher string B<@SECLEVEL=n> can be used at any point to set the security level to B<n>, which should be a number between zero and five, inclusive. See L<SSL_CTX_set_security_level> for a description of what each level means. +The cipher list can be prefixed with the B<DEFAULT> keyword, which enables +the default cipher list as defined below. Unlike cipher strings, +this prefix may not be combined with other strings using B<+> character. +For example, B<DEFAULT+DES> is not valid. + +The content of the default list is determined at compile time and normally +corresponds to B<ALL:!COMPLEMENTOFDEFAULT:!eNULL>. + =head1 CIPHER STRINGS The following is a list of all permitted cipher strings and their meanings. =over 4 -=item B<DEFAULT> - -The default cipher list. -This is determined at compile time and is normally -B<ALL:!COMPLEMENTOFDEFAULT:!eNULL>. -When used, this must be the first cipherstring specified. - =item B<COMPLEMENTOFDEFAULT> The ciphers included in B<ALL>, but not enabled by default. Currently
Clean handshake secrets
@@ -1646,6 +1646,11 @@ static int ssl_tls13_flush_buffers( mbedtls_ssl_context *ssl ) */ static int ssl_tls13_handshake_wrapup( mbedtls_ssl_context *ssl ) { + mbedtls_platform_zeroize( &ssl->handshake->tls1_3_master_secrets, + sizeof(ssl->handshake->tls1_3_master_secrets)); + mbedtls_platform_zeroize( &ssl->handshake->tls13_hs_secrets, + sizeof(ssl->handshake->tls13_hs_secrets)); + MBEDTLS_SSL_DEBUG_MSG( 1, ( "Switch to application keys for inbound traffic" ) ); mbedtls_ssl_set_inbound_transform ( ssl, ssl->transform_application );
Makefile: adding directory creation
@@ -64,6 +64,7 @@ $(PREFIX_O)/programs.o.cpio: $(PREFIX_O)programs.o $(BUILD_DIR)/programs.cpio $(PREFIX_PROG)phoenix-$(TARGET).elf: $(OBJS) $(PREFIX_O)/programs.o.cpio + @mkdir -p $(@D) @(printf "LD %-24s\n" "$(@F)"); $(SIL)$(LD) $(LDFLAGS) -e _start --section-start .init=$(VADDR_KERNEL_INIT) -o $(PREFIX_PROG)phoenix-$(TARGET).elf $(OBJS) $(PREFIX_O)/programs.o.cpio $(GCCLIB)
netutils/ftpc: ftpc_connect: Fixed invalid socket close.
@@ -73,6 +73,10 @@ SESSION ftpc_connect(FAR union ftpc_sockaddr_u *server) session->conntimeo = CONFIG_FTP_DEFTIMEO * CLOCKS_PER_SEC; session->pid = getpid(); + session->cmd.sd = -1; + session->data.sd = -1; + session->dacceptor.sd = -1; + /* Use the default port if the user specified port number zero */ #ifdef CONFIG_NET_IPv6
py/mpprint: Fix "%x" vs "%X" regression introduced in previous commit.
@@ -511,7 +511,7 @@ int mp_vprintf(const mp_print_t *print, const char *fmt, va_list args) { break; case 'x': case 'X': { - char fmt_c = 'x' - *fmt + 'A'; + char fmt_c = *fmt - 'X' + 'A'; mp_uint_t val; if (long_arg) { val = va_arg(args, unsigned long int);
bugID:17597281:[bt] Enlarge l2cap buffer to avoid buffer exhaust corner case.
*/ #ifdef BLE_APP_RECONFIG_AISILOP #undef CONFIG_BT_L2CAP_TX_BUF_COUNT -#define CONFIG_BT_L2CAP_TX_BUF_COUNT 2 +#define CONFIG_BT_L2CAP_TX_BUF_COUNT 5 #else #ifdef BLE_APP_RECONFIG_MESH_SRV #undef CONFIG_BT_L2CAP_TX_BUF_COUNT
Remove duplicate pk_can_do_ext test
@@ -133,10 +133,6 @@ PK can do ext: ECDH/ECDSA(ANY), check ECDSA(SHA256)+DERIVE|SIGN depends_on:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED pk_can_do_ext:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1):PSA_KEY_USAGE_DERIVE|PSA_KEY_USAGE_SIGN_HASH:PSA_ALG_ECDH:PSA_ALG_ECDSA(PSA_ALG_ANY_HASH):256:PSA_ALG_ECDSA(PSA_ALG_SHA_256):PSA_KEY_USAGE_DERIVE|PSA_KEY_USAGE_SIGN_HASH:1 -PK can do ext: ECDH/ECDSA(ANY), check ECDSA(SHA256)+DERIVE|SIGN -depends_on:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED -pk_can_do_ext:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1):PSA_KEY_USAGE_DERIVE|PSA_KEY_USAGE_SIGN_HASH:PSA_ALG_ECDH:PSA_ALG_ECDSA(PSA_ALG_ANY_HASH):256:PSA_ALG_ECDSA(PSA_ALG_SHA_256):PSA_KEY_USAGE_DERIVE|PSA_KEY_USAGE_SIGN_HASH:1 - PK can do ext: ECDH/ECDSA(ANY), check ECDSA(SHA256)+SIGN depends_on:MBEDTLS_ECDSA_C:MBEDTLS_ECP_DP_SECP256R1_ENABLED pk_can_do_ext:PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1):PSA_KEY_USAGE_DERIVE|PSA_KEY_USAGE_SIGN_HASH:PSA_ALG_ECDH:PSA_ALG_ECDSA(PSA_ALG_ANY_HASH):256:PSA_ALG_ECDSA(PSA_ALG_SHA_256):PSA_KEY_USAGE_SIGN_HASH:1
Adapt scaling for SMS data
@@ -128,17 +128,9 @@ int main_nlinv(int argc, char* argv[]) #else double scaling = 100. / md_znorm(DIMS, ksp_dims, kspace_data); - if (1 != ksp_dims[SLICE_DIM]) { // SMS + if (1 != ksp_dims[SLICE_DIM]) // SMS + scaling *= sqrt(ksp_dims[SLICE_DIM]); - if (conf.noncart) { - - scaling *= sqrt(ksp_dims[SLICE_DIM]); // Sqrt seems to work better for radial trajectories - - } else { - // ksp_dims[SLICE_DIM] = Multiband factor (Multislice k-space contains dims[2] times as much energy as single slice) - scaling *= ksp_dims[SLICE_DIM]; - } - } #endif debug_printf(DP_INFO, "Scaling: %f\n", scaling); md_zsmul(DIMS, ksp_dims, kspace_data, kspace_data, scaling);
Use ARRAY_LEN() macro
@@ -306,7 +306,7 @@ execute_server(struct server *server, const struct server_params *params) { // Port: 5005 // Then click on "Debug" #endif - return adb_execute(server->serial, cmd, sizeof(cmd) / sizeof(cmd[0])); + return adb_execute(server->serial, cmd, ARRAY_LEN(cmd)); } static socket_t
Remove credid from /oic/sec/sp representation Tested-by: IoTivity Jenkins
@@ -144,11 +144,6 @@ oc_sec_decode_sp(oc_rep_t *rep, size_t device) sp[device].supported_profiles = supported_profiles; } break; - case OC_REP_INT: - if (len == 6 && memcmp("credid", oc_string(rep->name), 6) == 0) { - sp[device].credid = rep->value.integer; - } - break; default: return false; break; @@ -196,9 +191,6 @@ oc_sec_encode_sp(size_t device) oc_rep_add_text_string(supportedprofiles, sp_to_string(OC_SP_PURPLE)); } oc_rep_close_array(root, supportedprofiles); - if (sp[device].credid != -1) { - oc_rep_set_int(root, credid, sp[device].credid); - } oc_rep_end_root_object(); }
Create the (failed) summary log even when sub-make fails
@@ -30,7 +30,7 @@ DOCDIR=../../tools/doxygen all: clean summary doxygen: - @make -C $(DOCDIR) 2> doxygen.err > /dev/null + -@$(MAKE) -C $(DOCDIR) 2> doxygen.err > /dev/null summary: doxygen @( \ @@ -55,4 +55,4 @@ summary: doxygen clean: @rm -f summary doxygen.err - @make -C $(DOCDIR) clean + @$(MAKE) -C $(DOCDIR) clean
Getting the MinSizeRel build working for the ESP32
$splitOption = [System.StringSplitOptions]::RemoveEmptyEntries $cmakeOptions = $env:BUILD_OPTIONS.Split($separator, $splitOption) - &$cmake -G Ninja "-DTOOLCHAIN_PREFIX=$env:ESP32_TOOLCHAIN_PATH" "-DESP32_IDF_PATH=$env:ESP32_IDF_PATH" "-DESP32_LIBS_PATH=$env:ESP32_LIBS_PATH" "-DCMAKE_BUILD_TYPE=Debug" $cmakeOptions "-DBUILD_VERSION=$env:GitVersion_AssemblySemVer" .. + &$cmake -G Ninja "-DTOOLCHAIN_PREFIX=$env:ESP32_TOOLCHAIN_PATH" "-DESP32_IDF_PATH=$env:ESP32_IDF_PATH" "-DESP32_LIBS_PATH=$env:ESP32_LIBS_PATH" "-DCMAKE_BUILD_TYPE=$env:CONFIGURATION" $cmakeOptions "-DBUILD_VERSION=$env:GitVersion_AssemblySemVer" .. } Else { If($env:BOARD_NAME -eq "ESP32_DEVKITC") { $cmake = "cmake" - &$cmake --build (Get-Location).path --target all --config "Debug" + &$cmake --build (Get-Location).path --target all --config "$env:CONFIGURATION" if ($lastexitcode -ne 0) {
hv: vmcs: trap CR4.SMAP/SMEP/PKE setting FuSa requires setting CR4.SMAP/SMEP/PKE will invalidate the TLB. However, setting CR4.SMAP will invalidate the TLB on native while not in non-root mode. To make sure this, we will trap CR4.SMAP/SMEP/PKE setting to invalidate the TLB in root mode. Acked-by: Anthony Xu
CR0_NE | CR0_ET | CR0_TS | CR0_EM | CR0_MP | CR0_PE) /* CR4 bits hv want to trap to track status change */ -#define CR4_TRAP_MASK (CR4_PSE | CR4_PAE | CR4_VMXE | CR4_PCIDE) +#define CR4_TRAP_MASK (CR4_PSE | CR4_PAE | CR4_VMXE | CR4_PCIDE | CR4_SMEP | CR4_SMAP | CR4_PKE) #define CR4_RESERVED_MASK ~(CR4_VME | CR4_PVI | CR4_TSD | CR4_DE | CR4_PSE | \ CR4_PAE | CR4_MCE | CR4_PGE | CR4_PCE | \ CR4_OSFXSR | CR4_PCIDE | CR4_OSXSAVE | \
test: only build .hoon files Previously it would fail to build .txt files and such. Now it filters those out and doesn't try.
loop(bez t.bez, fiz (~(put in fiz) [i.bez(s (snoc s.i.bez %hoon)) ~])) ;< fez=(list path) bind:m (list-tree:strandio i.bez) ?. =(~ fez) - =/ foz (turn fez |=(path [[-.i.bez +<] ~])) + =/ foz + %+ murn fez + |= p=path + ?. =(%hoon (rear p)) ~ + (some [[-.i.bez p] ~]) loop(bez t.bez, fiz (~(gas in fiz) foz)) ~| bad-test-beam+i.bez =/ tex=term =-(?>(((sane %tas) -) -) (rear s.i.bez))
sharpen the issue template
NOTE: A new issue should be about a bug verified with a minimized example or about a new feature request. -Randomly opened "bug" or "feature" reports to debug your setup will be closed as "invalid". +New "bug" or "feature" reports not satisfying these requirement will be closed as "invalid". Questions should go to the mailinglist at: [email protected] @@ -13,9 +13,9 @@ https://groups.google.com/forum/#!forum/mod_auth_openidc ###### Environment -- mod_auth_openidc version (e.g. 2.1.5) -- Apache version (e.g. 2.4.8) -- platform/distro (e.g. Ubuntu Xenial or Centos 7) +- mod_auth_openidc version (e.g. 2.3.8) +- Apache version (e.g. 2.4.34) +- platform/distro (e.g. Ubuntu Bionic or Centos 7) ###### Expected behaviour @@ -24,5 +24,5 @@ https://groups.google.com/forum/#!forum/mod_auth_openidc ###### Minimized example *Minimal, complete configuration that reproduces the behavior. Use the mailing list or get commercial support to discuss your own (full) setup.* -###### Configuration and Log files +###### Configuration and Apache server log files *Config and logs for the minimized example, possibly provided as attachments.*
Use immintrin.h rather then emmintrin.h...
#include <hse_util/timing.h> +#include <immintrin.h> + #ifndef SMP_CACHE_BYTES #define SMP_CACHE_BYTES (64) #endif @@ -60,8 +62,6 @@ raw_smp_processor_id(void) #endif -#include <emmintrin.h> - static HSE_ALWAYS_INLINE void cpu_relax(void) {
Clarified CPU_MODEL_JAKETOWN.
@@ -164,7 +164,7 @@ enum { #define CPU_MODEL_WESTMERE 0x2C ///< Gulftown, Westmere-EP, Westmere-WS #define CPU_MODEL_WESTMERE_EX 0x2F #define CPU_MODEL_SANDYBRIDGE 0x2A ///< Sandy Bridge -#define CPU_MODEL_JAKETOWN 0x2D ///< Sandy Bridge Xeon +#define CPU_MODEL_JAKETOWN 0x2D ///< Sandy Bridge Xeon E5, Core i7 Extreme #define CPU_MODEL_IVYBRIDGE 0x3A ///< Ivy Bridge #define CPU_MODEL_IVYBRIDGE_EP 0x3E #define CPU_MODEL_CRYSTALWELL 0x46
BugID:23881073: update netmgr API use
@@ -35,7 +35,7 @@ static int events_executor(input_event_t *eventinfo, void *cb_para, int flag) case CODE_WIFI_ON_GOT_IP: done_flag |= flag; netmgr_deinit(); - wifi_get_ip(ips); + netmgr_wifi_get_ip(ips); return 0; } return -1;
Add git rev-parse options
@@ -58,8 +58,8 @@ class CodeSizeComparison: @staticmethod def validate_revision(revision): - result = subprocess.run(["git", "rev-parse", "--verify", revision], - check=False, stdout=subprocess.PIPE) + result = subprocess.check_output(["git", "rev-parse", "--verify", + revision + "^{commit}"], shell=False) return result def _create_git_worktree(self, revision): @@ -208,15 +208,11 @@ def main(): parser.exit() validate_res = CodeSizeComparison.validate_revision(comp_args.old_rev) - if validate_res.returncode != 0: - sys.exit(validate_res.returncode) - old_revision = validate_res.stdout.decode().replace("\n", "") + old_revision = validate_res.decode().replace("\n", "") if comp_args.new_rev is not None: validate_res = CodeSizeComparison.validate_revision(comp_args.new_rev) - if validate_res.returncode != 0: - sys.exit(validate_res.returncode) - new_revision = validate_res.stdout.decode().replace("\n", "") + new_revision = validate_res.decode().replace("\n", "") else: new_revision = "current"
OnlineChecks: Add PhGenerateRandomNumber64
@@ -406,7 +406,7 @@ NTSTATUS UploadFileThreadStart( // HTTP request boundary string. postBoundary = PhFormatString( L"--%I64u", - (ULONG64)RtlRandomEx(&httpPostSeed) | ((ULONG64)RtlRandomEx(&httpPostSeed) << 31) + PhGenerateRandomNumber64() ); if (
Make grammar item namings clearer.
@@ -254,9 +254,10 @@ TABLE OF CONTENTS: 3.4. Packages and Uses + package: "pkg" ident = decl* ";;" + use: bareuse | quoteuse bareuse: use ident quoteuse: use "<quoted string>" - pkgdef: "pkg" ident = decl* ";;" There are two keywords for module system. 'use' is the simpler @@ -487,7 +488,7 @@ TABLE OF CONTENTS: 4.5. Defined Types: - tydefn: "type" ident "(" params ")" = type + tydef: "type" ident "(" params ")" = type params: typaram ("," typaram)* Users can define new types based on other types. These defined @@ -509,7 +510,7 @@ TABLE OF CONTENTS: traittypes: typaram ["->" type ("," type)*] traitbody: (name ":" type)* - impldef: "impl" ident imptypes "=" implbody + implstmt: "impl" ident imptypes "=" implbody traittypes: type ["->" type ("," type)*] traitbody: (name [":" type] "=" expr)* @@ -525,10 +526,6 @@ TABLE OF CONTENTS: behave identically from the type system perspective into a small set of classes. and define the constraints that they require. - Type inference in Myrddin operates as a bottom up tree walk, applying - the type equations for the operator to its arguments. It begins by - initializing all leaf nodes with the most specific known type for them - as follows: 5. VALUES AND EXPRESSIONS
Device::setState(): clarify code, no change in logic
@@ -760,20 +760,24 @@ void Device::setState(DeviceStateHandler state, DEV_StateLevel level) { m_state[level](this, Event(prefix(), REventStateLeave, level, key())); } + m_state[level] = state; - if (m_state[level] && level == StateLevel0) + + if (m_state[level]) + { + if (level == StateLevel0) { // invoke the handler in the next event loop iteration emit eventNotify(Event(prefix(), REventStateEnter, level, key())); } - else if (m_state[level]) + else { // invoke sub-states directly - // TODO: check might be wonky m_state[level](this, Event(prefix(), REventStateEnter, level, key())); } } } +} void Device::startStateTimer(int IntervalMs) {
hslua-classes: add package description
cabal-version: 2.2 name: hslua-classes version: 2.0.0 -synopsis: Marshaling classes for HsLua -description: FIXME! +synopsis: Type classes for HsLua +description: Type classes for convenient marshalling and calling of + Lua functions. homepage: https://hslua.org/ bug-reports: https://github.com/hslua/hslua/issues license: MIT
Change fix for bug with scalar inputs to power spectrum functions
@@ -104,14 +104,14 @@ def _vectorize_fn2(fn, fn_vec, cosmo, x, z, returns_status=True): # Access ccl_cosmology object cosmo = _cosmology_obj(cosmo) status = 0 + scalar = False + # If a scalar was passed, convert to an array if isinstance(x, float): - # Use single-value function - if returns_status: - f, status = fn(cosmo, x, z, status) # Note order of x,z switched - else: - f = fn(cosmo, x, z) - elif isinstance(x, np.ndarray): + scalar = True + x = np.array([x,]) + + if isinstance(x, np.ndarray): # Use vectorised function if returns_status: f, status = fn_vec(cosmo, z, x, x.size, status) @@ -126,5 +126,8 @@ def _vectorize_fn2(fn, fn_vec, cosmo, x, z, returns_status=True): # Check result and return check(status) + if scalar: + return f[0] + else: return f