message
stringlengths
6
474
diff
stringlengths
8
5.22k
fix svd typo
@@ -502,7 +502,7 @@ FLT bc_svd_compute_pose(bc_svd *self, FLT R[3][3], FLT t[3]) { rep_errors[2] = bc_svd_compute_R_and_t(self, ut, Betas[3], Rs[3], ts[3]); int N = 0; - if (rep_errors[0] < rep_errors[1]) + if (rep_errors[1] < rep_errors[0]) N = 1; if (rep_errors[2] < rep_errors[N]) N = 2;
u3: document snapshot system invariants
//! - memory protections (and file-backed mappings) are re-established. //! - patch files are deleted. //! +//! ### invariants +//! +//! definitions: +//! - a clean page is PROT_READ and 0 in the bitmap +//! - a dirty page is (PROT_READ|PROT_WRITE) and 1 in the bitmap +//! - the guard page is PROT_NONE and 1 in the bitmap (XX assumed) +//! +//! assumptions: +//! - all memory access patterns are outside-in, a page at a time +//! - ad-hoc exceptions are supported by calling u3e_ward() +//! +//! - there is a single guard page, between the segments +//! - dirty pages only become clean by being: +//! - loaded from a snapshot during initialization +//! - present in a snapshot after save +//! - clean pages only become dirty by being: +//! - modified (and caught by the fault handler) +//! - orphaned due to segment truncation (explicitly dirtied) +//! - at points of quiescence (initialization, after save) +//! - all pages of the north and south segments are clean +//! - all other pages are dirty +//! //! ### limitations //! //! - loom page size is fixed (16 KB), and must be a multiple of the
BRANCH=None TEST=None Commit-Ready: Ningning Xia Tested-by: Ningning Xia
# chromeos-ec. We use the no-vmtest-pre-cq configs since the tests won't # actually test against our EC changes. (That's what FAFT is for) pre-cq-configs: gru-no-vmtest-pre-cq reef-no-vmtest-pre-cq chell-no-vmtest-pre-cq + strago-no-vmtest-pre-cq # Stages to ignore in the commit queue. If these steps break, your CL will be # submitted anyway. Use with caution.
Updated the list of optional libraries in build_visit.
<group name="optional" comment="All optional libraries" enabled="no"> <lib name="adios"/> - <lib name="adios2"/> +<!-- <lib name="adios2"/> Removed for now by Eric Brugger--> <lib name="advio"/> <lib name="boost"/> <lib name="boxlib"/> <lib name="cfitsio"/> <lib name="conduit"/> <lib name="cgns"/> +<!-- <lib name="eavl"/> Removed for now by Eric Brugger--> <lib name="embree"/> +<!-- <lib name="fastbit"/> Removed for now by Eric Brugger--> +<!-- <lib name="fastquery"/> Removed for now by Eric Brugger--> <lib name="gdal"/> - <lib name="fastbit"/> - <lib name="fastquery"/> - <lib name="hdf5"/> + <lib name="glu"/> <lib name="h5part"/> + <lib name="hdf4"/> + <lib name="hdf5"/> + <lib name="icet"/> <lib name="ispc"/> + <lib name="llvm"/> +<!-- <lib name="mdsplus"/> Removed for now by Allen Sanderson--> + <lib name="mesagl"/> + <lib name="mfem"/> + <lib name="mili"/> + <lib name="moab"/> <lib name="mpich"/> <lib name="mxml"/> +<!-- <lib name="nektarpp"/> Removed for now by Eric Brugger--> <lib name="netcdf"/> - <lib name="nektarpp"/> <lib name="openexr"/> <lib name="openssl"/> + <lib name="osmesa"/> <lib name="ospray"/> <lib name="pidx"/> - <lib name="pyside"/> + <lib name="p7zip"/> +<!-- <lib name="pyside"/> Removed for now by Eric Brugger--> <lib name="silo"/> <lib name="szip"/> <lib name="tbb"/> - <lib name="uintah"/> +<!-- <lib name="tcmalloc"/> Removed for now by Eric Brugger--> +<!-- <lib name="uintah"/> Removed for now by Eric Brugger--> <lib name="visus"/> + <lib name="vtkm"/> + <lib name="vtkh"/> <lib name="xdmf"/> <lib name="zlib"/> </group>
Use ProjectRef for FIRRTL and use it for firrtl-interpreter
@@ -83,7 +83,10 @@ def isolateAllTests(tests: Seq[TestDefinition]) = tests map { test => lazy val chisel = (project in file("tools/chisel3")) +lazy val firrtl = ProjectRef(workspaceDirectory / "firrtl", "firrtl") + lazy val firrtl_interpreter = (project in file("tools/firrtl-interpreter")) + .dependsOn(firrtl) .settings(commonSettings) lazy val treadle = (project in file("tools/treadle")) @@ -107,7 +110,8 @@ lazy val midasTargetUtils = ProjectRef(firesimDir, "targetutils") // Rocket-chip dependencies (subsumes making RC a RootProject) lazy val hardfloat = (project in rocketChipDir / "hardfloat") - .settings(commonSettings).dependsOn(midasTargetUtils) + .dependsOn(midasTargetUtils) + .settings(commonSettings) lazy val rocketMacros = (project in rocketChipDir / "macros") .settings(commonSettings)
Fix spelling in status Fixes
@@ -599,7 +599,7 @@ bool KVCSetViaIvar(NSObject* self, struct objc_ivar* ivar, id value, NSString* k } /** - @Status Interopertable + @Status Interoperable */ - (NSMutableSet*)mutableSetValueForKeyPath:(NSString*)keyPath { NSString* restOfKeypath = nil;
Reduce max uniform/attribute name length;
#define LOVR_SHADER_TANGENT 4 #define LOVR_SHADER_BONES 5 #define LOVR_SHADER_BONE_WEIGHTS 6 -#define LOVR_MAX_UNIFORM_LENGTH 256 -#define LOVR_MAX_ATTRIBUTE_LENGTH 256 +#define LOVR_MAX_UNIFORM_LENGTH 64 +#define LOVR_MAX_ATTRIBUTE_LENGTH 64 static struct { Texture* defaultTexture;
util/export_taskinfo.c: Format with clang-format BRANCH=none TEST=none
@@ -25,14 +25,13 @@ struct taskinfo { uint32_t stack_size; }; -#define TASK(n, r, d, s, ...) { \ +#define TASK(n, r, d, s, ...) \ + { \ .name = #n, \ .routine = #r, \ .stack_size = s, \ }, -static const struct taskinfo taskinfos[] = { - CONFIG_TASK_LIST -}; +static const struct taskinfo taskinfos[] = { CONFIG_TASK_LIST }; #undef TASK uint32_t GET_TASKINFOS_FUNC(const struct taskinfo **infos)
out_cloudwatch_logs: use new tls prototype for upstream creation
@@ -304,7 +304,7 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins, struct flb_upstream *upstream = flb_upstream_create(config, ctx->endpoint, 443, FLB_IO_TLS, - &ctx->client_tls); + ctx->client_tls); if (!upstream) { flb_plg_error(ctx->ins, "Connection initialization error"); goto error;
server session MAINTENANCE code formatting
@@ -2958,8 +2958,7 @@ nc_ch_client_thread(void *arg) /* set next endpoint to try */ if (client->start_with == NC_CH_FIRST_LISTED) { next_endpt_index = 0; - } - else { + } else { /* we keep the current one but due to unlock/lock we have to find it again */ for (next_endpt_index = 0; next_endpt_index < client->ch_endpt_count; ++next_endpt_index) { if (!strcmp(client->ch_endpts[next_endpt_index].name, cur_endpt_name)) {
srpd REFACTOR return value check
@@ -285,7 +285,7 @@ srpd_rotation_change_cb(sr_session_ctx_t *session, uint32_t UNUSED(sub_id), cons } else if (oper == SR_OP_DELETED) { ATOMIC_STORE_RELAXED(data->running, 0); if ((rc = pthread_join(data->tid, NULL))) { - SRPLG_LOG_ERR(SRPD_PLUGIN_NAME, "pthread_join failed (%s).", sr_strerror(rc)); + SRPLG_LOG_ERR(SRPD_PLUGIN_NAME, "pthread_join failed (%s).", strerror(rc)); } /* continue and free iter */ } @@ -410,11 +410,14 @@ void srpd_rotation_cleanup_cb(sr_session_ctx_t *UNUSED(session), void *private_data) { srpd_rotation_data_t *data = private_data; + int r; sr_unsubscribe(data->subscr); if (ATOMIC_LOAD_RELAXED(data->running)) { ATOMIC_STORE_RELAXED(data->running, 0); - pthread_join(data->tid, NULL); + if ((r = pthread_join(data->tid, NULL))) { + SRPLG_LOG_ERR(SRPD_PLUGIN_NAME, "pthread_join failed (%s).", strerror(r)); + } } free(ATOMIC_PTR_LOAD_RELAXED(data->output_folder)); free(data);
out_forward: always initialize salt with random numbers There is an initialization bug that leaves the shared key salt being uninitialized when SSL is not enabled. This might allow attackers to guess the shared key by looking at the hash. Let's always initialize the salt buffer securely using flb_randombytes().
@@ -65,9 +65,6 @@ static int secure_forward_init(struct flb_forward *ctx, secure_forward_tls_error(ctx, ret); return -1; } - - /* Gernerate shared key salt */ - mbedtls_ctr_drbg_random(&fc->tls_ctr_drbg, fc->shared_key_salt, 16); return 0; } #endif @@ -520,6 +517,12 @@ static int forward_config_init(struct flb_forward_config *fc, } #endif + /* Generate the shared key salt */ + if (flb_randombytes(fc->shared_key_salt, 16)) { + flb_plg_error(ctx->ins, "cannot generate shared key salt"); + return -1; + } + mk_list_add(&fc->_head, &ctx->configs); return 0; }
Update joy.h added s16 JOY_writeJoypadX(u16 joy, u16 pos); and s16 JOY_writeJoypadY(u16 joy, u16 pos);
@@ -324,6 +324,21 @@ u16 JOY_readJoypad(u16 joy); */ s16 JOY_readJoypadX(u16 joy); +/** + * \brief + * Write joypad X axis. + * + * \param joy + * Joypad we query state.<br> + * <b>JOY_1</b> = joypad 1<br> + * <b>JOY_2</b> = joypad 2<br> + * <b>... </b> = ...<br> + * <b>JOY_8</b> = joypad 8 (only possible with 2 teamplayers connected)<br> + * \param pos + * Desired X position for joypad.<br> + */ +s16 JOY_writeJoypadX(u16 joy, u16 pos); + /** * \brief * Get joypad Y axis. @@ -348,6 +363,21 @@ s16 JOY_readJoypadX(u16 joy); */ s16 JOY_readJoypadY(u16 joy); +/** + * \brief + * Write joypad Y axis. + * + * \param joy + * Joypad we query state.<br> + * <b>JOY_1</b> = joypad 1<br> + * <b>JOY_2</b> = joypad 2<br> + * <b>... </b> = ...<br> + * <b>JOY_8</b> = joypad 8 (only possible with 2 teamplayers connected)<br> + * \param pos + * Desired Y position for joypad.<br> + */ +s16 JOY_writeJoypadY(u16 joy, u16 pos); + /** * \brief * Wait until a button is pressed on any connected controller.
data REFACTOR use internal function instead of types plugins wrapper
@@ -584,9 +584,9 @@ ly_store_prefix_data(const struct ly_ctx *ctx, const char *value, size_t value_l size_t len = stop - start; /* do we already have the prefix? */ - mod = ly_type_store_resolve_prefix(ctx, start, len, *format_p, *prefix_data_p); + mod = ly_resolve_prefix(ctx, start, len, *format_p, *prefix_data_p); if (!mod) { - mod = ly_type_store_resolve_prefix(ctx, start, len, format, prefix_data); + mod = ly_resolve_prefix(ctx, start, len, format, prefix_data); if (mod) { assert(*format_p == LY_PREF_SCHEMA_RESOLVED); /* store a new prefix - module pair */
consolidate branch tagging
@@ -15,10 +15,10 @@ before_script: build-alpine-arm: stage: build script: - - docker pull $CONTAINER_IMAGE:ARM32V6 || true - - docker build -f Dockerfile.ARM32V6 --cache-from $CONTAINER_IMAGE:ARM32V6-$CI_COMMIT_REF_SLUG --tag $CONTAINER_IMAGE:$CI_BUILD_REF --tag $CONTAINER_IMAGE:ARM32V6-$CI_COMMIT_REF_SLUG . - - test -n "$CI_BUILD_TAG" && docker tag $CONTAINER_IMAGE:$CI_BUILD_REF $CONTAINER_IMAGE:ARM32V6-$CI_BUILD_TAG || true - - docker push $CONTAINER_IMAGE:$CI_BUILD_REF + - docker pull $CONTAINER_IMAGE:ARM32V6-$CI_COMMIT_REF_SLUG || true + - docker build -f Dockerfile.ARM32V6 --cache-from $CONTAINER_IMAGE:ARM32V6-$CI_COMMIT_REF_SLUG --tag $CONTAINER_IMAGE:ARM32V6-$CI_BUILD_REF --tag $CONTAINER_IMAGE:ARM32V6-$CI_COMMIT_REF_SLUG . + - test -n "$CI_BUILD_TAG" && docker tag $CONTAINER_IMAGE:ARM32V6-$CI_BUILD_REF $CONTAINER_IMAGE:ARM32V6-$CI_BUILD_TAG || true + - docker push $CONTAINER_IMAGE:ARM32V6-$CI_BUILD_REF - docker push $CONTAINER_IMAGE:ARM32V6-$CI_COMMIT_REF_SLUG - test -n "$CI_BUILD_TAG" && docker push $CONTAINER_IMAGE:ARM32V6-$CI_BUILD_TAG || true
Fix get axis float types and get axis principal int.
@@ -337,6 +337,93 @@ HRESULT openbor_get_axis_principal_float_property(ScriptVariant **varlist , Scri // All values are float (DOUBLE) type. ScriptVariant_ChangeType(*pretvar, VT_INTEGER); + switch(property) + { + case _AXIS_PRINCIPAL_X: + + (*pretvar)->dblVal = (DOUBLE)handle->x; + + break; + + case _AXIS_PRINCIPAL_Y: + + (*pretvar)->dblVal = (DOUBLE)handle->y; + + break; + + case _AXIS_PRINCIPAL_Z: + + (*pretvar)->dblVal = (DOUBLE)handle->z; + + break; + + default: + + printf("Unsupported property.\n"); + goto error_local; + + break; + } + + return S_OK; + + error_local: + + printf("You must provide a valid handle and property name: " SELF_NAME "\n"); + *pretvar = NULL; + + return E_FAIL; + + #undef SELF_NAME + #undef ARG_MINIMUM + #undef ARG_HANDLE + #undef ARG_INDEX +} + +// Caskey, Damon V. +// 2018-05-14 +// +// Return an axis property. Requires +// the handle from axis property +// and property name to access. +HRESULT openbor_get_axis_principal_int_property(ScriptVariant **varlist , ScriptVariant **pretvar, int paramCount) +{ + #define SELF_NAME "openbor_get_axis_principal_int_property(void handle, char property)" + #define ARG_MINIMUM 2 // Minimum required arguments. + #define ARG_HANDLE 0 // Handle (pointer to property structure). + #define ARG_PROPERTY 1 // Property to access. + + s_axis_principal_int *handle = NULL; // Property handle. + e_axis_principal_properties property = 0; // Property argument. + + // Clear pass by reference argument used to send + // property data back to calling script. . + ScriptVariant_Clear(*pretvar); + + // Map string property name to a + // matching integer constant. + mapstrings_axis_principal_property(varlist, paramCount); + + // Verify arguments. There should at least + // be a pointer for the property handle and an integer + // to determine which property constant is accessed. + if(paramCount < ARG_MINIMUM + || varlist[ARG_HANDLE]->vt != VT_PTR + || varlist[ARG_PROPERTY]->vt != VT_INTEGER) + { + *pretvar = NULL; + goto error_local; + } + else + { + // Populate local vars for readability. + handle = (s_axis_principal_int *)varlist[ARG_HANDLE]->ptrVal; + property = (LONG)varlist[ARG_PROPERTY]->lVal; + } + + // All values are float (DOUBLE) type. + ScriptVariant_ChangeType(*pretvar, VT_INTEGER); + switch(property) { case _AXIS_PRINCIPAL_X: @@ -380,7 +467,6 @@ HRESULT openbor_get_axis_principal_float_property(ScriptVariant **varlist , Scri #undef ARG_INDEX } - // Caskey, Damon V. // 2018-05-14 //
Check dup function definition and missing nid
@@ -6,10 +6,24 @@ import fnmatch CURR_DIR = os.path.dirname(os.path.realpath(__file__)) DEF_FILE = 'definitions.dox' DEF_FILE_PATH = os.path.join(CURR_DIR, '..', 'docs', DEF_FILE) +DB_FILE = 'db.yml' +DB_FILE_PATH = os.path.join(CURR_DIR, '..', 'db.yml') INCLUDE_DIR = os.path.join(CURR_DIR, '..', 'include') DEFINE_RULE = re.compile(r' \* \\defgroup (Sce\w+) \w+') USER_GROUP_RULE = re.compile(r' \* \\(user|kernel)group\{(Sce\w+)\}') + +FUNC_RULE_PATTERN = ( + # ret + '^\w+\s+' + + # func name + '(_*k?sce\w+|__\w+)' + + # args; if define with multiline, end with comma, if not end with `);` + '\(.*(,|\);)' + + # white spaces + '\s*$' +) +FUNCTION_RULE = re.compile(FUNC_RULE_PATTERN) IGNORE_FILES = [ 'vitasdk.h', 'vitasdkkern.h', @@ -34,7 +48,22 @@ def read_def_groups(): definitions[m.group(1)] = 0 return definitions -def check_headers(definitions): +def read_nids(): + nids = dict() + with open(DB_FILE_PATH, 'r') as d: + SECTION = None + for line in d.xreadlines(): + line = line.strip() + k, v = line.split(':')[:2] + if not v.strip(): + SECTION = k + continue + if SECTION != 'functions': + continue + nids[k] = 1 + return nids + +def check_header_groups(definitions): errors = [] # check exists in definitions for header_path in findfile(INCLUDE_DIR, '*.h'): @@ -66,8 +95,33 @@ def check_headers(definitions): (DEF_FILE, k)) return errors +def check_function_nids(nids): + errors = [] + functions = dict() + for header_path in findfile(INCLUDE_DIR, '*.h'): + header_file = header_path.split('include/')[1] + if header_file in IGNORE_FILES: + continue + with open(header_path, 'r') as h: + have_group_define = False + for line in h.xreadlines(): + m = FUNCTION_RULE.match(line) + if not m: + continue + fn = m.group(1) + if functions.get(fn): + errors.append('%s: Already defined %s' % + (header_file, fn)) + continue + if not nids.get(fn): + errors.append('%s: Could not find NID %s' % + (header_file, fn)) + functions[fn] = 1 + return errors + if __name__ == '__main__': - errors = check_headers(read_def_groups()) + errors = check_header_groups(read_def_groups()) \ + + check_function_nids(read_nids()) if len(errors): for e in errors: print e
[chain] Fix seg-fault
@@ -300,7 +300,11 @@ func newExecutor(cs *ChainService, bState *types.BlockState, block *types.Block) } func (e *executor) execute() error { - defer e.receiptTx.Commit() + defer func() { + if e.receiptTx != nil { + e.receiptTx.Commit() + } + }() if e.execTx != nil { for _, tx := range e.txs {
doc/man3/SSL_set_bio.pod: Fix wrong function name in return values section
@@ -90,7 +90,7 @@ use SSL_set0_rbio() and SSL_set0_wbio() instead. =head1 RETURN VALUES -SSL_set_bio(), SSL_set_rbio() and SSL_set_wbio() cannot fail. +SSL_set_bio(), SSL_set0_rbio() and SSL_set0_wbio() cannot fail. =head1 SEE ALSO @@ -104,7 +104,7 @@ SSL_set0_rbio() and SSL_set0_wbio() were added in OpenSSL 1.1.0. =head1 COPYRIGHT -Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the OpenSSL license (the "License"). You may not use this file except in compliance with the License. You can obtain a copy
out_flowcounter: on config_map, use new set_property flag
@@ -251,17 +251,17 @@ static int out_fcount_exit(void *data, struct flb_config* config) static struct flb_config_map config_map[] = { { FLB_CONFIG_MAP_STR, "unit", NULL, - 0, + FLB_FALSE, 0, NULL }, { FLB_CONFIG_MAP_BOOL, "event_based", "false", - offsetof(struct flb_flowcounter, event_based), + FLB_TRUE, offsetof(struct flb_flowcounter, event_based), NULL }, /* EOF */ - {0, NULL, NULL, 0, NULL} + {0} }; struct flb_output_plugin out_flowcounter_plugin = {
Updated FR po files and goaccess.pot.
@@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2018-12-13 22:47-0600\n" +"POT-Creation-Date: 2018-12-13 22:48-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n"
Fix a warning that occurred in sceneview when running in checker texture mode [ci skip]
@@ -151,7 +151,9 @@ int main() // Set up resource data char *resourceData = readResourceFile(); const FileHeader *resourceHeader = (FileHeader*) resourceData; +#ifndef TEST_TEXTURE const TextureEntry *texHeader = (TextureEntry*)(resourceData + sizeof(FileHeader)); +#endif const MeshEntry *meshHeader = (MeshEntry*)(resourceData + sizeof(FileHeader) + resourceHeader->numTextures * sizeof(TextureEntry)); Texture **textures = new Texture*[resourceHeader->numTextures];
Default CAN baudrate is 125 kbps
@@ -10,7 +10,7 @@ from pyb import CAN TRANSMITTER = True can = CAN(2, CAN.NORMAL) -# Set a different baudrate (default is 250Kbps) +# Set a different baudrate (default is 125Kbps) # NOTE: The following parameters are for the H7 only. # # can.init(CAN.NORMAL, prescaler=32, sjw=1, bs1=8, bs2=3) # 125Kbps
hark-store: crash on invalid note read Two %read-note actions set on the same notification could cause the cache to become invalid. Instead, crash if we read a note that is already read.
&(=(read read.u.not) !?=(?(%read-note %unread-note) -.in)) ~& >> "Inconsistent hark cache, rebuilding" rebuild-cache + ?< &(=(read read.u.not) ?=(?(%read-note %unread-note) -.in)) =. u.tib (~(put by u.tib) index u.not(read read)) =. notifications
schema tree BUGFIX allow generating document root paths Fixes
@@ -533,7 +533,6 @@ lysc_path_until(const struct lysc_node *node, const struct lysc_node *parent, LY char *path = NULL; int len = 0; - LY_CHECK_ARG_RET(NULL, node, NULL); if (buffer) { LY_CHECK_ARG_RET(node->module->ctx, buflen > 1, NULL); buffer[0] = '\0';
better default error message
@@ -103,11 +103,8 @@ end -- @param tag The type tag at which the error is to be thown (string) -- @param message The optional error message. (?string) function typedecl.tag_error(tag, message) - local error_msg = message - and string.format("error at tag '%s': %s", tag, message) - or string.format("error at tag '%s'.", tag) - - error(error_msg) + message = message or "input has the wrong type or an elseif case is missing" + error(string.format("unhandled case '%s': %s", tag, message)) end return typedecl
Use address-from-prv from zuse
net=(unit [crypt=@ux auth=@ux]) == :: -::TODO into zuse -++ address-from-prv - =, secp256k1:secp:crypto - =, keccak:crypto - |= pk=@ - %^ end 3 20 - %+ keccak-256 64 - %^ rev 3 64 - %- serialize-point - (priv-to-pub pk) -:: ++ tape-to-ux |= t=tape (scan t zero-ux)
doc: add PG 14 relnote item about array function references User-defined objects that reference some built-in array functions will need to be recreated in PG 14. Reported-by: Justin Pryzby Discussion:
@@ -291,6 +291,35 @@ Author: Tom Lane <[email protected]> <listitem> <!-- Author: Tom Lane <[email protected]> +2020-11-04 [9e38c2bb5] Declare assorted array functions using anycompatible not +--> + + <para> + User-defined objects that reference some built-in array functions + along with their argument types must be recreated (Tom Lane) + </para> + + <para> + Specifically, <link + linkend="functions-array"><function>array_append()</function></link>, + <function>array_prepend()</function>, + <function>array_cat()</function>, + <function>array_position()</function>, + <function>array_positions()</function>, + <function>array_remove()</function>, + <function>array_replace()</function>, or <link + linkend="functions-math"><function>width_bucket()</function></link> + used to take <type>anyarray</type> arguments but now take + <type>anycompatiblearray</type>. Therefore, user-defined objects + like aggregates and operators that reference old array function + signatures must be dropped before upgrading and recreated once the + upgrade completes. + </para> + </listitem> + + <listitem> +<!-- +Author: Tom Lane <[email protected]> 2020-09-17 [76f412ab3] Remove factorial operators, leaving only the factorial() -->
add coverity build target to makefile
@@ -26,3 +26,7 @@ apply_fmt: run_test: rm -fr $(BUILD_TARGET_DIR) && mkdir $(BUILD_TARGET_DIR) && cd $(BUILD_TARGET_DIR) && cmake -DCMAKE_BUILD_TYPE=Release "$(CMAKE_FLAGS)" .. && make -j2 && cd test && ./odyssey_test docker-compose -f docker-compose-test.yml up --force-recreate --build + +submit-cov: + mkdir cov-build && cd cov-build + $(COV-BIN-PATH)/cov-build --dir cov-int make -j 4 && tar czvf odyssey.tgz cov-int && curl --form token=$(COV_TOKEN) --form email=$(COV_ISSUER) --form file=@./odyssey.tgz --form version="2" --form description="scalable potgresql connection pooler" https://scan.coverity.com/builds\?project\=yandex%2Fodyssey
Updated README.md with latest v1.4.2 changes.
@@ -96,9 +96,9 @@ GoAccess can be compiled and used on *nix systems. Download, extract and compile GoAccess with: - $ wget https://tar.goaccess.io/goaccess-1.4.1.tar.gz - $ tar -xzvf goaccess-1.4.1.tar.gz - $ cd goaccess-1.4.1/ + $ wget https://tar.goaccess.io/goaccess-1.4.2.tar.gz + $ tar -xzvf goaccess-1.4.2.tar.gz + $ cd goaccess-1.4.2/ $ ./configure --enable-utf8 --enable-geoip=legacy $ make # make install
Only set VMA_EXAMPLE_SOURCE_FILES when building sample app
@@ -30,6 +30,8 @@ target_link_libraries( Vulkan::Vulkan ) +if (VMA_BUILD_EXAMPLE_APP) + if(WIN32) set(VMA_EXAMPLE_SOURCE_FILES Common.cpp SparseBindingTest.cpp @@ -37,8 +39,6 @@ set(VMA_EXAMPLE_SOURCE_FILES VulkanSample.cpp ) -if (VMA_BUILD_EXAMPLE_APP) - if(WIN32) add_executable(VmaExample ${VMA_EXAMPLE_SOURCE_FILES}) # Visual Studio specific settings
fix unreferenced argument warning.
buffered.writeln(result, "") buffered.writeln(result, "void registerModules(lua_State* L)") buffered.writeln(result, "{") + buffered.writeln(result, "\t(void)(L);") for _, name in ipairs(nativeTable) do buffered.writeln(result, string.format("\tregister%s(L);", name)) end
ipv4 vrf test doc cleaning
@@ -142,7 +142,7 @@ class TestIp4VrfMultiInst(VppTestCase): raise def setUp(self): - """ip_add_del_route + """ Clear trace and packet infos before running each test. """ super(TestIp4VrfMultiInst, self).setUp() @@ -158,7 +158,7 @@ class TestIp4VrfMultiInst(VppTestCase): self.logger.info(self.vapi.ppcli("show ip arp")) def create_vrf_and_assign_interfaces(self, count, start=1): - """" + """ Create required number of FIB tables / VRFs, put 3 l2-pg interfaces to every FIB table / VRF. @@ -195,7 +195,7 @@ class TestIp4VrfMultiInst(VppTestCase): self.logger.debug(self.vapi.ppcli("show ip arp")) def delete_vrf(self, vrf_id): - """" + """ Delete required FIB table / VRF. :param int vrf_id: The FIB table / VRF ID to be deleted. @@ -307,7 +307,7 @@ class TestIp4VrfMultiInst(VppTestCase): def run_verify_test(self): """ - Create packet streams for all configured l2-pg interfaces, send all + Create packet streams for all configured l2-pg interfaces, send all \ prepared packet streams and verify that: - all packets received correctly on all pg-l2 interfaces assigned to bridge domains
Fix struct definition in UBO; You can't define a new struct in an interface block.
@@ -26,11 +26,12 @@ const char* lovrShaderVertexPrefix = "" "out vec2 texCoord; \n" "out vec4 vertexColor; \n" "out vec4 lovrColor; \n" -"uniform lovrDrawData { \n" -" struct { \n" +"struct DrawData { \n" " mat4 model; \n" " vec4 color; \n" -" } lovrDraws[MAX_DRAWS]; \n" +"}; \n" +"uniform lovrDrawData { \n" +" DrawData lovrDraws[MAX_DRAWS]; \n" "}; \n" "uniform mat4 lovrViews[2]; \n" "uniform mat4 lovrProjections[2]; \n"
Update oic/sec/cred * Added function to clear all credentials to handle DELETE requests without a query parameter. * Updated DELETE request handler to delete credential entries by credid. * Fixed schema in oc_sec_encode_cred(). * Fixed bug in oc_sec_decode_cred().
@@ -122,6 +122,17 @@ oc_sec_remove_cred_by_credid(int credid, int device) return false; } +static void +oc_sec_clear_creds(int device) +{ + oc_sec_cred_t *cred = oc_list_head(devices[device].creds), *next; + while (cred != NULL) { + next = cred->next; + oc_sec_remove_cred(cred, device); + cred = next; + } +} + oc_sec_cred_t * oc_sec_find_cred(oc_uuid_t *subjectuuid, int device) { @@ -160,10 +171,6 @@ oc_sec_encode_cred(bool persist, int device) oc_process_baseline_interface( oc_core_get_resource_by_index(OCF_SEC_CRED, device)); oc_rep_set_array(root, creds); - if (cr == NULL) { - oc_rep_object_array_start_item(creds); - oc_rep_object_array_end_item(creds); - } while (cr != NULL) { oc_rep_object_array_start_item(creds); oc_rep_set_int(creds, credid, cr->credid); @@ -336,7 +343,6 @@ oc_sec_decode_cred(oc_rep_t *rep, oc_sec_cred_t **owner, bool from_storage, oc_str_to_uuid(oc_string(*subjectuuid), &subject); if (!unique_credid(credid, device)) { oc_sec_remove_cred_by_credid(credid, device); - credid = -1; } if (credid == -1) { credid = get_new_credid(device); @@ -402,16 +408,29 @@ delete_cred(oc_request_t *request, oc_interface_mask_t interface, void *data) { (void)interface; (void)data; - char *subjectuuid = 0; - int ret = oc_get_query_value(request, "subjectuuid", &subjectuuid); - if (ret != -1 && - oc_cred_remove_subject(subjectuuid, request->resource->device)) { + bool success = false; + char *query_param = 0; + int ret = oc_get_query_value(request, "credid", &query_param); + int credid = 0; + if (ret != -1) { + credid = (int)strtoul(query_param, NULL, 10); + if (credid != 0) { + if (oc_sec_remove_cred_by_credid(credid, request->resource->device)) { + success = true; + } + } + } else { + oc_sec_clear_creds(request->resource->device); + success = true; + } + + if (success) { oc_send_response(request, OC_STATUS_DELETED); oc_sec_dump_cred(request->resource->device); - return; - } + } else { oc_send_response(request, OC_STATUS_NOT_FOUND); } +} void post_cred(oc_request_t *request, oc_interface_mask_t interface, void *data)
Updating PMU Event Counter Number from 12 to 8 to align with Cortex-M55's default number when the PMU is configured.
* ARMCM55 Device Series (configured for ARMCM55 with double precision FPU, * DSP extension, MVE, TrustZone) * @version V1.0.0 - * @date 03. March 2020 + * @date 26. March 2020 ******************************************************************************/ /* * Copyright (c) 2020 Arm Limited. All rights reserved. @@ -101,7 +101,7 @@ typedef enum IRQn #define __DSP_PRESENT 1U /* DSP extension present */ #define __SAUREGION_PRESENT 1U /* SAU regions present */ #define __PMU_PRESENT 1U /* PMU present */ -#define __PMU_NUM_EVENTCNT 12U /* PMU Event Counters */ +#define __PMU_NUM_EVENTCNT 8U /* PMU Event Counters */ #define __ICACHE_PRESENT 1U #define __DCACHE_PRESENT 1U
docs - remove Deprecated from gp_ignore_error_table also changed emphasized deprecation information to a NOTE
</body> </topic> <topic id="gp_ignore_error_table"> - <title>gp_ignore_error_table (Deprecated)</title> + <title>gp_ignore_error_table</title> <body> <p>Controls Greenplum Database behavior when the deprecated <codeph>INTO ERROR TABLE</codeph> clause is specified in a <codeph>CREATE EXTERNAL TABLE</codeph> or <codeph>COPY</codeph> command.</p> + <note>The <codeph>INTO ERROR TABLE</codeph> clause was deprecated and removed in Greenplum + Database 5. In Greenplum Database 7, this parameter will be removed as well, causing all + <codeph>INTO ERROR TABLE</codeph> invocations be yield a syntax error.</note> <p>The default value is <codeph>false</codeph>, Greenplum Database returns an error if the <codeph>INTO ERROR TABLE</codeph> clause is specified in a command. </p> <p>If the value is <codeph>true</codeph>, Greenplum Database ignores the clause, issues a you run applications that execute <codeph>CREATE EXTERNAL TABLE</codeph> or <codeph>COPY</codeph> commands that include the Greenplum Database 4.3.x <codeph>INTO ERROR TABLE</codeph> clause.</p> - <p>The <codeph>INTO ERROR TABLE</codeph> clause was deprecated and removed in Greenplum - Database 5. In Greenplum Database 7, this parameter will be removed as well, causing all - <codeph>INTO ERROR TABLE</codeph> invocations be yield a syntax error.</p> <table id="table_hnf_2v5_bdb"> <tgroup cols="3"> <colspec colnum="1" colname="col1" colwidth="1*"/>
Fix to masm support for SEH to work on a per file basis
priority = 7, emitFiles = function(prj, group) - local fileCfgFunc = { + local fileCfgFunc = function(fcfg, condition) + if fcfg then + return { m.excludedFromBuild, m.exceptionHandlingSEH, } - - m.emitFiles(prj, group, "Masm", nil, fileCfgFunc, function(cfg) - return cfg.system == p.WINDOWS - end) + else + return { + m.excludedFromBuild + } + end + end + m.emitFiles(prj, group, "Masm", nil, fileCfgFunc) end, emitFilter = function(prj, group) function m.exceptionHandlingSEH(filecfg, condition) - if not filecfg or filecfg.project.exceptionhandling == "SEH" then + if not filecfg or filecfg.exceptionhandling == "SEH" then m.element("UseSafeExceptionHandlers", condition, "true") end end
chore(test-discord-ws.c): trigger a callback for sending the ping
#include <assert.h> #include "discord.h" +#include "discord-internal.h" #include "cee-utils.h" #define THREADPOOL_SIZE "4" @@ -95,7 +96,19 @@ void on_force_error( struct discord_create_message_params params = { .content = (char *)discord_strerror(code, client) }; + discord_create_message(client, msg->channel_id, &params, NULL); +} +void on_ping( + struct discord *client, + const struct discord_user *bot, + const struct discord_message *msg) +{ + if (msg->author->bot) return; + + char text[256]; + sprintf(text, "Ping: %d", client->gw.hbeat->ping_ms); + struct discord_create_message_params params = { .content = text }; discord_create_message(client, msg->channel_id, &params, NULL); } @@ -103,9 +116,14 @@ enum discord_event_scheduler scheduler( struct discord *client, struct discord_user *bot, - struct sized_buffer *event_data, + struct sized_buffer *data, enum discord_gateway_events event) { + if (event == DISCORD_GATEWAY_EVENTS_MESSAGE_CREATE) { + char cmd[1024]=""; + json_extract(data->start, data->size, "(content):.*s", sizeof(cmd), cmd); + if (0 == strcmp("ping", cmd)) return DISCORD_EVENT_MAIN_THREAD; + } return DISCORD_EVENT_WORKER_THREAD; } @@ -132,6 +150,7 @@ int main(int argc, char *argv[]) discord_set_on_command(client, "spam", &on_spam); discord_set_on_command(client, "stop", &on_stop); discord_set_on_command(client, "force_error", &on_force_error); + discord_set_on_command(client, "ping", &on_ping); discord_run(client);
Add new_session_ticket err handler
@@ -2645,8 +2645,6 @@ send_request: /* * 7. Read the HTTP response */ - mbedtls_printf( " < Read from server:" ); - fflush( stdout ); /* * TLS and DTLS need different reading styles (stream vs datagram) @@ -2694,6 +2692,18 @@ send_request: ret = 0; goto reconnect; +#if defined(MBEDTLS_SSL_PROTO_TLS1_3) + +#if defined(MBEDTLS_SSL_SESSION_TICKETS) + case MBEDTLS_ERR_SSL_RECEIVED_NEW_SESSION_TICKET: + /* We were waiting for application data but got + * a NewSessionTicket instead. */ + mbedtls_printf( " got new session ticket.\n" ); + continue; +#endif /* MBEDTLS_SSL_SESSION_TICKETS */ + +#endif /* MBEDTLS_SSL_PROTO_TLS1_3 */ + default: mbedtls_printf( " mbedtls_ssl_read returned -0x%x\n", (unsigned int) -ret ); @@ -2703,8 +2713,8 @@ send_request: len = ret; buf[len] = '\0'; - mbedtls_printf( " %d bytes read\n\n%s", len, (char *) buf ); - + mbedtls_printf( " < Read from server: %d bytes read\n\n%s", len, (char *) buf ); + fflush( stdout ); /* End of message should be detected according to the syntax of the * application protocol (eg HTTP), just use a dummy test here. */ if( ret > 0 && buf[len-1] == '\n' ) @@ -2767,7 +2777,7 @@ send_request: len = ret; buf[len] = '\0'; - mbedtls_printf( " %d bytes read\n\n%s", len, (char *) buf ); + mbedtls_printf( " < Read from server: %d bytes read\n\n%s", len, (char *) buf ); ret = 0; }
u3: protect guard page if necessary after reprotecting loom
@@ -860,6 +860,19 @@ _ce_loom_protect_north(c3_w pgs_w, c3_w old_w) c3_assert(0); } + // protect guard page if clobbered + // + // NB: < pgs_w is precluded by assertion in _ce_patch_compose() + // + if ( (gar_pag_p >> u3a_page) < old_w ) { + fprintf(stderr, "loom: guard on reprotect\r\n"); + if ( 0 != mprotect(u3a_into(gar_pag_p), pag_siz_i, PROT_NONE) ) { + fprintf(stderr, "loom: failed to protect guard page: %s\r\n", + strerror(errno)); + c3_assert(0); + } + } + _ce_loom_track_north(pgs_w, dif_w); } else { @@ -895,6 +908,19 @@ _ce_loom_protect_south(c3_w pgs_w, c3_w old_w) c3_assert(0); } + // protect guard page if clobbered + // + // NB: > pgs_w is precluded by assertion in _ce_patch_compose() + // + if ( (gar_pag_p >> u3a_page) >= (u3a_pages - (old_w + 1)) ) { + fprintf(stderr, "loom: guard on reprotect\r\n"); + if ( 0 != mprotect(u3a_into(gar_pag_p), pag_siz_i, PROT_NONE) ) { + fprintf(stderr, "loom: failed to protect guard page: %s\r\n", + strerror(errno)); + c3_assert(0); + } + } + _ce_loom_track_south(pgs_w, dif_w); } else {
Improve filters for IAS zone sensors
@@ -80,7 +80,29 @@ void DeRestPluginPrivate::handleIasZoneClusterIndication(const deCONZ::ApsDataIn DBG_Printf(DBG_ZCL, "IAS Zone Status Change, status: 0x%04X, zoneId: %u, delay: %u\n", zoneStatus, zoneId, delay); - Sensor *sensor = getSensorNodeForAddressAndEndpoint(ind.srcAddress(), ind.srcEndpoint()); + Sensor *sensor = 0; + + for (Sensor &s : sensors) + { + if (s.deletedState() != Sensor::StateNormal) + { + continue; + } + + if (s.type() != QLatin1String("ZHAPresence") && + s.type() != QLatin1String("ZHAOpenClose")) + { + continue; + } + + if ((ind.srcAddress().hasExt() && s.address().ext() == ind.srcAddress().ext()) || + (ind.srcAddress().hasNwk() && s.address().nwk() == ind.srcAddress().nwk())) + { + sensor = &s; + break; + } + } + if (!sensor) { return;
[GB] RegisterPair can write to its pointee in the Deref addressing mode
@@ -281,8 +281,10 @@ impl VariableStorage for CpuRegisterPair { ((upper.read_u8(cpu) as u16) << 8) | (lower.read_u8(cpu) as u16) } - fn write_u8(&self, _cpu: &CpuState, val: u8) { - panic!("Wide register cannot write u8") + fn write_u8(&self, cpu: &CpuState, val: u8) { + // Implicitly dereference the memory pointed to by the register pair + let address = self.read_u16(cpu); + cpu.memory.write_u8(address, val) } fn write_u16(&self, cpu: &CpuState, val: u16) { @@ -962,6 +964,19 @@ fn test_wide_reg_addressing_mode_deref_decrement() { assert_eq!(cpu.get_op(OperandName::RegsHL).read_u16(&cpu), 0xaaba); } +#[test] +fn test_wide_reg_write_u8() { + let mut cpu = CpuState::new(); + // Given BC contains a pointer + cpu.get_op(OperandName::RegsBC).write_u16(&cpu, 0xaabb); + // And this pointer contains some data + cpu.memory.write_u16(0xaabb, 0x23); + // When we request an unadorned write + cpu.get_op(OperandName::RegsBC).write_u8(&cpu, 0x14); + // Then the data the pointer points to has been overwritten + assert_eq!(cpu.get_op(OperandName::RegsBC).read_u8(&cpu), 0x14); +} + /* Instructions tests */ /* DEC instruction tests */
fix: the check of BEARSSL
@@ -25,10 +25,10 @@ TEST_EXES := $(filter %.exe, $(TEST_SRC:.cpp=.exe) $(TEST_SRC:.c=.exe)) LIBDISCORD_CFLAGS := -I./ LIBDISCORD_LDFLAGS := -L./$(LIBDIR) -ldiscord -lcurl -ifeq ($(CC),stensal-c) +ifeq ($(BEARSSL),1) LIBDISCORD_LDFLAGS += -lbearssl -static - CFLAGS += -DBEARSSL -else ifdef $(BEARSSL) + CFLAGS += -DBEARSSL -DBEAR_SSL +else ifeq ($(CC),stensal-c) LIBDISCORD_LDFLAGS += -lbearssl -static CFLAGS += -DBEARSSL else
Added time initialization to the performance field
@@ -1003,6 +1003,7 @@ NVM_API int nvm_get_device_performance(const NVM_UID device_uid, p_performance->host_writes = pmem_info_output->TotalWriteRequests.Uint64; p_performance->block_reads = 0; p_performance->block_writes = 0; + p_performance->time = time(NULL); rc = NVM_SUCCESS; goto finish; }
minor caption updates
@@ -1013,7 +1013,7 @@ Notice that RSD and magnification predictions are not currently validated. We do \includegraphics[width=0.49\textwidth]{Cl_dd} \includegraphics[width=0.49\textwidth]{Cl_dl} \includegraphics[width=0.49\textwidth]{Cl_ll} -\caption{Tests of the angular power spectra accuracy. The black dot-dashed line indicates the target numerical accuracy of $0.1\sigma_\ell$. {\sl Top:} benchmark comparisons for power spectra between number counts in pairs of redshift bins. Results are shown for analytic (solid) and binned (dashed) redshift distributions, for the bin pairs 1-1 (blue), 1-2 (orange), 2-2 (green). {\sl Middle:} same as the top panel for cross-correlations between number counts and weak lensing, this time including the tomographic bin combination 2-1 (red). {\sl Bottom:} same as the top panel, but for the weak lensing power spectra.} +\caption{Tests of the angular power spectrum accuracy. The black dot-dashed line indicates the target numerical accuracy of $0.1\sigma_\ell$. {\sl Top:} benchmark comparisons for power spectra between number counts in pairs of redshift bins. Results are shown for analytic (solid) and binned (dashed) redshift distributions, for the bin pairs 1-1 (blue), 1-2 (orange), 2-2 (green). {\sl Middle:} same as the top panel for cross-correlations between number counts and weak lensing, this time including the tomographic bin combination 2-1 (red). {\sl Bottom:} same as the top panel, but for the weak lensing power spectra.} \label{fig:cls_limber} \end{figure} \begin{figure} @@ -1060,7 +1060,7 @@ We compared the difference between \ccl and the benchmarks for the cosmic shear, \begin{figure} \centering \includegraphics[width=0.49\textwidth]{projected_xiggl_error_comparison_bothnz_p5sigma} -\caption{Comparison between the predicted galaxy-galaxy lensing projected correlation function and the expected uncertainty for LSST for both redshift distributions.} +\caption{Comparison between the predicted galaxy-galaxy lensing projected correlation function and the expected uncertainty for LSST for both analytic and histogram redshift distributions.} \label{fig:corrval2} \end{figure} %------------------------
add manual python version check
@@ -7,6 +7,17 @@ if (NOT Python3_Interpreter_FOUND) return () endif () +# Sometimes CMake returns an invalid version of python: check for that +execute_process ( + COMMAND ${Python3_EXECUTABLE} -c "import sys; exit(sys.version_info < (3, 8))" + RESULT_VARIABLE EXIT_CODE + OUTPUT_QUIET) + +if (NOT EXIT_CODE EQUAL 0) + remove_tool (fuse "python3 delivered by cmake not of version >= 3.8") + return () +endif () + # Check if both pip and wheel are available execute_process ( COMMAND ${Python3_EXECUTABLE} -c "import pip,wheel"
typechecker-regex-prototype: augeas also required for haskell for travis
@@ -72,6 +72,7 @@ before_install: if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update brew install ninja + brew install augeas fi - | if [[ "$TRAVIS_OS_NAME" == "osx" && "$HASKELL" != "ON" ]]; then @@ -94,7 +95,6 @@ before_install: # Unfortunately Xerces 3.2 causes multiple problems if we translate Elektra with GCC on macOS brew install xerces-c fi - brew install augeas brew install dbus brew install discount brew install libgcrypt
Minor update to configure.ac configuration summary.
@@ -288,12 +288,12 @@ Your build configuration: Prefix : $prefix Package : $PACKAGE_NAME Version : $VERSION + Compiler flags : $CFLAGS + Linker flags : $LIBS $LDFLAGS Dynamic buffer : $with_getline Geolocation : $geolocation Storage method : $storage TLS/SSL : $openssl - Compiler flags : $CFLAGS - Linker flags : $LIBS $LDFLAGS Bugs : $PACKAGE_BUGREPORT EOF
DEV_InitDeviceFromDescription() update doc string
@@ -103,9 +103,9 @@ static ResourceItem *DEV_InitDeviceDescriptionItem(const DeviceDescription::Item return item; } -/*! Creates and initialises sub-device Resources and ResourceItems if not already present. +/*! Creates and initializes sub-device Resources and ResourceItems if not already present. - This function can replace database and joining device initialisation. + This function replaces the legacy database loading and joining device initialization. */ bool DEV_InitDeviceFromDescription(Device *device, const DeviceDescription &description) {
imgtool: Update docs for new key format Update the dependencies needed, as well as adding a blurb about how to password protect the private key.
@@ -8,13 +8,11 @@ this script should be preferred to the manual steps described in This program is written for Python3, and has several dependencies on Python libraries. These can be installed using 'pip3' manually: - pip3 install --user pycrypto - pip3 install --user pyasn1 - pip3 install --user ecdsa + pip3 install --user cryptography or, on Ubuntu, using the package manager: - sudo apt-get install python3-crypto python3-pyasn1 python3-ecdsa + sudo apt-get install python3-cryptography ## Managing keys @@ -29,6 +27,10 @@ mcuboot is configured to verify. This key file is what is used to sign images, this file should be protected, and not widely distributed. +You can add the `-p` argument to `keygen`, which will cause it to +prompt for a password. You will need to enter this password in every +time you use the private key. + ## Incorporating the public key into the code There is a development key distributed with mcuboot that can be used
Add daily measurement information to READ.md JerryScript-DCO-1.0-Signed-off-by: Youngil Choi
@@ -17,6 +17,8 @@ Key characteristics of JerryScript: Additional information can be found on our [project page](http://jerryscript.net) and [Wiki](https://github.com/jerryscript-project/jerryscript/wiki). +Memory usage and Binary footprint are measured at [here](https://jerryscript-project.github.io/jerryscript-test-results) with real target daily. + IRC channel: #jerryscript on [freenode](https://freenode.net) Mailing list: [email protected], you can subscribe [here](https://groups.io/g/jerryscript-dev) and access the mailing list archive [here](https://groups.io/g/jerryscript-dev/topics).
bootloader: fixed the issue custom_uart_gpio doesn't take effect
@@ -76,10 +76,12 @@ void bootloader_console_init(void) // Route GPIO signals to/from pins const uint32_t tx_idx = UART_PERIPH_SIGNAL(uart_num, SOC_UART_TX_PIN_IDX); const uint32_t rx_idx = UART_PERIPH_SIGNAL(uart_num, SOC_UART_RX_PIN_IDX); + gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[uart_rx_gpio], PIN_FUNC_GPIO); PIN_INPUT_ENABLE(GPIO_PIN_MUX_REG[uart_rx_gpio]); esp_rom_gpio_pad_pullup_only(uart_rx_gpio); esp_rom_gpio_connect_out_signal(uart_tx_gpio, tx_idx, 0, 0); esp_rom_gpio_connect_in_signal(uart_rx_gpio, rx_idx, 0); + gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[uart_tx_gpio], PIN_FUNC_GPIO); // Enable the peripheral periph_ll_enable_clk_clear_rst(PERIPH_UART0_MODULE + uart_num); }
meta: more realistic buffer limit for binary keys.
@@ -993,14 +993,17 @@ static int _meta_flag_preparse(token_t *tokens, const size_t ntokens, p += 2; \ } -// TODO: calc bytes remaining in buffer +// NOTE: being a little casual with the write buffer. +// the buffer needs to be sized that the longest possible meta response will +// fit. Here we allow the key to fill up to half the write buffer, in case +// something terrible has gone wrong. #define META_KEY(p, key, nkey, bin) { \ META_CHAR(p, 'k'); \ if (!bin) { \ memcpy(p, key, nkey); \ p += nkey; \ } else { \ - p += base64_encode((unsigned char *) key, nkey, (unsigned char *)p, WRITE_BUFFER_SIZE); \ + p += base64_encode((unsigned char *) key, nkey, (unsigned char *)p, WRITE_BUFFER_SIZE / 2); \ *p = ' '; \ *(p+1) = 'b'; \ p += 2; \
Fix function return type confusion When parse_hba_line's return type was changed from bool to a pointer, the MANDATORY_AUTH_ARG macro wasn't adjusted.
@@ -761,7 +761,7 @@ check_same_host_or_net(SockAddr *raddr, IPCompareMethod method) authname, argname), \ errcontext("line %d of configuration file \"%s\"", \ line_num, HbaFileName))); \ - return false; \ + return NULL; \ } \ } while (0);
Poll manager: fast skip unavailable nodes
@@ -15055,10 +15055,16 @@ void DeRestPluginPrivate::pollNextDevice() RestNodeBase *restNode = nullptr; - if (!pollNodes.empty()) + while (!pollNodes.empty()) { restNode = pollNodes.front(); pollNodes.pop_front(); + + DBG_Assert(restNode); + if (restNode && restNode->isAvailable()) + { + break; + } } if (pollNodes.empty()) // TODO time based
sdl_image: fix filename strings freed too early In ReadXPMFromArray() and SavePNG(), the passed filename parameter are converted to CString but then freed immediately using C.free().
@@ -337,7 +337,7 @@ func LoadWEBP_RW(src *sdl.RWops) (*sdl.Surface, error) { // (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_28.html) func ReadXPMFromArray(xpm string) (*sdl.Surface, error) { _xpm := C.CString(xpm) - C.free(unsafe.Pointer(_xpm)) + defer C.free(unsafe.Pointer(_xpm)) _surface := C.IMG_ReadXPMFromArray(&_xpm) if _surface == nil { return nil, GetError() @@ -348,7 +348,7 @@ func ReadXPMFromArray(xpm string) (*sdl.Surface, error) { func SavePNG(surface *sdl.Surface, file string) error { _surface := (*C.SDL_Surface)(unsafe.Pointer(surface)) _file := C.CString(file) - C.free(unsafe.Pointer(_file)) + defer C.free(unsafe.Pointer(_file)) _ret := C.IMG_SavePNG(_surface, _file) if _ret < 0 { return GetError()
Add 'Any' states for copy-done
@@ -266,6 +266,7 @@ purposes; they are not actually present in the boot vector. -----------------+--------+--------| magic | Unset | Unset | image-ok | Any | Any | + copy-done | Any | Any | -----------------+--------+--------' pending | | | confirmed | X | | @@ -279,6 +280,7 @@ purposes; they are not actually present in the boot vector. -----------------+--------+--------| magic | Any | Good | image-ok | Any | Unset | + copy-done | Any | Any | -----------------+--------+--------' pending | | T | confirmed | X | | @@ -292,6 +294,7 @@ purposes; they are not actually present in the boot vector. -----------------+--------+--------| magic | Any | Good | image-ok | Any | 0x01 | + copy-done | Any | Any | -----------------+--------+--------' pending | | P | confirmed | X | | @@ -322,6 +325,7 @@ no revert is performed. All other states don't need it. -----------------+--------+--------| magic | Good | Unset | image-ok | 0x01 | Any | + copy-done | Any | Any | -----------------+--------+--------' pending | | | confirmed | X | |
tools: Kconfig checker ignores test files
@@ -34,6 +34,9 @@ OUTPUT_SUFFIX = '.new' IGNORE_DIRS = ( # Kconfigs from submodules need to be ignored: os.path.join('components', 'mqtt', 'esp-mqtt'), + # Test Kconfigs are also ignored + os.path.join('tools', 'ldgen', 'test', 'data'), + os.path.join('tools', 'kconfig_new', 'test'), ) SPACES_PER_INDENT = 4
Build: do not trunc docker tags
@@ -515,10 +515,10 @@ def imageId(image) { def checksum(file) { // Used to identify if a Dockerfile changed - // Collissions result in not rebuilding the Docker image even though it - // changed. + // TODO expand to use more than one file if Dockerfile ever depends on + // external files return sh(returnStdout: true, - script: "cat $file | sha256sum | dd bs=1 count=8 status=none") + script: "cat $file | sha256sum | dd bs=1 count=64 status=none") .trim() }
fix 4 ios build
@@ -2,6 +2,14 @@ RESOURCES_LIBRARY() +IF (GCC OR CLANG) + # headers must be fixed later + CFLAGS( + GLOBAL "-Wno-error=unused-parameter" + GLOBAL "-Wno-error=sign-compare" + ) +ENDIF() + IF (OS_LINUX) # Qt + protobuf 2.6.1 + GL headers + GLES2 DECLARE_EXTERNAL_RESOURCE(MAPKIT_SDK sbr:648642209)
define H2O_RAND_MAX
* Wrapper of rand (3) or arc4random (3). Guaranteed to be multi-thread safe. */ #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) +#define H2O_RAND_MAX UINT32_MAX #define h2o_rand() arc4random() #else +#define H2O_RAND_MAX RAND_MAX #define H2O_DEFINE_RAND 1 int h2o_rand(void); #endif
stm32/network_wiznet5k: Automatically set MAC if device doesn't have one
@@ -128,6 +128,14 @@ STATIC void wiznet5k_init(void) { // Seems we need a small delay after init mp_hal_delay_ms(250); + // If the device doesn't have a MAC address then set one + uint8_t mac[6]; + getSHAR(mac); + if ((mac[0] | mac[1] | mac[2] | mac[3] | mac[4] | mac[5]) == 0) { + mp_hal_get_mac(MP_HAL_MAC_ETH0, mac); + setSHAR(mac); + } + // Hook the Wiznet into lwIP wiznet5k_lwip_init(&wiznet5k_obj); }
Add TSP logic reset after stream start
@@ -608,6 +608,7 @@ int Streamer::UpdateThreads(bool stopAll) const uint32_t data[] = {reg9 | (5 << 1), reg9 & ~(5 << 1)}; fpga->StartStreaming(); fpga->WriteRegisters(addr, data, 2); + lms->ResetLogicregisters(); } else if(not needTx and not needRx) {
sdl/pixels: add ABGR4444Model
@@ -361,6 +361,7 @@ var ( BGR565Model color.Model = color.ModelFunc(bgr565Model) BGR555Model color.Model = color.ModelFunc(bgr555Model) ARGB4444Model color.Model = color.ModelFunc(argb4444Model) + ABGR4444Model color.Model = color.ModelFunc(abgr4444Model) ) func rgb444Model(c color.Color) color.Color { @@ -485,3 +486,23 @@ func argb4444Model(c color.Color) color.Color { r, g, b, a := c.RGBA() return ARGB4444{uint8(a >> 4), uint8(r >> 4), uint8(g >> 4), uint8(b >> 4)} } + +type ABGR4444 struct { + A, B, G, R byte +} + +func (c ABGR4444) RGBA() (r, g, b, a uint32) { + a = uint32(c.A) << 4 + r = uint32(c.R) << 4 + g = uint32(c.G) << 4 + b = uint32(c.B) << 4 + return +} + +func abgr4444Model(c color.Color) color.Color { + if _, ok := c.(color.RGBA); ok { + return c + } + r, g, b, a := c.RGBA() + return ABGR4444{uint8(a >> 4), uint8(b >> 4), uint8(g >> 4), uint8(r >> 4)} +}
usb: try to get zlp and stall handling right
@@ -173,8 +173,6 @@ static uint32_t ubuf[0x20]; static volatile bool usb_device_configured = false; -static volatile bool tx_buffer_in_use = false; - static uint8_t tx_buffer_data[BUFFER_SIZE]; static circular_buffer_t tx_buffer = { .buffer = tx_buffer_data, @@ -254,23 +252,41 @@ static void cdc_rxonly(usbd_device *dev, uint8_t event, uint8_t ep) { circular_buffer_write_multi(&rx_buffer, buf, len); } +static volatile bool tx_stalled = true; + static void cdc_txonly(usbd_device *dev, uint8_t event, uint8_t ep) { - if (tx_buffer_in_use) { - usbd_ep_write(dev, ep, 0, 0); - return; - } + static volatile bool did_zlp = false; static uint8_t buf[CDC_DATA_SZ]; - - tx_buffer_in_use = true; const uint32_t len = circular_buffer_read_multi(&tx_buffer, buf, CDC_DATA_SZ); - tx_buffer_in_use = false; if (len) { usbd_ep_write(dev, ep, buf, len); + tx_stalled = false; + + // transfers smaller than max size count as zlp + if (len == CDC_DATA_SZ) { + did_zlp = false; + } else { + did_zlp = true; + } } else { + if (!did_zlp) { + // no zlp sent, flush now usbd_ep_write(dev, ep, 0, 0); + tx_stalled = false; + } else { + tx_stalled = true; + } + } } + +static void cdc_kickoff_tx() { + if (!tx_stalled) { + return; + } + + cdc_txonly(&udev, 0, CDC_TXD_EP); } static usbd_respond cdc_setconf(usbd_device *dev, uint8_t cfg) { @@ -293,7 +309,6 @@ static usbd_respond cdc_setconf(usbd_device *dev, uint8_t cfg) { usbd_ep_config(dev, CDC_NTF_EP, USB_EPTYPE_INTERRUPT, CDC_NTF_SZ); usbd_reg_endpoint(dev, CDC_RXD_EP, cdc_rxonly); usbd_reg_endpoint(dev, CDC_TXD_EP, cdc_txonly); - usbd_ep_write(dev, CDC_TXD_EP, 0, 0); usb_device_configured = true; @@ -387,12 +402,8 @@ void usb_serial_write(uint8_t *data, uint32_t len) { uint32_t written = 0; while (written < len) { - while (tx_buffer_in_use) - __NOP(); - - tx_buffer_in_use = true; written += circular_buffer_write_multi(&tx_buffer, data + written, len - written); - tx_buffer_in_use = false; + cdc_kickoff_tx(); } }
86 psxe patch
@@ -76,7 +76,7 @@ C interfaces, and can interface with ordering tools such as Scotch. %patch0 -p1 %patch1 -p1 %if "%{compiler_family}" == "intel" -%patch2 -p2 +#%patch2 -p2 %endif %build
fix(gradient): assert before dividing by 0
@@ -324,6 +324,8 @@ LV_ATTRIBUTE_FAST_MEM lv_grad_color_t lv_gradient_calculate(const lv_grad_dsc_t } } + LV_ASSERT(d != 0); + /*Then interpolate*/ frac -= min; lv_opa_t mix = (frac * 255) / d;
Block reading if queue is full
@@ -199,11 +199,10 @@ netconn_evt(esp_evt_t* evt) { return espOKIGNOREMORE; /* Return OK to free the memory and ignore further data */ } nc->mbox_receive_entries++; /* Increase number of packets in receive mbox */ - #if ESP_CFG_CONN_MANUAL_TCP_RECEIVE /* Check against 1 less to still allow potential close event to be written to queue */ if (nc->mbox_receive_entries >= (ESP_CFG_NETCONN_RECEIVE_QUEUE_LEN - 1)) { - /* Todo: Here we should suspend manual reading */ + conn->status.f.receive_blocked = 1; /* Block reading more data */ } #endif /* ESP_CFG_CONN_MANUAL_TCP_RECEIVE */ @@ -690,7 +689,7 @@ esp_netconn_receive(esp_netconn_p nc, esp_pbuf_p* pbuf) { #if ESP_CFG_CONN_MANUAL_TCP_RECEIVE else { esp_core_lock(); - /* todo: Resume manual reading */ + nc->conn->status.f.receive_blocked = 0; /* Resume reading more data */ esp_conn_recved(nc->conn, *pbuf); /* Notify stack about received data */ esp_core_unlock(); }
luci-mod-status: re-enable LuCI version display
@@ -40,16 +40,14 @@ return baseclass.extend({ var boardinfo = data[0], systeminfo = data[1], cpubench = data[2], - cpuusage = data[3]; //, -// luciversion = data[4]; + cpuusage = data[3], + luciversion = data[4]; -/* luciversion = luciversion.filter(function(l) { return l.match(/^\s*(luciname|luciversion)\s*=/); }).map(function(l) { return l.replace(/^\s*\w+\s*=\s*['"]([^'"]+)['"].*$/, '$1'); }).join(' '); -*/ var datestr = null; @@ -70,7 +68,7 @@ return baseclass.extend({ _('Hostname'), boardinfo.hostname, _('Model'), boardinfo.model + cpubench.cpubench, _('Architecture'), boardinfo.system, - _('Firmware Version'), (L.isObject(boardinfo.release) ? boardinfo.release.description: '')/* + ' / ' : '') + (luciversion || '')*/, + _('Firmware Version'), (L.isObject(boardinfo.release) ? boardinfo.release.description: '') + ' / ' : '') + (luciversion || ''), _('Kernel Version'), boardinfo.kernel, _('Local Time'), datestr, _('Uptime'), systeminfo.uptime ? '%t'.format(systeminfo.uptime) : null,
dispatch_connection: add some more elaborate comments Explain a bit better why we can always add another character without overrunning our buffer.
@@ -432,8 +432,12 @@ dispatch_connection(connection *conn, dispatcher *self, struct timeval start) } __sync_add_and_fetch(&(self->metrics), 1); + /* add newline and terminate the string, we can do this + * because we substract one from buf and we always store + * a full metric in buf before we copy it to metric + * (which is of the same size) */ *q++ = '\n'; - *q = '\0'; /* can do this because we substract one from buf */ + *q = '\0'; /* perform routing of this metric */ tracef("dispatcher %d, connfd %d, metric %s",
schema tree BUGFIX make sure features are correctly set ... when using ly_ctx_load_module and the module is already loaded and implemented.
#include "in_internal.h" #include "log.h" #include "parser_schema.h" +#include "schema_features.h" +#include "schema_compile.h" #include "set.h" #include "tree.h" #include "tree_data.h" @@ -874,13 +876,26 @@ search_file: /* * module found, make sure it is implemented if should be */ - if (implement && !(*mod)->implemented) { + if (implement) { + if ((*mod)->implemented) { + /* set features if different */ + ret = lys_set_features((*mod)->parsed, features); + if (!ret) { + /* context need to be recompiled so that feature changes are properly applied */ + unres->recompile = 1; + } else if (ret != LY_EEXIST) { + /* error */ + return ret; + } /* else no feature changes */ + } else { + /* implement */ ret = lys_set_implemented_r(*mod, features, unres); if (ret) { *mod = NULL; return ret; } } + } return LY_SUCCESS; }
Update Managed heap allocator
// -// Copyright (c) 2017 The nanoFramework project contributors +// Copyright (c) 2019 The nanoFramework project contributors // Portions Copyright (c) Microsoft Corporation. All rights reserved. // See LICENSE file in the project root for full license information. // #include <nanoHAL.h> -// Define an area for the CLR managed heap -#if !defined(MANAGED_HEAP_SIZE) -#define MANAGED_HEAP_SIZE (64*1024) -#endif +// +// Allocate Memory for Managed heap +// +// if spiRam is available then use all available ram - SPI_ALLOW_FREE +// +// if no spiRam or spiRam malloc fails then malloc from normal ram +// +// The CLR calls this multiple times. Once memory is allocated return the same memory for all +// subsequent calls. + + +static const char* TAG = "Memory"; + +// Space to leave free in spiRam +#define SPI_ALLOW_FREE (256 * 1024) -uint32_t managedHeap[MANAGED_HEAP_SIZE/ sizeof(uint32_t)]; +// You can't go much bigger than this when allocating in normal memory to +// get memory in one continous lump. +#define NORMAL_MEMORY_SIZE (64 * 1024) + +// Saved memory allocation for when heap is reset so we can return same value. +unsigned char* pManagedHeap = NULL; +size_t managedHeapSize = 0; + +// +// Return the location and size of the managed heap +// If called a 2nd time then always return same value +// void HeapLocation(unsigned char*& baseAddress, unsigned int& sizeInBytes) { NATIVE_PROFILE_PAL_HEAP(); - baseAddress = (unsigned char*)&managedHeap; - sizeInBytes = sizeof(managedHeap); + // Memory allocated yet ? + if (pManagedHeap == NULL) + { + // Memory size to allocate in normal memory if spiRam not available + managedHeapSize = NORMAL_MEMORY_SIZE; + + // See if we have any SPIRAM + size_t spiramMaxSize = heap_caps_get_largest_free_block(MALLOC_CAP_8BIT | MALLOC_CAP_32BIT | MALLOC_CAP_SPIRAM); + + // Sanity check - Make sure there is at least managedHeapSize available in SPIRAM + if (spiramMaxSize > (SPI_ALLOW_FREE + managedHeapSize)) + { + // Allocate heap from SPIRAM + managedHeapSize = spiramMaxSize - SPI_ALLOW_FREE; + pManagedHeap = (unsigned char *)heap_caps_malloc(managedHeapSize, MALLOC_CAP_8BIT | MALLOC_CAP_32BIT | MALLOC_CAP_SPIRAM); + if (pManagedHeap) + ESP_LOGI(TAG, "Managed heap allocated, spiRam size:%d max:%d", managedHeapSize, spiramMaxSize); + } + + while(pManagedHeap == NULL) + { + // Allocate heap from Internal RAM + pManagedHeap = (unsigned char *)heap_caps_malloc(managedHeapSize, MALLOC_CAP_8BIT | MALLOC_CAP_32BIT); + if (pManagedHeap) + { + ESP_LOGI(TAG, "Managed heap allocated, internal size:%d", managedHeapSize); + } + else + { + // Subtract 1K and try again + managedHeapSize -= 1024; + if (managedHeapSize <= 0) + { + ESP_LOGE(TAG, "Unable to allocate any Managed heap"); + return; + } + } + } + } + + baseAddress = pManagedHeap; + sizeInBytes = managedHeapSize; }
merge dwm patches
@@ -3339,10 +3339,12 @@ tile(Monitor *m) if (i < m->nmaster) { h = (m->wh - my) / (MIN(n, m->nmaster) - i); resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0); + if (my + HEIGHT(c) < m->wh) my += HEIGHT(c); } else { h = (m->wh - ty) / (n - i); resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0); + if (ty + HEIGHT(c) < m->wh) ty += HEIGHT(c); } }
Add FORCE Z14 from patch provided by aarnez in
@@ -1085,6 +1085,16 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define CORENAME "Z13" #endif +#ifdef FORCE_Z14 +#define FORCE +#define ARCHITECTURE "ZARCH" +#define SUBARCHITECTURE "Z14" +#define ARCHCONFIG "-DZ14 " \ + "-DDTB_DEFAULT_ENTRIES=64" +#define LIBNAME "z14" +#define CORENAME "Z14" +#endif + #ifndef FORCE #ifdef USER_TARGET
Filter out net.IPNet and sort the IPv4 addresses
@@ -1394,6 +1394,7 @@ func FindJumpMap(ap *tc.AttachPoint) (mapFD bpf.MapFD, err error) { } func (m *bpfEndpointManager) getInterfaceIP(ifaceName string) (*net.IP, error) { + var ipAddrs []net.IP if ip, ok := m.ifaceToIpMap[ifaceName]; ok { return &ip, nil } @@ -1405,14 +1406,19 @@ func (m *bpfEndpointManager) getInterfaceIP(ifaceName string) (*net.IP, error) { if err != nil { return nil, err } - sort.Slice(addrs, func(i, j int) bool { - return bytes.Compare(addrs[i].(*net.IPNet).IP, addrs[j].(*net.IPNet).IP) < 0 - }) - for _, addr := range addrs { - if ipv4Addr := addr.(*net.IPNet).IP.To4(); ipv4Addr != nil { - return &ipv4Addr, nil + switch t := addr.(type) { + case *net.IPNet: + if t.IP.To4() != nil { + ipAddrs = append(ipAddrs, t.IP) + } + } } + sort.Slice(ipAddrs, func(i, j int) bool { + return bytes.Compare(ipAddrs[i], ipAddrs[j]) < 0 + }) + if len(ipAddrs) > 0 { + return &ipAddrs[0], nil } return nil, errors.New("interface ip address not found") }
Correct consumption calculation for Immax 07048L
"name": "state/alert" }, { - "name": "state/on" + "name": "state/on", + "refresh.interval": 86400 }, { "name": "state/reachable" "name": "state/lastupdated" }, { - "name": "state/power" + "name": "state/power", + "refresh.interval": 86400 } ] }, "name": "config/reachable" }, { - "name": "state/consumption" + "name": "state/consumption", + "refresh.interval": 86400, + "parse": { + "at": "0x0000", + "cl": "0x0702", + "ep": 1, + "eval": "Item.val = Attr.val * 10;", + "fn": "zcl" + } }, { "name": "state/lastupdated"
XDP TX fix Remove the workaround in QUIC for XDP TX hangs. XDP version updated to 0.16.1.
@@ -391,7 +391,7 @@ CxPlatXdpReadConfig( Xdp->RxRingSize = 128; Xdp->TxBufferCount = 4096; Xdp->TxRingSize = 128; - Xdp->TxAlwaysPoke = TRUE; + Xdp->TxAlwaysPoke = FALSE; // // Read config from config file. @@ -621,8 +621,8 @@ CxPlatDpRawInterfaceInitialize( goto Error; } - uint32_t Flags = 0; // TODO: support native/generic forced flags. - Status = XskBind(Queue->RxXsk, Interface->IfIndex, i, Flags, NULL); + uint32_t Flags = XSK_BIND_RX; + Status = XskBind(Queue->RxXsk, Interface->IfIndex, i, Flags); if (QUIC_FAILED(Status)) { QuicTraceEvent( LibraryErrorStatus, @@ -632,6 +632,16 @@ CxPlatDpRawInterfaceInitialize( goto Error; } + Status = XskActivate(Queue->RxXsk, 0, NULL); + if (QUIC_FAILED(Status)) { + QuicTraceEvent( + LibraryErrorStatus, + "[ lib] ERROR, %u, %s.", + Status, + "XskActivate"); + goto Error; + } + XSK_RING_INFO_SET RxRingInfo; uint32_t RxRingInfoSize = sizeof(RxRingInfo); Status = XskGetSockopt(Queue->RxXsk, XSK_SOCKOPT_RING_INFO, &RxRingInfo, &RxRingInfoSize); @@ -718,8 +728,8 @@ CxPlatDpRawInterfaceInitialize( goto Error; } - Flags = 0; // TODO: support native/generic forced flags. - Status = XskBind(Queue->TxXsk, Interface->IfIndex, i, Flags, NULL); + Flags = XSK_BIND_TX; // TODO: support native/generic forced flags. + Status = XskBind(Queue->TxXsk, Interface->IfIndex, i, Flags); if (QUIC_FAILED(Status)) { QuicTraceEvent( LibraryErrorStatus, @@ -729,6 +739,16 @@ CxPlatDpRawInterfaceInitialize( goto Error; } + Status = XskActivate(Queue->TxXsk, 0, NULL); + if (QUIC_FAILED(Status)) { + QuicTraceEvent( + LibraryErrorStatus, + "[ lib] ERROR, %u, %s.", + Status, + "XskActivate"); + goto Error; + } + XSK_RING_INFO_SET TxRingInfo; uint32_t TxRingInfoSize = sizeof(TxRingInfo); Status = XskGetSockopt(Queue->TxXsk, XSK_SOCKOPT_RING_INFO, &TxRingInfo, &TxRingInfoSize); @@ -1454,9 +1474,8 @@ CxPlatXdpTx( ProdCount++; } - uint32_t TxIndexQuery; if (ProdCount > 0 || - (CompCount > 0 && XskRingProducerReserve(&Queue->TxRing, MAXUINT32, &TxIndexQuery) != Queue->TxRing.size)) { + (CompCount > 0 && XskRingProducerReserve(&Queue->TxRing, MAXUINT32, &TxIndex) != Queue->TxRing.size)) { XskRingProducerSubmit(&Queue->TxRing, ProdCount); if (Xdp->TxAlwaysPoke || XskRingProducerNeedPoke(&Queue->TxRing)) { uint32_t OutFlags;
[util/generic] Docs for TInputRangeAdaptor. __FORCE_COMMIT__
@@ -34,23 +34,21 @@ namespace NStlIterator { * * Derived class is expected to define: * \code - * using TRetVal = <pointer>; - * TRetVal Next(); + * TSomething* Next(); * \endcode * - * `TRetVal` is expected to be a pointer-like type. `Next()` returning nullptr - * signals end of range. + * `Next()` returning `nullptr` signals end of range. Note that you can also use + * pointer-like types instead of actual pointers (e.g. `TAtomicSharedPtr`). * * Since iteration state is stored inside the derived class, the resulting range * is an input range (works for single pass algorithms only). Technically speaking, - * if `TRetVal` is a non-const pointer, it can also work as an output range. + * if you're returning a non-const pointer from `Next`, it can also work as an output range. * * Example usage: * \code * class TSquaresGenerator: public TInputRangeAdaptor<TSquaresGenerator> { * public: - * using TRetVal = const double*; - * TRetVal Next() { + * const double* Next() { * Current_ = State_ * State_; * State_ += 1.0; * // Never return nullptr => we have infinite range!
os/binfmt/libelf: Correctly update no. of blocks for caching Update number of blocks for caching correctly based on extra unaligned data in file.
@@ -454,15 +454,15 @@ int elf_cache_init(int filfd, uint16_t offset, off_t filelen, uint8_t compressio elf_compress_type = compression_type; /* Set number of blocks to use for caching */ - if (CONFIG_ELF_CACHE_BLOCKS_COUNT < (CUTOFF_RATIO_CACHE_BLOCKS) * (number_of_blocks)) { - number_blocks_caching = CONFIG_ELF_CACHE_BLOCKS_COUNT; - } else { - number_blocks_caching = ((CUTOFF_RATIO_CACHE_BLOCKS) * (number_of_blocks)); + if (CONFIG_ELF_CACHE_BLOCKS_COUNT > (CUTOFF_RATIO_CACHE_BLOCKS) * (number_of_blocks)) { + number_blocks_caching = (CUTOFF_RATIO_CACHE_BLOCKS) * (number_of_blocks); } /* Extra unaligned data apart from blocksize */ - if (file_len % cache_blocks_size) + if (file_len % cache_blocks_size) { number_of_blocks++; + number_blocks_caching++; + } /* Initialize max_accesed_count to 0 */ max_accessed_count = 0;
Set SHA cap to match FOM
@@ -406,7 +406,7 @@ ACVP_RESULT acvp_enable_hash_cap( //TODO: need to validate that cipher, mode, etc. are valid values // we also need to make sure we're not adding a duplicate - cap->in_bit = 1; + cap->in_bit = 0; cap->in_empty = 1; return (acvp_append_hash_caps_entry(ctx, cap, cipher, crypto_handler));
some change.
@@ -52,12 +52,14 @@ void vcp_putch(uint8_t ch) uint8_t vcp_getch(void) { - /* for debugging */ - //uint8_t ch = CDC_Itf_Getch(); - //drv_uart_write(DRV_UART_NUM_4, ch); - //return ch; - +#if 1 return CDC_Itf_Getch(); +#else + /* for debugging */ + uint8_t ch = CDC_Itf_Getch(); + drv_uart_write(DRV_UART_NUM_4, ch); + return ch; +#endif }
copy desktop file
@@ -45,7 +45,9 @@ install: all sed "s/VERSION/${VERSION}/g" < instantwm.1 > ${DESTDIR}${MANPREFIX}/man1/instantwm.1 chmod 644 ${DESTDIR}${MANPREFIX}/man1/instantwm.1 cp -f instantwm.desktop ${DESTDIR}/usr/share/xsessions + cp -f instantwm.desktop ${DESTDIR}/usr/share/xsessions/default.desktop chmod 644 ${DESTDIR}/usr/share/xsessions/instantwm.desktop + chmod 644 ${DESTDIR}/usr/share/xsessions/default.desktop cp -f startinstantos ${DESTDIR}${PREFIX}/bin/startinstantos chmod 755 ${DESTDIR}${PREFIX}/bin/startinstantos @@ -53,7 +55,8 @@ uninstall: rm -f ${DESTDIR}${PREFIX}/bin/instantwm\ ${DESTDIR}${MANPREFIX}/man1/instantwm.1\ ${DESTDIR}${PREFIX}/bin/startinstantos\ - ${DESTDIR}/usr/share/xsessions/instantwm.desktop + ${DESTDIR}/usr/share/xsessions/instantwm.desktop\ + ${DESTDIR}/usr/share/xsessions/default.desktop .PHONY: all options clean dist install uninstall
added more ESSID iterations
@@ -72,34 +72,39 @@ if(lflag == true) return; } /*===========================================================================*/ -void writeessidreversed(FILE *fhout, uint8_t essidlen, uint8_t *essid) +static void writeessidsweeped(FILE *fhout, uint8_t essidlen, uint8_t *essid) { -char pskstring[PSKSTRING_LEN_MAX] = {}; +static int l1, l2; +static char sweepstring[PSKSTRING_LEN_MAX] = {}; -memset(&pskstring, 0, PSKSTRING_LEN_MAX); -int pi; -int po = 0; -for(pi = essidlen -1; pi >= 0; pi--) +for(l1 = 3; l1 <= essidlen; l1++) { - pskstring[po] = essid[pi]; - po++; + for(l2 = 0; l2 <= essidlen -l1; l2++) + { + memset(&sweepstring, 0, PSKSTRING_LEN_MAX); + memcpy(&sweepstring, &essid[l2], l1); + writepsk(fhout, sweepstring); + } } -writepsk(fhout, pskstring); return; } /*===========================================================================*/ static void prepareessid(FILE *fhout, uint8_t essidlen, uint8_t *essid) { -char pskstring[PSKSTRING_LEN_MAX] = {}; - -memset(&pskstring, 0, PSKSTRING_LEN_MAX); -memcpy(&pskstring, essid, essidlen); -writepsk(fhout, pskstring); -writeessidreversed(fhout, essidlen, essid); - +static int pi; +static int po = 0; +static uint8_t essidreverse[PSKSTRING_LEN_MAX] = {}; +writeessidsweeped(fhout, essidlen, essid); +memset(&essidreverse, 0, PSKSTRING_LEN_MAX); +for(pi = essidlen -1; pi >= 0; pi--) + { + essidreverse[po] = essid[pi]; + po++; + } +writeessidsweeped(fhout, essidlen, essidreverse); return; } /*===========================================================================*/
ec_commands: fix DP PIN assignment flag The DP PIN assignment mask was shifted by 1 bit since CL:2432452. TEST=ensure asurada DP out BRANCH=none
@@ -6461,13 +6461,13 @@ enum tcpc_cc_polarity { POLARITY_COUNT }; -#define MODE_DP_PIN_A BIT(1) -#define MODE_DP_PIN_B BIT(2) -#define MODE_DP_PIN_C BIT(3) -#define MODE_DP_PIN_D BIT(4) -#define MODE_DP_PIN_E BIT(5) -#define MODE_DP_PIN_F BIT(6) -#define MODE_DP_PIN_ALL GENMASK(6, 0) +#define MODE_DP_PIN_A BIT(0) +#define MODE_DP_PIN_B BIT(1) +#define MODE_DP_PIN_C BIT(2) +#define MODE_DP_PIN_D BIT(3) +#define MODE_DP_PIN_E BIT(4) +#define MODE_DP_PIN_F BIT(5) +#define MODE_DP_PIN_ALL GENMASK(5, 0) #define PD_STATUS_EVENT_SOP_DISC_DONE BIT(0) #define PD_STATUS_EVENT_SOP_PRIME_DISC_DONE BIT(1)
interface: stringify number prop 0 is falsy.
@@ -7,7 +7,7 @@ interface LoadingProps { } export function Loading({ text }: LoadingProps) { return ( - <Body border={0}> + <Body border="0"> <Center height="100%"> <LoadingSpinner /> {Boolean(text) && <Text ml={4}>{text}</Text>}
Passwd: Fix minor spelling mistakes
@@ -19,13 +19,13 @@ If present, the not-posix compliant `fgetpwent` function will be used to read th ## Configuration -If the config key `index` is set to `name` passwd entrys will be sorted by name, if not set or set to `uid` passwd entries will be sorted by uid +If the config key `index` is set to `name` passwd entries will be sorted by name, if not set or set to `uid` passwd entries will be sorted by uid ## Fields - `gecos` contains the full name of the account - `gid` contains the accounts primary group id -- `home` contains the path to the accounts home directoy +- `home` contains the path to the accounts home directory - `shell` contains the accounts default shell - `uid` contains the accounts uid - `name` contains the account name
VERSION bump to version 2.1.61
@@ -64,7 +64,7 @@ endif() # micro version is changed with a set of small changes or bugfixes anywhere in the project. set(SYSREPO_MAJOR_VERSION 2) set(SYSREPO_MINOR_VERSION 1) -set(SYSREPO_MICRO_VERSION 60) +set(SYSREPO_MICRO_VERSION 61) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
Add support for Comet Lake H and S
@@ -1409,6 +1409,7 @@ int get_cpuname(void){ } case 10: //family 6 exmodel 10 switch (model) { + case 5: // Comet Lake H and S case 6: // Comet Lake U if(support_avx2()) return CPUTYPE_HASWELL; @@ -1967,8 +1968,8 @@ int get_coretype(void){ break; case 10: switch (model) { - case 6: - // Comet Lake U + case 5: // Comet Lake H and S + case 6: // Comet Lake U if(support_avx()) #ifndef NO_AVX2 return CORE_HASWELL;
Correct board info alignment. Made board_info_t non-packed. Using canonical alignment for the fields will reduce code size. Remove aligned(4) on default weak g_board_info.
@@ -54,7 +54,7 @@ enum _board_info_flags { * The board initialization function pointers allow the board to override the routines defined * by the device family. */ -typedef struct __attribute__((__packed__)) board_info { +typedef struct board_info { uint16_t info_version; /*!< Version number of the board info */ uint16_t family_id; /*!< Use to select or identify target family from defined target family or custom ones */ char board_id[5]; /*!< 4-char board ID plus null terminator */
tools/biolatpcts: Add accumulative reporting on SIGUSR2 SIGUSR1's behavior is the same - print and start a new interval. SIGUSR2 triggers output without starting a new interval and can be used to monitor progress without affecting the accumulation of data points.
@@ -28,10 +28,14 @@ Monitor IO latency distribution of a block device epilog = """ When interval is infinite, biolatpcts will print out result once the -initialization is complete to indicate readiness. Once initialized, -biolatpcts will output whenever it receives SIGUSR1 and before exiting on -SIGINT, SIGTERM or SIGHUP. This can be used to obtain latency distribution -between two events. +initialization is complete to indicate readiness. After initialized, +biolatpcts will output whenever it receives SIGUSR1/2 and before exiting on +SIGINT, SIGTERM or SIGHUP. + +SIGUSR1 starts a new period after reporting. SIGUSR2 doesn't and can be used +to monitor progress without affecting accumulation of data points. They can +be used to obtain latency distribution between two arbitrary events and +monitor progress inbetween. """ parser = argparse.ArgumentParser(description = description, epilog = epilog, @@ -216,18 +220,23 @@ def format_usec(lat): if args.interval == 0: sys.exit(0) -# Set up signal handling so that we print the result on USR1 and before +# Set up signal handling so that we print the result on USR1/2 and before # exiting on a signal. Combined with infinite interval, this can be used to -# obtain overall latency distribution between two events. +# obtain overall latency distribution between two events. On USR2 the +# accumulated counters are cleared too, which can be used to define +# arbitrary intervals. +force_update_last_rwdf = False keep_running = True result_req = Event() def sig_handler(sig, frame): - global keep_running, result_req - if sig != signal.SIGUSR1: + global keep_running, force_update_last_rwdf, result_req + if sig == signal.SIGUSR1: + force_update_last_rwdf = True + elif sig != signal.SIGUSR2: keep_running = False result_req.set() -for sig in (signal.SIGUSR1, signal.SIGINT, signal.SIGTERM, signal.SIGHUP): +for sig in (signal.SIGUSR1, signal.SIGUSR2, signal.SIGINT, signal.SIGTERM, signal.SIGHUP): signal.signal(sig, sig_handler) # If infinite interval, always trigger the first output so that the caller @@ -239,19 +248,24 @@ while keep_running: result_req.wait(args.interval if args.interval > 0 else None) result_req.clear() + update_last_rwdf = args.interval > 0 or force_update_last_rwdf + force_update_last_rwdf = False rwdf_total = [0] * 4; for i in range(400): v = cur_rwdf_100ms.sum(i).value rwdf_100ms[i] = max(v - last_rwdf_100ms[i], 0) + if update_last_rwdf: last_rwdf_100ms[i] = v v = cur_rwdf_1ms.sum(i).value rwdf_1ms[i] = max(v - last_rwdf_1ms[i], 0) + if update_last_rwdf: last_rwdf_1ms[i] = v v = cur_rwdf_10us.sum(i).value rwdf_10us[i] = max(v - last_rwdf_10us[i], 0) + if update_last_rwdf: last_rwdf_10us[i] = v rwdf_total[int(i / 100)] += rwdf_100ms[i]
filter: do not leak on failure case (CID 156545)
@@ -115,6 +115,9 @@ int flb_filter_set_property(struct flb_filter_instance *filter, char *k, char *v len = strlen(k); tmp = flb_env_var_translate(filter->config->env, v); + if (!tmp) { + return -1; + } /* Check if the key is a known/shared property */ if (prop_key_check("match", k, len) == 0) { @@ -124,6 +127,7 @@ int flb_filter_set_property(struct flb_filter_instance *filter, char *k, char *v /* Append any remaining configuration key to prop list */ prop = flb_malloc(sizeof(struct flb_config_prop)); if (!prop) { + flb_free(tmp); return -1; }
delete a useless %s.
@@ -67,7 +67,7 @@ rt_size_t rt_i2c_transfer(struct rt_i2c_bus_device *bus, #ifdef RT_I2C_DEBUG for (ret = 0; ret < num; ret++) { - i2c_dbg("msgs[%d] %c, addr=0x%02x, len=%d%s\n", ret, + i2c_dbg("msgs[%d] %c, addr=0x%02x, len=%d\n", ret, (msgs[ret].flags & RT_I2C_RD) ? 'R' : 'W', msgs[ret].addr, msgs[ret].len); }
BugID:18744724:enable wifi lowpoer after enable sniffer
#include "rda5981_sys_data.h" #include "trng_api.h" +#ifdef AOS_COMP_PWRMGMT +#include "aos/pwrmgmt.h" +#endif + #define WIFISTACK_DEBUG #ifdef WIFISTACK_DEBUG #define WIFISTACK_PRINT(fmt, ...) do {\ @@ -504,6 +508,9 @@ static r_void rda59xx_daemon(r_void *arg) res = rda59xx_sniffer_enable_internal((sniffer_handler_t)(msg.arg1)); rda_sem_release((r_void *)msg.arg3); module_state |= STATE_SNIFFER; +#if (WIFI_CONFIG_SUPPORT_LOWPOWER > 0) + pwrmgmt_wifi_powersave_enable(); +#endif break; case DAEMON_SNIFFER_DISABLE: WIFISTACK_PRINT("DAEMON_SNIFFER_DISABLE!\r\n");
[NFSC] implement motion blur disabler (readme)
@@ -852,6 +852,8 @@ The usage is as simple as inserting the files into game's root directory. Uninst ![](https://habrastorage.org/webt/d_/eg/ym/d_egymd6w_tem2erocab-e9ikna.png) Added an option to improve gamepad support (gamepad icons, fixed bindings etc) +![](https://habrastorage.org/webt/d_/eg/ym/d_egymd6w_tem2erocab-e9ikna.png) Added an option to disable motion blur + ![](https://habrastorage.org/webt/d_/eg/ym/d_egymd6w_tem2erocab-e9ikna.png) Added an option to change fps limit ![](https://habrastorage.org/webt/d_/eg/ym/d_egymd6w_tem2erocab-e9ikna.png) Added an option to expand controller configuration
Fix bug in sample_run to pass check-cpp check
@@ -116,10 +116,14 @@ int main(int argc,char **argv) } */ - int *ells=malloc(NL*sizeof(int)); - double *cells_ll_limber=malloc(NL*sizeof(double)); - double *cells_gl_limber=malloc(NL*sizeof(double)); - double *cells_gg_limber=malloc(NL*sizeof(double)); + //int *ells=malloc(NL*sizeof(int)); + //double *cells_ll_limber=malloc(NL*sizeof(double)); + //double *cells_gl_limber=malloc(NL*sizeof(double)); + //double *cells_gg_limber=malloc(NL*sizeof(double)); + int ells[NL]; + double cells_ll_limber[NL]; + double cells_gl_limber[NL]; + double cells_gg_limber[NL]; for(int ii=0;ii<NL;ii++) ells[ii]=ii;
doc: Fix ECX FIPS documentation Both Ed448 and were omitted from the signature list. X448 and X25519 were flagged as not FIPS valid which wasn't correct. Fixes
@@ -116,12 +116,8 @@ The OpenSSL FIPS provider supports these operations and algorithms: =item X25519, see L<EVP_KEYEXCH-X25519(7)> -This has the property "provider=fips,fips=no" - =item X448, see L<EVP_KEYEXCH-X448(7)> -This has the property "provider=fips,fips=no" - =back =head2 Asymmetric Signature @@ -132,6 +128,10 @@ This has the property "provider=fips,fips=no" =item RSA, see L<EVP_SIGNATURE-RSA(7)> +=item X25519, see L<EVP_SIGNATURE-ED25519(7)> + +=item X448, see L<EVP_SIGNATURE-ED448(7)> + =item HMAC, see L<EVP_SIGNATURE-HMAC(7)> =item CMAC, see L<EVP_SIGNATURE-CMAC(7)>
Jenkinsfile: fix daily job hanging
@@ -124,7 +124,7 @@ def cleanupDockerRegistry(targetNode) { def frontendFolder = "${env.HOME}/compose/frontend" dir(frontendFolder){ // Run garbage collect on the registry - sh 'docker-compose run --rm registry bin/registry garbage-collect /etc/docker/registry/config.yml' + sh 'COMPOSE_INTERACTIVE_NO_CLI=1 docker-compose run -T --rm registry bin/registry garbage-collect /etc/docker/registry/config.yml' } } }
Cellular fix to test code only: cellNetConnectDisconnectPlus(). In the test cellNetConnectDisconnectPlus() there is a check as to whether the module is connected. However, some modules might actually have disconnected again but the time this check is reached so instead the check is now whether the module _has been_ connected.
@@ -95,9 +95,10 @@ static uCellNetStatus_t gLastNetStatus = U_CELL_NET_STATUS_UNKNOWN; */ static bool gConnectCallbackCalled = false; -/** The last status value passed to gConnectCallbackCalled. +/** Whether gConnectCallbackCalled has been called with isConnected + * true. */ -static bool gIsConnected = false; +static bool gHasBeenConnected = false; /** A variable to track errors in the callbacks. */ @@ -167,7 +168,9 @@ static void connectCallback(bool isConnected, void *pParameter) } gConnectCallbackCalled = true; - gIsConnected = isConnected; + if (isConnected) { + gHasBeenConnected = true; + } } /* ---------------------------------------------------------------- @@ -295,11 +298,11 @@ U_PORT_TEST_FUNCTION("[cellNet]", "cellNetConnectDisconnectPlus") U_CELL_PRIVATE_HAS(pModule, U_CELL_PRIVATE_FEATURE_CSCON)) { // Check that the connect status callback has been called. U_PORT_TEST_ASSERT(gConnectCallbackCalled); - U_PORT_TEST_ASSERT(gIsConnected); + U_PORT_TEST_ASSERT(gHasBeenConnected); U_PORT_TEST_ASSERT(gCallbackErrorCode == 0); } else { U_PORT_TEST_ASSERT(!gConnectCallbackCalled); - U_PORT_TEST_ASSERT(!gIsConnected); + U_PORT_TEST_ASSERT(!gHasBeenConnected); } // Check that we have an active RAT @@ -425,7 +428,7 @@ U_PORT_TEST_FUNCTION("[cellNet]", "cellNetConnectDisconnectPlus") (gLastNetStatus != U_CELL_NET_STATUS_REGISTERED_NO_CSFB_HOME) && (gLastNetStatus != U_CELL_NET_STATUS_REGISTERED_NO_CSFB_ROAMING)); - // Note: can't check that gIsConnected is false here as the RRC + // Note: can't check that gHasBeenConnected is false here as the RRC // connection may not yet be closed. U_PORT_TEST_ASSERT(gCallbackErrorCode == 0);
nsim: use explicit api types Type: fix
* @brief VPP control-plane API messages for the network delay simulator */ -option version = "2.1.0"; +option version = "2.1.1"; +import "vnet/interface_types.api"; /** \brief enable / disable the network delay simulation cross-connect @param client_index - opaque cookie to identify the sender @@ -21,11 +22,11 @@ autoreply define nsim_cross_connect_enable_disable u32 context; /* Enable / disable the feature on the interfaces */ - u8 enable_disable; + bool enable_disable; /* Interface handles */ - u32 sw_if_index0; - u32 sw_if_index1; + vl_api_interface_index_t sw_if_index0; + vl_api_interface_index_t sw_if_index1; option vat_help = "[<intfc0> | sw_if_index <swif0>] [<intfc1> | sw_if_index <swif1>] [disable]"; }; @@ -44,10 +45,10 @@ autoreply define nsim_output_feature_enable_disable u32 context; /* Enable / disable the feature on the interfaces */ - u8 enable_disable; + bool enable_disable; /* Interface handles */ - u32 sw_if_index; + vl_api_interface_index_t sw_if_index; option vat_help = "[<intfc> | sw_if_index <nnn> [disable]"; };