message
stringlengths
6
474
diff
stringlengths
8
5.22k
acl: correct acl vat help message "ipv4"/"ipv6" option is not supported in acl_add_replace and macip_acl_add_replace vat api. Update its help message per actual api usage. Type: fix
@@ -110,7 +110,7 @@ manual_print manual_endian define acl_add_replace string tag[64]; /* What gets in here gets out in the corresponding tag field when dumping the ACLs. */ u32 count; vl_api_acl_rule_t r[count]; - option vat_help = "<acl-idx> [<ipv4|ipv6>] <permit|permit+reflect|deny|action N> [src IP/plen] [dst IP/plen] [sport X-Y] [dport X-Y] [proto P] [tcpflags FL MASK], ... , ..."; + option vat_help = "<acl-idx> <permit|permit+reflect|deny|action N> [src IP/plen] [dst IP/plen] [sport X-Y] [dport X-Y] [proto P] [tcpflags FL MASK], ... , ..."; }; /** \brief Reply to add/replace ACL @@ -301,7 +301,7 @@ manual_endian manual_print define macip_acl_add_replace string tag[64]; u32 count; vl_api_macip_acl_rule_t r[count]; - option vat_help = "<acl-idx> [<ipv4|ipv6>] <permit|deny|action N> [count <count>] [src] ip <ipaddress/[plen]> mac <mac> mask <mac_mask>, ... , ..."; + option vat_help = "<acl-idx> <permit|deny|action N> [count <count>] [src] ip <ipaddress/[plen]> mac <mac> mask <mac_mask>, ... , ..."; }; /** \brief Reply to add/replace MACIP ACL
revert build.sh
@@ -171,7 +171,10 @@ make package if [ -f /usr/bin/dpkg ]; then # Install new package [[ -z "$NOROOT" ]] && sudo dpkg -i *.deb || echo "No root: skipping package deployment." -elif [ -f /usr/bin/rpmbuild ]; then +fi + +# RedHat / CentOS +if [ -f /usr/bin/rpmbuild ]; then [[ -z "$NOROOT" ]] && sudo rpm -i --force -v *.rpm || echo "No root: skipping package deployment." fi
fix dependencies when building static
@@ -243,11 +243,11 @@ IF (OPENEXR_BUILD_STATIC) ENDIF () iF (BUILD_DWALOOKUPS) - ADD_DEPENDENCIES ( IlmImf b44ExpLogTable ) + ADD_DEPENDENCIES ( IlmImf_static b44ExpLogTable ) ENDIF () IF (BUILD_B44EXPLOGTABLE) - ADD_DEPENDENCIES ( IlmImf dwaLookups ) + ADD_DEPENDENCIES ( IlmImf_static dwaLookups ) ENDIF() ENDIF ()
Rename unused field The flag is used only in the server_start() implementation, there is no need to store it in the structure.
@@ -16,7 +16,6 @@ struct server { uint16_t local_port; bool tunnel_enabled; bool tunnel_forward; // use "adb forward" instead of "adb reverse" - bool send_frame_meta; // request frame PTS to be able to record properly }; #define SERVER_INITIALIZER { \ @@ -28,7 +27,6 @@ struct server { .local_port = 0, \ .tunnel_enabled = false, \ .tunnel_forward = false, \ - .send_frame_meta = false, \ } // init default values
pem: fix indentation and replace assert after
*/ #include "libssh2_priv.h" -#include <assert.h> static int readline(char *line, int line_size, FILE * fp) @@ -140,22 +139,24 @@ _libssh2_pem_parse(LIBSSH2_SESSION * session, ret = -1; goto out; } + all_methods = libssh2_crypt_methods(); while ((cur_method = *all_methods++)) { if (*cur_method->pem_annotation && - memcmp(line, cur_method->pem_annotation, strlen(cur_method->pem_annotation)) == 0) { + memcmp(line, cur_method->pem_annotation, + strlen(cur_method->pem_annotation)) == 0) { method = cur_method; - memcpy(iv, line+strlen(method->pem_annotation)+1, 2*method->iv_len); + memcpy(iv, line+strlen(method->pem_annotation)+1, + 2*method->iv_len); } } - /* None of the available crypt methods were able to decrypt this key */ + /* None of the available crypt methods were able to decrypt the key */ if (method == NULL) return -1; /* Decode IV from hex */ - for (i = 0; i < method->iv_len; ++i) - { + for (i = 0; i < method->iv_len; ++i) { iv[i] = hex_decode(iv[2*i]) << 4; iv[i] |= hex_decode(iv[2*i+1]); } @@ -214,7 +215,8 @@ _libssh2_pem_parse(LIBSSH2_SESSION * session, ret = -1; goto out; } - libssh2_md5_update(fingerprint_ctx, passphrase, strlen((char*)passphrase)); + libssh2_md5_update(fingerprint_ctx, passphrase, + strlen((char*)passphrase)); libssh2_md5_update(fingerprint_ctx, iv, 8); libssh2_md5_final(fingerprint_ctx, secret); if (method->secret_len > MD5_DIGEST_LENGTH) { @@ -223,7 +225,8 @@ _libssh2_pem_parse(LIBSSH2_SESSION * session, goto out; } libssh2_md5_update(fingerprint_ctx, secret, MD5_DIGEST_LENGTH); - libssh2_md5_update(fingerprint_ctx, passphrase, strlen((char*)passphrase)); + libssh2_md5_update(fingerprint_ctx, passphrase, + strlen((char*)passphrase)); libssh2_md5_update(fingerprint_ctx, iv, 8); libssh2_md5_final(fingerprint_ctx, secret + MD5_DIGEST_LENGTH); } @@ -242,12 +245,20 @@ _libssh2_pem_parse(LIBSSH2_SESSION * session, } /* Do the actual decryption */ - assert((*datalen % blocksize) == 0); + if ((*datalen % blocksize) != 0) { + memset((char*)secret, 0, sizeof(secret)); + method->dtor(session, &abstract); + memset(*data, 0, *datalen); + LIBSSH2_FREE(session, *data); + ret = -1; + goto out; + } while (len_decrypted <= *datalen - blocksize) { if (method->crypt(session, *data + len_decrypted, blocksize, &abstract)) { ret = LIBSSH2_ERROR_DECRYPT; + memset((char*)secret, 0, sizeof(secret)); method->dtor(session, &abstract); memset(*data, 0, *datalen); LIBSSH2_FREE(session, *data);
try it with apt
@@ -31,7 +31,7 @@ env: # unoptimized routines. See https://www.openssl.org/docs/man1.1.0/crypto/OPENSSL_ia32cap.html - S2N_LIBCRYPTO=openssl-1.1.0 OPENSSL_ia32cap="~0x200000200000000" BUILD_S2N=true TESTS=integration GCC6_REQUIRED=true - S2N_LIBCRYPTO=openssl-1.1.0 LATEST_CLANG=true TESTS=fuzz - - TESTS=sawHMAC SAW_HMAC_TEST=md5 SAW=true GCC6_REQUIRED=false LATEST_CLANG=true + - TESTS=sawHMAC SAW_HMAC_TEST=md5 SAW=true GCC6_REQUIRED=false - TESTS=sawHMAC SAW_HMAC_TEST=sha1 SAW=true GCC6_REQUIRED=false - TESTS=sawHMAC SAW_HMAC_TEST=sha224 SAW=true GCC6_REQUIRED=false - TESTS=sawHMAC SAW_HMAC_TEST=sha256 SAW=true GCC6_REQUIRED=false @@ -122,7 +122,7 @@ script: - if [[ "$TRAVIS_OS_NAME" == "osx" && "$TESTS" == "integration" ]]; then scan-build --status-bugs -o /tmp/scan-build make -j8; STATUS=$?; test $STATUS -ne 0 && cat /tmp/scan-build/*/* ; [ "$STATUS" -eq "0" ] ; fi - if [[ "$TESTS" == "integration" ]]; then make clean; make integration ; fi - if [[ "$TESTS" == "fuzz" ]]; then export PATH=$LATEST_CLANG_INSTALL_DIR/bin:$PATH && make clean && make fuzz ; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" && "$TESTS" == "sawHMAC" ]]; then export PATH=$LATEST_CLANG_INSTALL_DIR/bin:$PATH && clang --version && make -C tests/saw/ tmp/verify_s2n_hmac_$SAW_HMAC_TEST.log ; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" && "$TESTS" == "sawHMAC" ]]; sudo apt install clang-3.8; make -C tests/saw/ tmp/verify_s2n_hmac_$SAW_HMAC_TEST.log ; fi - if [[ "$TESTS" == "sawDRBG" ]]; then make -C tests/saw tmp/spec/DRBG/DRBG.log ; fi - if [[ "$TESTS" == "sawHMACFailure" ]]; then make -C tests/saw failure-tests ; fi - if [[ "$TESTS" == "ctverif" ]]; then .travis/run_ctverif.sh $CTVERIF_INSTALL_DIR ; fi
in_random: use new input chunk registration calls
@@ -50,6 +50,8 @@ static int in_random_collect(struct flb_input_instance *i_ins, int fd; int ret; uint64_t val; + msgpack_packer mp_pck; + msgpack_sbuffer mp_sbuf; struct flb_in_random_config *ctx = in_context; if (ctx->samples == 0) { @@ -74,19 +76,21 @@ static int in_random_collect(struct flb_input_instance *i_ins, close(fd); } - /* Mark the start of a 'buffer write' operation */ - flb_input_buf_write_start(i_ins); + /* Initialize local msgpack buffer */ + msgpack_sbuffer_init(&mp_sbuf); + msgpack_packer_init(&mp_pck, &mp_sbuf, msgpack_sbuffer_write); - msgpack_pack_array(&i_ins->mp_pck, 2); - flb_pack_time_now(&i_ins->mp_pck); - msgpack_pack_map(&i_ins->mp_pck, 1); + /* Pack data */ + msgpack_pack_array(&mp_pck, 2); + flb_pack_time_now(&mp_pck); + msgpack_pack_map(&mp_pck, 1); - msgpack_pack_str(&i_ins->mp_pck, 10); - msgpack_pack_str_body(&i_ins->mp_pck, "rand_value", 10); - msgpack_pack_uint64(&i_ins->mp_pck, val); - - flb_input_buf_write_end(i_ins); + msgpack_pack_str(&mp_pck, 10); + msgpack_pack_str_body(&mp_pck, "rand_value", 10); + msgpack_pack_uint64(&mp_pck, val); + flb_input_chunk_append_raw(i_ins, NULL, 0, mp_sbuf.data, mp_sbuf.size); + msgpack_sbuffer_destroy(&mp_sbuf); ctx->samples_count++; return 0;
GM ignition: remove signal with noise and false positives
@@ -29,7 +29,6 @@ extern int can_silent; // Ignition detected from CAN meessages bool ignition_can = false; -bool ignition_cadillac = false; uint32_t ignition_can_cnt = 0U; #define ALL_CAN_SILENT 0xFF @@ -197,16 +196,9 @@ void ignition_can_hook(CANPacket_t *to_push) { if (bus == 0) { // GM exception - // TODO: verify on all supported GM models that we can reliably detect ignition using only this signal, - // since the 0x1F1 signal can briefly go low immediately after ignition if ((addr == 0x160) && (len == 5)) { // this message isn't all zeros when ignition is on - ignition_cadillac = GET_BYTES_04(to_push) != 0U; - } - if ((addr == 0x1F1) && (len == 8)) { - // Bit 5 is ignition "on" - bool ignition_gm = ((GET_BYTE(to_push, 0) & 0x20U) != 0U); - ignition_can = ignition_gm || ignition_cadillac; + ignition_can = GET_BYTES_04(to_push) != 0U; } // Tesla exception
better logic with StringSplitter
@@ -483,12 +483,12 @@ static inline TStringSplitter<It> StringSplitter(It begin, size_t len) { return {begin, begin + len}; } -template <class Str> +template <class Str, std::enable_if_t<!std::is_pointer<std::remove_cv_t<std::remove_reference_t<Str>>>::value, int> = 0> static inline auto StringSplitter(Str& s) { return TStringSplitter<decltype(std::cbegin(s))>(std::cbegin(s), std::cend(s)); } -template <class Str> +template <class Str, std::enable_if_t<!std::is_pointer<std::remove_cv_t<std::remove_reference_t<Str>>>::value, int> = 0> static inline auto StringSplitter(Str&& s) { using TRes = TStringSplitter<decltype(std::cbegin(s)), TCopyOwnerPolicy<std::remove_cv_t<std::remove_reference_t<Str>>>>; return TRes(std::move(s));
openssl-dsa.pod.in: Fix glitch: pvk-string -> pvk-strong
@@ -38,7 +38,7 @@ B<openssl> B<dsa> [B<-pubout>] {- $OpenSSL::safe::opt_engine_synopsis -}{- $OpenSSL::safe::opt_provider_synopsis -} -=for openssl ifdef pvk-string pvk-weak pvk-none engine +=for openssl ifdef pvk-strong pvk-weak pvk-none engine =head1 DESCRIPTION
SW: Adding fake queue mode support
@@ -92,6 +92,8 @@ struct snap_card { size_t errinfo_size; /* Size of errinfo */ void *errinfo; /* Err info Buffer */ struct cxl_event event; /* Buffer to keep event from IRQ */ + unsigned int attach_timeout_sec; + unsigned int queue_length; /* unused */ }; /* To be used for software simulation, use funcs provided by action */ @@ -570,12 +572,34 @@ void snap_card_free(struct snap_card *_card) struct snap_queue *snap_queue_alloc(struct snap_card *card, snap_action_type_t action_type, unsigned int queue_length __unused, - unsigned int attach_timeout_sec __unused) + unsigned int attach_timeout_sec) { card->queue_type = action_type; + card->queue_length = queue_length; + card->attach_timeout_sec = attach_timeout_sec; + return (struct snap_queue *)card; } +/* + * @note At this point in time we emulate a real queue behavior by + * doing the same as we do when using snap_sync_execute_job directly. + * This is basically a queue of length 1. Once there are use-cases + * which will profit from a real hardware job queue, this must be + * changed along with a real hardware queue implementation. + */ +int snap_queue_sync_execute_job(struct snap_queue *queue, + struct snap_job *cjob, + unsigned int timeout_sec) +{ + struct snap_card *card = (struct snap_card *)queue; + + return snap_sync_execute_job(card, card->action_type, + (SNAP_ACTION_DONE_IRQ | SNAP_ATTACH_IRQ), + cjob, card->attach_timeout_sec, + timeout_sec); +} + void snap_queue_free(struct snap_queue *queue __unused) { struct snap_card *card = (struct snap_card *)queue;
Always run tty check.
@@ -139,7 +139,7 @@ class Command(BaseCommand): executable = os.path.join(options['server_root'], 'apachectl') name = executable.ljust(len(options['process_name'])) - if options['isatty'] and sys.stdout.isatty(): + if sys.stdout.isatty(): process = None def handler(signum, frame):
Compiler warning (format overflow)
@@ -72,8 +72,8 @@ static grib_handle* grib_sections_copy_internal(grib_handle* hfrom,grib_handle* long section_offset[MAX_NUM_SECTIONS]={0,}; long off=0; grib_handle* h; - char section_length_str[]="section0Length"; - char section_offset_str[]="offsetSection0"; + char section_length_str[64]="section0Length"; + char section_offset_str[64]="offsetSection0"; long length,offset; *err=grib_get_long(hfrom,"edition",&edition);
links: prevents title from being overwritten fixes
@@ -83,11 +83,11 @@ export class LinkSubmit extends Component<LinkSubmitProps, LinkSubmitState> { fetch(`https://noembed.com/embed?url=${linkValue}`) .then(response => response.json()) .then((result) => { - if (result.title) { + if (result.title && !this.state.linkTitle) { this.setState({ linkTitle: result.title }); } }).catch((error) => {/*noop*/}); - } else { + } else if (!this.state.linkTitle) { this.setState({ linkTitle: decodeURIComponent(linkValue .split('/')
Function name needs to be CNAME, set from outside to allow suffixing for dynamic_arch
@@ -825,7 +825,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. int __attribute__ ((noinline)) -dgemm_kernel(BLASLONG m, BLASLONG n, BLASLONG k, double alpha, double * __restrict__ A, double * __restrict__ B, double * __restrict__ C, BLASLONG ldc) +CNAME(BLASLONG m, BLASLONG n, BLASLONG k, double alpha, double * __restrict__ A, double * __restrict__ B, double * __restrict__ C, BLASLONG ldc) { unsigned long M=m, N=n, K=k;
Remove extra mem_size line [ci skip]
@@ -49,7 +49,7 @@ if out != "": # loop through available nodes, selecting the node with the most free mem for i in avail_nodes: cpu_line = lines[line_idx] - mem_size_line = lines[line_idx + 1] + # mem. size unused. skip and use mem. free mem_free_line = lines[line_idx + 2] line_idx += 3
uname: Document errors
@@ -27,6 +27,11 @@ This plugin defines following keynames below its mount point: - version - machine +## Errors + +The only documented error in `uname(2)` is when an invalid buffer is passed to it. +As this is an implementation error only, this plugin should not run into errors. + ## Restrictions This plugin is read-only.
poly/tests: printing only real value of polynomial to screen (verbose)
/* - * Copyright (c) 2007 - 2015 Joseph Gaeddert + * Copyright (c) 2007 - 2019 Joseph Gaeddert * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -328,7 +328,7 @@ void autotest_polyf_findroots() if (liquid_autotest_verbose) { printf("poly:\n"); for (i=0; i<6; i++) - printf(" p[%3u] = %12.8f + j*%12.8f\n", i, crealf(p[i]), cimagf(p[i])); + printf(" p[%3u] = %12.8f\n", i, p[i]); printf("roots:\n"); for (i=0; i<5; i++)
fix(style): reset style lookup table after gc sweep/lv_deinit
@@ -169,6 +169,9 @@ void lv_style_reset(lv_style_t * style) lv_style_prop_t lv_style_register_prop(uint8_t flag) { + if(LV_GC_ROOT(_lv_style_custom_prop_flag_lookup_table) == NULL) { + _lv_style_custom_prop_flag_lookup_table_size = 0; + } /* * Allocate the lookup table if it's not yet available. */
add move constructor and assignment operator
@@ -99,8 +99,24 @@ class SimdAlignedBuffer64 return *this; } +#if __cplusplus >= 201103L + SimdAlignedBuffer64(SimdAlignedBuffer64 &&rhs) noexcept + : _handle(rhs._handle), _buffer(rhs._buffer) + { + rhs._handle = nullptr; + rhs._buffer = nullptr; + } + + SimdAlignedBuffer64 &operator=(SimdAlignedBuffer64 &&rhs) noexcept + { + std::swap(_handle, rhs._handle); + std::swap(_buffer, rhs._buffer); + return *this; + } +#endif ~SimdAlignedBuffer64 () { + if (_handle) EXRFreeAligned (_handle); _handle = 0; _buffer = 0;
gftpui.c: show only gftp version & url in log window When running the gftp-gtk or gtfp-text, this msg is displayed: gFTP 2.0.19
@@ -154,8 +154,7 @@ gftpui_common_about (gftp_logging_func logging_function, gpointer logdata) { char *str; - logging_function (gftp_logging_misc, logdata, "%s, Copyright (C) 1998-2008 Brian Masney <[email protected]>. If you have any questions, comments, or suggestions about this program, please feel free to email them to me. You can always find out the latest news about gFTP from my website at http://www.gftp.org/\n", gftp_version); - logging_function (gftp_logging_misc, logdata, _("gFTP comes with ABSOLUTELY NO WARRANTY; for details, see the COPYING file. This is free software, and you are welcome to redistribute it under certain conditions; for details, see the COPYING file\n")); + logging_function (gftp_logging_misc, logdata, "%s - http://www.gftp.org/\n", gftp_version); str = _("Translated by"); if (strcmp (str, "Translated by") != 0)
hv:irq: avoid out-of-range access to irq_alloc_bitmap[] Logically, out-of-range access won't happen at these places. However, it depends on the behaviour of other codes. This commit makes changes to explicitly eliminate the possibility in these functions.
@@ -41,10 +41,11 @@ uint32_t alloc_irq_num(uint32_t req_irq) if (irq == IRQ_INVALID) { /* if no valid irq num given, find a free one */ irq = ffz64_ex(irq_alloc_bitmap, NR_IRQS); - irq = (irq == NR_IRQS) ? IRQ_INVALID : irq; } - if (irq != IRQ_INVALID) { + if (irq >= NR_IRQS) { + irq = IRQ_INVALID; + } else { bitmap_set_nolock((uint16_t)(irq & 0x3FU), irq_alloc_bitmap + (irq >> 6U)); } @@ -323,7 +324,13 @@ void dispatch_interrupt(struct intr_excp_ctx *ctx) uint32_t irq = vector_to_irq[vr]; struct irq_desc *desc; - if (irq == IRQ_INVALID) { + /* The value from vector_to_irq[] must be: + * IRQ_INVALID, which means the vector is not allocated; + * or + * < NR_IRQS, which is the irq number it bound with; + * Any other value means there is something wrong. + */ + if (irq == IRQ_INVALID || irq >= NR_IRQS) { goto ERR; }
enable CRT shader in the exported builds, fix
@@ -1036,7 +1036,7 @@ if(BUILD_STUB) target_include_directories(tic80${SCRIPT} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) if(BUILD_SDLGPU) - target_compile_definitions(tic80studio PUBLIC CRT_SHADER_SUPPORT) + target_compile_definitions(tic80${SCRIPT} PRIVATE CRT_SHADER_SUPPORT) endif() if(MINGW)
refactor: dont rebuild sqlite3
@@ -15,7 +15,7 @@ file(GLOB ADAPTER_CODE "*.h" "*.c") file(GLOB SPECS_CODE "specs-code/*.h" "specs-code/*.c") file(GLOB MUJS_CODE "mujs/*.h" "mujs/*.c") -file(GLOB SQLITE3_CODE "sqlite3/*.h" "sqlite3/*.c") +#file(GLOB SQLITE3_CODE "sqlite3/*.h" "sqlite3/*.c") include_directories(${CMAKE_SOURCE_DIR}) include_directories(${CMAKE_SOURCE_DIR}/common) @@ -26,8 +26,7 @@ include_directories(${CMAKE_SOURCE_DIR}/specs-code) add_library(discord ${CORE_CODE} ${ADAPTER_CODE} ${SPECS_CODE}) add_library(mujs ${MUJS_CODE}) -add_library(sqlite3 ${SQLITE3_CODE}) - +#add_library(sqlite3 ${SQLITE3_CODE}) set(ORCA_INCLUDE_PATH ${CMAKE_SOURCE_DIR}) add_executable(bot-echo.exe bots/bot-echo.c)
Change the start position check on INCBIN Currently INCBIN gives an error if your start position == file size. This means you cannot include an empty file. It also means the text of the error message is incorrect (as the start is not greater, but equal to the length of the file)
@@ -774,7 +774,7 @@ void out_BinaryFile(char const *s, int32_t startPos) if (fseek(f, 0, SEEK_END) != -1) { fsize = ftell(f); - if (startPos >= fsize) { + if (startPos > fsize) { error("Specified start position is greater than length of file\n"); fclose(f); return; @@ -841,7 +841,7 @@ void out_BinaryFileSlice(char const *s, int32_t start_pos, int32_t length) if (fseek(f, 0, SEEK_END) != -1) { fsize = ftell(f); - if (start_pos >= fsize) { + if (start_pos > fsize) { error("Specified start position is greater than length of file\n"); return; }
dpdk: detect also
@@ -10,7 +10,7 @@ git submodule update --recursive patch -p 1 -d dpdk/ < ixgbe_18_11.patch -if lspci | grep -q 'ConnectX-5'; then +if lspci | grep -q 'ConnectX-[4,5]'; then patch -p 1 -d dpdk/ < mlx5_18_11.patch elif lspci | grep -q 'ConnectX-3'; then patch -p 1 -d dpdk/ < mlx4_18_11.patch
add ctrl+R shortcut in the Surf mode
@@ -1520,6 +1520,10 @@ static void processShortcuts() } else if(keyWasPressedOnce(tic_key_f7)) setCoverImage(); else if(keyWasPressedOnce(tic_key_f8)) takeScreenshot(); + else if(keyWasPressedOnce(tic_key_r)) + { + if(ctrl) runProject(); + } #if !defined(__EMSCRIPTEN__) else if(keyWasPressedOnce(tic_key_f9)) startVideoRecord(); #endif
changelog: added 2.3.1 changes
+2017-02-07 Franklin "Snaipe" Mathieu <[email protected]> + + * criterion: version 2.3.1 + * Fix: correctly handle malformed --debug parameter + * Fix: replaced the cryptic message when the debugger is not present with a more explicit one. + * Fix: cache section limits on report hooks for significantly better performance. + * Fix: don't report passing assertions by default for significantly better performance. + * Addition: added --full-stats CLI switch to report passing assertions for compatibility purposes. + + The full git changelog may be accessed with `git log v2.3.0-1..v2.3.1`. + 2016-12-07 Franklin "Snaipe" Mathieu <[email protected]> * criterion: version 2.3.0-1
libhfcommon: use #error comment
@@ -158,7 +158,7 @@ static int execCC(int argc, char** argv) { char* getIncPaths(void) { #if !defined(_HFUZZ_INC_PATH) #error \ - "You need to define _HFUZZ_INC_PATH to a directory containing directrory 'includes' with libhfcommon/libhfuzz/libhfnetdriver includes" + "You need to define _HFUZZ_INC_PATH to a directory with the directory called 'includes', containing honggfuzz's lib* includes. Typically it's be the build/sources dir" #endif static char path[PATH_MAX];
fixup: missing ,
@@ -181,7 +181,7 @@ def generate_elektra_builds_fast() { tasks << build_and_test( "debian-stable-fast", DOCKER_IMAGES.stretch, - CMAKE_FLAGS_BUILD_ALL + CMAKE_FLAGS_BUILD_ALL, [TEST_NOKDB] ) tasks << build_and_test(
Typo in SSL_CONF_CTX_set_flags.pod
=head1 NAME -SSL_CONF_CTX_set_flags, SSL_CONF_CTX_clear_flags - Set of clear SSL configuration context flags +SSL_CONF_CTX_set_flags, SSL_CONF_CTX_clear_flags - Set or clear SSL configuration context flags =head1 SYNOPSIS
Fixes bad multi-screen value behaviour
@@ -133,7 +133,13 @@ void ui_712_new_field(const void *const field_ptr, const uint8_t *const data, default: PRINTF("Unhandled type\n"); } - ux_flow_prev(); + + // not pretty, manually changes the internal state of the UX flow + // so that we always land on the first screen of a paging step without any visible + // screen glitching (quick screen switching) + G_ux.flow_stack[G_ux.stack_count - 1].index = 0; + // since the flow now thinks we are displaying the first step, do next + ux_flow_next(); } /**
Make HGetall and HKeys local only
@@ -753,6 +753,7 @@ redis_parse_req(struct msg *r) case 5: if (str5icmp(m, 'h', 'k', 'e', 'y', 's')) { r->type = MSG_REQ_REDIS_HKEYS; + r->msg_routing = ROUTING_LOCAL_NODE_ONLY; r->is_read = 1; break; } @@ -1015,6 +1016,7 @@ redis_parse_req(struct msg *r) if (str7icmp(m, 'h', 'g', 'e', 't', 'a', 'l', 'l')) { r->type = MSG_REQ_REDIS_HGETALL; + r->msg_routing = ROUTING_LOCAL_NODE_ONLY; r->is_read = 1; break; }
Use the frag_context variable only when SICSLOWPAN_CONF_FRAG is set.
@@ -1959,6 +1959,7 @@ input(void) int req_size = uncomp_hdr_len + (uint16_t)(frag_offset << 3) + packetbuf_payload_len; if(req_size > sizeof(uip_buf)) { +#if SICSLOWPAN_CONF_FRAG LOG_ERR( "input: packet and fragment context %u dropped, minimum required IP_BUF size: %d+%d+%d=%d (current size: %u)\n", frag_context, @@ -1967,6 +1968,7 @@ input(void) /* Discard all fragments for this contex, as reassembling this particular fragment would * cause an overflow in uipbuf */ clear_fragments(frag_context); +#endif /* SICSLOWPAN_CONF_FRAG */ return; } }
use relaxed load for last search position in an arena
@@ -103,9 +103,9 @@ static size_t mi_block_count_of_size(size_t size) { ----------------------------------------------------------- */ static bool mi_arena_alloc(mi_arena_t* arena, size_t blocks, mi_bitmap_index_t* bitmap_idx) { - size_t idx = mi_atomic_load_acquire(&arena->search_idx); // start from last search + size_t idx = mi_atomic_load_relaxed(&arena->search_idx); // start from last search; ok to be relaxed as the exact start does not matter if (_mi_bitmap_try_find_from_claim_across(arena->blocks_inuse, arena->field_count, idx, blocks, bitmap_idx)) { - mi_atomic_store_release(&arena->search_idx, idx); // start search from here next time + mi_atomic_store_relaxed(&arena->search_idx, idx); // start search from here next time return true; }; return false;
Fix make test scapy python patch issue,
@@ -23,6 +23,7 @@ $(PIP_INSTALL_DONE): $(PIP_PATCH_DONE): $(PIP_INSTALL_DONE) @echo --- patching --- + @sleep 1 # Ensure python recompiles patched *.py files -> *.pyc for f in $(CURDIR)/patches/scapy-2.3.3/*.patch ; do \ echo Applying patch: $$(basename $$f) ; \ patch -p1 -d $(SCAPY_SOURCE) < $$f ; \
decision: specify that mmapstorage frees data on kdbSet
@@ -194,7 +194,7 @@ ksRemoveByName (cowMeta, "meta:/type"); keyString(copiedKey); // Error! Original value has been deleted. Pointer to data in copiedKey points to potentially freed memory ``` - The same problems in principle exist for `mmapstorage`, however this is just a storage plugin and the user does not have any API to create COW keys themselves. + The same problems in principle exist for `mmapstorage` where `kdbSet` frees (`munmap`) the keyset. We can still let users access the flag `ELEKTRA_CP_COW`, we just need to clearly document what is forbidden. Maybe set the `KEY_FLAG_RO_VALUE` on the original key, so that the API itself detects the error. There is, however, no flag for `keyDel` that we could set.
Travis: Always consider exit status of `run_all` This commit fixes
@@ -163,7 +163,6 @@ script: # Unfortunately the Haskell tests do not work currently: # https://github.com/ElektraInitiative/libelektra/issues/1631 if [[ "$HASKELL" != "ON" ]]; then - ninja run_all - kdb run_all + ninja run_all && kdb run_all fi fi
Squashed 'opae-libs/' changes from 7552df61..7052a77c Move OPAE version back to 1.4.0. git-subtree-dir: opae-libs git-subtree-split:
@@ -29,7 +29,7 @@ project(opae-libs) set(OPAE_VERSION_MAJOR 1 CACHE STRING "OPAE major version" FORCE) set(OPAE_VERSION_MINOR 4 CACHE STRING "OPAE minor version" FORCE) -set(OPAE_VERSION_REVISION 1 CACHE STRING "OPAE revision version" FORCE) +set(OPAE_VERSION_REVISION 0 CACHE STRING "OPAE revision version" FORCE) set(OPAE_VERSION ${OPAE_VERSION_MAJOR}.${OPAE_VERSION_MINOR}.${OPAE_VERSION_REVISION} CACHE STRING "OPAE version" FORCE)
enclave-tls/dist: add the postun rules in the rpm spec
%global _missing_build_ids_terminate_build 0 %global PROJECT inclavare-containers +%global ENCLAVE_TLS_ROOTDIR /opt/enclave-tls +%global ENCLAVE_TLS_BINDIR /usr/share/enclave-tls/samples + Name: enclave-tls Version: 0.6.1 Release: %{centos_base_release}%{?dist} @@ -51,9 +54,12 @@ popd %install pushd %{name} -Enclave_Tls_Root=%{?buildroot}/opt/enclave-tls Enclave_Tls_Bindir=%{?buildroot}/usr/share/enclave-tls/samples make install +Enclave_Tls_Root=%{?buildroot}%{ENCLAVE_TLS_ROOTDIR} Enclave_Tls_Bindir=%{?buildroot}%{ENCLAVE_TLS_BINDIR} make install popd +%postun +rm -rf %{ENCLAVE_TLS_ROOTDIR} $(dirname %{ENCLAVE_TLS_BINDIR}) + %files -f %{SOURCE10} %changelog
util/usb_if.h: Format with clang-format BRANCH=none TEST=none
@@ -34,9 +34,8 @@ int usb_findit(const char *serialno, uint16_t vid, uint16_t pid, * pointer, if provided along with 'allow_less', lets the caller know how many * bytes were received. */ -int usb_trx(struct usb_endpoint *uep, void *outbuf, int outlen, - void *inbuf, int inlen, int allow_less, - size_t *rxed_count); +int usb_trx(struct usb_endpoint *uep, void *outbuf, int outlen, void *inbuf, + int inlen, int allow_less, size_t *rxed_count); /* * This function should be called for graceful tear down of the USB interface @@ -47,7 +46,7 @@ int usb_trx(struct usb_endpoint *uep, void *outbuf, int outlen, void usb_shut_down(struct usb_endpoint *uep); #define USB_ERROR(m, r) \ - fprintf(stderr, "%s:%d, %s returned %d (%s)\n", __FILE__, __LINE__, \ - m, r, libusb_strerror(r)) + fprintf(stderr, "%s:%d, %s returned %d (%s)\n", __FILE__, __LINE__, m, \ + r, libusb_strerror(r)) #endif /* ! __EC_EXTRA_USB_UPDATER_USB_IF_H */
Add cached GetDlgItem
@@ -314,28 +314,31 @@ INT_PTR CALLBACK PhSipMemoryDialogProc( { PPH_LAYOUT_ITEM graphItem; PPH_LAYOUT_ITEM panelItem; + HWND totalPhysicalLabel; PhSipInitializeMemoryDialog(); MemoryDialog = hwndDlg; + totalPhysicalLabel = GetDlgItem(hwndDlg, IDC_TOTALPHYSICAL); + PhInitializeLayoutManager(&MemoryLayoutManager, hwndDlg); - PhAddLayoutItem(&MemoryLayoutManager, GetDlgItem(hwndDlg, IDC_TOTALPHYSICAL), NULL, PH_ANCHOR_LEFT | PH_ANCHOR_TOP | PH_ANCHOR_RIGHT | PH_LAYOUT_FORCE_INVALIDATE); + PhAddLayoutItem(&MemoryLayoutManager, totalPhysicalLabel, NULL, PH_ANCHOR_LEFT | PH_ANCHOR_TOP | PH_ANCHOR_RIGHT | PH_LAYOUT_FORCE_INVALIDATE); graphItem = PhAddLayoutItem(&MemoryLayoutManager, GetDlgItem(hwndDlg, IDC_GRAPH_LAYOUT), NULL, PH_ANCHOR_ALL); panelItem = PhAddLayoutItem(&MemoryLayoutManager, GetDlgItem(hwndDlg, IDC_LAYOUT), NULL, PH_ANCHOR_LEFT | PH_ANCHOR_RIGHT | PH_ANCHOR_BOTTOM); MemoryGraphMargin = graphItem->Margin; SetWindowFont(GetDlgItem(hwndDlg, IDC_TITLE), MemorySection->Parameters->LargeFont, FALSE); - SetWindowFont(GetDlgItem(hwndDlg, IDC_TOTALPHYSICAL), MemorySection->Parameters->MediumFont, FALSE); + SetWindowFont(totalPhysicalLabel, MemorySection->Parameters->MediumFont, FALSE); if (PhSipGetMemoryLimits(&InstalledMemory, &ReservedMemory)) { - PhSetDialogItemText(hwndDlg, IDC_TOTALPHYSICAL, - PhaConcatStrings2(PhaFormatSize(InstalledMemory, ULONG_MAX)->Buffer, L" installed")->Buffer); + PhSetWindowText(totalPhysicalLabel, PhaConcatStrings2( + PhaFormatSize(InstalledMemory, ULONG_MAX)->Buffer, L" installed")->Buffer); } else { - PhSetDialogItemText(hwndDlg, IDC_TOTALPHYSICAL, - PhaConcatStrings2(PhaFormatSize(UInt32x32To64(PhSystemBasicInformation.NumberOfPhysicalPages, PAGE_SIZE), ULONG_MAX)->Buffer, L" total")->Buffer); + PhSetWindowText(totalPhysicalLabel, PhaConcatStrings2( + PhaFormatSize(UInt32x32To64(PhSystemBasicInformation.NumberOfPhysicalPages, PAGE_SIZE), ULONG_MAX)->Buffer, L" total")->Buffer); } MemoryPanel = CreateDialog(PhInstanceHandle, MAKEINTRESOURCE(IDD_SYSINFO_MEMPANEL), hwndDlg, PhSipMemoryPanelDialogProc);
io-libs/netcdf-cxx: bump to v4.3.1
@@ -21,7 +21,7 @@ Name: %{pname}-%{compiler_family}-%{mpi_family}%{PROJ_DELIM} Summary: C++ Libraries for the Unidata network Common Data Form License: NetCDF Group: %{PROJ_NAME}/io-libs -Version: 4.3.0 +Version: 4.3.1 Release: 1%{?dist} Url: http://www.unidata.ucar.edu/software/netcdf/ Source0: https://github.com/Unidata/netcdf-cxx4/archive/v%{version}.tar.gz
options/internal: Fix file_window mmap() path bug
@@ -19,7 +19,7 @@ struct file_window { #ifdef MLIBC_MAP_FILE_WINDOWS if(mlibc::sys_vm_map(nullptr, (size_t)info.st_size, PROT_READ, MAP_PRIVATE, - fd, 0, &global_tzinfo_buffer)) + fd, 0, &_ptr)) mlibc::panicLogger() << "mlibc: Error mapping TZinfo" << frg::endlog; #else _ptr = getAllocator().allocate(info.st_size);
gpu: macOS also tries linking to MoltenVK;
@@ -1837,6 +1837,7 @@ bool gpu_init(gpu_config* config) { PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr) GetProcAddress(state.library, "vkGetInstanceProcAddr"); #elif __APPLE__ state.library = dlopen("libvulkan.1.dylib", RTLD_NOW | RTLD_LOCAL); + if (!state.library) state.library = dlopen("libMoltenVK.dylib", RTLD_NOW | RTLD_LOCAL); CHECK(state.library, "Failed to load vulkan library") return gpu_destroy(), false; PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr = (PFN_vkGetInstanceProcAddr) dlsym(state.library, "vkGetInstanceProcAddr"); #else
VERSION bump to version 1.1.22
@@ -45,7 +45,7 @@ set(CMAKE_C_FLAGS_PACKAGE "-g -O2 -DNDEBUG") # micro version is changed with a set of small changes or bugfixes anywhere in the project. set(LIBNETCONF2_MAJOR_VERSION 1) set(LIBNETCONF2_MINOR_VERSION 1) -set(LIBNETCONF2_MICRO_VERSION 21) +set(LIBNETCONF2_MICRO_VERSION 22) set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION}) # Version of the library
Do not start TSCH EB sending process when the TSCH_EB_PERIOD is set to zero
@@ -1181,8 +1181,10 @@ turn_on(void) tsch_is_started = 1; /* Process tx/rx callback and log messages whenever polled */ process_start(&tsch_pending_events_process, NULL); + if(TSCH_EB_PERIOD > 0) { /* periodically send TSCH EBs */ process_start(&tsch_send_eb_process, NULL); + } /* try to associate to a network or start one if setup as coordinator */ process_start(&tsch_process, NULL); LOG_INFO("starting as %s\n", tsch_is_coordinator ? "coordinator": "node");
configfs: fix index out of bounds
@@ -101,8 +101,12 @@ uint64_t tcmu_cfgfs_dev_get_info_u64(struct tcmu_device *dev, const char *name, strerror(errno)); *fn_ret = -EINVAL; return 0; + } else if (ret == 0) { + tcmu_err("Invalid device info.\n"); + *fn_ret = -EINVAL; + return 0; } - buf[sizeof(buf)-1] = '\0'; /* paranoid? Ensure null terminated */ + buf[ret-1] = '\0'; /* paranoid? Ensure null terminated */ if (asprintf(&search_pattern, " %s: ", name) < 0) { tcmu_err("Could not create search string.\n"); @@ -186,6 +190,9 @@ char *tcmu_cfgfs_dev_get_wwn(struct tcmu_device *dev) tcmu_err("Could not read configfs to read unit serial: %s\n", strerror(errno)); return NULL; + } else if (ret == 0) { + tcmu_err("Invalid VPD serial number.\n"); + return NULL; } /* Kill the trailing '\n' */
Trivial: test_container.py First argument of a classmethod should be named 'cls'.
@@ -26,11 +26,11 @@ class ContainerIntegrationTestCase(VppTestCase): """ Container integration extended testcases """ @classmethod - def setUpClass(self): - super(ContainerIntegrationTestCase, self).setUpClass() + def setUpClass(cls): + super(ContainerIntegrationTestCase, cls).setUpClass() # create pg0 and pg1 - self.create_pg_interfaces(range(2)) - for i in self.pg_interfaces: + cls.create_pg_interfaces(range(2)) + for i in cls.pg_interfaces: i.admin_up() i.config_ip4() i.config_ip6()
make fpuPresent and mpuPresent optional
<!-- V1.1: Endian specifies the endianess of the processor/device --> <xs:element name="endian" type="endianType"/> <!-- V1.1: mpuPresent specifies whether or not a memory protection unit is physically present --> - <xs:element name="mpuPresent" type="xs:boolean"/> + <xs:element name="mpuPresent" type="xs:boolean" minOccurs="0"/> <!-- V1.1: fpuPresent specifies whether or not a floating point hardware unit is physically present --> - <xs:element name="fpuPresent" type="xs:boolean"/> + <xs:element name="fpuPresent" type="xs:boolean" minOccurs="0"/> <!-- V1.2: fpuDP specifies a double precision floating point hardware unit is physically present--> <xs:element name="fpuDP" type="xs:boolean" minOccurs="0"/> <!-- V1.2: icachePresent specifies that an instruction cache is physically present-->
tools: fix static code analysis overflow of the buffer Width is not specified for 's' conversion specifier. This can result in an overflow of the buffer provided in argument 3 of a call to 'fscanf'
@@ -173,7 +173,7 @@ STATIC fpga_result parse_perf_attributes(struct udev_device *dev, globfree(&pglob); return FPGA_EXCEPTION; } - if (fscanf(file, "%s", attr_value) != 1) { + if (fscanf(file, "%127s", attr_value) != 1) { OPAE_ERR("Failed to read %s", pglob.gl_pathv[i]); goto out; }
coap: Take ownership over the packet before calling reserveHeader.
@@ -968,6 +968,9 @@ void coap_sock_handler(sock_udp_t *sock, sock_async_flags_t type, void *arg) { return; } + // take ownership over the packet + msg->owner = COMPONENT_OPENCOAP; + if (packetfunctions_reserveHeader(&msg, COAP_MAX_MSG_LEN) == E_FAIL) { openserial_printf("Could not reserve header\n"); return;
Patch tinycthread to work with Visual Studio C11;
@@ -162,6 +162,8 @@ int _tthread_timespec_get(struct timespec *ts, int base); #endif #elif defined(__GNUC__) && defined(__GNUC_MINOR__) && (((__GNUC__ << 8) | __GNUC_MINOR__) < ((4 << 8) | 9)) #define _Thread_local __thread +#elif defined(_MSC_VER) && (!defined(STDC_NO_THREADS) || defined(STDC_NO_THREADS) && STDC_NO_THREADS == 1) + #define _Thread_local __declspec(thread) #endif /* Macros */
added configUSE_TICKLESS_IDLE
* See http://www.freertos.org/a00110.html *----------------------------------------------------------*/ +#define configUSE_TICKLESS_IDLE 0 #define configUSE_PREEMPTION 1 #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 1
[fix] Bad bash syntax in github action
@@ -38,6 +38,7 @@ runs: using: 'composite' steps: - name: Commit the changes + id: commit run: | git config --global user.name ${{ inputs.name }} ORIGIN="$(pwd)" @@ -48,17 +49,20 @@ runs: if [ -z "${CHANGES}" ]; \ then \ echo "No changes, stopping now"; \ - cd ${origin} \ + echo "::save-state name=COMMIT::NO"; \ + cd "${ORIGIN}"; \ exit 0; \ fi echo -e "Changes:\n${CHANGES}" git add ${{ inputs.files }} git commit -am "${{ inputs.message }}" + echo "::save-state name=COMMIT::YES" git log -n 2 - cd ${ORIGIN} + cd "${ORIGIN}" shell: bash - name: Push commit + if: ${{ steps.commit.state.COMMIT == 'YES' }} uses: ad-m/github-push-action@master with: github_token: ${{ inputs.secret }}
Call stream_close before removing stream from map
@@ -12232,15 +12232,15 @@ int ngtcp2_conn_is_in_draining_period(ngtcp2_conn *conn) { int ngtcp2_conn_close_stream(ngtcp2_conn *conn, ngtcp2_strm *strm) { int rv; - rv = ngtcp2_map_remove(&conn->strms, (ngtcp2_map_key_type)strm->stream_id); + rv = conn_call_stream_close(conn, strm); if (rv != 0) { - assert(rv != NGTCP2_ERR_INVALID_ARGUMENT); return rv; } - rv = conn_call_stream_close(conn, strm); + rv = ngtcp2_map_remove(&conn->strms, (ngtcp2_map_key_type)strm->stream_id); if (rv != 0) { - goto fin; + assert(rv != NGTCP2_ERR_INVALID_ARGUMENT); + return rv; } if (ngtcp2_strm_is_tx_queued(strm)) { @@ -12251,11 +12251,7 @@ int ngtcp2_conn_close_stream(ngtcp2_conn *conn, ngtcp2_strm *strm) { } } -fin: - ngtcp2_strm_free(strm); - ngtcp2_objalloc_strm_release(&conn->strm_objalloc, strm); - - return rv; + return 0; } int ngtcp2_conn_close_stream_if_shut_rdwr(ngtcp2_conn *conn,
file_optical: remove unused mutex Forgot to remove completion mutex when file_optical was converted to runner's threading.
@@ -78,7 +78,6 @@ struct fbo_state { uint8_t event_op_ch_code; uint8_t async_cache_count; pthread_mutex_t state_mtx; - pthread_mutex_t completion_mtx; int curr_handler; }; @@ -231,7 +230,6 @@ static int fbo_open(struct tcmu_device *dev) tcmu_dbg("FBO Open: fd %d\n", state->fd); pthread_mutex_init(&state->state_mtx, NULL); - pthread_mutex_init(&state->completion_mtx, NULL); /* Record that we've changed our Operational state */ fbo_report_op_change(dev, 0x02);
quic: add -v and -s to filter response headers
@@ -710,6 +710,9 @@ def handle_quic_event(cpu, data, size): if allowed_quic_event and ev.type != allowed_quic_event: return + if allowed_res_header_name and ev.type == "send_response_header" and ev.h2o_header_name != allowed_res_header_name: + return + res = OrderedDict() load_common_fields(res, ev) @@ -767,9 +770,12 @@ def handle_quic_event(cpu, data, size): print(json.dumps(res, separators = (',', ':'))) def usage(): - print ("USAGE: h2olog -p PID") - print (" h2olog quic -p PID") - print (" h2olog quic -t event_type -p PID") + print(""" +USAGE: h2olog -p PID + h2olog quic -p PID + h2olog quic -t event_type -p PID + h2olog quic -v -s response_header_name -p PID +""".strip()) exit() def trace_http(): @@ -802,12 +808,19 @@ if len(sys.argv) > 1 and sys.argv[1] == "quic": try: h2o_pid = 0 allowed_quic_event = None - opts, args = getopt.getopt(sys.argv[optidx:], 'p:t:') + allowed_res_header_name = None + verbose = False + opts, args = getopt.getopt(sys.argv[optidx:], 'vp:t:s:') for opt, arg in opts: if opt == "-p": h2o_pid = arg - if opt == "-t": + elif opt == "-t": allowed_quic_event = arg + elif opt == "-v": + verbose = True + elif opt == "-s": # reSponse + allowed_res_header_name = arg.lower() + except getopt.error as msg: print(msg) sys.exit(2) @@ -844,6 +857,7 @@ if sys.argv[1] == "quic": u.enable_probe(probe="quictrace_recv", fn_name="trace_quictrace_recv") u.enable_probe(probe="quictrace_recv_ack_delay", fn_name="trace_quictrace_recv_ack_delay") u.enable_probe(probe="quictrace_lost", fn_name="trace_quictrace_lost") + if verbose: u.enable_probe(probe="send_response_header", fn_name="trace_send_response_header") b = BPF(text=quic_bpf, usdt_contexts=[u]) else:
test: fix typo in comment in threadstest.c
@@ -366,7 +366,7 @@ static void thread_provider_load_unload(void) * Test 2: Simple fetch worker * Test 3: Worker downgrading a shared EVP_PKEY * Test 4: Worker using a shared EVP_PKEY - * Test 5: Workder loading and unloading a provider + * Test 5: Worker loading and unloading a provider */ static int test_multi(int idx) {
rbd: fix llu vs PRIu64 use for len/off Should be using PRIu64 for off/len because they are uint64_t.
@@ -1367,7 +1367,8 @@ static int tcmu_rbd_aio_caw(struct tcmu_device *dev, struct tcmulib_cmd *cmd, goto out_free_bounce_buffer; } - tcmu_dev_dbg(dev, "Start CAW off:%llu, len:%llu\n", off, len); + tcmu_dev_dbg(dev, "Start CAW off: %"PRIu64", len: %"PRIu64"\n", + off, len); ret = rbd_aio_compare_and_write(state->image, off, len, aio_cb->bounce_buffer, aio_cb->bounce_buffer + len, completion,
nimble/host: Start extended scan if possible While enabling scan for mesh, appropriate scan type should be use.
@@ -369,6 +369,16 @@ done: int bt_mesh_scan_enable(void) { +#if MYNEWT_VAL(BLE_EXT_ADV) + struct ble_gap_ext_disc_params uncoded_params = + { .itvl = MESH_SCAN_INTERVAL, .window = MESH_SCAN_WINDOW, + .passive = 1 }; + + BT_DBG(""); + + return ble_gap_ext_disc(g_mesh_addr_type, 0, 0, 0, 0, 0, + &uncoded_params, NULL, NULL, NULL); +#else struct ble_gap_disc_params scan_param = { .passive = 1, .filter_duplicates = 0, .itvl = MESH_SCAN_INTERVAL, .window = MESH_SCAN_WINDOW }; @@ -376,6 +386,7 @@ int bt_mesh_scan_enable(void) BT_DBG(""); return ble_gap_disc(g_mesh_addr_type, BLE_HS_FOREVER, &scan_param, NULL, NULL); +#endif } int bt_mesh_scan_disable(void)
Re-enable combined fw image for factory programming.
@@ -630,6 +630,10 @@ endif # This target generates the uvc, bootloader and firmware images. $(OPENMV): $(BOOTLOADER) $(UVC) $(CM4) $(FIRMWARE) ifeq ($(OMV_ENABLE_BL), 1) + # Generate a contiguous firmware image for factory programming + $(OBJCOPY) -Obinary --pad-to=$(MAIN_APP_ADDR) --gap-fill=0xFF $(FW_DIR)/$(BOOTLOADER).elf $(FW_DIR)/$(BOOTLOADER)_padded.bin + $(CAT) $(FW_DIR)/$(BOOTLOADER)_padded.bin $(FW_DIR)/$(FIRMWARE).bin > $(FW_DIR)/$(OPENMV).bin + $(RM) $(FW_DIR)/$(BOOTLOADER)_padded.bin $(SIZE) $(FW_DIR)/$(BOOTLOADER).elf endif $(SIZE) $(FW_DIR)/$(FIRMWARE).elf
Fix count variable calculation in typedarray copyWithin Fixes JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi
@@ -1873,16 +1873,16 @@ ecma_builtin_typedarray_prototype_copy_within (ecma_value_t this_arg, /**< this } } - int32_t distance = (int32_t) (end - start); - int32_t offset = (int32_t) (info.typedarray_length - target); - int32_t count = JERRY_MIN (distance, offset); - if (target >= info.typedarray_length || start >= end || end == 0) { return ecma_copy_value (this_arg); } else { + uint32_t distance = end - start; + uint32_t offset = info.typedarray_length - target; + uint32_t count = JERRY_MIN (distance, offset); + memmove (info.buffer_p + (target * info.element_size), info.buffer_p + (start * info.element_size), (size_t) (count * info.element_size));
Implement UPDATE_MARK_UPDATE_ANIMATION.
@@ -21427,7 +21427,7 @@ void update_animation() if(self->animating) { //self->nextanim = _time + (self->animation->delay[f]); - self->update_mark |= 1; // frame updated, mark it + self->update_mark |= UPDATE_MARK_UPDATE_ANIMATION; // frame updated, mark it // just switch frame to f, if frozen, expand_time will deal with it well update_frame(self, f); }
Add message on successful save
@@ -1460,10 +1460,13 @@ void app_input_cmd(App_state* a, App_input_cmd ev) { } bool app_hacky_try_save(App_state* a) { - if (!a->filename) return false; - if (a->field.height == 0 || a->field.width == 0) return false; + if (!a->filename) + return false; + if (a->field.height == 0 || a->field.width == 0) + return false; FILE* f = fopen(a->filename, "w"); - if (!f) return false; + if (!f) + return false; field_fput(&a->field, f); fclose(f); return true; @@ -1849,9 +1852,35 @@ int main(int argc, char** argv) { app_input_character(&app_state, '.'); break; - case KEY_F(2): - app_hacky_try_save(&app_state); + case KEY_F(2): { + if (app_state.is_playing) { + app_input_cmd(&app_state, App_input_cmd_toggle_play_pause); + } + bool ok = app_hacky_try_save(&app_state); + werase(stdscr); + notimeout(stdscr, FALSE); + wmove(stdscr, 0, 0); + if (ok) { + wprintw(stdscr, "Saved file %s\nPress any key to continue\n", + app_state.filename); + } else { + wprintw(stdscr, "FAILED to save %s\nPress any key to continue\n", + app_state.filename); + } + bool did_resize = false; + for (;;) { + int key0 = wgetch(stdscr); + if (key0 == KEY_RESIZE) + did_resize = true; + if (key0 != KEY_RESIZE && key0 != ERR) break; + } + werase(stdscr); + app_state.is_draw_dirty = true; + if (did_resize) + ungetch(KEY_RESIZE); + wtimeout(stdscr, cur_timeout); + } break; default: if (key >= CHAR_MIN && key <= CHAR_MAX && is_valid_glyph((Glyph)key)) {
Fix 80 characters indentation in rsa_verify_wrap()
@@ -178,7 +178,8 @@ static int rsa_verify_wrap( void *ctx, mbedtls_md_type_t md_alg, int key_len; unsigned char buf[MBEDTLS_PK_RSA_PUB_DER_MAX_BYTES]; mbedtls_pk_info_t pk_info = mbedtls_rsa_info; - psa_algorithm_t psa_alg_md = PSA_ALG_RSA_PKCS1V15_SIGN( mbedtls_psa_translate_md( md_alg ) ); + psa_algorithm_t psa_alg_md = + PSA_ALG_RSA_PKCS1V15_SIGN( mbedtls_psa_translate_md( md_alg ) ); size_t rsa_len = mbedtls_rsa_get_len( rsa ); #if SIZE_MAX > UINT_MAX
Images path fix
@@ -2,10 +2,11 @@ import subprocess import pysurvive import sys +import os from gooey import Gooey, GooeyParser @Gooey(tabbed_groups=True, - image_dir="images", + image_dir=os.path.dirname(os.path.realpath(__file__)) + "/images", use_cmd_args=True, program_name="pysurvive", richtext_controls=True,
libcupsfilters: Silenced warning in rastertopdf() filter function
@@ -1178,18 +1178,16 @@ void pdf_set_line(struct pdf_info * info, unsigned line_n, unsigned char *line, return; } - switch(info->outformat) - { - case OUTPUT_FORMAT_PDF: - memcpy((info->page_data->getBuffer()+(line_n*info->line_bytes)), line, info->line_bytes); - break; - case OUTPUT_FORMAT_PCLM: + if (info->outformat == OUTPUT_FORMAT_PCLM) { // copy line data into appropriate pclm strip size_t strip_num = line_n / info->pclm_strip_height_preferred; - unsigned line_strip = line_n - strip_num*info->pclm_strip_height_preferred; - memcpy(((info->pclm_strip_data[strip_num])->getBuffer() + (line_strip*info->line_bytes)), + unsigned line_strip = line_n - + strip_num * info->pclm_strip_height_preferred; + memcpy(((info->pclm_strip_data[strip_num])->getBuffer() + + (line_strip*info->line_bytes)), line, info->line_bytes); + } else { + memcpy((info->page_data->getBuffer() + (line_n * info->line_bytes)), line, info->line_bytes); - break; } }
Fix OP_SETGV in output_code
@@ -2456,7 +2456,7 @@ void output_opcode( uint8_t opcode ) "LOADI_6", "LOADI_7", "LOADSYM", "LOADNIL", // 0x10 "LOADSELF","LOADT", "LOADF", "GETGV", - 0, 0, 0, "GETIV", + "SETGV", 0, 0, "GETIV", "SETIV", 0, 0, "GETCONST", "SETCONST",0, 0, "GETUPVAR", // 0x20
targets: zephyr: Follow Zephyr 1.7-pre on console refactors. JerryScript-DCO-1.0-Signed-off-by: Paul Sokolovsky
#include <zephyr.h> #include <uart.h> +#include <drivers/console/console.h> #include <drivers/console/uart_console.h> #include "getline-zephyr.h" /* While app processes one input line, Zephyr will have another line buffer to accumulate more console input. */ -static struct uart_console_input line_bufs[2]; +static struct console_input line_bufs[2]; static struct k_fifo free_queue; static struct k_fifo used_queue; char *zephyr_getline(void) { - static struct uart_console_input *cmd; + static struct console_input *cmd; /* Recycle cmd buffer returned previous time */ if (cmd != NULL)
feat(venachain):Modify demo main Makefile to adapt demo_venachain
# Generate sub-directory list OBJECTS_DIR = $(BOAT_BUILD_DIR)/demo -.PHONY: all demo_ethereum demo_platon demo_platone demo_fiscobcos demo_fabric demo_hw_bcs demo_chainmaker -all: $(OBJECTS_DIR) demo_ethereum demo_platon demo_platone demo_fiscobcos demo_fabric demo_hw_bcs demo_chainmaker +.PHONY: all demo_ethereum demo_platon demo_platone demo_fiscobcos demo_fabric demo_hw_bcs demo_chainmaker demo_venachain +all: $(OBJECTS_DIR) demo_ethereum demo_platon demo_platone demo_fiscobcos demo_fabric demo_hw_bcs demo_chainmaker demo_venachain demo_ethereum: ifeq ($(BOAT_PROTOCOL_USE_ETHEREUM), 1) @@ -41,6 +41,11 @@ ifeq ($(BOAT_PROTOCOL_USE_CHAINMAKER), 1) make -C $(BOAT_BASE_DIR)/demo/demo_chainmaker all endif +demo_venachain: +ifeq ($(BOAT_PROTOCOL_USE_VENACHAIN), 1) + make -C $(BOAT_BASE_DIR)/demo/demo_venachain all +endif + $(OBJECTS_DIR): $(BOAT_MKDIR) -p $(OBJECTS_DIR) @@ -52,4 +57,5 @@ clean: make -C $(BOAT_BASE_DIR)/demo/demo_fabric clean make -C $(BOAT_BASE_DIR)/demo/demo_hw_bcs clean make -C $(BOAT_BASE_DIR)/demo/demo_chainmaker clean + make -C $(BOAT_BASE_DIR)/demo/demo_venachain clean -$(BOAT_RM) $(BOAT_BUILD_DIR)/demo
plugins type BUGFIX use after free
@@ -2166,7 +2166,7 @@ ly_type_store_union(const struct ly_ctx *ctx, const struct lysc_type *type, cons /* store format-specific data for later prefix resolution */ subvalue->format = format; - subvalue->prefix_data = ly_type_union_store_prefix_data(ctx, value, value_len, format, prefix_data); + subvalue->prefix_data = ly_type_union_store_prefix_data(ctx, subvalue->original, value_len, format, prefix_data); subvalue->hints = hints; subvalue->ctx_node = ctx_node;
use absolute view geometry to calculate position
@@ -346,23 +346,23 @@ swayc_t *new_floating_view(wlc_handle handle) { view->sticky = false; // Set the geometry of the floating view - struct wlc_geometry geometry; - wlc_view_get_visible_geometry(handle, &geometry); + const struct wlc_geometry *geometry = wlc_view_get_geometry(handle); // give it requested geometry, but place in center if possible // in top left otherwise - if (geometry.size.w != 0) { - view->x = (swayc_active_workspace()->width - geometry.size.w) / 2; + if (geometry->size.w != 0) { + view->x = (swayc_active_workspace()->width - geometry->size.w) / 2; } else { view->x = 0; } - if (geometry.size.h != 0) { - view->y = (swayc_active_workspace()->height - geometry.size.h) / 2; + if (geometry->size.h != 0) { + view->y = (swayc_active_workspace()->height - geometry->size.h) / 2; } else { view->y = 0; } - view->width = geometry.size.w; - view->height = geometry.size.h; + + view->width = geometry->size.w; + view->height = geometry->size.h; view->desired_width = view->width; view->desired_height = view->height;
system/uorb: simply orb_check by SNIOC_UPDATED
#include <errno.h> #include <fcntl.h> #include <limits.h> -#include <poll.h> #include <stdio.h> #include <sys/ioctl.h> #include <unistd.h> @@ -228,20 +227,7 @@ int orb_get_state(int fd, FAR struct orb_state *state) int orb_check(int fd, FAR bool *updated) { - struct pollfd fds[1]; - int ret; - - fds[0].fd = fd; - fds[0].events = POLLIN; - - ret = poll(fds, 1, 0); - if (ret < 0) - { - return -1; - } - - *updated = (fds[0].revents & POLLIN) > 0; - return 0; + return ioctl(fd, SNIOC_UPDATED, (unsigned long)(uintptr_t)updated); } int orb_ioctl(int fd, int cmd, unsigned long arg)
POWER10: Use POWER9 as a fallback If the toolchain is too old, or the mma features isn't set on a POWER10 fall back to the POWER9 loops.
@@ -52,6 +52,9 @@ static gotoblas_t *get_coretype(void) { if (__builtin_cpu_supports ("arch_3_1") && __builtin_cpu_supports ("mma")) return &gotoblas_POWER10; #endif + /* Fall back to the POWER9 implementation if the toolchain is too old or the MMA feature is not set */ + if (__builtin_cpu_is("power10")) + return &gotoblas_POWER9; return NULL; }
Use bool return type
@@ -217,7 +217,7 @@ static bool try_quantize_rgb_blue_contract( * * @return Returns @c false on failure, @c true on success. */ -static int try_quantize_rgba_blue_contract( +static bool try_quantize_rgba_blue_contract( vfloat4 color0, vfloat4 color1, uint8_t output[8],
spiffs: restore dependency of flash targets on spiffs images Closes
@@ -47,14 +47,16 @@ function(spiffs_create_partition_image partition base_dir) ADDITIONAL_MAKE_CLEAN_FILES ${image_file}) - idf_component_get_property(main_args esptool_py FLASH_ARGS) idf_component_get_property(sub_args esptool_py FLASH_SUB_ARGS) esptool_py_flash_target(${partition}-flash "${main_args}" "${sub_args}") esptool_py_flash_target_image(${partition}-flash "${partition}" "${offset}" "${image_file}") + add_dependencies(${partition}-flash spiffs_${partition}_bin) + if(arg_FLASH_IN_PROJECT) esptool_py_flash_target_image(flash "${partition}" "${offset}" "${image_file}") + add_dependencies(flash spiffs_${partition}_bin) endif() else() set(message "Failed to create SPIFFS image for partition '${partition}'. "
{AH} add __all__ statement
@@ -823,3 +823,11 @@ cdef class VCFProxy(NamedTupleProxy): idx, f = self.map_key2field[key] TupleProxy._setindex(self, idx, str(value)) + +__all__ = [ + "TupleProxy", + "NamedTupleProxy", + "GTFProxy", + "GFF3Proxy", + "BedProxy", + "VCFProxy"]
app/mediarecorder : change logic of mediarecorder error handling Modify to check whether the return value is error Modify the 'isPlaying' update logic that it is updated in started or finished callback
@@ -83,6 +83,7 @@ public: void onPlaybackStarted(MediaPlayerObserverInterface::Id id) { std::cout << "onPlaybackStarted" << std::endl; + isPlaying = true; } void onPlaybackFinished(MediaPlayerObserverInterface::Id id) @@ -234,28 +235,27 @@ public: return; } - mp.setObserver(shared_from_this()); - mp.setDataSource(std::move(source)); + if (mp.setObserver(shared_from_this()) == PLAYER_ERROR) { + std::cout << "Mediaplayer::setObserver failed" << std::endl; + return; + } - if (mp.prepare() == PLAYER_OK) { - isPlaying = true; - if (mp.start() == PLAYER_OK) { - // playback started + if (mp.setDataSource(std::move(source)) == PLAYER_ERROR) { + std::cout << "Mediaplayer::setDataSource failed" << std::endl; return; } - std::cout << "Mediaplayer::start failed" << std::endl; - isPlaying = false; + if (mp.prepare() == PLAYER_ERROR) { + std::cout << "Mediaplayer::prepare failed" << std::endl; + return; + } + if (mp.start() == PLAYER_ERROR) { + std::cout << "Mediaplayer::start failed" << std::endl; if (mp.unprepare() == PLAYER_ERROR) { std::cout << "Mediaplayer::unprepare failed" << std::endl; } - } else { - std::cout << "Mediaplayer::prepare failed" << std::endl; - } - - if (mp.destroy() == PLAYER_ERROR) { - std::cout << "Mediaplayer::destroy failed" << std::endl; + return; } }
pg: add support for ip mode through cli Type: improvement
@@ -689,6 +689,7 @@ create_pg_if_cmd_fn (vlib_main_t * vm, unformat_input_t _line_input, *line_input = &_line_input; u32 if_id, gso_enabled = 0, gso_size = 0, coalesce_enabled = 0; clib_error_t *error = NULL; + pg_interface_mode_t mode = PG_MODE_ETHERNET; if (!unformat_user (input, unformat_line_input, line_input)) return 0; @@ -710,6 +711,10 @@ create_pg_if_cmd_fn (vlib_main_t * vm, goto done; } } + else if (unformat (line_input, "mode ip4")) + mode = PG_MODE_IP4; + else if (unformat (line_input, "mode ip6")) + mode = PG_MODE_IP6; else { error = clib_error_create ("unknown input `%U'", @@ -719,7 +724,7 @@ create_pg_if_cmd_fn (vlib_main_t * vm, } pg_interface_add_or_get (pg, if_id, gso_enabled, gso_size, coalesce_enabled, - PG_MODE_ETHERNET); + mode); done: unformat_free (line_input); @@ -731,7 +736,8 @@ done: VLIB_CLI_COMMAND (create_pg_if_cmd, static) = { .path = "create packet-generator", .short_help = "create packet-generator interface <interface name>" - " [gso-enabled gso-size <size> [coalesce-enabled]]", + " [gso-enabled gso-size <size> [coalesce-enabled]]" + " [mode <ethernet | ip4 | ip6>]", .function = create_pg_if_cmd_fn, }; /* *INDENT-ON* */
Override Intel build status
@@ -48,5 +48,7 @@ try{ GLOBAL_ERROR = e throw e } finally { - currentBuild.result = (GLOBAL_ERROR != null) ? 'FAILURE' : "SUCCESS" + // As builds are failing out of our control, unblock E2E builds by overriding build result to success + // currentBuild.result = (GLOBAL_ERROR != null) ? 'FAILURE' : "SUCCESS" + currentBuild.result = 'SUCCESS' }
Added support for converting 16 bits-per-component UIImages
@@ -62,7 +62,7 @@ namespace carto { CGColorSpaceGetColorTable(colorSpace, colorTable.data()); } - if (bytesPerComponent != 1) { + if (bytesPerComponent != 1 && bytesPerComponent != 2) { Log::Errorf("BitmapUtils::CreateBitmapFromUImage: Failed to create Bitmap, unsupported bytes per component parameter: %u", bytesPerComponent); return std::shared_ptr<Bitmap>(); } @@ -70,7 +70,7 @@ namespace carto { const unsigned int* rgbaRemap = RGBA_REMAP; ColorFormat::ColorFormat colorFormat = ColorFormat::COLOR_FORMAT_RGBA; bool premultiplyAlpha = false; - switch (bytesPerPixel) { + switch (bytesPerPixel / bytesPerComponent) { case 4: switch(info & kCGBitmapAlphaInfoMask) { case kCGImageAlphaPremultipliedFirst: @@ -116,6 +116,19 @@ namespace carto { CFDataRef data = CGDataProviderCopyData(provider); const unsigned char* bytes = CFDataGetBytePtr(data); + // Convert data to 8 bit per component, if 16 bit per component + std::vector<unsigned char> bytes8Bit; + if (bytesPerComponent == 2) { + bytes8Bit.resize(width * height * bytesPerPixel / 2); + for (std::size_t i = 0; i < width * height * bytesPerPixel / 2; i++) { + bytes8Bit[i] = static_cast<unsigned char>(*reinterpret_cast<const unsigned short*>(&bytes[i * 2]) >> 8); + } + bytes = bytes8Bit.data(); + bytesPerComponent /= 2; + bytesPerRow /= 2; + bytesPerPixel /= 2; + } + std::shared_ptr<Bitmap> bitmap; if (!premultiplyAlpha && rgbaRemap == RGBA_REMAP) { bitmap = std::make_shared<Bitmap>(bytes, width, height, colorFormat, bytesPerRow);
multi-page tables for manifest
+%\newcommand{\firstColWidth}{2.3cm} +%\newcommand{\secondColWidth}{1.25cm} + \input{common/manifest_intro} -\newcommand{\firstColWidth}{4.9cm} +\newcommand{\firstColWidth}{4.95cm} \newcommand{\secondColWidth}{1.25cm} \vspace*{1.0cm} \vspace*{\tabSpaceBot{}} \end{table} +\renewcommand{\firstColWidth}{4.1cm} +\renewcommand{\secondColWidth}{1.8cm} + % Resource Management \begin{table}[h!] \caption{\bf Resource Management} \vspace*{\captionSpace{}} \label{table:rms} \vspace*{\tabSpaceBot{}} \end{table} - +\renewcommand{\firstColWidth}{4.9cm} % Development Tools \begin{table}[h!] \renewcommand{\firstColWidth}{4.2cm} \renewcommand{\secondColWidth}{1.92cm} -% Perf Tools +% Perf Tools (1) \begin{table}[h!] \caption{\bf Performance Analysis Tools} \vspace*{\captionSpace{}} \label{table:perf-tools} \input manifest/perf-tools \vspace*{\tabSpaceBot{}} \end{table} +% Perf Tools (2) +\begin{table}[h!] +\caption*{Table~\ref{table:perf-tools} (cont): {\bf Performance Analyis Tools} \vspace*{\captionSpace{}} } +%\caption*{\bf Performance Analysis Tools (cont)} \vspace*{\captionSpace{}} +\input manifest/perf-tools2 +\vspace*{\tabSpaceBot{}} +\end{table} + % Distro Packages \begin{table}[h!] \caption{\bf Distro Support Packages/Dependencies} \vspace*{\captionSpace{}} \label{table:distro-packages} \vspace*{\tabSpaceBot{}} \end{table} -% IO Libs +% IO Libs (1) \begin{table}[h!] \caption{\bf IO Libraries} \vspace*{\captionSpace{}} \label{table:io-libs} \input manifest/io-libs \vspace*{\tabSpaceBot{}} \end{table} +% IO Libs (2) +\begin{table}[h!] +\caption*{Table~\ref{table:io-libs} (cont): {\bf IO Libraries} \vspace*{\captionSpace{}} } +%\caption{\bf IO Libraries} \vspace*{\captionSpace{}} \label{table:io-libs} +\input manifest/io-libs2 +\vspace*{\tabSpaceBot{}} +\end{table} + %\renewcommand{\firstColWidth}{4.5cm} %\renewcommand{\secondColWidth}{1.5cm} \vspace*{\tabSpaceBot{}} \end{table} -% Parallel libs +% Parallel libs (1) \begin{table}[h!] \caption{\bf Parallel Libraries} \vspace*{\captionSpace{}} \label{table:parallel-libs} \input manifest/parallel-libs \vspace*{\tabSpaceBot{}} \end{table} +% Parallel libs (2) +\begin{table}[h!] +\caption*{Table~\ref{table:parallel-libs} (cont): {\bf Parallel Libraries} \vspace*{\captionSpace{}} } +\input manifest/parallel-libs2 +\vspace*{\tabSpaceBot{}} +\end{table} +
Fix up line length.
@@ -82,10 +82,14 @@ namespace ARIASDK_NS_BEGIN { throw std::invalid_argument("nullptr passed for viewer name"); } - return m_dataViewerCollection.end() != std::find_if(m_dataViewerCollection.begin(), m_dataViewerCollection.end(), [&viewerName](std::shared_ptr<IDataViewer> viewer) + auto lookupResult = std::find_if(m_dataViewerCollection.begin(), + m_dataViewerCollection.end(), + [&viewerName](std::shared_ptr<IDataViewer> viewer) { return strcmp(viewer->GetName(), viewerName) == 0; }); + + return lookupResult != m_dataViewerCollection.end(); } bool DataViewerCollection::IsViewerEnabled() const noexcept
TCPMv2: pe_send_soft_reset_run should use pe_sender_response_run BRANCH=none TEST=run through new attach to get soft reset condition Tested-by: Denis Brockus
@@ -3655,6 +3655,12 @@ static void pe_send_soft_reset_entry(int port) prl_reset_soft(port); pe_sender_response_msg_entry(port); + + /* + * Mark the temporary timer PE_TIMER_TIMEOUT as expired to limit + * to sending a single SoftReset message. + */ + pd_timer_enable(port, PE_TIMER_TIMEOUT, 0); } static void pe_send_soft_reset_run(int port) @@ -3662,18 +3668,20 @@ static void pe_send_soft_reset_run(int port) int type; int cnt; int ext; + enum pe_msg_check msg_check; /* Wait until protocol layer is running */ if (!prl_is_running(port)) return; /* - * TODO(b:181337870) This should be using pe_sender_response_msg_run - * to make sure PE_TIMER_SENDER_RESPONSE does not start until the - * message is actually sent and probably a good idea to not get lost - * if we hit a discard + * Protocol layer is running, so need to send a single SoftReset. + * Use temporary timer to act as a flag to keep this as a single + * message send. */ - if (pd_timer_is_disabled(port, PE_TIMER_SENDER_RESPONSE)) { + if (!pd_timer_is_disabled(port, PE_TIMER_TIMEOUT)) { + pd_timer_disable(port, PE_TIMER_TIMEOUT); + /* * TODO(b/150614211): Soft reset type should match * unexpected incoming message type @@ -3682,9 +3690,20 @@ static void pe_send_soft_reset_run(int port) send_ctrl_msg(port, pe[port].soft_reset_sop, PD_CTRL_SOFT_RESET); - /* Initialize and run SenderResponseTimer */ - pd_timer_enable(port, PE_TIMER_SENDER_RESPONSE, - PD_T_SENDER_RESPONSE); + return; + } + + /* + * Check the state of the message sent + */ + msg_check = pe_sender_response_msg_run(port); + + /* + * Handle discarded message + */ + if (msg_check == PE_MSG_DISCARDED) { + pe_set_ready_state(port); + return; } /* @@ -3692,7 +3711,8 @@ static void pe_send_soft_reset_run(int port) * PE_SRC_Send_Capabilities state when: * 1) An Accept Message has been received. */ - if (PE_CHK_FLAG(port, PE_FLAGS_MSG_RECEIVED)) { + if (msg_check == PE_MSG_SENT && + PE_CHK_FLAG(port, PE_FLAGS_MSG_RECEIVED)) { PE_CLR_FLAG(port, PE_FLAGS_MSG_RECEIVED); type = PD_HEADER_TYPE(rx_emsg[port].header); @@ -3724,12 +3744,12 @@ static void pe_send_soft_reset_run(int port) set_state_pe(port, PE_SRC_HARD_RESET); return; } - } static void pe_send_soft_reset_exit(int port) { pe_sender_response_msg_exit(port); + pd_timer_disable(port, PE_TIMER_TIMEOUT); } /**
Remove fprintf() in tests It was committed by mistake.
@@ -91,7 +91,6 @@ static void test_adb_devices_daemon_start_mixed() { struct sc_adb_device *device = &devices[0]; assert(!strcmp("0123456789abcdef", device->serial)); assert(!strcmp("unauthorized", device->state)); - fprintf(stderr, "==== [%s]\n", device->model); assert(!device->model); device = &devices[1];
printer tree MAINTENANCE priv pointer abstraction
@@ -695,8 +695,20 @@ struct trt_tree_ctx { const struct lysc_node *cn; /**< Actual pointer to compiled node. */ }; +/** + * @brief Check if lysp node is available from + * the current compiled node. + * + * Use only if trt_tree_ctx.lysc_tree is set to true. + */ +#define TRP_TREE_CTX_LYSP_NODE_PRESENT(CN) \ + (CN->priv) + /** * @brief Get lysp_node from trt_tree_ctx.cn. + * + * Use only if :TRP_TREE_CTX_LYSP_NODE_PRESENT returns true + * for that node. */ #define TRP_TREE_CTX_GET_LYSP_NODE(CN) \ ((const struct lysp_node *)CN->priv) @@ -2305,10 +2317,12 @@ tro_print_features_names(const struct trt_tree_ctx *tc, struct ly_out *out) { const struct lysp_qname *iffs; - iffs = tc->lysc_tree ? - TRP_TREE_CTX_GET_LYSP_NODE(tc->cn)->iffeatures : - tc->pn->iffeatures; - + if (tc->lysc_tree) { + assert(TRP_TREE_CTX_LYSP_NODE_PRESENT(tc->cn)); + iffs = TRP_TREE_CTX_GET_LYSP_NODE(tc->cn)->iffeatures; + } else { + iffs = tc->pn->iffeatures; + } LY_ARRAY_COUNT_TYPE i; LY_ARRAY_FOR(iffs, i) { @@ -2337,9 +2351,12 @@ tro_print_keys(const struct trt_tree_ctx *tc, struct ly_out *out) { const struct lysp_node_list *list; - list = tc->lysc_tree ? - (const struct lysp_node_list *)TRP_TREE_CTX_GET_LYSP_NODE(tc->cn) : - (const struct lysp_node_list *)tc->pn; + if (tc->lysc_tree) { + assert(TRP_TREE_CTX_LYSP_NODE_PRESENT(tc->cn)); + list = (const struct lysp_node_list *)TRP_TREE_CTX_GET_LYSP_NODE(tc->cn); + } else { + list = (const struct lysp_node_list *)tc->pn; + } assert(list->nodetype & LYS_LIST); if (trg_charptr_has_data(list->key)) { @@ -3162,14 +3179,14 @@ troc_read_node(struct trt_parent_cache ca, const struct trt_tree_ctx *tc) /* set node's name */ ret.name.str = cn->name; - if (tc->cn->priv) { + if (TRP_TREE_CTX_LYSP_NODE_PRESENT(cn)) { /* <type> */ ret.type = trop_resolve_type(TRP_TREE_CTX_GET_LYSP_NODE(cn)); /* <iffeature> */ ret.iffeatures = trop_node_has_iffeature(TRP_TREE_CTX_GET_LYSP_NODE(cn)); } else { - /* only the case node can have the priv pointer set to NULL */ + /* only the implicit case node doesn't have access to lysp node */ assert(tc->cn->nodetype & LYS_CASE); /* <type> */
vere/aes_siv: check claimed length
@@ -330,6 +330,9 @@ u3qea_sivc_de(u3_atom key, if ( u3r_met(3, key) > 64 ) { return u3_none; } + if ( c3y == u3qa_gth(u3r_met(3, txt), len) ) { + return u3_none; + } u3r_bytes_reverse(0, 64, key_y, key); return _siv_de(key_y, 64, ads, iv, len, txt);
plugins: register new custom plugins
#define FLB_PLUGINS_H #include <monkey/mk_core.h> +#include <fluent-bit/flb_custom.h> #include <fluent-bit/flb_input.h> #include <fluent-bit/flb_output.h> #include <fluent-bit/flb_filter.h> int flb_plugins_register(struct flb_config *config) { + struct flb_custom_plugin *custom; struct flb_input_plugin *in; struct flb_output_plugin *out; struct flb_filter_plugin *filter; +@FLB_CUSTOM_PLUGINS_ADD@ @FLB_IN_PLUGINS_ADD@ @FLB_OUT_PLUGINS_ADD@ @FLB_FILTER_PLUGINS_ADD@ @@ -48,10 +51,17 @@ void flb_plugins_unregister(struct flb_config *config) { struct mk_list *tmp; struct mk_list *head; + struct flb_custom_plugin *custom; struct flb_input_plugin *in; struct flb_output_plugin *out; struct flb_filter_plugin *filter; + mk_list_foreach_safe(head, tmp, &config->custom_plugins) { + custom = mk_list_entry(head, struct flb_custom_plugin, _head); + mk_list_del(&custom->_head); + flb_free(custom); + } + mk_list_foreach_safe(head, tmp, &config->in_plugins) { in = mk_list_entry(head, struct flb_input_plugin, _head); mk_list_del(&in->_head);
Makefile add pkg libs/includes for NetBSD
@@ -142,11 +142,12 @@ else ifeq ($(OS),NetBSD) ARCH := NETBSD ARCH_SRCS := $(sort $(wildcard netbsd/*.c)) - ARCH_CFLAGS := -std=c11 -I/usr/local/include \ + ARCH_CFLAGS := -std=c11 -I/usr/local/include -I/usr/pkg/include \ -Wextra -Wno-override-init \ -funroll-loops -D_KERNTYPES - ARCH_LDFLAGS := -L/usr/local/include \ - -pthread -lcapstone -lrt + ARCH_LDFLAGS := -L/usr/local/include -L/usr/pkg/lib \ + -pthread -lcapstone -lrt \ + -Wl,--rpath=/usr/pkg/lib # OS NetBSD else
A couple comments.
++ abet :: complete cycle ^- {(each (list ovum) seed) _sys} ?^ but.gut + :: + :: cycle has ordered a reboot; report it + :: [[%| u.but.gut] sys] + :: + :: no reboot; flush output + :: [[%& (flop out.gut)] sys(out.gut ~)] :: :: ++boot:le ++ boot :: reboot
BugID:18962832:Refine netmgr connect API with timeout param
@@ -52,7 +52,7 @@ uint32_t auth_req_times = 0; uint32_t auth_req_fail_times = 0; uint32_t auth_rsp_times = 0; #endif -char ota_server_name[CONFIG_HTTPC_SERVER_NAME_SIZE] = "http://mjfile-test.smartmidea.net:80/"; +char ota_server_name[CONFIG_HTTPC_SERVER_NAME_SIZE] = "https://mjfile-test.smartmidea.net:80"; uint32_t ota_req_times = 0; uint32_t ota_req_fail_times = 0; uint32_t ota_rsp_times = 0; @@ -452,7 +452,7 @@ static void httpc_delayed_action(void *arg) #endif break; case HTTP_OTA: - httpc_ota("/050509031881.bin"); + httpc_ota("050509031881.bin"); break; case HTTP_OTA_HEAD: httpc_ota_head("/050509031881.bin"); @@ -504,10 +504,10 @@ int application_start(int argc, char *argv[]) { aos_set_log_level(AOS_LL_DEBUG); netmgr_init(); - netmgr_connect(WIFI_SSID, WIFI_PASSWORD); + netmgr_connect(WIFI_SSID, WIFI_PASSWORD, 10000); aos_cli_register_command(&httpc_cmd); http_client_initialize(); - aos_post_delayed_action(2000, httpc_delayed_action, NULL); + aos_post_delayed_action(100, httpc_delayed_action, NULL); aos_loop_run(); return 0; }
rms/slurm: save use_interactive_step option to example config file
@@ -473,7 +473,7 @@ echo "PartitionName=normal Nodes=c[1-4] Default=YES MaxTime=24:00:00 State=UP Ov # 5/5/2020 [email protected] - enable configless option echo "SlurmctldParameters=enable_configless" >> $RPM_BUILD_ROOT/%{_sysconfdir}/slurm.conf.ohpc # 11/9/2021 [email protected] - setup interactive jobs for salloc -LaunchParameters=use_interactive_step +LaunchParameters=use_interactive_step >> $RPM_BUILD_ROOT/%{_sysconfdir}/slurm.conf.ohpc # 6/3/16 [email protected] - Adding ReturnToService Directive to starting config file (note removal of variable during above creation) echo "ReturnToService=1" >> $RPM_BUILD_ROOT/%{_sysconfdir}/slurm.conf.ohpc # 9/17/14 [email protected] - Add option to drop VM cache during epilog
Fix return code when CLI is passed too many args
@@ -119,6 +119,27 @@ void nvm_current_cmd(struct Command Command) g_cur_command = Command; } +//temp, until uefi and os validation agree to +//return code unification. +EFI_STATUS uefi_to_os_ret_val(EFI_STATUS uefi_rc) +{ + EFI_STATUS rc = EFI_SUCCESS; + switch (uefi_rc) + { + case (0): + break; + case (2): + rc = 201; + break; + case (EFI_INVALID_PARAMETER): + rc = 201; + break; + default: + rc = 1; + } + return rc; +} + NVM_API int nvm_run_cli(int argc, char *argv[]) { EFI_STATUS rc; @@ -127,7 +148,7 @@ NVM_API int nvm_run_cli(int argc, char *argv[]) rc = init_protocol_shell_parameters_protocol(argc, argv); if (rc == EFI_INVALID_PARAMETER) { wprintf(L"Syntax Error: Exceeded input parameters limit.\n"); - return (int)rc; + return (int)uefi_to_os_ret_val(rc); } if (gOsShellParametersProtocol.StdOut == stdout) @@ -141,19 +162,8 @@ NVM_API int nvm_run_cli(int argc, char *argv[]) return nvm_status; } - rc = UefiMain(0, NULL); - switch (rc) { - case (0): - break; - case (2): - rc = 201; - break; - case (EFI_INVALID_PARAMETER): - rc = 201; - break; - default: - rc = 1; - } + rc = uefi_to_os_ret_val(UefiMain(0, NULL)); + //gOsShellParametersProtocol.StdOut will be overriden when //-o xml is used (temp hack) if (gOsShellParametersProtocol.StdOut != stdout) {
`fio_write` schedule flush event directly
@@ -2014,7 +2014,7 @@ void fio_force_event(intptr_t uuid, enum fio_io_event ev) { fio_defer_push_task(deferred_ping, (void *)uuid, NULL); break; case FIO_EVENT_ON_READY: - fio_defer_push_task(deferred_on_ready, (void *)uuid, NULL); + fio_defer_push_urgent(deferred_on_ready, (void *)uuid, NULL); break; } } @@ -2547,10 +2547,13 @@ ssize_t fio_write2_fn(intptr_t uuid, fio_write_args_s options) { packet->dealloc = (options.after.dealloc ? options.after.dealloc : free); } /* add packet to outgoing list */ + uint8_t was_empty = 1; fio_lock(&uuid_data(uuid).sock_lock); if (!uuid_is_valid(uuid)) { goto locked_error; } + if (uuid_data(uuid).packet) + was_empty = 0; if (options.urgent == 0) { *uuid_data(uuid).packet_last = packet; uuid_data(uuid).packet_last = &packet->next; @@ -2564,10 +2567,12 @@ ssize_t fio_write2_fn(intptr_t uuid, fio_write_args_s options) { uuid_data(uuid).packet_last = &packet->next; } } + fio_atomic_add(&uuid_data(uuid).packet_count, 1); fio_unlock(&uuid_data(uuid).sock_lock); - fio_atomic_add(&uuid_data(uuid).packet_count, 1); - fio_poll_add_write(fio_uuid2fd(uuid)); + if (was_empty) { + fio_defer_push_urgent(deferred_on_ready, (void *)uuid, NULL); + } return 0; locked_error: fio_unlock(&uuid_data(uuid).sock_lock);
grid: fixing readme and contributor docs
@@ -6,7 +6,7 @@ Landscape is built primarily using [React], [Typescript], and [Tailwind CSS]. [V ## Getting Started -To get started using Landscape first you need to run, `npm run bootstrap` at the top level of the greater urbit repo. This will install your npm dependencies and correctly link the current implementation of the packages at `pkg/npm/*` to your dependencies. +To get started using Landscape first you need to run, `npm i && npm run bootstrap` at the top level of the greater urbit repo. This will install your npm dependencies and correctly link the current implementation of the packages at `pkg/npm/*` to your dependencies. If you intend to edit those packages will developing on Landscape, you should also have `npm run watch-libs` running to build and re-link them after every change.
touch_sensor: add esp_timer error check
@@ -457,12 +457,11 @@ esp_err_t touch_pad_filter_start(uint32_t filter_period_ms) ESP_RETURN_ON_FALSE(filter_period_ms >= portTICK_PERIOD_MS, ESP_ERR_INVALID_ARG, TOUCH_TAG, "Touch pad filter period error"); ESP_RETURN_ON_FALSE(rtc_touch_mux, ESP_ERR_INVALID_STATE, TOUCH_TAG, "Touch pad not initialized"); + esp_err_t ret = ESP_OK; xSemaphoreTake(rtc_touch_mux, portMAX_DELAY); if (s_touch_pad_filter == NULL) { s_touch_pad_filter = (touch_pad_filter_t *) calloc(1, sizeof(touch_pad_filter_t)); - if (s_touch_pad_filter == NULL) { - goto err_no_mem; - } + ESP_GOTO_ON_FALSE(s_touch_pad_filter, ESP_ERR_NO_MEM, err_no_mem, TOUCH_TAG, "no memory for filter"); } if (s_touch_pad_filter->timer == NULL) { esp_timer_create_args_t timer_cfg = { @@ -472,23 +471,25 @@ esp_err_t touch_pad_filter_start(uint32_t filter_period_ms) .name = "touch filter timer", .skip_unhandled_events = true, }; - esp_timer_create(&timer_cfg, &(s_touch_pad_filter->timer)); - if (s_touch_pad_filter->timer == NULL) { - free(s_touch_pad_filter); - s_touch_pad_filter = NULL; - goto err_no_mem; - } + ESP_GOTO_ON_ERROR(esp_timer_create(&timer_cfg, &(s_touch_pad_filter->timer)), + err_timer_create, TOUCH_TAG, "failed to create the filter timer"); s_touch_pad_filter->period = filter_period_ms; touch_pad_filter_cb(NULL); // Trigger once immediately to get the initial raw value - esp_timer_start_periodic(s_touch_pad_filter->timer, filter_period_ms * 1000); + ESP_GOTO_ON_ERROR(esp_timer_start_periodic(s_touch_pad_filter->timer, filter_period_ms * 1000), + err_timer_start, TOUCH_TAG, "failed to start the filter timer"); } - xSemaphoreGive(rtc_touch_mux); - return ESP_OK; + xSemaphoreGive(rtc_touch_mux); + return ret; +err_timer_start: + esp_timer_delete(s_touch_pad_filter->timer); +err_timer_create: + free(s_touch_pad_filter); + s_touch_pad_filter = NULL; err_no_mem: xSemaphoreGive(rtc_touch_mux); - return ESP_ERR_NO_MEM; + return ret; } esp_err_t touch_pad_filter_stop(void)
kernel/init: call fs_initialize before clock_initialize to initialize semaphore for inode clock_initialize use the semahpore for inode, g_inode_sem before initialization. A semaphore shouldn't be used without initialization. So we need to call fs_initilize function which initializes inode semaphore before that.
@@ -434,6 +434,12 @@ void os_start(void) wd_initialize(); } +#if CONFIG_NFILE_DESCRIPTORS > 0 + /* Initialize the file system (needed to support device drivers) */ + + fs_initialize(); +#endif + /* Initialize the POSIX timer facility (if included in the link) */ #ifdef CONFIG_HAVE_WEAKFUNCTIONS @@ -484,12 +490,6 @@ void os_start(void) } #endif -#if CONFIG_NFILE_DESCRIPTORS > 0 - /* Initialize the file system (needed to support device drivers) */ - - fs_initialize(); -#endif - #ifdef CONFIG_NET /* Initialize the networking system. Network initialization is * performed in two steps: (1) net_setup() initializes static
nucleo-f401re; fix build for bootloader.
#include <syscfg/syscfg.h> #include <os/os_dev.h> +#if MYNEWT_VAL(UART_0) #include <uart/uart.h> #include <uart_hal/uart_hal.h> +#endif #include <hal/hal_bsp.h> #include <hal/hal_gpio.h> @@ -110,6 +112,8 @@ hal_bsp_init(void) { int rc; + (void)rc; + #if MYNEWT_VAL(UART_0) rc = os_dev_create((struct os_dev *) &hal_uart0, CONSOLE_UART, OS_DEV_INIT_PRIMARY, 0, uart_hal_init, (void *)&uart_cfg[0]);
only set heartbeat lost when in a car safety mode
@@ -142,6 +142,12 @@ void set_safety_mode(uint16_t mode, int16_t param) { can_init_all(); } +bool is_car_safety_mode(uint16_t mode) { + return (mode != SAFETY_SILENT) && + (mode != SAFETY_NOOUTPUT) && + (mode != SAFETY_ELM327); +} + // ***************************** USB port ***************************** int get_health_pkt(void *dat) { @@ -467,9 +473,7 @@ int usb_cb_control_msg(USB_Setup_TypeDef *setup, uint8_t *resp, bool hardwired) // **** 0xdf: set unsafe mode case 0xdf: // you can only set this if you are in a non car safety mode - if ((current_safety_mode == SAFETY_SILENT) || - (current_safety_mode == SAFETY_NOOUTPUT) || - (current_safety_mode == SAFETY_ELM327)) { + if (!is_car_safety_mode(current_safety_mode)) { unsafe_mode = setup->b.wValue.w; } break; @@ -695,6 +699,11 @@ void tick_handler(void) { siren_countdown = 5U; } + // set flag to indicate the heartbeat was lost + if (is_car_safety_mode(current_safety_mode)) { + heartbeat_lost = true; + } + if (current_safety_mode != SAFETY_SILENT) { set_safety_mode(SAFETY_SILENT, 0U); } @@ -702,9 +711,6 @@ void tick_handler(void) { set_power_save_state(POWER_SAVE_STATUS_ENABLED); } - // set flag to indicate the heartbeat was lost - heartbeat_lost = true; - // Also disable IR when the heartbeat goes missing current_board->set_ir_power(0U); @@ -728,7 +734,7 @@ void tick_handler(void) { // set ignition_can to false after 2s of no CAN seen if (ignition_can_cnt > 2U) { ignition_can = false; - }; + } // on to the next one uptime_cnt += 1U;