message
stringlengths
6
474
diff
stringlengths
8
5.22k
Add generic strategy for hor_sad'ing an non-split width block
@@ -619,6 +619,58 @@ static uint32_t ver_sad_generic(const kvz_pixel *pic_data, const kvz_pixel *ref_ return sad; } +/** + * \brief Horizontally interpolate SAD outside the frame. + * + * \param data1 Starting point of the first picture. + * \param data2 Starting point of the second picture. + * \param width Width of the region for which SAD is calculated. + * \param height Height of the region for which SAD is calculated. + * \param width Width of the pixel array. + * + * \returns Sum of Absolute Differences + */ +static unsigned hor_sad(const kvz_pixel *pic_data, const kvz_pixel *ref_data, + int block_width, int block_height, unsigned pic_stride, unsigned ref_stride) +{ + int x, y; + unsigned sad = 0; + + for (y = 0; y < block_height; ++y) { + for (x = 0; x < block_width; ++x) { + sad += abs(pic_data[y * pic_stride + x] - ref_data[y * ref_stride]); + } + } + + return sad; +} + + +static uint32_t hor_sad_generic(const kvz_pixel *pic_data, const kvz_pixel *ref_data, + int32_t width, int32_t height, uint32_t pic_stride, + uint32_t ref_stride, uint32_t left, uint32_t right) +{ + uint32_t result = 0; + if (left) { + result += hor_sad (pic_data, ref_data + left, left, + height, pic_stride, ref_stride); + + result += kvz_reg_sad(pic_data + left, ref_data + left, width - left, + height, pic_stride, ref_stride); + } else if (right) { + result += kvz_reg_sad(pic_data, ref_data, width - right, + height, pic_stride, ref_stride); + + result += hor_sad (pic_data + width - right, + ref_data + width - right - 1, + right, height, pic_stride, ref_stride); + } else { + result += kvz_reg_sad(pic_data, ref_data, width, + height, pic_stride, ref_stride); + } + return result; +} + int kvz_strategy_register_picture_generic(void* opaque, uint8_t bitdepth) { bool success = true; @@ -656,6 +708,7 @@ int kvz_strategy_register_picture_generic(void* opaque, uint8_t bitdepth) success &= kvz_strategyselector_register(opaque, "get_optimized_sad", "generic", 0, &get_optimized_sad_generic); success &= kvz_strategyselector_register(opaque, "ver_sad", "generic", 0, &ver_sad_generic); + success &= kvz_strategyselector_register(opaque, "hor_sad", "generic", 0, &hor_sad_generic); return success; }
improve %ames /a/give error message
:: routed directly out to unix :: ?: ?=([%give *] q.kyz) - ~| [%ames-bad-duct %give duct=gad.fox p.kyz] + ~| [%ames-bad-duct %give from=p.kyz route=q.kyz] ?> ?=(^ gad.fox) :_ +>.$ [[gad.fox %give kyz] [hen %give %mack ~] ~]
adds comet mining (but not yet booting)
@@ -235,8 +235,54 @@ _king_fake(u3_noun ship, u3_noun pill, u3_noun path) void _king_come(u3_noun star, u3_noun pill, u3_noun path) { - fprintf(stderr, "boot: comets not yet supported\r\n"); - exit(1); + u3_noun seed; + + if ( u3_nul == star ) { + // XX ~marzod hardcoded + // choose from list, at random, &c + // + star = 256; + } + else { + // XX parse and validate + // + u3_noun tar = u3k(u3t(star)); + u3z(star); + star = tar; + } + + { + u3_noun sar = u3dc("scot", 'p', u3k(star)); + c3_c* tar_c = u3r_string(sar); + + fprintf(stderr, "boot: mining a comet under %s\r\n", tar_c); + free(tar_c); + u3z(sar); + } + + { + c3_w eny_w[16]; + u3_noun eny; + + c3_rand(eny_w); + eny = u3i_words(16, eny_w); + + seed = u3dc("come:dawn", u3k(star), u3k(eny)); + u3z(eny); + } + + { + u3_noun who = u3dc("scot", 'p', u3k(u3h(seed))); + c3_c* who_c = u3r_string(who); + + fprintf(stderr, "boot: found comet %s\r\n", who_c); + free(who_c); + u3z(who); + } + + u3z(star); + + return _king_dawn(seed, pill, path); } /* _king_dawn(): boot from keys, validating
decisions: clarify updates
@@ -75,6 +75,8 @@ For each solution a proposal, rationale and optionally implications should be gi - "Decision", "Rationale" and "Implications" are now filled out and fixed according to the reviews - decisions of this step usually already have an implementation PR +Decisions that need an update, e.g. because assumptions changed, usually directly start with the step "Decided". + > In this step, decision PRs only modify a _single_ decision. > Only exceptions like backlinks from other decisions are allowed.
Update monero_pool.json forgotten comma
"perPoolLogFile": false }, "banning": { - "manager": "integrated" + "manager": "integrated", "banOnJunkReceive": true, "banOnInvalidShares": false },
specialize mi_mallocn for count=1
@@ -443,7 +443,12 @@ mi_decl_allocator void* mi_calloc(size_t count, size_t size) mi_attr_noexcept { // Uninitialized `calloc` extern mi_decl_allocator void* mi_heap_mallocn(mi_heap_t* heap, size_t count, size_t size) mi_attr_noexcept { size_t total; - if (mi_mul_overflow(count,size,&total)) return NULL; + if (count==1) { + total = size; + } + else if (mi_mul_overflow(count, size, &total)) { + return NULL; + } return mi_heap_malloc(heap, total); }
os/se/ameba: Link non-secure print to Secure Allow to print secure log using non-secure print to prevent mixed log
***************************************************************************************************/ #include <stdint.h> +#include <stdio.h> #include "flash_api.h" #include "device_lock.h" @@ -29,6 +30,7 @@ typedef struct { void (*device_unlock)(uint32_t); void (*setstatusbits)(uint32_t); int (*get_random_bytes)(void *, uint32_t); + void (*info_printf)(const char *); } nsfunc_ops_s; /* Flash Status Bit */ @@ -79,6 +81,11 @@ static void ns_setstatusbits(u32 NewState) device_mutex_unlock(RT_DEV_LOCK_FLASH); } +static void ns_printf(const char *input) +{ + printf("%s\n", input); +} + extern int rtw_get_random_bytes(void *dst, u32 size); void *rtl_set_ns_func(void) { @@ -89,6 +96,7 @@ void *rtl_set_ns_func(void) ns_func.device_unlock = device_mutex_unlock; ns_func.setstatusbits = ns_setstatusbits; ns_func.get_random_bytes = rtw_get_random_bytes; + ns_func.info_printf = ns_printf; return (void *)&ns_func; }
Addition of an option to compute the Nesterov-Todd scaling either by "Qp formula" or "F formula".
@@ -1708,6 +1708,7 @@ void gfc3d_IPM(GlobalFrictionContactProblem* restrict problem, double* restrict printIteresProbMatlabFile(iteration, globalVelocity, velocity, reaction, d, n, m, iterates); hasNotConverged = 0; + // numerics_printf_verbose(-1, "%9.2e %9.2e %9.2e\n", norm2VecDiff(tmpsol, globalVelocity, m), norm2VecDiff(tmpsol+m, velocity, nd), norm2VecDiff(tmpsol+m+nd, reaction, nd)); break; } @@ -1757,7 +1758,7 @@ void gfc3d_IPM(GlobalFrictionContactProblem* restrict problem, double* restrict } NM_insert(J, minus_H, m + nd, 0); NM_insert(J, NM_eye(nd), m + nd, m); - NM_insert(J, NM_scalar(nd, -1e-6), m + nd, m + nd); + //NM_insert(J, NM_scalar(nd, -1e-6), m + nd, m + nd); } else { @@ -1807,6 +1808,7 @@ void gfc3d_IPM(GlobalFrictionContactProblem* restrict problem, double* restrict if (options->iparam[SICONOS_FRICTION_3D_IPM_IPARAM_ITERATES_MATLAB_FILE]) printIteresProbMatlabFile(iteration, globalVelocity, velocity, reaction, d, n, m, iterates); + if (options->iparam[SICONOS_FRICTION_3D_IPM_IPARAM_REDUCED_SYSTEM] == 0) { /* building the right-hand side related to the first system @@ -1990,7 +1992,6 @@ void gfc3d_IPM(GlobalFrictionContactProblem* restrict problem, double* restrict cblas_dcopy(m, rhs, 1, d_globalVelocity, 1); cblas_dcopy(nd, rhs+m, 1, d_velocity, 1); cblas_dcopy(nd, rhs+m+nd, 1, d_reaction, 1); - } else { @@ -2199,7 +2200,7 @@ void gfc3d_ipm_set_default(SolverOptions* options) options->iparam[SICONOS_FRICTION_3D_IPM_IPARAM_NESTEROV_TODD_SCALING_METHOD] = SICONOS_FRICTION_3D_IPM_NESTEROV_TODD_SCALING_WITH_QP; - options->iparam[SICONOS_FRICTION_3D_IPARAM_RESCALING] = 0; //SICONOS_FRICTION_3D_RESCALING_BALANCING_MHHT; + options->iparam[SICONOS_FRICTION_3D_IPARAM_RESCALING] = SICONOS_FRICTION_3D_RESCALING_BALANCING_MHHT; options->dparam[SICONOS_DPARAM_TOL] = 1e-8; options->dparam[SICONOS_FRICTION_3D_IPM_SIGMA_PARAMETER_1] = 1e-8;
don't clog up jenkins build queue
@@ -19,6 +19,11 @@ pipeline { PARTIAL_TESTS = "${env.BRANCH_NAME == 'master' ? ' ' : '1'}" DOCKER_IMAGE_TAG = "panda:build-${env.GIT_COMMIT}" } + options { + timeout(time: 3, unit: 'HOURS') + disableConcurrentBuilds(abortPrevious: env.BRANCH_NAME != 'master') + } + stages { stage ('Acquire resource locks') { options {
toml: updated readme
# TODO: Documentation +## NULL keys +The plugin supports null keys. They are represented as special string of value '!ELEKTRA_NULL!' in a toml file, since toml doesn't support empty assignments. Be aware that a string of that value (full string must match exactly) will always be translated into a null key. + ## Requirements: - The plugin needs Flex (TODO: min version) and Bison (TODO: min version). - Comments and newlines between the last array element and closing brackets are discarded. - Trailing commas in arrays and inline tables are discarded - - Comments/newlines between the last element of an array and the closing bracket are discarded. - - Currently, only spaces in front of comments are preserved. + - Only spaces in front of comments are preserved. ## Questions - Don't know where/how exactly to store trailing array comments/newline info * Can't associate those info to array top key in the way like file ending comments are preserved * Maybe add own metakey (eg. epilogue/comment/#1)? - - How to handle null keys? (See storage plugin tutorial) - * TOML doesn't allow empty assignments (eg 'key = ') - * So how should empty values be represented in a toml file? ## TODOs - Document functions - Maybe preserve spaces - Before array values - Before assignment/simple table header/table array header - - Don't store origvalue, if transformed value is equal to untransformed value - Maybe use date plugin
build CHANGE increase libyang dep version There is a bugfix that could manifest in sysrepo.
@@ -44,8 +44,8 @@ set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION} set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION}) # Version of libyang library that this sysrepo depends on -set(LIBYANG_DEP_VERSION 1.0.119) -set(LIBYANG_DEP_SOVERSION 1.5.14) +set(LIBYANG_DEP_VERSION 1.0.120) +set(LIBYANG_DEP_SOVERSION 1.5.15) # options if((CMAKE_BUILD_TYPE_LOWER STREQUAL debug) OR (CMAKE_BUILD_TYPE_LOWER STREQUAL package))
Check for tagged release
set -e set -o pipefail +SKIP_VALIDATE=false + +function usage +{ + echo "Usage: $0 [--skip-validate]" + echo "Initialize Chipyard submodules and setup initial env.sh script." + echo "" + echo " --skip-validate Skip prompt checking for tagged release" +} + +while test $# -gt 0 +do + case "$1" in + --skip-validate) + SKIP_VALIDATE=true; + ;; + -h | -H | --help) + usage + exit 1 + ;; + *) echo "ERROR: bad argument $1" + usage + exit 2 + ;; + esac + shift +done + # Check that git version is at least 1.7.8 MYGIT=$(git --version) MYGIT=${MYGIT#'git version '} # Strip prefix @@ -17,6 +45,21 @@ if [ "$MINGIT" != "$(echo -e "$MINGIT\n$MYGIT" | sort -V | head -n1)" ]; then false fi +# before doing anything verify that you are on a release branch/tag +set +e +tag=$(git describe --exact-match --tags) +tag_ret_code=$? +set -e +if [ $tag_ret_code -ne 0 ]; then + if [ "$SKIP_VALIDATE" = false ]; then + read -p "WARNING: You are not on a tagged release of Chipyard. Type \"ok\" to continue: " validate + [[ $validate == [oO][kK] ]] || exit 3 + echo "Setting up non-release Chipyard" + fi +else + echo "Setting up Chipyard $tag" +fi + # On macOS, use GNU readlink from 'coreutils' package in Homebrew/MacPorts if [ "$(uname -s)" = "Darwin" ] ; then READLINK=greadlink
GUI: Warning when opening ipfs-urls. Extra question if you really want to open IPFS-url. Only activated on left-clicking the asset in the overview-page.
@@ -712,7 +712,18 @@ void OverviewPage::openIPFSForAsset(const QModelIndex &index) QString ipfsbrowser = walletModel->getOptionsModel()->getIpfsUrl(); // If the ipfs hash isn't there or doesn't start with Qm, disable the action item - if (ipfshash.count() > 0 && ipfshash.indexOf("Qm") == 0 && ipfsbrowser.indexOf("http") == 0) { - QDesktopServices::openUrl(QUrl::fromUserInput(ipfsbrowser.replace("%s", ipfshash))); + if (ipfshash.count() > 0 && ipfshash.indexOf("Qm") == 0 && ipfsbrowser.indexOf("http") == 0) + { + QUrl ipfsurl = QUrl::fromUserInput(ipfsbrowser.replace("%s", ipfshash)); + + // Create the box with everything. + if(QMessageBox::Yes == QMessageBox::question(this, + tr("Open IPFS content?"), + tr("Open the following IPFS content in your default browser?\n") + + ipfsurl.toString() + )) + { + QDesktopServices::openUrl(ipfsurl); + } } }
[state] Fix bug: infinite loop problem to rollback block state
@@ -38,6 +38,7 @@ type BlockInfo struct { BlockHash types.BlockID PrevHash types.BlockID } + type StateEntry struct { State *types.State Undo *types.State @@ -214,8 +215,9 @@ func (sdb *ChainStateDB) Rollback(blockNo types.BlockNo) error { sdb.Lock() defer sdb.Unlock() - for sdb.latest.BlockNo > blockNo { - bs, err := sdb.loadBlockState(sdb.latest.BlockHash) + target := sdb.latest + for target.BlockNo > blockNo { + bs, err := sdb.loadBlockState(target.BlockHash) if err != nil { return err } @@ -231,6 +233,10 @@ func (sdb *ChainStateDB) Rollback(blockNo types.BlockNo) error { } // logger.Debugf("- trie.root: %v", base64.StdEncoding.EncodeToString(sdb.GetHash())) sdb.latest = &bs.BlockInfo + target = &BlockInfo{ + BlockNo: sdb.latest.BlockNo - 1, + BlockHash: sdb.latest.PrevHash, + } } err := sdb.saveStateDB() return err
Clean up some printfs.
u3_noun ref, u3_noun syn) { - fprintf(stderr, "ar: hook\r\n"); u3_noun gat = u3j_hook(u3k(van), "ar"); - fprintf(stderr, "ar: hooked\r\n"); return u3i_molt(gat, u3x_sam, u3nc(u3k(ref), u3k(syn)), 0); } { u3_noun gat = u3j_soft(_ar_core(van, ref, syn), "fish"); - fprintf(stderr, "got gate\r\n"); - return u3n_slam_on(gat, u3k(axe)); + return u3n_kick_on(u3i_molt(gat, + u3x_sam, + u3k(axe), + 0)); } /* open
BugID:18373779:delete AOS_DEBUG_PANIC
#include <k_api.h> #include <assert.h> #include "aos/hal/uart.h" - -#ifdef AOS_DEBUG_PANIC #include <debug_api.h> -#endif #if (RHINO_CONFIG_HW_COUNT > 0) extern unsigned long long system_clock(void);
INTERNAL: Disable reconfig when domain name given
@@ -1337,6 +1337,42 @@ static void sm_reload_ZK_config(zhandle_t *zh, int *retry_ms) } #endif +static int arcus_check_domain_name(char *ensemble_list) { + char *copy, *token, *save_ptr; + struct hostent *zkhost; + int ret; + + copy = strdup(ensemble_list); + if (copy == NULL) { + return -1; + } + + do { + if (strchr(copy, ',')) { + ret = 0; break; + } + + token = strtok_r(ensemble_list, ":", &save_ptr); + if (inet_aton(token, NULL)) { + ret = 0; break; + } + + zkhost = gethostbyname(token); + if (!zkhost) { + ret = 0; break; + } + + int addr_cnt = 0; + while (zkhost->h_addr_list[addr_cnt]) { + addr_cnt++; + } + ret = addr_cnt > 1 ? 1 : 0; + } while (0); + + free(copy); + return ret; +} + void arcus_zk_init(char *ensemble_list, int zk_to, EXTENSION_LOGGER_DESCRIPTOR *logger, int verbose, size_t maxbytes, int port, @@ -1439,9 +1475,15 @@ void arcus_zk_init(char *ensemble_list, int zk_to, #ifdef ENABLE_ZK_RECONFIG /* Initialize zk_reconfig */ - zk_reconfig.version = -1; + int is_domain_name = arcus_check_domain_name(main_zk->ensemble_list); + if (is_domain_name < 0) { + arcus_conf.logger->log(EXTENSION_LOG_WARNING, NULL, + "Failed to initialize the zk reconfig. Terminating.\n"); + arcus_exit(main_zk->zh, EX_SOFTWARE); + } + zk_reconfig.needed = (is_domain_name == 0); zk_reconfig.enabled = false; - zk_reconfig.needed = true; + zk_reconfig.version = -1; if (zk_reconfig.needed) { /* check if ZK dynamic reconfig is enabled ? */ if (arcus_check_zk_reconfig_enabled(main_zk->zh) != 0) {
X509 build_chain(): Rename variable 'depth' to 'max_depth' This should increase readability and maintainability.
@@ -2992,7 +2992,7 @@ static int build_chain(X509_STORE_CTX *ctx) int may_alternate = 0; int trust = X509_TRUST_UNTRUSTED; int alt_untrusted = 0; - int depth; + int max_depth; int ok = 0; int prev_error = ctx->error; int i; @@ -3048,7 +3048,7 @@ static int build_chain(X509_STORE_CTX *ctx) * Build chains up to one longer the limit, later fail if we hit the limit, * with an X509_V_ERR_CERT_CHAIN_TOO_LONG error code. */ - depth = ctx->param->depth + 1; + max_depth = ctx->param->depth + 1; while (search != 0) { X509 *issuer = NULL; @@ -3092,7 +3092,7 @@ static int build_chain(X509_STORE_CTX *ctx) curr = sk_X509_value(ctx->chain, i - 1); /* Note: get_issuer() must be used even if curr is self-signed. */ - ok = num > depth ? 0 : get_issuer(&issuer, ctx, curr); + ok = num > max_depth ? 0 : get_issuer(&issuer, ctx, curr); if (ok < 0) { trust = -1; @@ -3225,11 +3225,11 @@ static int build_chain(X509_STORE_CTX *ctx) if (!ossl_assert(num == ctx->num_untrusted)) goto int_err; curr = sk_X509_value(ctx->chain, num - 1); - issuer = (X509_self_signed(curr, 0) || num > depth) ? + issuer = (X509_self_signed(curr, 0) || num > max_depth) ? NULL : find_issuer(ctx, sk_untrusted, curr); if (issuer == NULL) { /* - * Once we have reached a self-signed cert or num exceeds depth + * Once we have reached a self-signed cert or num > max_depth * or can't find an issuer in the untrusted list we stop looking * there and start looking only in the trust store if enabled. */ @@ -3264,7 +3264,7 @@ static int build_chain(X509_STORE_CTX *ctx) * signers, or else direct leaf PKIX trust. */ num = sk_X509_num(ctx->chain); - if (num <= depth) { + if (num <= max_depth) { if (trust == X509_TRUST_UNTRUSTED && DANETLS_HAS_DANE_TA(dane)) trust = check_dane_pkeys(ctx); if (trust == X509_TRUST_UNTRUSTED && num == ctx->num_untrusted) @@ -3292,7 +3292,7 @@ static int build_chain(X509_STORE_CTX *ctx) case X509_V_OK: break; } - CB_FAIL_IF(num > depth, + CB_FAIL_IF(num > max_depth, ctx, NULL, num - 1, X509_V_ERR_CERT_CHAIN_TOO_LONG); CB_FAIL_IF(DANETLS_ENABLED(dane) && (!DANETLS_HAS_PKIX(dane) || dane->pdpth >= 0),
Change Changelog link to point at Changelog readme Make the contributing document link to how to create a changelog rather than just linking to the Changelog itself.
@@ -79,4 +79,4 @@ Mbed TLS is well documented, but if you think documentation is needed, speak out 1. Complex parts in the code should include comments. 1. If needed, a Readme file is advised. 1. If a [Knowledge Base (KB)](https://tls.mbed.org/kb) article should be added, write this as a comment in the PR description. -1. A [ChangeLog](https://github.com/ARMmbed/mbedtls/blob/development/ChangeLog) entry should be added for this contribution. +1. A [ChangeLog](https://github.com/ARMmbed/mbedtls/blob/development/ChangeLog.d/00README.md) entry should be added for this contribution.
Separate projects for CUDA libraries
@@ -172,15 +172,9 @@ IF (CUDA_REQUIRED) ENDIF() IF (HOST_OS_WINDOWS) - LDFLAGS(cublas.lib curand.lib cudart_static.lib cusparse.lib) + LDFLAGS(cudart_static.lib) ELSE() - EXTRALIBS(-lcurand_static -lcudart_static -lcusparse_static -lculibos) - IF (CUDA_VERSION STREQUAL "10.1" AND USE_ARCADIA_CUDA) - FROM_SANDBOX(1006791015 OUT cublas.a) - EXTRALIBS(-llapack_static) - ELSE() - EXTRALIBS(-lcublas_static) - ENDIF() + EXTRALIBS(-lcudart_static -lculibos) ENDIF() END()
Remove duplicate statement.
#ifdef __FreeBSD__ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: head/sys/netinet/sctp_indata.c 321289 2017-07-20 11:09:33Z tuexen $"); +__FBSDID("$FreeBSD: head/sys/netinet/sctp_indata.c 321463 2017-07-25 11:05:53Z tuexen $"); #endif #include <netinet/sctp_os.h> @@ -2060,7 +2060,6 @@ sctp_process_a_data_chunk(struct sctp_tcb *stcb, struct sctp_association *asoc, struct mbuf *mm; control->data = dmbuf; - mm = control->data; for (mm = control->data; mm; mm = mm->m_next) { control->length += SCTP_BUF_LEN(mm); }
Clean the buffers
@@ -425,6 +425,7 @@ createCron(const char *scopePath, const char* filterPath) { return FALSE; } + scope_memset(path, 0, PATH_MAX); // Create the cron entry if (scope_snprintf(path, sizeof(path), SCOPE_CRON_PATH) < 0) { scope_perror("createCron: cron: error: snprintf() failed\n"); @@ -432,6 +433,7 @@ createCron(const char *scopePath, const char* filterPath) { return FALSE; } + scope_memset(buf, 0, 1024); if (scope_snprintf(buf, sizeof(buf), SCOPE_CRONTAB) < 0) { scope_perror("createCron: cron: error: snprintf() failed\n"); scope_fprintf(scope_stderr, "path: %s\n", path);
hark: use vertical rules FIxes urbit/landscape#150.
import React from "react"; -import { Text as NormalText, Row, Icon } from "@tlon/indigo-react"; +import { Text as NormalText, Row, Icon, Rule } from "@tlon/indigo-react"; import f from "lodash/fp"; import _ from "lodash"; import moment from "moment"; @@ -11,12 +11,6 @@ const Text = (props: PropFunc<typeof Text>) => ( <NormalText fontWeight="500" {...props} /> ); -const Divider = (props: PropFunc<typeof Text>) => ( - <Text lineHeight="tall" mx="1" fontWeight="bold" color="lightGray"> - | - </Text> -); - function Author(props: { patp: string; contacts: Contacts; last?: boolean }) { const contact: Contact | undefined = props.contacts?.[props.patp]; @@ -92,13 +86,9 @@ export function Header(props: { <Text mr="1">{description}</Text> {!!moduleIcon && <Icon icon={moduleIcon as any} />} {!!channel && <Text fontWeight="500">{channelTitle}</Text>} - <Text mx="1" fontWeight="bold" color="lightGray"> - | - </Text> + <Rule vertical height="12px" /> <Text fontWeight="500">{groupTitle}</Text> - <Text lineHeight="tall" mx="1" fontWeight="bold" color="lightGray"> - | - </Text> + <Rule vertical height="12px"/> <Text fontWeight="regular" color="lightGray"> {time} </Text>
sysrpeo-plugind BUGFIX create plugins dir recursively Refs
@@ -206,6 +206,34 @@ daemon_init(int debug, sr_log_level_t log_level) sr_log_syslog("sysrepo-plugind", log_level); } +/* from src/common.c */ +int +sr_mkpath(const char *path, mode_t mode) +{ + char *p, *dup; + + dup = strdup(path); + for (p = strchr(dup + 1, '/'); p; p = strchr(p + 1, '/')) { + *p = '\0'; + if (mkdir(dup, mode) == -1) { + if (errno != EEXIST) { + *p = '/'; + return -1; + } + } + *p = '/'; + } + free(dup); + + if (mkdir(path, mode) == -1) { + if (errno != EEXIST) { + return -1; + } + } + + return 0; +} + static int load_plugins(struct srpd_plugin_s **plugins, int *plugin_count) { @@ -231,7 +259,7 @@ load_plugins(struct srpd_plugin_s **plugins, int *plugin_count) error_print(0, "Checking plugins dir existence failed (%s).", strerror(errno)); return -1; } - if (mkdir(plugins_dir, 00777) == -1) { + if (sr_mkpath(plugins_dir, 00777) == -1) { error_print(0, "Creating plugins dir \"%s\" failed (%s).", plugins_dir, strerror(errno)); return -1; }
Work around Windows ftell() bug as per Microsoft engineering's suggestion See
@@ -237,6 +237,15 @@ static long file_ctrl(BIO *b, int cmd, long num, void *ptr) _setmode(fd, _O_TEXT); else _setmode(fd, _O_BINARY); + /* + * Reports show that ftell() isn't trustable in text mode. + * This has been confirmed as a bug in the Universal C RTL, see + * https://developercommunity.visualstudio.com/content/problem/425878/fseek-ftell-fail-in-text-mode-for-unix-style-text.html + * The suggested work-around from Microsoft engineering is to + * turn off buffering until the bug is resolved. + */ + if ((num & BIO_FP_TEXT) != 0) + setvbuf((FILE *)ptr, NULL, _IONBF, 0); # elif defined(OPENSSL_SYS_MSDOS) int fd = fileno((FILE *)ptr); /* Set correct text/binary mode */
oc_cred:Allow for provisioning of 256-bit PSKs
@@ -510,13 +510,13 @@ oc_sec_add_new_cred(size_t device, bool roles_resource, oc_tls_peer_t *client, if (privatedata && privatedata_size > 0) { if (credtype == OC_CREDTYPE_PSK && privatedata_encoding == OC_ENCODING_BASE64) { - if (privatedata_size != 24) { + if (privatedata_size > 64) { oc_sec_remove_cred(cred, device); return -1; } - uint8_t key[24]; - memcpy(key, privatedata, 24); - int key_size = oc_base64_decode(key, 24); + uint8_t key[64]; + memcpy(key, privatedata, privatedata_size); + int key_size = oc_base64_decode(key, privatedata_size); if (key_size < 0) { oc_sec_remove_cred(cred, device); return -1;
Fix cone winding;
@@ -4792,7 +4792,7 @@ void lovrPassCone(Pass* pass, float* transform, uint32_t segments) { // Sides for (uint32_t i = 0; i < segments; i++) { - uint16_t tri[] = { segments + i, segments + (i + 1) % segments, vertexCount - 1 }; + uint16_t tri[] = { segments + (i + 1) % segments, segments + i, vertexCount - 1 }; memcpy(indices, tri, sizeof(tri)); indices += COUNTOF(tri); }
driver/ioexpander/pca9555.h: Format with clang-format BRANCH=none TEST=none
#define PCA9555_IO_6 BIT(6) #define PCA9555_IO_7 BIT(7) -static inline int pca9555_read(const int port, - const uint16_t i2c_addr_flags, +static inline int pca9555_read(const int port, const uint16_t i2c_addr_flags, int reg, int *data_ptr) { return i2c_read8(port, i2c_addr_flags, reg, data_ptr); } -static inline int pca9555_write(const int port, - const uint16_t i2c_addr_flags, +static inline int pca9555_write(const int port, const uint16_t i2c_addr_flags, int reg, int data) { return i2c_write8(port, i2c_addr_flags, reg, data);
pyocf: Add new error codes
@@ -49,6 +49,9 @@ class OcfErrorCode(IntEnum): OCF_ERR_INVALID_CACHE_LINE_SIZE = auto() OCF_ERR_CACHE_NAME_MISMATCH = auto() OCF_ERR_INVAL_CACHE_DEV = auto() + OCF_ERR_CORE_UUID_EXISTS = auto() + OCF_ERR_METADATA_LAYOUT_MISMATCH = auto() + OCF_ERR_CACHE_LINE_SIZE_MISMATCH = auto() class OcfCompletion:
Make batchbuild should forward CXX and DBG
@@ -159,10 +159,10 @@ clean: @echo "[Clean] Removing $(VEC) build outputs" batchbuild: - @+$(MAKE) -s VEC=nointrin - @+$(MAKE) -s VEC=sse2 - @+$(MAKE) -s VEC=sse4.2 - @+$(MAKE) -s VEC=avx2 + @+$(MAKE) -s CXX=$(CXX) DBG=$(DBG) VEC=nointrin + @+$(MAKE) -s CXX=$(CXX) DBG=$(DBG) VEC=sse2 + @+$(MAKE) -s CXX=$(CXX) DBG=$(DBG) VEC=sse4.2 + @+$(MAKE) -s CXX=$(CXX) DBG=$(DBG) VEC=avx2 batchclean: @+$(MAKE) -s clean VEC=nointrin
[CUDA] Fix crash with printf without any _cl_var_arg calls
@@ -217,7 +217,8 @@ void pocl_cuda_fix_printf(llvm::Module *module) // Replace calls to _cl_va_arg with reads from new i64 array argument llvm::Function *cl_va_arg = module->getFunction("_cl_va_arg"); - assert(cl_va_arg); + if (cl_va_arg) + { llvm::Argument *args_in = &*++new_cl_printf->getArgumentList().begin(); std::vector<llvm::Value*> va_arg_calls(cl_va_arg->users().begin(), cl_va_arg->users().end()); @@ -255,6 +256,10 @@ void pocl_cuda_fix_printf(llvm::Module *module) call->eraseFromParent(); } + // Remove function from module + cl_va_arg->eraseFromParent(); + } + // Loop over function callers // Generate array of i64 arguments to replace variadic arguments std::vector<llvm::Value*> callers(cl_printf->users().begin(), @@ -315,8 +320,7 @@ void pocl_cuda_fix_printf(llvm::Module *module) new_arg->takeName(&*old_arg); old_arg->replaceAllUsesWith(&*new_arg); - // Remove old functions - cl_va_arg->eraseFromParent(); + // Remove old function cl_printf->eraseFromParent(); }
docs: small tweak to WW recipes to support installation for tarball-based local repo
@@ -43,6 +43,6 @@ default location for this example is in [sms](*\#*) wwmkchroot -v centos-8 $CHROOT # Enable OpenHPC and EPEL repos inside chroot [sms](*\#*) dnf -y --installroot $CHROOT install epel-release -[sms](*\#*) cp -p /etc/yum.repos.d/OpenHPC.repo $CHROOT/etc/yum.repos.d +[sms](*\#*) cp -p /etc/yum.repos.d/OpenHPC*.repo $CHROOT/etc/yum.repos.d \end{lstlisting} % end_ohpc_run
don't stop inhibit after endOfframe.
@@ -790,8 +790,6 @@ port_INLINE void activity_synchronize_endOfFrame(PORT_TIMER_WIDTH capturedTime) // return to listening state changeState(S_SYNCLISTEN); - - openserial_inhibitStop(); } port_INLINE bool ieee154e_processIEs(OpenQueueEntry_t* pkt, uint16_t* lenIE) {
doc UPDATE clarify optional parameter
@@ -281,7 +281,7 @@ int nc_client_tls_ch_add_bind_listen(const char *address, uint16_t port); * * @param[in] address IP address to bind to. * @param[in] port Port to bind to. - * @param[in] hostname Expected server hostname, verified by TLS when connecting to it. + * @param[in] hostname Expected server hostname, verified by TLS when connecting to it. If NULL, the check is skipped. * @return 0 on success, -1 on error. */ int nc_client_tls_ch_add_bind_hostname_listen(const char *address, uint16_t port, const char *hostname);
fix noexcept attribute on array delete operators
@@ -32,8 +32,8 @@ terms of the MIT license. A copy of the license can be found in the file void* operator new[](std::size_t n, const std::nothrow_t& tag) noexcept { (void)(tag); return mi_new_nothrow(n); } #if (__cplusplus >= 201402L || _MSC_VER >= 1916) - void operator delete (void* p, std::size_t n) { mi_free_size(p,n); }; - void operator delete[](void* p, std::size_t n) { mi_free_size(p,n); }; + void operator delete (void* p, std::size_t n) noexcept { mi_free_size(p,n); }; + void operator delete[](void* p, std::size_t n) noexcept { mi_free_size(p,n); }; #endif #if (__cplusplus > 201402L || defined(__cpp_aligned_new))
Fix 'memory.lock' not released when allocation failed, in function 'block_new'
@@ -7136,8 +7136,10 @@ static inline block_s *block_new(void) { } /* collect memory from the system */ blk = sys_alloc(FIO_MEMORY_BLOCK_SIZE * FIO_MEMORY_BLOCKS_PER_ALLOCATION, 0); - if (!blk) + if (!blk) { + fio_unlock(&memory.lock); return NULL; + } FIO_LOG_DEBUG("memory allocator allocated %p from the system", (void *)blk); FIO_MEMORY_ON_BLOCK_ALLOC(); block_init_root(blk, blk);
[meson] add license keyword to project declaration
-project('lighttpd', 'c', version: '1.4.67', default_options : ['c_std=c11']) +project('lighttpd', 'c', version: '1.4.67', license: 'BSD-3-Clause', + default_options : ['c_std=c11'] +) subdir('src') subdir('tests') @@ -10,10 +12,10 @@ subdir('tests') # $ ninja # full build: -# $ meson configure -D build_extra_warnings=true -D with_bzip=true -D with_dbi=true -D with_fam=true -D with_krb5=true -D with_ldap=true -D with_libev=true -D with_libunwind=true -D with_lua=true -D with_mysql=true -D with_openssl=true -D with_pcre2=true -D with_pgsql=true -D with_sasl=true -D with_webdav_locks=true -D with_webdav_props=true -D with_xattr=true -D with_zlib=true +# $ meson configure -D build_extra_warnings=true -D buildtype=debugoptimized -D with_bzip=true -D with_dbi=true -D with_fam=true -D with_krb5=true -D with_ldap=true -D with_libev=true -D with_libunwind=true -D with_lua=true -D with_mysql=true -D with_openssl=true -D with_pcre2=true -D with_pgsql=true -D with_sasl=true -D with_webdav_locks=true -D with_webdav_props=true -D with_xattr=true -D with_zlib=true # optimized build: # $ meson configure -D b_lto=true -D buildtype=debugoptimized -# monolitic build (contains all plugins): -# $ meson configure -D build_static=true +# monolithic build (contains all plugins): +# $ meson configure -D build_static=true -D buildtype=minsize
bump lmod-defaults to 1.3.3
Summary: OpenHPC default login environments Name: lmod-defaults-%{compiler_family}-%{mpi_family}%{PROJ_DELIM} -Version: 1.3.1 +Version: 1.3.3 Release: 1 License: BSD Group: %{PROJ_NAME}/admin
Config: Don't clean hardware w/o config change
@@ -25,6 +25,8 @@ hardware_subdirs += $(SNAP_ROOT)/hardware action_subdirs += $(SNAP_ROOT)/actions snap_config = .snap_config +snap_config_bak = .snap_config_test.bak +snap_config_new = .snap_config_test.new snap_config_sh = .snap_config.sh snap_config_cflags = .snap_config.cflags snap_env_sh = snap_env.sh @@ -124,12 +126,17 @@ endif # SNAP Config config menuconfig xconfig gconfig oldconfig: @echo "$@: Setting up SNAP configuration" + @touch $(snap_config) && sed '/^#/ d' <$(snap_config) >$(snap_config_bak) @for dir in $(config_subdirs); do \ if [ -d $$dir ]; then \ $(MAKE) -s -C $$dir $@ || exit 1; \ fi \ done - @$(MAKE) -C hardware clean + @sed '/^#/ d' <$(snap_config) >$(snap_config_new) + @if [ -n "`diff -q $(snap_config_bak) $(snap_config_new)`" ]; then \ + $(MAKE) -C hardware clean; \ + fi + @$(RM) $(snap_config_bak) $(snap_config_new) snap_config: @$(MAKE) -s menuconfig || exit 1
Make test_alloc_long_entity_value() robust vs allocation changes
@@ -10096,22 +10096,9 @@ START_TEST(test_alloc_long_entity_value) "<doc>&e2;</doc>"; char entity_text[] = "Hello world"; int i; -#define MAX_ALLOC_COUNT 20 - int repeat = 0; +#define MAX_ALLOC_COUNT 40 for (i = 0; i < MAX_ALLOC_COUNT; i++) { - /* Repeat certain counts to defeat cached allocations */ - if (i == 5 && repeat == 4) { - i -= 2; - repeat++; - } - else if ((i == 2 && repeat < 3) || - (i == 3 && repeat == 3) || - (i == 4 && repeat == 5) || - (i == 5 && repeat == 6)) { - i--; - repeat++; - } allocation_count = i; XML_SetUserData(parser, entity_text); XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); @@ -10119,7 +10106,9 @@ START_TEST(test_alloc_long_entity_value) if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text), XML_TRUE) != XML_STATUS_ERROR) break; - XML_ParserReset(parser, NULL); + /* See comment in test_alloc_parse_xdecl() */ + alloc_teardown(); + alloc_setup(); } if (i == 0) fail("Parsing worked despite failing allocations");
Fix test results In a rare case a failure can occur in a VppTestCase which hasn't been part of the original TestSuite, such as in memif testcases. Fix the reporting after test run in these cases.
@@ -87,10 +87,6 @@ class TestResult(dict): return suite_from_failed(self.testcase_suite, rerun_ids) def get_testcase_names(self, test_id): - if re.match(r'.+\..+\..+', test_id): - test_name = self._get_test_description(test_id) - testcase_name = self._get_testcase_doc_name(test_id) - else: # could be tearDownClass (test_ipsec_esp.TestIpsecEsp1) setup_teardown_match = re.match( r'((tearDownClass)|(setUpClass)) \((.+\..+)\)', test_id) @@ -103,17 +99,25 @@ class TestResult(dict): break testcase_name = self._get_testcase_doc_name(testcase_name) else: - test_name = test_id - testcase_name = test_id + test_name = self._get_test_description(test_id) + testcase_name = self._get_testcase_doc_name(test_id) return testcase_name, test_name def _get_test_description(self, test_id): - return get_test_description(descriptions, + if test_id in self.testcases_by_id: + desc = get_test_description(descriptions, self.testcases_by_id[test_id]) + else: + desc = test_id + return desc def _get_testcase_doc_name(self, test_id): - return get_testcase_doc_name(self.testcases_by_id[test_id]) + if test_id in self.testcases_by_id: + doc_name = get_testcase_doc_name(self.testcases_by_id[test_id]) + else: + doc_name = test_id + return doc_name def test_runner_wrapper(suite, keep_alive_pipe, stdouterr_queue,
YAMBi: Execute unit tests again Since commit the unit test would not execute the test suite for the plugin any more.
@@ -140,5 +140,6 @@ TEST (yambi, map) int main (int argc, char * argv[]) { init (argc, argv); // Required for `srcdir_file` to work properly - return 0; + ::testing::InitGoogleTest (&argc, argv); + return RUN_ALL_TESTS (); }
[ctr/lua] update state var prefix for merkle proof verification
@@ -563,7 +563,7 @@ func (cw *ChainWorker) Receive(context actor.Context) { logger.Error().Str("hash", enc.ToString(msg.ContractAddress)).Err(err).Msg("failed to get state for account") } else if contractProof.Inclusion { contractTrieRoot := contractProof.State.StorageRoot - varId := bytes.NewBufferString("_") + varId := bytes.NewBufferString("_sv_") varId.WriteString(msg.VarName) varId.WriteString(msg.VarIndex) varTrieKey := common.Hasher(varId.Bytes())
Correct HTML output for netconn_server example
@@ -25,7 +25,8 @@ resp_data_mainpage_top[] = "" " <meta http-equiv=\"refresh\" content=\"1\" />" " </head>" " <body>" -" <p>Netconn driven website! <p>Total system up time: <b>"; +" <p>Netconn driven website!</p>" +" <p>Total system up time: <b>"; /** * \brief Bottom part of main page
Hide missleading exception
@@ -26,6 +26,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; using CsProtocol; using System.Linq; +using Fiddler; namespace CommonSchema { @@ -325,6 +326,10 @@ namespace CommonSchema outputBuffer.SetLength(0); } while (true); } + catch (EndOfStreamException) + { + Logger.LogDebug("End of Binary Stream"); + } catch (Exception ex) { // end of input
Update syslog message priority format to match sysrepo
@@ -42,10 +42,10 @@ struct { NC_VERB_LEVEL level; const char *label; } verb[] = { - {NC_VERB_ERROR, "ERROR"}, - {NC_VERB_WARNING, "WARNING"}, - {NC_VERB_VERBOSE, "VERBOSE"}, - {NC_VERB_DEBUG, "DEBUG"} + {NC_VERB_ERROR, "[ERR]"}, + {NC_VERB_WARNING, "[WRN]"}, + {NC_VERB_VERBOSE, "[INF]"}, + {NC_VERB_DEBUG, "[DBG]"} }; #ifdef NC_ENABLED_SSH
Raise clap version to 0.15.0
@@ -22,7 +22,7 @@ typedef struct clap_version { } #endif -static CLAP_CONSTEXPR const clap_version CLAP_VERSION = {0, 14, 0}; +static CLAP_CONSTEXPR const clap_version CLAP_VERSION = {0, 15, 0}; static CLAP_CONSTEXPR inline bool clap_version_is_compatible(const clap_version &v) { // For version 0, we require the same minor version because
Configurations/50-masm.conf: add /nologo to ml64 command line.
inherit_from => [ "VC-WIN64-common", asm("x86_64_asm"), sub { $disabled{shared} ? () : "x86_64_uplink" } ], as => "ml64", - asflags => "/c /Cp /Cx /Zi", + asflags => "/nologo /c /Cp /Cx /Zi", asoutflag => "/Fo", sys_id => "WIN64A", bn_asm_src => sub { return undef unless @_;
ipmi-watchdog: WD_POWER_CYCLE_ACTION -> WD_RESET_ACTION The IPMI specification denotes that action 0x1 is Host Reset and 0x3 is Host Power Cycle. Use the correct name for Reset in our watchdog code.
/* WDT expiration actions */ #define WDT_PRETIMEOUT_SMI 0x10 -#define WDT_POWER_CYCLE_ACTION 0x01 +#define WDT_RESET_ACTION 0x01 #define WDT_NO_ACTION 0x00 /* How long to set the overall watchdog timeout for. In units of @@ -122,7 +122,7 @@ void ipmi_wdt_final_reset(void) /* todo: this is disabled while we're waiting on fixed watchdog * behaviour */ #if 0 - set_wdt(WDT_POWER_CYCLE_ACTION | WDT_PRETIMEOUT_SMI, WDT_TIMEOUT, + set_wdt(WDT_RESET_ACTION | WDT_PRETIMEOUT_SMI, WDT_TIMEOUT, WDT_MARGIN/10); reset_wdt(NULL, (void *) 1); #endif @@ -134,7 +134,7 @@ void ipmi_wdt_final_reset(void) void ipmi_wdt_init(void) { init_timer(&wdt_timer, reset_wdt, NULL); - set_wdt(WDT_POWER_CYCLE_ACTION, WDT_TIMEOUT, 0); + set_wdt(WDT_RESET_ACTION, WDT_TIMEOUT, 0); /* Start the WDT. We do it synchronously to make sure it has * started before skiboot continues booting. Otherwise we
add reference to the technical report
@@ -47,7 +47,7 @@ Notable aspects of the design include: and usually uses less memory (up to 25% more in the worst case). A nice property is that it does consistently well over a wide range of benchmarks. -You can read more on the design of _mimalloc_ in the upcoming technical report +You can read more on the design of _mimalloc_ in the [technical report](https://www.microsoft.com/en-us/research/publication/mimalloc-free-list-sharding-in-action) which also has detailed benchmark results. Enjoy! @@ -252,7 +252,7 @@ suffering from underperformance in less common situations (which is what the second half of our benchmark set tests for). We show here only the results on an AMD EPYC system (Apr 2019) -- for -specific details and further benchmarks we refer to the technical report. +specific details and further benchmarks we refer to the [technical report](https://www.microsoft.com/en-us/research/publication/mimalloc-free-list-sharding-in-action). The benchmark suite is scripted and available separately as [mimalloc-bench](https://github.com/daanx/mimalloc-bench).
router_readconfig: keep around all resolved addresses Removing all but the first resolved address disallows us to try fail-over strategies lateron.
@@ -625,7 +625,6 @@ router_readconfig(router *orig, char sport[8]; int err; struct addrinfo *walk = NULL; - struct addrinfo *next = NULL; char hnbuf[256]; for (; *p != '\0' && !isspace(*p) && *p != ';'; p++) { @@ -733,30 +732,16 @@ router_readconfig(router *orig, router_free(ret); return NULL; } - - if (!useall && saddrs->ai_next != NULL) { - /* take first result only */ - freeaddrinfo(saddrs->ai_next); - saddrs->ai_next = NULL; - } } else { /* TODO: try to create/append to file */ proto = "file"; - saddrs = (void *)1; } - walk = saddrs; - while (walk != NULL) { + walk = saddrs; /* NULL if file */ + do { servers *s; - /* disconnect from the rest to avoid double - * frees by freeaddrinfo() in server_destroy() */ - if (walk != (void *)1) { - next = walk->ai_next; - walk->ai_next = NULL; - } - if (useall) { /* unfold whatever we resolved, for human * readability issues */ @@ -794,7 +779,7 @@ router_readconfig(router *orig, newserver = server_new(ip, (unsigned short)port, *proto == 'f' ? CON_FILE : *proto == 'u' ? CON_UDP : CON_TCP, - walk == (void *)1 ? NULL : walk, + walk, queuesize, batchsize, maxstalls, iotimeout, sockbufsize); if (newserver == NULL) { @@ -942,8 +927,8 @@ router_readconfig(router *orig, } } - walk = next; - } + walk = useall ? walk->ai_next : NULL; + } while (walk != NULL); *p = termchr; for (; *p != '\0' && isspace(*p); p++)
Improved the README of the CMSIS-DSP Python wrapper. More details about the installation procedure.
@@ -8,15 +8,35 @@ But even with those limitations, it can be very useful to test a CMSIS-DSP imple # How to build and install +## Tested configurations + +The building of this package has been tested on Windows with the Python install from python.org and Microsoft Visual 2017. + +It has also been tested with cygwin. In that case, python-devel must be installed too. To run the examples, scipy and matplotlib must also be installed in cygwin. + +On Linux, it worked with standard installation. + +Other configurations should work but the setup.py file would have to be improved. It is a first version and the build process will have to be improved. + +The package is working with Python 2 and 3. + +## Building + The build is using a customized arm_math.h in folder cmsisdsp_pkg/src to be able to compile on windows. As a consequence, if you build on an ARM computer, you won't get the optimizations of the CMSIS library. It is possible to get them by replacing the customized arm_math.h by the official one. -Following command will build in place. +Since the CMSIS-DSP wrapper is using numpy, you must first install it if not already done. So, for instance to install it locally you could do: + + > pip install numpy --user + +Once numpy is installed, you can build the CMSIS-DSP python wrapper. Go to folder CMSIS/DSP/PythonWrapper. + +Following command will build in place if you have the right compiler and if Python can find it. > python setup.py build_ext --inplace -If you launch Python from same directory you'll be able to play with the test scripts. You'll need to install a few additional Python packages to run the examples. See below. +Then, if you launch Python from same directory you'll be able to play with the test scripts. You'll need to install a few additional Python packages to run the examples (scipy and matplotlib). See below. If you want to install the cmsisdsp package, it is advised to install it into a virtualenv @@ -37,14 +57,14 @@ Activate the environment: Install some packages to be able to run the examples > pip install numpy - > pip instal scipy - > pip instal matplotplib + > pip install scipy + > pip install matplotlib Now, you can install the cmsisdsp package in editable mode: > pip install -e "Path To The Folder Containing setup.py" -Then you can copy the scripts testdsp.py and example.py and try to run them from this virtual environment. +Then you can copy the scripts testdsp.py and example.py and try to run them from this virtual environment. example.y is requiring a data file to be downloaded from the web. See below in this document for the link. # Usage @@ -178,6 +198,14 @@ This example depends on a data file which can be downloaded here: https://www.physionet.org/pn3/ecgiddb/Person_87/rec_2.dat +This signal was created for a master thesis: + +Lugovaya T.S. Biometric human identification based on electrocardiogram. [Master's thesis] Faculty of Computing Technologies and Informatics, Electrotechnical University "LETI", Saint-Petersburg, Russian Federation; June 2005. + +and it is part of the PhysioNet database + +Goldberger AL, Amaral LAN, Glass L, Hausdorff JM, Ivanov PCh, Mark RG, Mietus JE, Moody GB, Peng C-K, Stanley HE. PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals. Circulation 101(23):e215-e220 [Circulation Electronic Pages; http://circ.ahajournals.org/cgi/content/full/101/23/e215]; 2000 (June 13). + # LIMITATIONS
Add objcopy for clang7_cortex toolchains Add objcopy for clang7_cortex toolchains
"nm": { "description": "Run nm" }, + "objcopy": { + "description": "Run objcopy" + }, "svn": { "description": "Subversion command-line client" }, "strip": { "bottle": "clang7", "executable": "llvm-strip" + }, + "objcopy": { + "bottle": "clang7", + "executable": "llvm-objcopy" } }, "platforms": [ "strip": { "bottle": "clang7", "executable": "llvm-strip" + }, + "objcopy": { + "bottle": "clang7", + "executable": "llvm-objcopy" } }, "platforms": [ "llvm-strip": [ "bin", "llvm-strip" + ], + "llvm-objcopy": [ + "bin", + "llvm-objcopy" ] } },
capture: adding attr parsing
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */ #include <stdio.h> +#include <string.h> #include "m_pd.h" #include "common/loud.h" #include "hammer/file.h" #define CAPTURE_DEFSIZE 512 +#define CAPTURE_DEFPREC 64 //default precision +#define CAPTURE_MINPREC 1 //minimum preision +//not sure what's planned for precision Matt but i'll just put 64 here for 64 bits for now +//and then delete these two lines of comments after you're done - DK typedef struct _capture { @@ -19,6 +24,7 @@ typedef struct _capture int x_count; int x_counter; int x_head; + int x_precision; t_outlet * x_count_outlet; t_hammerfile *x_filehandle; } t_capture; @@ -240,26 +246,53 @@ static void capture_free(t_capture *x) freebytes(x->x_buffer, x->x_bufsize * sizeof(*x->x_buffer)); } -static void *capture_new(t_symbol *s, t_floatarg f) +static void *capture_new(t_symbol *s, int argc, t_atom * argv) { t_capture *x = 0; float *buffer; - int bufsize = (int)f; /* CHECKME */ - if (bufsize <= 0) /* CHECKME */ - bufsize = CAPTURE_DEFSIZE; + int bufsize; + int precision; + t_float _bufsize = CAPTURE_DEFSIZE; + t_float _precision = CAPTURE_DEFPREC; + t_symbol * dispfmt = NULL; + while(argc){ + if(argv->a_type == A_FLOAT){ + _bufsize = atom_getfloatarg(0, argc, argv); + argc--; + argv++; + } + else if(argv->a_type == A_SYMBOL){ + t_symbol * curargt = atom_getsymbolarg(0, argc, argv); + argc--; + argv++; + if((strcmp(curargt->s_name, "@precision") == 0) && argc){ + _precision = atom_getfloatarg(0, argc, argv); + argc--; + argv++; + } + else{ + dispfmt = curargt; + }; + }; + }; + + precision = _precision > CAPTURE_MINPREC ? (int)_precision : CAPTURE_MINPREC; + bufsize = _bufsize > 0 ? (int)_bufsize : CAPTURE_DEFSIZE; + if (buffer = getbytes(bufsize * sizeof(*buffer))) { x = (t_capture *)pd_new(capture_class); x->x_canvas = canvas_getcurrent(); - if (s && s != &s_) + if (dispfmt) { - if (s == gensym("x")) + if (dispfmt == gensym("x")) x->x_intmode = 'x'; - else if (s == gensym("m")) + else if (dispfmt == gensym("m")) x->x_intmode = 'm'; else x->x_intmode = 'd'; /* ignore floats */ - } + }; + x->x_precision = precision; x->x_buffer = buffer; x->x_bufsize = bufsize; outlet_new((t_object *)x, &s_float); @@ -275,7 +308,7 @@ void capture_setup(void) capture_class = class_new(gensym("capture"), (t_newmethod)capture_new, (t_method)capture_free, - sizeof(t_capture), 0, A_DEFFLOAT, A_DEFSYM, 0); + sizeof(t_capture), 0, A_GIMME, 0); class_addfloat(capture_class, capture_float); class_addlist(capture_class, capture_list); class_addmethod(capture_class, (t_method)capture_clear,
no-op on bad mugs
:: |% ++ bite :: packet to cake - |= pac=rock ^- cake + |= pac=rock + ^- (unit cake) =+ [mag=(end 5 1 pac) bod=(rsh 5 1 pac)] =+ :* vez=(end 0 3 mag) :: protocol version chk=(cut 0 [3 20] mag) :: checksum vix=(bex +((cut 0 [25 2] mag))) :: width of sender tay=(cut 0 [27 5] mag) :: message type == - ?> =(protocol-version vez) - ?> =(chk (end 0 20 (mug bod))) + :: XX these packets should be firewalled in vere so that they don't + :: make it into the event log + :: + ?. =(protocol-version vez) ~ + ?. =(chk (end 0 20 (mug bod))) ~ + %- some :+ [(end 3 wix bod) (cut 3 [wix vix] bod)] (kins tay) (rsh 3 (add wix vix) bod) ~/ %gnaw |= [kay=cape ryn=lane pac=rock] :: process packet ^- [p=(list boon) q=fort] - ?. =(protocol-version (end 0 3 pac)) [~ fox] - =+ kec=(bite pac) - ?: (goop p.p.kec) + =/ kec=(unit cake) (bite pac) + ?~ kec [~ fox] + ?: (goop p.p.u.kec) [~ fox] - ?. =(our q.p.kec) + ?. =(our q.p.u.kec) [~ fox] =; zap=[p=(list boon) q=fort] [(weld p.zap next) q.zap] =< zork =< zank - :: ~& [%hear p.p.kec ryn `@p`(mug (shaf %flap pac))] - %- ~(chew la:(ho:um p.p.kec) kay ryn %none (shaf %flap pac)) - [q.kec r.kec] + :: ~& [%hear p.p.u.kec ryn `@p`(mug (shaf %flap pac))] + %- ~(chew la:(ho:um p.p.u.kec) kay ryn %none (shaf %flap pac)) + [q.u.kec r.u.kec] :: ++ goop :: blacklist |= him=ship
VERSION bump to version 2.0.90
@@ -62,7 +62,7 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) # set version of the project set(LIBYANG_MAJOR_VERSION 2) set(LIBYANG_MINOR_VERSION 0) -set(LIBYANG_MICRO_VERSION 89) +set(LIBYANG_MICRO_VERSION 90) set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION}) # set version of the library set(LIBYANG_MAJOR_SOVERSION 2)
buffers: performance improvement Initialize the local variables as to prevent first fall through one by one processing; skip prefetching rather than doing one by one when count below 12. Type: improvement
@@ -786,28 +786,42 @@ vlib_buffer_free_inline (vlib_main_t * vm, u32 * buffers, u32 n_buffers, vlib_buffer_t bt = { }; #if defined(CLIB_HAVE_VEC128) vlib_buffer_t bpi_mask = {.buffer_pool_index = ~0 }; - vlib_buffer_t bpi_vec = {.buffer_pool_index = ~0 }; + vlib_buffer_t bpi_vec = {}; vlib_buffer_t flags_refs_mask = { .flags = VLIB_BUFFER_NEXT_PRESENT, .ref_count = ~1 }; #endif + if (PREDICT_FALSE (n_buffers == 0)) + return; + + vlib_buffer_t *b = vlib_get_buffer (vm, buffers[0]); + buffer_pool_index = b->buffer_pool_index; + bp = vlib_get_buffer_pool (vm, buffer_pool_index); + vlib_buffer_copy_template (&bt, &bp->buffer_template); +#if defined(CLIB_HAVE_VEC128) + bpi_vec.buffer_pool_index = buffer_pool_index; +#endif + while (n_buffers) { vlib_buffer_t *b[8]; u32 bi, sum = 0, flags, next; - if (n_buffers < 12) + if (n_buffers < 4) goto one_by_one; vlib_get_buffers (vm, buffers, b, 4); - vlib_get_buffers (vm, buffers + 8, b + 4, 4); + if (n_buffers >= 12) + { + vlib_get_buffers (vm, buffers + 8, b + 4, 4); vlib_prefetch_buffer_header (b[4], LOAD); vlib_prefetch_buffer_header (b[5], LOAD); vlib_prefetch_buffer_header (b[6], LOAD); vlib_prefetch_buffer_header (b[7], LOAD); + } #if defined(CLIB_HAVE_VEC128) u8x16 p0, p1, p2, p3, r;
fixed memory leak and cleaned up style
@@ -993,15 +993,16 @@ _cw_intr_win(c3_c* han_c) } #endif -c3_c -*_cw_eval_get_input(FILE* fp, size_t size) +/* _cw_eval_get_input(): Read input from file and return a concatenated string +*/ +c3_c* +_cw_eval_get_input(FILE* fp, size_t size) { -//The size is extended by the input with the value of the provisional c3_c *str; c3_i ch; size_t len = 0; - str = realloc(NULL, sizeof(*str)*size);//size is start size + str = c3_realloc(NULL, size);//size is start size if( !str ) return str; @@ -1009,7 +1010,8 @@ c3_c while( EOF != (ch=fgetc(fp)) ){ str[len++]=ch; if( len == size ){ - str = realloc(str, sizeof(*str)*(size+=16)); + size +=16; + str = realloc(str, (size)); if(!str) return str; } @@ -1017,7 +1019,7 @@ c3_c str[len++]='\0'; - return realloc(str, sizeof(*str)*len); + return c3_realloc(str,len); } @@ -1069,6 +1071,7 @@ _cw_eval_commence(c3_i argc, c3_c* argv[]) } u3z(res); u3z(gat); + free(evl_c); } /* _cw_serf_commence(): initialize and run serf
Disable profile recorder controller by default to get the e2e test passing
@@ -499,6 +499,10 @@ func (r *ReconcileSPOd) getConfiguredSPOd( useCustomHostProc := cfg.Spec.HostProcVolumePath != bindata.DefaultHostProcPath volume, mount := bindata.CustomHostProcVolume(cfg.Spec.HostProcVolumePath) + // Disable profile recording controller by default + templateSpec.Containers[bindata.ContainerIDDaemon].Args = append( + templateSpec.Containers[bindata.ContainerIDDaemon].Args, + "--with-recording=false") if cfg.Spec.EnableLogEnricher || cfg.Spec.EnableBpfRecorder { if useCustomHostProc { templateSpec.Volumes = append(templateSpec.Volumes, volume)
Adjust nrf52832 compile output
@@ -182,7 +182,7 @@ nrf52832.a: $(OBJECTS) # Assemble files $(OBJECT_DIRECTORY)/%.o: %.s - @echo Compiling file: $(notdir $<) + $(TRACE_CC) $(Q)$(CC) $(ASMFLAGS) $(addprefix -I$(NRF52_SDK_ROOT)/, $(INC_PATHS)) -c -o $@ $< %.jlink:
Enable more Mal tests
@@ -65,7 +65,6 @@ commands_full = [ "args": ["16", "64"], "expect_sha1": "d85df3561eb15f6f0e6f20d5640e8e1306222c6d" }, { - "skip": True, # Fails on Windows-uvwasi, on CI only (CNR locally) "name": "mal", "wasm": "./wasi/mal/mal.wasm", "args": ["./wasi/mal/test-fib.mal", "16"],
Fix buffer overflow in the cc26x0-cc13x0 BMP280 sensor driver The calibration data structure's size is 28 bytes, but we were only allocating 24 bytes for the buffer used for calibration I2C transactions. I2C transactions would write 4 bytes beyond the end of the buffer.
/*---------------------------------------------------------------------------*/ /* Misc. */ #define MEAS_DATA_SIZE 6 -#define CALIB_DATA_SIZE 24 /*---------------------------------------------------------------------------*/ #define RES_OFF 0 #define RES_ULTRA_LOW_POWER 1 @@ -120,8 +119,8 @@ typedef struct bmp_280_calibration { int16_t dig_p9; int32_t t_fine; } bmp_280_calibration_t; -/*---------------------------------------------------------------------------*/ -static uint8_t calibration_data[CALIB_DATA_SIZE]; + +static bmp_280_calibration_t calibration_data; /*---------------------------------------------------------------------------*/ #define SENSOR_STATUS_DISABLED 0 #define SENSOR_STATUS_INITIALISED 1 @@ -165,7 +164,8 @@ init(void) select_on_bus(); /* Read and store calibration data */ - sensor_common_read_reg(ADDR_CALIB, calibration_data, CALIB_DATA_SIZE); + sensor_common_read_reg(ADDR_CALIB, (uint8_t *)&calibration_data, + sizeof(calibration_data)); /* Reset the sensor */ val = VAL_RESET_EXECUTE; @@ -227,7 +227,7 @@ static void convert(uint8_t *data, int32_t *temp, uint32_t *press) { int32_t utemp, upress; - bmp_280_calibration_t *p = (bmp_280_calibration_t *)calibration_data; + bmp_280_calibration_t *p = &calibration_data; int32_t v_x1_u32r; int32_t v_x2_u32r; int32_t temperature;
Makefile: Add make all target This is a covenient way to ensure that everything builds before pushing changes.
@@ -4,6 +4,10 @@ help: .PHONY: doc +all: movehub cityhub cplushub nxt ev3dev-armel + +clean-all: clean-movehub clean-cityhub clean-cplushub clean-nxt clean-ev3dev-armel + ev3dev-host: @$(MAKE) -C bricks/ev3dev CROSS_COMPILE=
Added --browsers-file command line option to default config file.
@@ -427,6 +427,12 @@ no-term-resolver false # all-static-files false +# Include an additional delimited list of browsers/crawlers/feeds etc. +# See config/browsers.list for an example or +# https://raw.githubusercontent.com/allinurl/goaccess/master/config/browsers.list +# +#browsers-file <filename> + # Date specificity. Possible values: `date` (default), or `hr`. # #date-spec hr
tests: stop overriding hashbang in scripts Execute scripts directly so they use the specified interpreter + parameters in the first line. This aligns the behavior between running scripts through make and manually in the shell.
@@ -12,7 +12,7 @@ summary: $(TESTLOGS) %.testlog: %.sh @echo "========== Running script test $(basename $@).sh ==========" - @bash "$(basename $@).sh" "$(CONTIKI)" + @./"$(basename $@).sh" "$(CONTIKI)" clean: @rm -f *.*log report summary
fix free memory issue.
@@ -1165,7 +1165,7 @@ static void *sync_thread(void *arg) static void reset_callback(struct ldus_rbtree *node) { - struct block_internal *b = (struct block_internal *)_rbtree_ptr(node); + struct block_internal *b = (struct block_internal *)node; if(b->remark) { xdag_free(b->remark); }
update api_platon.h fix the issue
@@ -298,7 +298,7 @@ __BOATSTATIC __BOATINLINE BOAT_RESULT BoatPlatONTxSetData(BoatPlatONTx *tx_ptr, * @brief Prase RPC method RESPONSE. * @see web3_parse_json_result() ******************************************************************************/ -BOAT_RESULT BoatPlatONPraseRpcResponseStringResult(const BCHAR *json_string, BoatFieldVariable *result_out) +BOAT_RESULT BoatPlatONPraseRpcResponseStringResult(const BCHAR *json_string, BoatFieldVariable *result_out); /*!****************************************************************************
bricks/_common: Group module configs. This makes it easier to see at a glance what is enabled.
#define MICROPY_ENABLE_COMPILER (PYBRICKS_OPT_COMPILER) +// Enabled modules +#define MICROPY_PY_IO (PYBRICKS_OPT_EXTRA_MOD) +#define MICROPY_PY_MATH (PYBRICKS_OPT_FLOAT) +#define MICROPY_PY_STRUCT (PYBRICKS_OPT_EXTRA_MOD) +#define MICROPY_PY_SYS (PYBRICKS_OPT_EXTRA_MOD) +#define MICROPY_PY_UERRNO (1) +#define MICROPY_PY_UJSON (PYBRICKS_OPT_EXTRA_MOD) +#define MICROPY_PY_URANDOM (PYBRICKS_OPT_EXTRA_MOD) +#define MICROPY_PY_USELECT (PYBRICKS_OPT_EXTRA_MOD) + #define MICROPY_PY_UERRNO_LIST \ X(EPERM) \ X(EIO) \ #define MICROPY_PY_ARRAY (0) #define MICROPY_PY_ATTRTUPLE (0) #define MICROPY_PY_COLLECTIONS (0) -#define MICROPY_PY_MATH (PYBRICKS_OPT_FLOAT) #define MICROPY_PY_CMATH (0) #define MICROPY_PY_ALL_SPECIAL_METHODS (PYBRICKS_OPT_EXTRA_MOD) #define MICROPY_PY_REVERSE_SPECIAL_METHODS (PYBRICKS_OPT_EXTRA_MOD) -#define MICROPY_PY_IO (PYBRICKS_OPT_EXTRA_MOD) -#define MICROPY_PY_UJSON (PYBRICKS_OPT_EXTRA_MOD) -#define MICROPY_PY_STRUCT (PYBRICKS_OPT_EXTRA_MOD) -#define MICROPY_PY_SYS (PYBRICKS_OPT_EXTRA_MOD) #define MICROPY_PY_SYS_EXIT (0) #define MICROPY_PY_SYS_MODULES (0) #define MICROPY_PY_SYS_STDFILES (PYBRICKS_OPT_EXTRA_MOD) #define MICROPY_PY_SYS_STDIO_BUFFER (PYBRICKS_OPT_EXTRA_MOD) -#define MICROPY_PY_URANDOM (PYBRICKS_OPT_EXTRA_MOD) #define MICROPY_PY_URANDOM_EXTRA_FUNCS (PYBRICKS_OPT_EXTRA_MOD) #define MICROPY_PY_URANDOM_SEED_INIT_FUNC ({ extern uint32_t pbdrv_clock_get_us(void); pbdrv_clock_get_us(); }) -#define MICROPY_PY_USELECT (PYBRICKS_OPT_EXTRA_MOD) #define MICROPY_PY_UTIME_MP_HAL (0) #define MICROPY_MODULE_BUILTIN_INIT (1) #define MICROPY_MODULE_WEAK_LINKS (0) #endif #define MICROPY_KBD_EXCEPTION (1) #define MICROPY_ENABLE_SCHEDULER (0) -#define MICROPY_PY_UERRNO (1) #define MICROPY_PY_INSTANCE_ATTRS (1) #define MICROPY_PERSISTENT_CODE_LOAD (1)
PH: Center choose columns window
@@ -131,6 +131,7 @@ INT_PTR CALLBACK PhpColumnsDlgProc( context->InactiveList = GetDlgItem(hwndDlg, IDC_INACTIVE); context->ActiveList = GetDlgItem(hwndDlg, IDC_ACTIVE); + PhCenterWindow(hwndDlg, GetParent(hwndDlg)); if (context->Type == PH_CONTROL_TYPE_TREE_NEW) {
generalizes =model syntax to be valid for any toro tsfs, tssm, tshp, etc.
?~(a !! ?~(t.a [%wing i.a] [%tsgl [%wing i.a] $(a t.a)])) (most col rope) :: + ++ espy :: face for =model + |= rot=root + ^- (unit (pair term root)) + =; mot + ?~(mot ~ `[u.mot rot]) + |- ^- (unit term) + ?+ rot ~ + {$bcsm *} $(rot p.rot) + {$wing *} ?~(p.rot ~ ?^(i.p.rot ~ `i.p.rot)) + {$limb *} `p.rot + {$dbug *} $(rot ~(open ap rot)) + {$tsgl *} $(rot ~(open ap rot)) + {$tsgr *} $(rot q.rot) + == + :: ++ scad %+ knee *root |. ~+ %- stew == :- '=' ;~ pfix tis - %+ sear - |= hon/hoon - ^- (unit hoon) - %+ bind - |- ^- (unit term) - ?+ hon ~ - {$bcsm *} $(hon p.hon) - {$wing *} ?~(p.hon ~ ?^(i.p.hon ~ `i.p.hon)) - {$limb *} `p.hon - {$dbug *} $(hon ~(open ap hon)) - {$tsgl *} $(hon ~(open ap hon)) - {$tsgr *} $(hon q.hon) - == - |=(term [%bcts +< hon]) - wyde + %+ cook + |=([mot=term rot=root] [%bcts mot rot]) + (sear espy wyde) == :- ['a' 'z'] ;~ pose == == :: - ++ wise ;~(plug sym (punt ;~(pfix ;~(pose fas tis) wyde))) + ++ wise :: toro form + ;~ pose + ;~ pfix tis + %+ cook + |=([mot=term rot=root] [mot ~ rot]) + (sear espy wyde) + == + ;~(plug sym (punt ;~(pfix ;~(pose fas tis) wyde))) + == + :: ++ wrap |* fel/rule %+ cook
crypto.c: Clarify comments on use of userdata for header + context + key opad blocks
@@ -172,7 +172,8 @@ static int crypto_lhash (lua_State *L) static int crypto_new_hash_hmac (lua_State *L, int what) { - /* get pointer to relevant hash_mechs table entry in app/crypto/digest.c */ + // get pointer to relevant hash_mechs table entry in app/crypto/digest.c. Note that + // the size of the table needed is dependent on the the digest type const digest_mech_info_t *mi = crypto_digest_mech (luaL_checkstring (L, 1)); if (!mi) return bad_mech (L); @@ -182,22 +183,24 @@ static int crypto_new_hash_hmac (lua_State *L, int what) uint8_t *k_opad = NULL; if (what == WANT_HMAC) - { + { // The key and k_opad are only used for HMAC; these default to NULLs for HASH key = luaL_checklstring (L, 2, &len); k_opad_len = mi->block_size; } // create a userdatum with specific metatable. This comprises the ud header, - // the encrypto context block, and an optional HMAC block + // the encrypto context block, and an optional HMAC block as a single allocation + // unit udlen = sizeof(digest_user_datum_t) + mi->ctx_size + k_opad_len; digest_user_datum_t *dudat = (digest_user_datum_t *)lua_newuserdata(L, udlen); - void *ctx = (char *)(dudat + 1); - mi->create (ctx); - - luaL_getmetatable(L, "crypto.hash"); + luaL_getmetatable(L, "crypto.hash"); // and set its metatable to the crypto.hash table lua_setmetatable(L, -2); + void *ctx = dudat + 1; // The context block immediately follows the digest_user_datum + mi->create (ctx); + if (what == WANT_HMAC) { + // The k_opad block immediately follows the context block k_opad = (char *)ctx + mi->ctx_size; crypto_hmac_begin (ctx, mi, key, len, k_opad); }
ssl-opt: add state check
@@ -10484,6 +10484,7 @@ run_test "TLS 1.3: Server side check - openssl" \ -s "tls13 server state: MBEDTLS_SSL_CLIENT_HELLO" \ -s "tls13 server state: MBEDTLS_SSL_SERVER_HELLO" \ -s "tls13 server state: MBEDTLS_SSL_ENCRYPTED_EXTENSIONS" \ + -s "tls13 server state: MBEDTLS_SSL_SERVER_CERTIFICATE" \ -s "SSL - The requested feature is not available" \ -s "=> parse client hello" \ -s "<= parse client hello" @@ -10500,6 +10501,7 @@ run_test "TLS 1.3: Server side check - gnutls" \ -s "tls13 server state: MBEDTLS_SSL_CLIENT_HELLO" \ -s "tls13 server state: MBEDTLS_SSL_SERVER_HELLO" \ -s "tls13 server state: MBEDTLS_SSL_ENCRYPTED_EXTENSIONS" \ + -s "tls13 server state: MBEDTLS_SSL_SERVER_CERTIFICATE" \ -s "SSL - The requested feature is not available" \ -s "=> parse client hello" \ -s "<= parse client hello" @@ -10515,6 +10517,7 @@ run_test "TLS 1.3: Server side check - mbedtls" \ -s "tls13 server state: MBEDTLS_SSL_CLIENT_HELLO" \ -s "tls13 server state: MBEDTLS_SSL_SERVER_HELLO" \ -s "tls13 server state: MBEDTLS_SSL_ENCRYPTED_EXTENSIONS" \ + -s "tls13 server state: MBEDTLS_SSL_SERVER_CERTIFICATE" \ -c "client state: MBEDTLS_SSL_ENCRYPTED_EXTENSIONS" \ -s "SSL - The requested feature is not available" \ -s "=> parse client hello" \
Make ioclass name bigger
@@ -293,7 +293,7 @@ typedef enum { #define OCF_IO_CLASS_INVALID OCF_IO_CLASS_MAX /** Maximum size of the IO class name */ -#define OCF_IO_CLASS_NAME_MAX 33 +#define OCF_IO_CLASS_NAME_MAX 1024 /** IO class priority which indicates pinning */ #define OCF_IO_CLASS_PRIO_PINNED -1
mesh: Initialize msg_ctx when re-encrypting friend msg Set app_idx and net_idx in the msg_ctx before calling bt_mesh_keys_resolve when re-encrypting friend messages, as they'll be referenced inside the function. this is port of
@@ -345,7 +345,12 @@ static int unseg_app_sdu_unpack(struct bt_mesh_friend *frnd, struct unseg_app_sdu_meta *meta) { uint16_t app_idx = FRIEND_ADV(buf)->app_idx; - struct bt_mesh_net_rx net; + struct bt_mesh_net_rx net = { + .ctx = { + .app_idx = app_idx, + .net_idx = frnd->subnet->net_idx, + }, + }; int err; meta->subnet = frnd->subnet; @@ -437,6 +442,8 @@ static int unseg_app_sdu_prepare(struct bt_mesh_friend *frnd, return 0; } + BT_DBG("Re-encrypting friend pdu"); + err = unseg_app_sdu_decrypt(frnd, buf, &meta); if (err) { BT_WARN("Decryption failed! %d", err);
free IPD receive buffer when connection gets lost or reset event occurs
@@ -341,6 +341,12 @@ espi_reset_everything(uint8_t forced) { #endif /* ESP_CFG_MODE_STATION */ esp.m.sta.is_connected = 0; + /* Check if IPD active */ + if (esp.m.ipd.buff != NULL) { + esp_pbuf_free(esp.m.ipd.buff); + esp.m.ipd.buff = NULL; + } + /* Invalid ESP modules */ ESP_MEMSET(&esp.m, 0x00, sizeof(esp.m)); @@ -984,6 +990,11 @@ espi_process(const void* data, size_t data_len) { static uint8_t ch_prev1, ch_prev2; static esp_unicode_t unicode; + /* Check status if device is available */ + if (!esp.status.f.dev_present) { + return espERRNODEVICE; + } + d = data; /* Go to byte format */ d_len = data_len; while (d_len) { /* Read entire set of characters from buffer */
SW: Fix error handling when polling for job completion
@@ -712,6 +712,7 @@ int snap_action_completed(struct snap_action *action, int *rc, int timeout) } if (rc) *rc = _rc; + return (action_data & ACTION_CONTROL_IDLE) == ACTION_CONTROL_IDLE; } @@ -797,9 +798,16 @@ int snap_action_sync_execute_job(struct snap_action *action, snap_action_start(action); completed = snap_action_completed(action, &rc, timeout_sec); + /* Issue #360 */ + if (rc != 0) { + snap_trace("%s: EIO rc=%d completed=%d\n", __func__, + rc, completed); + rc = SNAP_EIO; + goto __snap_action_sync_execute_job_exit; + } if (completed == 0) { /* Not done */ - snap_trace("%s: rc=%d completed=%d\n", __func__, + snap_trace("%s: ETIME rc=%d completed=%d\n", __func__, rc, completed); if (rc == 0) { errno = ETIME; @@ -830,7 +838,8 @@ int snap_action_sync_execute_job(struct snap_action *action, rc = snap_mmio_read32(card, action_addr, &job_data[i]); if (rc != 0) goto __snap_action_sync_execute_job_exit; - snap_trace(" %s: %d Addr: %x Data: %x\n", __func__, i, action_addr, job_data[i]); + snap_trace(" %s: %d Addr: %x Data: %x\n", __func__, i, + action_addr, job_data[i]); } __snap_action_sync_execute_job_exit:
Tests: added test for encoding in the "pass" option.
@@ -181,6 +181,61 @@ class TestRouting(TestApplicationProto): self.assertEqual(self.get(url='/blah')['status'], 200, '/blah') self.assertEqual(self.get(url='/BLAH')['status'], 404, '/BLAH') + def test_routes_pass_encode(self): + def check_pass(path, name): + self.assertIn( + 'success', + self.conf( + { + "listeners": { + "*:7080": {"pass": "applications/" + path} + }, + "applications": { + name: { + "type": "python", + "processes": {"spare": 0}, + "path": self.current_dir + '/python/empty', + "working_directory": self.current_dir + + '/python/empty', + "module": "wsgi", + } + }, + } + ), + ) + + self.assertEqual(self.get()['status'], 200) + + check_pass("%25", "%") + check_pass("blah%2Fblah", "blah/blah") + check_pass("%2Fblah%2F%2Fblah%2F", "/blah//blah/") + check_pass("%20blah%252Fblah%7E", " blah%2Fblah~") + + def check_pass_error(path, name): + self.assertIn( + 'error', + self.conf( + { + "listeners": { + "*:7080": {"pass": "applications/" + path} + }, + "applications": { + name: { + "type": "python", + "processes": {"spare": 0}, + "path": self.current_dir + '/python/empty', + "working_directory": self.current_dir + + '/python/empty', + "module": "wsgi", + } + }, + } + ), + ) + + check_pass_error("%", "%") + check_pass_error("%1", "%1") + def test_routes_absent(self): self.conf( {
VERSION bump to version 2.0.214
@@ -61,7 +61,7 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) # set version of the project set(LIBYANG_MAJOR_VERSION 2) set(LIBYANG_MINOR_VERSION 0) -set(LIBYANG_MICRO_VERSION 213) +set(LIBYANG_MICRO_VERSION 214) set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION}) # set version of the library set(LIBYANG_MAJOR_SOVERSION 2)
Reduce default text size
@@ -38,8 +38,8 @@ text_box_t* text_box_create(Size size, Color background_color) { text_box_t* tb = calloc(1, sizeof(text_box_t)); tb->layer = create_layer(size); tb->size = size; - tb->font_size = size_make(12, 12); - tb->font_padding = size_make(2, 2); + tb->font_size = size_make(8, 12); + tb->font_padding = size_make(0, 4); tb->background_color = background_color; // Fill the background color to start off with draw_rect(tb->layer, rect_make(point_zero(), size), background_color, THICKNESS_FILLED);
fixed outline items corruption
@@ -1885,17 +1885,12 @@ static void drawOutlineBar(Code* code, s32 x, s32 y) tic_api_rect(code->tic, rect.x - 1, rect.y + code->outline.index*STUDIO_TEXT_HEIGHT, rect.w + 1, TIC_FONT_HEIGHT + 2, tic_color_red); - for(s32 i = 0; i < code->outline.size; i++) + for(const tic_outline_item* ptr = code->outline.items, *end = ptr + code->outline.size; + ptr < end; ptr++, y += STUDIO_TEXT_HEIGHT) { - const tic_outline_item* ptr = &code->outline.items[i]; - - char orig[STUDIO_TEXT_BUFFER_WIDTH]; + char orig[STUDIO_TEXT_BUFFER_WIDTH] = {0}; strncpy(orig, ptr->pos, MIN(ptr->size, sizeof(orig))); - drawFilterMatch(code, x, y, orig, filter); - - ptr++; - y += STUDIO_TEXT_HEIGHT; } } else
pci: Wait 20ms before checking presence detect on PCIe As the PHB presence logic has a debounce timer that can take a while to settle.
@@ -1641,6 +1641,11 @@ void pci_init_slots(void) { unsigned int i; + /* Some PHBs may need that long to debounce the presence detect + * after HW initialization. + */ + time_wait_ms(20); + prlog(PR_NOTICE, "PCI: Resetting PHBs...\n"); pci_do_jobs(pci_reset_phb);
btc-wallet: fix imports
@@ -12,10 +12,10 @@ import { import Sigil from '../Sigil'; import * as bitcoin from 'bitcoinjs-lib'; import { isValidPatp } from 'urbit-ob'; -import Sent from './sent.js'; +import Sent from './Sent.tsx'; import Error from '../Error'; -import { copyToClipboard, satsToCurrency } from '../../lib/util.js'; -import { useSettings } from '../../hooks/useSettings.js'; +import { copyToClipboard, satsToCurrency } from '../../lib/util.ts'; +import { useSettings } from '../../hooks/useSettings.tsx'; import { api } from '../../lib/api'; type Props = {
fix COPY_FILES_TO_BUILD_PREFIX to accept arguments started started with ${CURDIR}/ and ${BINDIR}/
from _common import sort_by_keywords -SOURCE_ROOT = '${ARCADIA_ROOT}' -BUILD_ROOT = '${ARCADIA_BUILD_ROOT}' +SOURCE_ROOT = '${ARCADIA_ROOT}/' +BUILD_ROOT = '${ARCADIA_BUILD_ROOT}/' +CURDIR = '${CURDIR}/' +BINDIR = '${BINDIR}/' def oncopy_files_to_build_prefix(unit, *args): @@ -22,8 +24,13 @@ def oncopy_files_to_build_prefix(unit, *args): # nothing to do pass elif len(prefix) > 0 and arg.startswith(BUILD_ROOT): - unit.oncopy_file([arg, '{}{}'.format(build_prefix, arg[len(BUILD_ROOT):])]) + unit.oncopy_file([arg, '{}/{}'.format(build_prefix, arg[len(BUILD_ROOT):])]) elif arg.startswith(SOURCE_ROOT): - unit.oncopy_file([arg, '{}{}'.format(build_prefix, arg[len(SOURCE_ROOT):])]) + unit.oncopy_file([arg, '{}/{}'.format(build_prefix, arg[len(SOURCE_ROOT):])]) else: - unit.oncopy_file([arg, '{}/{}/{}'.format(build_prefix, unit.get(['MODDIR']), arg)]) + offset = 0 + if arg.startswith(BINDIR): + offset = len(BINDIR) + elif arg.startswith(CURDIR): + offset = len(CURDIR) + unit.oncopy_file([arg, '{}/{}/{}'.format(build_prefix, unit.get(['MODDIR']), arg[offset:])])
Integrate DataViewer APIs with LogManager
#include "Enums.hpp" #include "ILogger.hpp" #include "IAuthTokensController.hpp" +#include "IDataViewer.hpp" #include "ISemanticContext.hpp" #include "LogConfiguration.hpp" #include "LogSessionData.hpp" @@ -348,6 +349,41 @@ namespace ARIASDK_NS_BEGIN /// <param name="defaultLevel">Diagnostic level for the LogManager</param> /// <param name="allowedLevels">Set with levels that are allowed to be sent</param> virtual void SetLevelFilter(uint8_t defaultLevel, const std::set<uint8_t>& allowedLevels) = 0; + + /// <summary> + /// Register an IDataViewer with LogManager. + /// </summary> + /// <param name="dataViewer">dataViewer to register with LogManager</param> + /// <returns> + /// 0 if registeration succeeded, negative value if registeration failed, + /// STATUS_EALREADY if dataViewer is already registered. + /// </returns> + virtual status_t RegisterViewer(const std::shared_ptr<IDataViewer>& dataViewer) noexcept = 0; + + /// <summary> + /// Unregister a IDataViewer from LogManager. + /// </summary> + /// <param name="viewerName"> + /// Unique Name to identify the viewer that should be unregistered from the LogManager. + /// </param> + /// <returns> + /// 0 if unregisteration succeeded, negative value if unregisteration failed, + /// STATUS_EALREADY if dataViewer is already unregistered. + /// </returns> + virtual status_t UnregisterViewer(const std::string& viewerName) noexcept = 0; + + /// <summary> + /// Check if the given viewer (name) is registered as a data viewer. + /// </summary> + /// <param name="viewerName"> + /// Unique Name to identify the viewer being checked. + /// </param> + virtual bool IsViewerEnabled(const std::string& viewerName) noexcept = 0; + + /// <summary> + /// Check if any viewers are registered. + /// </summary> + virtual bool AreAnyViewersEnabled() noexcept = 0; }; } ARIASDK_NS_END
Manually clone the repository for Conan builds. Since actions/checkout will always break `git describe` I've decided to make my own step for cloning the repo.
@@ -13,9 +13,15 @@ jobs: CONAN_GCC_VERSIONS: [7, 8, 9] steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 # Needed to support tags. + # actions/checkout breaks `git describe` so a manual clone is needed. + # https://github.com/actions/checkout/issues/272 + - name: Clone libtcod + run: | + git clone https://github.com/libtcod/libtcod.git ${{github.workspace}} + git checkout ${{github.sha}} + - name: git describe + run: | + git describe - name: Set up Python 3 uses: actions/setup-python@v2 with: @@ -50,9 +56,10 @@ jobs: experimental: true steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 # Needed to support tags. + - name: Clone libtcod + run: | + git clone https://github.com/libtcod/libtcod.git ${{github.workspace}} + git checkout ${{github.sha}} - name: Set up Python 3 uses: actions/setup-python@v2 with:
in_mqtt: fix head overflow in parser (FLU-01-005, FLU-01-006) Current implementation trust in packet information leading to security issues (buffer overflow). The following patch makes sure to add proper validation of topic length specified in the packet and also add extra checks on packet drop routine to avoid overflows.
@@ -76,6 +76,14 @@ static inline int mqtt_packet_drop(struct mqtt_conn *conn) return 0; } + /* Check boundaries */ + if (conn->buf_pos + 1 > conn->buf_len) { + conn->buf_frame_end = 0; + conn->buf_len = 0; + conn->buf_pos = 0; + return 0; + } + move_bytes = conn->buf_pos + 1; memmove(conn->buf, conn->buf + move_bytes, @@ -234,6 +242,13 @@ static int mqtt_handle_publish(struct mqtt_conn *conn) hlen = BUFC() << 8; conn->buf_pos++; hlen |= BUFC(); + + /* Validate topic length against current buffer capacity (overflow) */ + if (hlen > (conn->buf_len - conn->buf_pos)) { + flb_debug("[in_mqtt] invalid topic length"); + return -1; + } + conn->buf_pos++; topic = conn->buf_pos; topic_len = hlen; @@ -288,6 +303,7 @@ static int mqtt_handle_ping(struct mqtt_conn *conn) int mqtt_prot_parser(struct mqtt_conn *conn) { + int ret; int bytes = 0; int length = 0; int pos = conn->buf_pos; @@ -374,7 +390,10 @@ int mqtt_prot_parser(struct mqtt_conn *conn) mqtt_handle_connect(conn); } else if (conn->packet_type == MQTT_PUBLISH) { - mqtt_handle_publish(conn); + ret = mqtt_handle_publish(conn); + if (ret == -1) { + return MQTT_ERROR; + } } else if (conn->packet_type == MQTT_PINGREQ) { mqtt_handle_ping(conn);
tests: fix centos detection Type: fix Fixes:
@@ -218,7 +218,7 @@ def _running_on_centos(): return True if "centos" in os_id.lower() else False -running_on_centos = _running_on_centos +running_on_centos = _running_on_centos() class KeepAliveReporter(object):
Fix Travis CI script exit
@@ -72,3 +72,5 @@ script: - ./picohttp_ct -n -r && HTTPRESULT=$? - if [[ ${QUICRESULT} != 0 ]]; then for i in $(find ./ -maxdepth 1 -name 'core*' -print); do gdb $(pwd)/picoquic_ct core* -ex "thread apply all bt" -ex "set pagination 0" -batch; done; fi; - if [[ ${HTTPRESULT} != 0 ]]; then for i in $(find ./ -maxdepth 1 -name 'core*' -print); do gdb $(pwd)/picohttp_ct core* -ex "thread apply all bt" -ex "set pagination 0" -batch; done; fi; + - if [[ ${QUICRESULT} == 0 ]] && [[ ${HTTPRESULT} == 0 ]]; then exit 0; fi; + - exit 1
Add prototypes for SceGpu MMU functions
@@ -16,6 +16,9 @@ int PVRSRVGetMiscInfoKM(void *info); int ksceGpuGetRegisterDump(void *dst, SceSize size); +int ksceGpuMmuMapMemory(void *mmuContext, uint32_t vaddr, void *base, uint32_t size, uint32_t flags); +int ksceGpuMmuUnmapMemory(void *mmuContext, uint32_t vaddr, uint32_t size); + #ifdef __cplusplus } #endif
Remove legacy dot elements from checkdamageeffects().
@@ -24958,11 +24958,6 @@ void checkdamageeffects(s_collision_attack *attack) #define _steal attack->steal #define _seal attack->seal #define _sealtime attack->sealtime -#define _dot attack->recursive->mode -#define _dot_index attack->recursive->index -#define _dot_time attack->recursive->time -#define _dot_force attack->recursive->force -#define _dot_rate attack->recursive->rate #define _staydown0 attack->staydown.rise #define _staydown1 attack->staydown.riseattack @@ -25018,21 +25013,6 @@ void checkdamageeffects(s_collision_attack *attack) // Apply any recursive (damage over time) effects. check_damage_recursive(self, opp, attack); - if(attack->recursive) - { - if(_dot) //dot: Damage over time effect. - { - self->dot_owner[_dot_index] = opp ? opp : self; //dot owner. - self->dot[_dot_index] = _dot; //Mode: 1. HP (non lethal), 2. MP, 3. HP (non lethal) & MP, 4. HP, 5. HP & MP. - self->dot_time[_dot_index] = _time + (_dot_time * GAME_SPEED / 100); //Gametime dot will expire. - self->dot_force[_dot_index] = _dot_force; //How much to dot each tick. - self->dot_rate[_dot_index] = _dot_rate; //Delay between dot ticks. - self->dot_atk[_dot_index] = attack->attack_type; //dot attack type. - } - } - - - if(self->modeldata.nodrop) { self->drop = 0; // Static enemies/nodrop enemies cannot be knocked down @@ -25064,11 +25044,6 @@ void checkdamageeffects(s_collision_attack *attack) #undef _steal #undef _seal #undef _sealtime -#undef _dot -#undef _dot_index -#undef _dot_time -#undef _dot_force -#undef _dot_rate #undef _staydown0 #undef _staydown1 }
run with only ASan
@@ -18,7 +18,7 @@ jobs: - name: default command: make -f misc/docker-ci.mk - name: asan - command: make -f misc/docker-ci.mk CMAKE_ARGS='"-DCMAKE_C_COMPILER=clang;-fsanitize=address,undefined" "-DCMAKE_CXX_COMPILER=clang++;-fsanitize=address,undefined"' CHECK_ENVS="ASAN_OPTIONS=detect_leaks=0" + command: make -f misc/docker-ci.mk CMAKE_ARGS='"-DCMAKE_C_COMPILER=clang;-fsanitize=address" "-DCMAKE_CXX_COMPILER=clang++;-fsanitize=address"' CHECK_ENVS="ASAN_OPTIONS=detect_leaks=0" timeout-minutes: 10 steps:
feat(fabric test case): add fabric test case "CreatePersistWalletFail_KeyTypeErr"
@@ -668,6 +668,21 @@ START_TEST(test_001CreateWallet_0013CreatePersistWalletFail_11wallets) } END_TEST +START_TEST(test_001CreateWallet_0014CreatePersistWalletFail_KeyTypeErr) +{ + BSINT32 rtnVal; + BoatHlfabricWallet *g_fabric_wallet_ptr = NULL; + BoatHlfabricWalletConfig wallet_config = get_fabric_wallet_settings(); + wallet_config.accountPriKey_config.prikey_type = BOAT_WALLET_PRIKEY_TYPE_UNKNOWN; + /* 1. execute unit test */ + rtnVal = BoatWalletCreate(BOAT_PROTOCOL_HLFABRIC, "fabric.cfg", &wallet_config, sizeof(BoatHlfabricWalletConfig)); + + ck_assert_int_eq(rtnVal, BOAT_ERROR_WALLET_KEY_TYPE_ERR); + + fabricWalletConfigFree(wallet_config); +} +END_TEST + Suite *make_wallet_suite(void) { @@ -693,7 +708,7 @@ Suite *make_wallet_suite(void) tcase_add_test(tc_wallet_api, test_001CreateWallet_0011CreatePersistWalletSuccess); tcase_add_test(tc_wallet_api, test_001CreateWallet_0012CreatePersistWalletSuccess_10wallets); tcase_add_test(tc_wallet_api, test_001CreateWallet_0013CreatePersistWalletFail_11wallets); - + tcase_add_test(tc_wallet_api, test_001CreateWallet_0014CreatePersistWalletFail_KeyTypeErr); return s_wallet; }
graph-store: updated deep-node retrieval to use +tab
(~(get by graphs) [ship term]) ?~ result [~ ~] - =* graph p.u.result - =/ =(list [atom node:store]) (tap:orm graph) :- ~ :- ~ :- %graph-update-2 !> ^- update:store - :- now.bowl + :+ %0 + now.bowl :+ %add-nodes [ship term] - =| deep-map=(map index:store node:store) - =| iter=@ud - =| =index:store - |- ^- (map index:store node:store) - ?: ?|(?=(~ list) =(iter count)) - deep-map - =* atom -.i.list - =* node +.i.list - =. index (snoc index atom) - :: check children first, then check parent + =* a u.count + =/ b=(list (pair atom node:store)) + (tab:orm p.u.result start u.count) + =| c=index:store + =| d=(map index:store node:store) + =| e=@ud + =- d + |- ^- [e=@ud d=(map index:store node:store)] + ?: ?|(?=(~ b) =(e a)) + [e d] + =* atom p.i.b + =* node q.i.b ?- -.children.node - %empty - =. deep-map (~(put by deep-map) index node(children [%empty ~])) - $(list t.list, iter +(iter), index ~) + %empty $(e +(e), d (~(put by d) c node)) :: %graph - =. deep-map $(list (tap:orm p.children.node)) - =. iter ~(wyt by deep-map) - ?: =(iter count) - deep-map - =. deep-map (~(put by deep-map) index node(children [%empty ~])) - $(list t.list, iter +(iter), index ~) + =/ f $(c (snoc c atom), b (tab:orm p.children.node ~ (sub a e))) + ?: =(e.f a) f + %_ $ + e +(e.f) + d (~(put by d.f) c node(children [%empty ~])) + == == :: [%x %update-log-subset @ @ @ @ ~]
Add WithMultiRoCCFromBuildRoCC to make heterogeneous accelerator configs easier
@@ -83,6 +83,17 @@ class WithMultiRoCC extends Config((site, here, up) => { case BuildRoCC => site(MultiRoCCKey).getOrElse(site(TileKey).hartId, Nil) }) +/** + * Assigns what was previously in the BuildRoCC key to specific harts with MultiRoCCKey + * Must be paired with WithMultiRoCC + */ +class WithMultiRoCCFromBuildRoCC(harts: Int*) extends Config((site, here, up) => { + case BuildRoCC => Nil + case MultiRoCCKey => up(MultiRoCCKey, site) ++ harts.distinct.map { i => + (i -> up(BuildRoCC, site)) + } +}) + /** * Config fragment to add Hwachas to cores based on hart *
doc/security: fix re-flashable bootloader section Add pointer to key generation section Fix sequence point ordering
@@ -129,11 +129,11 @@ To enable a reflashable bootloader: 2. If necessary, set the :ref:`CONFIG_SECURE_BOOTLOADER_KEY_ENCODING` based on the coding scheme used by the device. The coding scheme is shown in the ``Features`` line when ``esptool.py`` connects to the chip, or in the ``espefuse.py summary`` output. -2. Follow the steps shown above to choose a signing key file, and generate the key file. +3. Please follow the steps shown in :ref:`secure-boot-generate-key` to generate signing key. Path of the generated key file must be specified in "Secure Boot Configuration" menu. -3. Run ``idf.py bootloader``. A binary key file will be created, derived from the private key that is used for signing. Two sets of flashing steps will be printed - the first set of steps includes an ``espefuse.py burn_key secure_boot_v1 path_to/secure-bootloader-key-xxx.bin`` command which is used to write the bootloader key to efuse. (Flashing this key is a one-time-only process.) The second set of steps can be used to reflash the bootloader with a pre-calculated digest (generated during the build process). +4. Run ``idf.py bootloader``. A binary key file will be created, derived from the private key that is used for signing. Two sets of flashing steps will be printed - the first set of steps includes an ``espefuse.py burn_key secure_boot_v1 path_to/secure-bootloader-key-xxx.bin`` command which is used to write the bootloader key to efuse. (Flashing this key is a one-time-only process.) The second set of steps can be used to reflash the bootloader with a pre-calculated digest (generated during the build process). -4. Resume from :ref:`Step 6 of the one-time flashing process <secure-boot-resume-normal-flashing>`, to flash the bootloader and enable secure boot. Watch the console log output closely to ensure there were no errors in the secure boot configuration. +5. Resume from :ref:`Step 6 of the one-time flashing process <secure-boot-resume-normal-flashing>`, to flash the bootloader and enable secure boot. Watch the console log output closely to ensure there were no errors in the secure boot configuration. .. _secure-boot-generate-key:
build: compile flb_http_client_debug.c if it support is enabled
@@ -44,7 +44,6 @@ set(src flb_plugin.c flb_gzip.c flb_http_client.c - flb_http_client_debug.c flb_callback.c ) @@ -105,6 +104,13 @@ if(FLB_SIGNV4 AND FLB_TLS) ) endif() +if(FLB_HTTP_CLIENT_DEBUG) + set(src + ${src} + "flb_http_client_debug.c" + ) +endif() + if(FLB_LUAJIT) set(src ${src}
Fixing request_app_link reference counting. Racing conditions reproduced periodically on test_python_process_switch.
@@ -731,9 +731,7 @@ nxt_request_app_link_release_handler(nxt_task_t *task, void *obj, void *data) nxt_assert(req_app_link->work.data == data); - nxt_atomic_fetch_add(&req_app_link->use_count, -1); - - nxt_request_app_link_release(task, req_app_link); + nxt_request_app_link_use(task, req_app_link, -1); } @@ -4695,7 +4693,7 @@ nxt_router_port_select(nxt_task_t *task, nxt_port_select_state_t *state) &req_app_link->link_app_requests); } - ra_use_delta++; + nxt_request_app_link_inc_use(req_app_link); nxt_debug(task, "req_app_link stream #%uD enqueue to app->requests", req_app_link->stream);
tunslip6: print connection error info Print the errno relating to the failed connect rather than the (potential) errno from close. If close succeeded, errno is undefined.
@@ -1044,8 +1044,8 @@ exit(1); } if(connect(slipfd, p->ai_addr, p->ai_addrlen) == -1) { - close(slipfd); perror("client: connect"); + close(slipfd); continue; } break;
move wrapup_free_hs_transform
@@ -1009,31 +1009,6 @@ static void ssl_update_checksum_sha384( mbedtls_ssl_context *ssl, #if defined(MBEDTLS_SSL_PROTO_TLS1_2) -void mbedtls_ssl_handshake_wrapup_free_hs_transform( mbedtls_ssl_context *ssl ) -{ - MBEDTLS_SSL_DEBUG_MSG( 3, ( "=> handshake wrapup: final free" ) ); - - /* - * Free our handshake params - */ - mbedtls_ssl_handshake_free( ssl ); - mbedtls_free( ssl->handshake ); - ssl->handshake = NULL; - - /* - * Free the previous transform and swith in the current one - */ - if( ssl->transform ) - { - mbedtls_ssl_transform_free( ssl->transform ); - mbedtls_free( ssl->transform ); - } - ssl->transform = ssl->transform_negotiate; - ssl->transform_negotiate = NULL; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "<= handshake wrapup: final free" ) ); -} - void mbedtls_ssl_handshake_wrapup( mbedtls_ssl_context *ssl ) { int resume = ssl->handshake->resume; @@ -7969,6 +7944,31 @@ static void ssl_calc_finished_tls_sha384( } #endif /* MBEDTLS_SHA384_C */ +void mbedtls_ssl_handshake_wrapup_free_hs_transform( mbedtls_ssl_context *ssl ) +{ + MBEDTLS_SSL_DEBUG_MSG( 3, ( "=> handshake wrapup: final free" ) ); + + /* + * Free our handshake params + */ + mbedtls_ssl_handshake_free( ssl ); + mbedtls_free( ssl->handshake ); + ssl->handshake = NULL; + + /* + * Free the previous transform and swith in the current one + */ + if( ssl->transform ) + { + mbedtls_ssl_transform_free( ssl->transform ); + mbedtls_free( ssl->transform ); + } + ssl->transform = ssl->transform_negotiate; + ssl->transform_negotiate = NULL; + + MBEDTLS_SSL_DEBUG_MSG( 3, ( "<= handshake wrapup: final free" ) ); +} + #endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ #endif /* MBEDTLS_SSL_TLS_C */
cmake policy CMP0025 was introduced in CMake 3.0
@@ -38,11 +38,6 @@ else() set(CMAKE_CXX_STANDARD "${SUPPORTED_CXX_STD_VERSION}") endif() -# Fix behavior of CMAKE_CXX_STANDARD when targeting macOS. -if(POLICY CMP0025) - cmake_policy(SET CMP0025 NEW) -endif() - include(CheckCCompilerFlag) include(CPackComponent) macro(pass_through_cpack_vars)