message
stringlengths
6
474
diff
stringlengths
8
5.22k
Fix typo for non x86 platforms.
@@ -304,7 +304,7 @@ ethernet_frame_is_any_tagged (u16 type0, u16 type1) r = _mm_cmpeq_epi16 (ethertype_mask, r); return !_mm_test_all_zeros (r, r); #else - return ethernet_frame_is_tagged (type0) || ethernet_frame_istagged (type1); + return ethernet_frame_is_tagged (type0) || ethernet_frame_is_tagged (type1); #endif }
Fix up accumulate_pi_characters() to work for builds
@@ -5635,15 +5635,15 @@ accumulate_pi_characters(void *userData, CharData *storage = (CharData *)userData; CharData_AppendXMLChars(storage, target, -1); - CharData_AppendXMLChars(storage, ": ", 2); + CharData_AppendXMLChars(storage, XCS(": "), 2); CharData_AppendXMLChars(storage, data, -1); - CharData_AppendXMLChars(storage, "\n", 1); + CharData_AppendXMLChars(storage, XCS("\n"), 1); } START_TEST(test_pi_yml) { const char *text = "<?yml something like data?><doc/>"; - const XML_Char *expected = "yml: something like data\n"; + const XML_Char *expected = XCS("yml: something like data\n"); CharData storage; CharData_Init(&storage); @@ -5659,7 +5659,7 @@ END_TEST START_TEST(test_pi_xnl) { const char *text = "<?xnl nothing like data?><doc/>"; - const XML_Char *expected = "xnl: nothing like data\n"; + const XML_Char *expected = XCS("xnl: nothing like data\n"); CharData storage; CharData_Init(&storage); @@ -5675,7 +5675,7 @@ END_TEST START_TEST(test_pi_xmm) { const char *text = "<?xmm everything like data?><doc/>"; - const XML_Char *expected = "xmm: everything like data\n"; + const XML_Char *expected = XCS("xmm: everything like data\n"); CharData storage; CharData_Init(&storage); @@ -5698,7 +5698,11 @@ START_TEST(test_utf16_pi) "<\0?\0\x04\x0e\x08\x0e?\0>\0" /* <q/> */ "<\0q\0/\0>\0"; - const XML_Char *expected = "\xe0\xb8\x84\xe0\xb8\x88: \n"; +#ifdef XML_UNICODE + const XML_Char *expected = XCS("\x0e04\x0e08: \n"); +#else + const XML_Char *expected = XCS("\xe0\xb8\x84\xe0\xb8\x88: \n"); +#endif CharData storage; CharData_Init(&storage); @@ -5721,7 +5725,11 @@ START_TEST(test_utf16_be_pi) "\0<\0?\x0e\x04\x0e\x08\0?\0>" /* <q/> */ "\0<\0q\0/\0>"; - const XML_Char *expected = "\xe0\xb8\x84\xe0\xb8\x88: \n"; +#ifdef XML_UNICODE + const XML_Char *expected = XCS("\x0e04\x0e08: \n"); +#else + const XML_Char *expected = XCS("\xe0\xb8\x84\xe0\xb8\x88: \n"); +#endif CharData storage; CharData_Init(&storage);
Add Zip license
@@ -6,6 +6,7 @@ This application makes use of the following third party libraries: - [Python Apple support](https://github.com/pybee/Python-Apple-support) - [Rubicon ObjC](https://github.com/pybee/rubicon-objc) - [SourceEditor](https://github.com/louisdh/source-editor) +- [Zip](https://github.com/marmelroy/Zip) ## Cpython @@ -379,3 +380,32 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` + +## Zip + +``` +The MIT License (MIT) + +Copyright (c) 2015 Roy Marmelstein + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +``` + +```
herm: keep blit & belt marks in cache Perhaps there should be a general-purpose mechanism for this, but for now this will suffice.
%+ verb | %- agent:dbug ^- agent:gall +=> |% + ++ request-tube + |= [bowl:gall from=mark to=mark next=?] + ^- card:agent:gall + :* %pass /tube/[from]/[to] + %arvo %c %warp + our q.byk ~ + :: + ?: next + [%next %c da+now /[from]/[to]] + [%sing %c da+now /[from]/[to]] + == + -- |_ =bowl:gall +* this . def ~(. (default-agent this %|) bowl) ++ on-init ^- (quip card:agent:gall _this) :_ this - [%pass /herm/1 %arvo %d %view [//term/1]~]~ + :: set up dill session subscription, + :: and ensure the tubes we use are in cache + :: + :~ [%pass /herm/1 %arvo %d %view [//term/1]~] + (request-tube bowl %blit %json |) + (request-tube bowl %json %belt |) + == :: ++ on-save !>([%0 ~]) ++ on-load ++ on-arvo |= [=wire =sign-arvo] ^- (quip card:agent:gall _this) - ?. =(/herm/1 wire) !! + ?+ wire !! + :: pass on dill blits for the session + :: + [%herm %~.1 ~] ?. ?=([%d %blit *] sign-arvo) ~| [%unexpected-sign [- +<]:sign-arvo] !! - :: ~& [dap.bowl %blit (turn p.sign-arvo head)] :_ this %+ turn p.sign-arvo |= =blit:dill [%give %fact [/herm]~ %blit !>(blit)] + :: + :: ensure the tubes we need remain in cache + :: + [%tube @ @ ~] + =* from i.t.wire + =* to i.t.t.wire + ?. ?=([%c %writ *] sign-arvo) + ~| [%unexpected-sign [- +<]:sign-arvo] + !! + :_ this + [(request-tube bowl from to &)]~ + == :: ++ on-poke |= [=mark =vase]
fix v03 direction
@@ -385,6 +385,7 @@ ACVP_RESULT acvp_aes_kat_handler(ACVP_CTX *ctx, JSON_Object *obj) ACVP_SYM_CIPHER_TC stc; ACVP_TEST_CASE tc; ACVP_RESULT rv; + const char *dir_str2 = NULL; const char *dir_str = json_object_get_string(obj, "direction"); const char *alg_str = json_object_get_string(obj, "algorithm"); ACVP_SYM_CIPH_DIR dir; @@ -459,19 +460,19 @@ ACVP_RESULT acvp_aes_kat_handler(ACVP_CTX *ctx, JSON_Object *obj) for (i = 0; i < g_cnt; i++) { groupval = json_array_get_value(groups, i); groupobj = json_value_get_object(groupval); + dir_str2 = json_object_get_string(groupobj, "direction"); - /* version 0.3 direction */ - if (dir_str == NULL) { - dir_str = json_object_get_string(groupobj, "direction"); + /* version 0.3 direction will override 0.2 if there */ + if (dir_str2 != NULL) { /* * verify the direction is valid */ - if (!strncmp(dir_str, "encrypt", 7)) { + if (!strncmp(dir_str2, "encrypt", 7)) { dir = ACVP_DIR_ENCRYPT; - } else if (!strncmp(dir_str, "decrypt", 7)) { + } else if (!strncmp(dir_str2, "decrypt", 7)) { dir = ACVP_DIR_DECRYPT; } else { - acvp_log_msg(ctx, "ERROR: unsupported direction requested from server (%s)", dir_str); + acvp_log_msg(ctx, "ERROR: unsupported direction requested from server (%s)", dir_str2); return (ACVP_UNSUPPORTED_OP); } }
[bsp]bluetrum] update kconfig
@@ -49,15 +49,6 @@ menu "On-chip Peripheral Drivers" endmenu -menu "On-chip Peripheral Drivers" - - menuconfig BSP_USING_UART0 - bool "Enable UART0" - select RT_USING_SERIAL - default y - -endmenu - menu "Board extended module Drivers" endmenu
Fix minor typo (missing "r" in colorset).
@@ -36,8 +36,8 @@ int mapstrings_drawmethod(ScriptVariant **varlist, int paramCount) "clip_position_y", "clip_size_x", "clip_size_y", - "coloset_index", - "coloset_table", + "colorset_index", + "colorset_table", "enable", "fill_color", "flip_x",
nvbios/p: parse PMU/Falcon ucode data bit entries For now, just establish scaffolding and don't plumb through any actual parsing of the two underlying tables for version 1 and 2.
@@ -36,7 +36,51 @@ static int parse_at(struct envy_bios *bios, struct envy_bios_p *p, int idx, int offset, const char ** name) { + struct p_known_tables p1_tbls[] = { + /* { 0x00, &p->unk0.offset, "UNKNOWN" }, */ + }; + struct p_known_tables p2_tbls[] = { + /* { 0x00, &p->unk0.offset, "UNKNOWN" }, */ + }; + struct p_known_tables *tbls; + int entries_count = 0; + int ret; + + if (p->bit->version == 0x1) { + tbls = p1_tbls; + entries_count = (sizeof(p1_tbls) / sizeof(struct p_known_tables)); + } else if (p->bit->version == 0x2) { + tbls = p2_tbls; + entries_count = (sizeof(p2_tbls) / sizeof(struct p_known_tables)); + } else return -EINVAL; + + /* either we address by offset or idx */ + if (idx != -1 && offset != -1) + return -EINVAL; + + /* lookup the index by the table's offset */ + if (offset > -1) { + idx = 0; + while (idx < entries_count && tbls[idx].offset != offset) + idx++; + } + + /* check the index */ + if (idx < 0 || idx >= entries_count) + return -ENOENT; + + /* check the table has the right size */ + if (tbls[idx].offset + 2 > p->bit->t_len) + return -ENOENT; + + if (name) + *name = tbls[idx].name; + + uint32_t tblOffset; + ret = bios_u32(bios, p->bit->t_offset + tbls[idx].offset, &tblOffset); + *tbls[idx].ptr = tblOffset; + return ret; } int
fix serial_print_hex
@@ -20,7 +20,7 @@ Blockly.Python.serial_println = function() { Blockly.Python.serial_print_hex = function() { Blockly.Python.definitions_['import_microbit_*'] = 'from microbit import *'; var content = Blockly.Python.valueToCode(this, 'CONTENT', Blockly.Python.ORDER_ATOMIC) || '0'; - var code = "uart.write(str(hex("+content+")+'\\r\\n')\n"; + var code = "uart.write(str(hex("+content+")) + '\\r\\n')\n"; return code; };
config_id test needs quote provider
@@ -54,9 +54,12 @@ int main(int argc, const char* argv[]) 1, &enclave); OE_TEST(result == OE_OK); + if (oe_sgx_has_quote_provider()) + { enclave_test_config_id(enclave, &result); OE_TEST(result == OE_OK); } + } else { result = oe_create_config_id_enclave(
HLS Sponge: Add register duplication checking in Makefile
@@ -61,10 +61,13 @@ $(SOLUTION_NAME): $(objs) # if they occur. Rather than challenging our luck. # # Check for critical warnings and exit if those occur. Add more if needed. +# Check for register duplication (0x184/Action_Output_o). # check: $(symlinks) @grep -A8 critical $(SOLUTION_DIR)*/$(SOLUTION_NAME)/$(SOLUTION_NAME).log ; \ test $$? = 1 + @grep -A8 0x184 vhdl/action_wrapper_ctrl_reg_s_axi.vhd ; \ + test $$? = 1 clean: $(RM) -r $(SOLUTION_DIR)* run_hls_script.tcl *~ *.log \
tools: fix test n6010 test cases
@@ -264,17 +264,6 @@ TEST_P(board_dfl_n6010_c_p, board_n6010_6) { EXPECT_EQ(print_board_info(tokens_[0]), FPGA_OK); } -/** -* @test board_n6010_7 -* @brief Tests: enum_hssi_feature -* @details Validates Enumerate hssi feature in sysfs <br> -*/ -TEST_P(board_dfl_n6010_c_p, board_n6010_7) { - - char hssi_feature_dev[SYSFS_PATH_MAX]; - EXPECT_EQ(enum_hssi_feature(tokens_[0], hssi_feature_dev), FPGA_OK); -} - /** * @test board_n6010_8 * @brief Tests: print_phy_info @@ -343,9 +332,6 @@ TEST_P(board_n6010_invalid_c_p, board_n6010_11) { EXPECT_EQ(print_mac_info(tokens_[0]), FPGA_NOT_FOUND); EXPECT_EQ(print_sec_info(tokens_[0]), FPGA_NOT_FOUND); - char hssi_feature_dev[SYSFS_PATH_MAX]; - EXPECT_EQ(enum_hssi_feature(tokens_[0], - hssi_feature_dev), FPGA_NOT_FOUND); EXPECT_NE(print_phy_info(tokens_[0]), FPGA_EXCEPTION); }
Make test_alloc_long_doc_name() robust vs allocation pattern changes
@@ -9947,21 +9947,16 @@ START_TEST(test_alloc_long_doc_name) "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789AZ" " a='1'/>"; int i; -#define MAX_ALLOC_COUNT 10 - int repeat = 0; +#define MAX_ALLOC_COUNT 20 for (i = 0; i < MAX_ALLOC_COUNT; i++) { - /* Repeat certain counts to defeat cached allocations */ - if ((i == 2 && repeat < 4) || - (i == 3 && repeat < 6)) { - i--; - repeat++; - } allocation_count = i; 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 reallocations");
KeySet: Fix minor grammar mistake
@@ -151,7 +151,7 @@ static void elektraOpmphmCopy (KeySet * dest ELEKTRA_UNUSED, const KeySet * sour * * Objects created with ksNew() must be destroyed with ksDel(). * - * You can use a various long list of parameters to preload the keyset + * You can use a arbitrary long list of parameters to preload the keyset * with a list of keys. Either your first and only parameter is 0 or * your last parameter must be KEY_END. *
vere: updates command docs
@@ -644,6 +644,7 @@ _cw_usage(c3_c* bin_c) "utilities:\n", " %s cram %.*s jam state:\n", " %s dock %.*s copy binary:\n", + " %s eval %.*s eval hoon:\n", " %s grab %.*s measure memory usage:\n", " %s info %.*s print pier info:\n", " %s meld %.*s deduplicate snapshot:\n", @@ -652,6 +653,7 @@ _cw_usage(c3_c* bin_c) " %s next %.*s request upgrade:\n", " %s queu %.*s<at-event> cue state:\n", " %s vere ARGS <output dir> download binary:\n", + " %s vile %.*s print keyfile:\n", "\n run as a 'serf':\n", " %s serf <pier> <key> <flags> <cache-size> <at-event>" #ifdef U3_OS_mingw @@ -2053,6 +2055,7 @@ _cw_utils(c3_i argc, c3_c* argv[]) // $@ ~ :: usage // $% [%cram dir=@t] :: jam state // [%dock dir=@t] :: copy binary + // [%eval ~] :: eval hoon // [?(%grab %mass) dir=@t] :: gc // [%info dir=@t] :: print // [%meld dir=@t] :: deduplicate
tools: Wait and dump the initial messages during gdbmi initialization
@@ -1271,7 +1271,8 @@ def gdbmi_start(gdb_path, gdb_cmds, core_filename, prog_filename): # type: (str gdb_args.append(prog_filename) res = GdbController(gdb_path=gdb_path, gdb_args=gdb_args) # Consume initial output by issuing a dummy command - res.write("-data-list-register-values x pc", timeout_sec=5) + gdbmi_run_cmd_get_responses(res, "-data-list-register-values x pc", None, "console", multiple=True, + done_message="done", done_type="result") return res
Adds a missing includes statement
#include <CppUTest/TestHarness.h> #include <CppUTest/CommandLineTestRunner.h> #include <zconf.h> -#include <constants.h> +#include <string.h> +#include "constants.h" #include "bundle.h" #include "properties.h" #include "celix_framework_factory.h" @@ -477,7 +478,7 @@ TEST(CelixBundleContextServicesTests, serviceTrackerWithRaceConditionTest) { lock.unlock(); }; - long trackerId = trackerId = celix_bundleContext_trackServices(ctx, calcName, NULL, NULL, &data, add, remove); + long trackerId = celix_bundleContext_trackServices(ctx, calcName, NULL, NULL, &data, add, remove); std::thread registerThread{[&]{ long id = celix_bundleContext_registerService(ctx, calcName, &svc, NULL, NULL);
Add SceKernelHeap document
@@ -220,10 +220,58 @@ SceUID ksceKernelFindMemBlockByAddrForPid(SceUID pid, const void *addr, SceSize */ int ksceKernelRemapBlock(SceUID uid, SceKernelMemBlockType type); +/** + * Create heap area + * + * @param[in] name - The heap name + * @param[in] size - The heap size + * @param[in] opt - The pointer of SceKernelHeapCreateOpt option data + * + * @return heapid on success, < 0 on error. + */ SceUID ksceKernelCreateHeap(const char *name, SceSize size, SceKernelHeapCreateOpt *opt); + +/** + * Delete heap area + * + * @param[in] uid - The heapid + * + * @return always 0. + * + * note - Trigger an infinite loop if something fails internally. + * For example, passing an invalid heapid. + */ int ksceKernelDeleteHeap(SceUID uid); + +/** + * Allocation the specified length of memory from heap + * + * @param[in] uid - The heapid + * @param[in] size - The alloc size + * + * @return The pointer of allocated memory on success, NULL on error. + */ void *ksceKernelAllocHeapMemory(SceUID uid, SceSize size); -void *ksceKernelAllocHeapMemoryWithOption(SceUID heapid, SceSize len, SceAllocOpt *pOpt); + +/** + * Allocation the specified length of memory from heap with option + * + * @param[in] uid - The heapid + * @param[in] size - The alloc size + * @param[in] opt - The pointer of option + * + * @return The pointer of allocated memory on success, NULL on error. + */ +void *ksceKernelAllocHeapMemoryWithOption(SceUID heapid, SceSize len, SceAllocOpt *opt); + +/** + * Free allocated memory + * + * @param[in] uid - The heapid + * @param[in] ptr - The pointer of allocated memory + * + * @return 0 on success, < 0 on error. + */ int ksceKernelFreeHeapMemory(SceUID uid, void *ptr); int ksceKernelMemcpyUserToKernelForPid(SceUID pid, void *dst, uintptr_t src, SceSize len);
Removed usage of nxt_thread_context in loadable modules. This change allows to use __thread class storage on MacOSX.
@@ -175,6 +175,9 @@ NXT_EXPORT nxt_application_module_t nxt_app_module = { }; +static nxt_task_t *nxt_php_task; + + nxt_inline u_char * nxt_realpath(const void *c) { @@ -195,6 +198,8 @@ nxt_php_init(nxt_task_t *task, nxt_common_app_conf_t *conf) static nxt_str_t user_str = nxt_string("user"); static nxt_str_t admin_str = nxt_string("admin"); + nxt_php_task = task; + c = &conf->u.php; if (c->root == NULL) { @@ -866,5 +871,5 @@ static void nxt_php_log_message(char *message) #endif { - nxt_thread_log_error(NXT_LOG_NOTICE, "php message: %s", message); + nxt_log(nxt_php_task, NXT_LOG_NOTICE, "php message: %s", message); }
Add calls to observer for failures
@@ -1063,6 +1063,9 @@ namespace MAT_NS_BEGIN { env->ExceptionDescribe(); env->ExceptionClear(); + if (m_observer) { + m_observer->OnStorageFailed(message); + } if (s_throwExceptions) { MATSDK_THROW(std::logic_error(message)); @@ -1078,7 +1081,9 @@ namespace MAT_NS_BEGIN { env->ExceptionDescribe(); env->ExceptionClear(); - + if (m_observer) { + m_observer->OnStorageFailed(message); + } if (s_throwExceptions) { MATSDK_THROW(std::runtime_error(message));
add world function
@@ -70,13 +70,13 @@ typedef struct typedef struct { - //NAME me_; + NAME me_; NAME parent_; vector<NAME> child_; Pose relative_to_parent_; - Pose world_; + Pose pose_to_world_; State origin_; Joint joint_; @@ -84,13 +84,24 @@ typedef struct Inertia inertia_; } Component; + +typedef struct +{ + NAME name_; + NAME child_; + + Pose pose_; + State origin_; +} World; + class Manipulator { private: int dof_; int8_t component_size_; - vector<Component> component_; + World world_; + map<Name, Component> component_; public: Manipulator() @@ -104,12 +115,18 @@ class Manipulator /* dof_ component_size_ + world_.name_ + world_.child_ + world_.pose_.position + world_.pose_.orientation + world_.origin_.velocity + world_.origin_.acceleration component_.at(name).parent_ component_.at(name).child_(i) component_.at(name).relative_to_parent_.position component_.at(name).relative_to_parent_.orientation - component_.at(name).world_.position - component_.at(name).world_.orientation + component_.at(name).pose_to_world_.position + component_.at(name).pose_to_world_.orientation component_.at(name).origin_.velocity component_.at(name).origin_.acceleration component_.at(name).joint_.axis @@ -128,12 +145,19 @@ class Manipulator ///////////////////////////*initialize function*///////////////////////////// void init(int dof, int component_size, bool *error); + // void addWorld(Name world_name, NAME child_name, Vector3f world_position = Vector3f::Zero(), Matrix3f world_orientation = Matrix3f::Identity(3,3), bool *error) void addComponent(Name me_name, Name parent_name, NAME child_name, Vector3f relative_position, Matrix3f relative_orientation, int8_t actuator_id = -1, Vector3f axis_of_rotation = Vector3f::Zero(), float mass = 0.0, Matrix3f inertia_tensor = Matrix3f::Identity(3,3), Vector3f center_of_mass = Vector3f::Zero(), bool *error); void addComponentChild(Name me_name, NAME child_name, bool *error); void checkManipulatorSetting(bool *error); ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////Set function////////////////////////////////// + // void setWorldPose(Pose world_pose, bool *error); + // void setWorldPosition(Vector3f world_position, bool *error); + // void setWorldOrientation(Matrix3f world_orientation, bool *error); + // void setWorldState(State world_state, bool *error); + // void setWorldVelocity(Vector6f world_velocity, bool *error); + // void setWorldAcceleration(Vector6f world_acceleration, bool *error); void setComponent(Name name, Component component, bool *error); void setComponentPoseToWorld(Name name Pose pose_to_world, bool *error); void setComponentPositionToWorld(Name name, Vector3f position_to_world, bool *error); @@ -151,6 +175,14 @@ class Manipulator ///////////////////////////////Get function////////////////////////////////// int getDOF(bool *error); int8_t getComponentSize(bool *error); + // Name getWorldName(bool *error); + // Name getWorldChildName(bool *error); + // Pose getWorldPose(bool *error); + // Vector3f getWorldPosition(bool *error); + // Matrix3f getWorldOrientation(bool *error); + // State getWorldState(bool *error); + // Vector6f getWorldVelocity(bool *error); + // Vector6f getWorldAcceleration(bool *error); Component getComponent(Name name, bool *error); Name getComponentParentName(Name name, bool *error); vector<NAME> getComponentChildName(Name name, bool *error);
Emitter: type_matchup doesn't do anything here. This is a relic from when type_matchup did autoboxing to Any and was necessary here. Now it does nothing.
@@ -2778,12 +2778,6 @@ static void eval_build_tuple(lily_emit_state *emit, lily_ast *ast, elem_type = expect->subtypes[i]; eval_tree(emit, arg, elem_type); - - if (elem_type && elem_type != arg->result->type) - /* Attempt to fix the type to what's wanted. If it fails, the parent - tree will note a type mismatch. Can't do anything else here - though. */ - type_matchup(emit, elem_type, arg); } for (i = 0, arg = ast->arg_start;
Extend the test_multi_load() test Run more threads and load the legacy provider (which uses a child lib ctx) in order to hit more possible thread failures.
#include "threadstest.h" /* Limit the maximum number of threads */ -#define MAXIMUM_THREADS 3 +#define MAXIMUM_THREADS 10 /* Limit the maximum number of providers loaded into a library context */ #define MAXIMUM_PROVIDERS 4 @@ -558,6 +558,7 @@ static int test_multi_load_unload_provider(void) return testresult; } +static char *multi_load_provider = "legacy"; /* * This test attempts to load several providers at the same time, and if * run with a thread sanitizer, should crash if the core provider code @@ -567,7 +568,7 @@ static void test_multi_load_worker(void) { OSSL_PROVIDER *prov; - if (!TEST_ptr(prov = OSSL_PROVIDER_load(multi_libctx, "default")) + if (!TEST_ptr(prov = OSSL_PROVIDER_load(multi_libctx, multi_load_provider)) || !TEST_true(OSSL_PROVIDER_unload(prov))) multi_success = 0; } @@ -588,6 +589,7 @@ static int test_multi_default(void) static int test_multi_load(void) { int res = 1; + OSSL_PROVIDER *prov; /* The multidefault test must run prior to this test */ if (!multidefault_run) { @@ -595,7 +597,21 @@ static int test_multi_load(void) res = test_multi_default(); } - return thread_run_test(NULL, 3, &test_multi_load_worker, 0, NULL) && res; + /* + * We use the legacy provider in test_multi_load_worker because it uses a + * child libctx that might hit more codepaths that might be sensitive to + * threading issues. But in a no-legacy build that won't be loadable so + * we use the default provider instead. + */ + prov = OSSL_PROVIDER_load(NULL, "legacy"); + if (prov == NULL) { + TEST_info("Cannot load legacy provider - assuming this is a no-legacy build"); + multi_load_provider = "default"; + } + OSSL_PROVIDER_unload(prov); + + return thread_run_test(NULL, MAXIMUM_THREADS, &test_multi_load_worker, 0, + NULL) && res; } static void test_obj_create_one(void)
utils: new function to print human readable sizes
@@ -403,3 +403,28 @@ int flb_utils_time_split(char *time, int *sec, long *nsec) return 0; } + +void flb_utils_bytes_to_human_readable_size(size_t bytes, + char *out_buf, size_t size) +{ + unsigned long i; + unsigned long u = 1024; + static const char *__units[] = { + "b", "K", "M", "G", + "T", "P", "E", "Z", "Y", NULL + }; + + for (i = 0; __units[i] != NULL; i++) { + if ((bytes / u) == 0) { + break; + } + u *= 1024; + } + if (!i) { + snprintf(out_buf, size, "%lu%s", (long unsigned int) bytes, __units[0]); + } + else { + float fsize = (float) ((double) bytes / (u / 1024)); + snprintf(out_buf, size, "%.1f%s", fsize, __units[i]); + } +}
Speedup api_circle, api_tri. it crashed when you try to draw circle with y<0
@@ -869,8 +869,8 @@ static void api_circle(tic_mem* memory, s32 xm, s32 ym, u32 radius, u8 color) if (r > x || err > y) err += ++x*2+1; } while (x < 0); - s32 yt = max(machine->state.clip.t, ym-radius); - s32 yb = min(machine->state.clip.b, ym+radius+1); + s32 yt = max(machine->state.clip.t, ym-(s32)radius); + s32 yb = min(machine->state.clip.b, ym+(s32)radius+1); u8 final_color = mapColor(&machine->memory, color); for(s32 y = yt; y < yb; y++) { s32 xl = max(SidesBuffer.Left[y], machine->state.clip.l);
tests: more elaborate output on version mismatch
@@ -132,11 +132,11 @@ check_version() REAL_KDB_VERSION="`"$KDB" get system/elektra/version/constants/KDB_VERSION 2> /dev/null`" [ "x$REAL_KDB_VERSION" = "x$KDB_VERSION" ] - exit_if_fail "Script was not compiled ($KDB_VERSION) with this elektra version ($REAL_KDB_VERSION): KDB_VERSION mismatch use CHECK_VERSION=NO to disable" + exit_if_fail "Script was not compiled ($KDB_VERSION) with this elektra version ($REAL_KDB_VERSION): KDB_VERSION mismatch for kdb-tool ($KDB), use CHECK_VERSION=NO to disable" REAL_SO_VERSION="`"$KDB" get system/elektra/version/constants/SO_VERSION 2> /dev/null`" [ "x$REAL_SO_VERSION" = "x$SO_VERSION" ] - exit_if_fail "Script was not compiled ($SO_VERSION) with this elektra version ($REAL_SO_VERSION): SO_VERSION mismatch" + exit_if_fail "Script was not compiled ($SO_VERSION) with this elektra version ($REAL_SO_VERSION): SO_VERSION mismatch for kdb-tool ($KDB), use CHECK_VERSION=NO to disable" } check_remaining_files()
Fix for issue 1 of bug
@@ -1277,7 +1277,9 @@ io_readable(neat_ctx *ctx, neat_flow *flow, #ifdef NEAT_SCTP_DTLS if (flow->security_needed && neat_base_stack(flow->socket->stack) == NEAT_STACK_SCTP) { +#if !defined(USRSCTP_SUPPORT) socklen_t len; +#endif // !defined(USRSCTP_SUPPORT) int ret = 0; struct security_data *private = (struct security_data *) flow->socket->dtls_data->userData;
docs/ure: Add flags arg to ure.compile(), mention that ure.DEBUG is optional.
@@ -47,7 +47,7 @@ etc. are not supported. Functions --------- -.. function:: compile(regex_str) +.. function:: compile(regex_str, [flags]) Compile regular expression, return `regex <regex>` object. @@ -65,6 +65,7 @@ Functions .. data:: DEBUG Flag value, display debug information about compiled expression. + (Availability depends on `MicroPython port`.) .. _regex:
POWER9 Cleanups: de-assert SPW De-assert special wakeup bits for the case when SPWU bit is set, however the core is gated to maintain a coherent state for special wakeup.
@@ -302,6 +302,8 @@ static int p9_core_set_special_wakeup(struct cpu_thread *cpu) * raise error. */ if (dctl_core_is_gated(cpu)) { + /* Deassert spwu for this strange error */ + xscom_write(chip_id, swake_addr, 0); prlog(PR_ERR, "Failed special wakeup on %u:%u" " as CORE_GATED is set\n", chip_id, core_id);
Fix legacy config path
@@ -256,7 +256,7 @@ NTSTATUS KphSetParameters( _In_ PKPH_PARAMETERS Parameters ) { - static PH_STRINGREF keyName = PH_STRINGREF_INIT(L"System\\CurrentControlSet\\Services\\kph2\\Parameters"); + static PH_STRINGREF keyName = PH_STRINGREF_INIT(L"System\\CurrentControlSet\\Services\\KProcessHacker2\\Parameters"); NTSTATUS status; HANDLE parametersKeyHandle = NULL; ULONG disposition;
bss_dgram.c: fix unaligned access char (alignment 1) casted to union sctp_notification (alignment > 1). Fixes:
@@ -1009,7 +1009,6 @@ static int dgram_sctp_read(BIO *b, char *out, int outl) int ret = 0, n = 0, i, optval; socklen_t optlen; bio_dgram_sctp_data *data = (bio_dgram_sctp_data *) b->ptr; - union sctp_notification *snp; struct msghdr msg; struct iovec iov; struct cmsghdr *cmsg; @@ -1075,8 +1074,10 @@ static int dgram_sctp_read(BIO *b, char *out, int outl) } if (msg.msg_flags & MSG_NOTIFICATION) { - snp = (union sctp_notification *)out; - if (snp->sn_header.sn_type == SCTP_SENDER_DRY_EVENT) { + union sctp_notification snp; + + memcpy(&snp, out, sizeof(snp)); + if (snp.sn_header.sn_type == SCTP_SENDER_DRY_EVENT) { # ifdef SCTP_EVENT struct sctp_event event; # else @@ -1116,18 +1117,20 @@ static int dgram_sctp_read(BIO *b, char *out, int outl) # endif } # ifdef SCTP_AUTHENTICATION_EVENT - if (snp->sn_header.sn_type == SCTP_AUTHENTICATION_EVENT) - dgram_sctp_handle_auth_free_key_event(b, snp); + if (snp.sn_header.sn_type == SCTP_AUTHENTICATION_EVENT) + dgram_sctp_handle_auth_free_key_event(b, &snp); # endif if (data->handle_notifications != NULL) data->handle_notifications(b, data->notification_context, (void *)out); + memset(&snp, 0, sizeof(snp)); memset(out, 0, outl); - } else + } else { ret += n; } + } while ((msg.msg_flags & MSG_NOTIFICATION) && (msg.msg_flags & MSG_EOR) && (ret < outl));
Registering help for commands registered with shell_cmd_register
@@ -914,6 +914,9 @@ shell_cmd_register(const struct shell_cmd *sc) compat_commands[num_compat_commands].sc_cmd = sc->sc_cmd; compat_commands[num_compat_commands].sc_cmd_func = sc->sc_cmd_func; +#if MYNEWT_VAL(SHELL_CMD_HELP) + compat_commands[num_compat_commands].help = sc->help; +#endif ++num_compat_commands; return 0; }
[core] warn if backend server config contains '_' (detect a common config typo)
@@ -1302,6 +1302,14 @@ int gw_set_defaults_backend(server *srv, gw_plugin_data *p, data_unset *du, size goto error; } + for (size_t m = 0; m < da_host->value->used; ++m) { + if (NULL != strchr(da_host->value->data[m]->key->ptr, '_')) { + log_error_write(srv, __FILE__, __LINE__, "sb", + "incorrect directive contains underscore ('_') instead of dash ('-'):", + da_host->value->data[m]->key); + } + } + if ((!buffer_string_is_empty(host->host) || host->port) && !buffer_string_is_empty(host->unixsocket)) { log_error_write(srv, __FILE__, __LINE__, "sbsbsbs",
Simplify finding largest_blob
@@ -46,20 +46,15 @@ while(True): for r in ROIS: blobs = img.find_blobs(GRAYSCALE_THRESHOLD, roi=r[0:4], merge=True) # r[0:4] is roi tuple. if blobs: - # Find the index of the blob with the most pixels. - most_pixels = 0 - largest_blob = 0 - for i in range(len(blobs)): - if blobs[i].pixels() > most_pixels: - most_pixels = blobs[i].pixels() - largest_blob = i + # Find the blob with the most pixels. + largest_blob = max(blobs, key=lambda b: b.pixels()) # Draw a rect around the blob. - img.draw_rectangle(blobs[largest_blob].rect()) - img.draw_cross(blobs[largest_blob].cx(), - blobs[largest_blob].cy()) + img.draw_rectangle(largest_blob.rect()) + img.draw_cross(largest_blob.cx(), + largest_blob.cy()) - centroid_sum += blobs[largest_blob].cx() * r[4] # r[4] is the roi weight. + centroid_sum += largest_blob.cx() * r[4] # r[4] is the roi weight. center_pos = (centroid_sum / weight_sum) # Determine center of line.
Do not use \n endings in source and include list
@@ -286,9 +286,6 @@ function(afr_write_metadata) ) # Write all sources and include dirs. - string(REPLACE ";" "\n" src_ocw "${src_ocw}") - string(REPLACE ";" "\n" src_all "${src_all}") - string(REPLACE ";" "\n" inc_all "${inc_all}") file(WRITE "${ocw_dir}/source_paths.txt" "${src_ocw}") file(WRITE "${ide_dir}/source_paths.txt" "${src_all}") file(WRITE "${ide_dir}/include_paths.txt" "${inc_all}")
Fix Octave with new versions of CMake.
@@ -1077,7 +1077,7 @@ function (tinyspline_add_swig_library) endif() if(${ARGS_CXX11}) set_property(TARGET ${ARGS_TARGET} - APPEND PROPERTY CXX_STANDARD 11) + PROPERTY CXX_STANDARD 11) set_property(TARGET ${ARGS_TARGET} APPEND PROPERTY CXX_STANDARD_REQUIRED ON) set_property(TARGET ${ARGS_TARGET}
Fix occasional openssl "the function should not be called" error
@@ -860,6 +860,7 @@ int recv_crypto_data(ngtcp2_conn *conn, uint64_t offset, const uint8_t *data, if (rv != 0) { return rv; } + return 0; } // SSL_do_handshake() might not consume all data (e.g.,
Shell Test: Remove unnecessary code
@@ -59,10 +59,8 @@ function (add_scripttest testname) list (FIND excluded_tests "${testname_we}" index_excluded) if (index_excluded EQUAL -1) - set (KDB_COMMAND ${KDB_COMMAND_BASENAME}) set (RACE_COMMAND "$KDB race") - set (INCLUDE_COMMON - "${INCLUDE_COMMON_INSTALLED_FILE}if [ -z \"$KDB\" ]; then KDB=${KDB_COMMAND}; fi") + set (INCLUDE_COMMON "${INCLUDE_COMMON_INSTALLED_FILE}") configure_file ("${filename}" "${CMAKE_CURRENT_BINARY_DIR}/${testname}" @ONLY) install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${testname}" DESTINATION ${TARGET_TOOL_EXEC_FOLDER} @@ -82,7 +80,7 @@ function (add_scripttest testname) if (NOT ${testname_we} STREQUAL "run_all") set (KDB_COMMAND "${CMAKE_BINARY_DIR}/bin/${KDB_COMMAND_BASENAME}") set (RACE_COMMAND "${CMAKE_BINARY_DIR}/bin/race") - set (INCLUDE_COMMON "${INCLUDE_COMMON_FILE}KDB=\"${KDB_COMMAND}\"") + set (INCLUDE_COMMON "${INCLUDE_COMMON_FILE}") set (testscriptname "${CMAKE_CURRENT_BINARY_DIR}/testscr_${testname}") configure_file ("${filename}" "${testscriptname}" @ONLY) add_test (testscr_${testname_we} "${testscriptname}") # dash does memleak:
Leaf: Add function to convert array parents
@@ -261,6 +261,29 @@ pair<CppKeySet, CppKeySet> splitDirectoriesLeaves (CppKeySet const & keys) return make_pair (directories, leaves); } +/** + * @brief Convert all keys in `parents` to an empty array parent and an array element with index `#0` storing the data of the old key. + * + * @param parents This parameter contains the set of array parent this function converts. + * + * @return A key set containing only empty array parents and corresponding array elements storing the values of the old array parent + */ +CppKeySet convertArrayParentsToLeaves (CppKeySet const & parents) +{ + CppKeySet converted; + + for (auto parent : parents) + { + CppKey directory{ parent.getName (), KS_END }; + CppKey leaf = parent.dup (); + leaf.addBaseName ("#0"); + converted.append (directory); + converted.append (leaf); + } + + return converted; +} + /** * @brief Convert all keys in `directories` to an empty key and a leaf key containing the data of the old key. *
fixes seg fault if max pass try reached
@@ -267,6 +267,10 @@ struct oidc_account* genNewAccount(struct oidc_account* account, secFree(prompt); loaded_p = decryptAccount(shortname, encryptionPassword); } + if (loaded_p == NULL) { + secFree(encryptionPassword); + exit(EXIT_FAILURE); + } secFreeAccount(account); account = loaded_p; } else { @@ -454,6 +458,9 @@ void handleDelete(struct arguments arguments) { loaded_p = decryptAccount(arguments.args[0], encryptionPassword); secFree(encryptionPassword); } + if (loaded_p == NULL) { + return; + } char* json = accountToJSONString(*loaded_p); secFreeAccount(loaded_p); deleteClient(arguments.args[0], json, 1);
Array: Remove value in `elektraArrayGetNextKey`
@@ -249,7 +249,7 @@ Key * elektraArrayGetNextKey (KeySet * arrayKeys) ksAppendKey (arrayKeys, last); Key * newKey = keyDup (last); - keySetString (newKey, ""); + keySetBinary (newKey, 0, 0); int ret = elektraArrayIncName (newKey); if (ret == -1)
Avoid adding host-specific cpuflags to the common part of DYNAMIC_ARCH builds
# COMPILER_PREFIX = mingw32- +ifndef DYNAMIC_ARCH +ADD_CPUFLAGS = 1 +else +ifdef TARGET_CORE +ADD_CPUFLAGS = 1 +endif +endif + +ifdef ADD_CPUFLAGS ifdef HAVE_SSE CCOMMON_OPT += -msse +ifneq ($(F_COMPILER), NAG) FCOMMON_OPT += -msse endif - +endif +endif ifeq ($(OSNAME), Interix) ARFLAGS = -m x86
agc/autotest: tightening up AGC bandwdith to help with stability
@@ -135,7 +135,7 @@ void autotest_agc_crcf_rssi_noise() { // set paramaters float gamma = -30.0f; // nominal signal level [dB] - float bt = 0.01f; // agc bandwidth + float bt = 2e-3f; // agc bandwidth float tol = 1.0f; // error tolerance [dB] // signal properties @@ -147,7 +147,7 @@ void autotest_agc_crcf_rssi_noise() unsigned int i; float complex x, y; - for (i=0; i<3000; i++) { + for (i=0; i<8000; i++) { // generate sample (circular complex noise) x = nstd*(randnf() + _Complex_I*randnf())*M_SQRT1_2;
Remove `static` from inline function declarations
@@ -565,15 +565,14 @@ inline int quicly_decode_streams_blocked_frame(const uint8_t **src, const uint8_ return 0; } -static inline size_t quicly_new_connection_id_frame_capacity(uint64_t sequence, uint64_t retire_prior_to, uint8_t cid_len) +inline size_t quicly_new_connection_id_frame_capacity(uint64_t sequence, uint64_t retire_prior_to, uint8_t cid_len) { return 1 + quicly_encodev_capacity(sequence) + quicly_encodev_capacity(retire_prior_to) + cid_len + QUICLY_STATELESS_RESET_TOKEN_LEN; } -static inline uint8_t *quicly_encode_new_connection_id_frame(uint8_t *dst, uint64_t sequence, uint64_t retire_prior_to, - const uint8_t *cid, uint8_t cid_len, - const uint8_t *stateless_reset_token) +inline uint8_t *quicly_encode_new_connection_id_frame(uint8_t *dst, uint64_t sequence, uint64_t retire_prior_to, const uint8_t *cid, + uint8_t cid_len, const uint8_t *stateless_reset_token) { *dst++ = QUICLY_FRAME_TYPE_NEW_CONNECTION_ID; dst = quicly_encodev(dst, sequence); @@ -587,12 +586,12 @@ static inline uint8_t *quicly_encode_new_connection_id_frame(uint8_t *dst, uint6 return dst; } -static inline size_t quicly_retire_connection_id_frame_capacity(uint64_t sequence) +inline size_t quicly_retire_connection_id_frame_capacity(uint64_t sequence) { return 1 + quicly_encodev_capacity(sequence); } -static inline uint8_t *quicly_encode_retire_connection_id_frame(uint8_t *dst, uint64_t sequence) +inline uint8_t *quicly_encode_retire_connection_id_frame(uint8_t *dst, uint64_t sequence) { *dst++ = QUICLY_FRAME_TYPE_RETIRE_CONNECTION_ID; dst = quicly_encodev(dst, sequence);
Update parser documentation.
@@ -788,7 +788,8 @@ static const JanetReg cfuns[] = { {"parser.consume", cfun_consume, "(parser.consume parser bytes)\n\n" "Input bytes into the parser and parse them. Will not throw errors " - "if there is a parse error. Returns the parser." + "if there is a parse error. Returns the bytes not consumed if the parser is " + "full or errors, or nil if the parser is still pending." }, {"parser.byte", cfun_byte, "(parser.byte parser b)\n\n"
lwip/dhcp: apply indent apply indent
@@ -231,7 +231,7 @@ err_t netifapi_netif_common(struct netif *netif, netifapi_void_fn voidfunc, neti * call the "errtfunc" (or the "voidfunc" if "errtfunc" is NULL) in a thread-safe * way by running that function inside the tcpip_thread context. * - * @note use only for functions where there is only "netif" parameter. + * @note if netif needs to get argurment, use this API */ err_t netifapi_netif_common_arg(struct netif *netif, netifapi_void_fn_arg voidfunc, netifapi_errt_fn_arg errtfunc, void *arg) {
Disable CPU affinity by default again This setting must have been changed unintentionally by my PR (probably leftover from unrelated tests)
@@ -100,7 +100,7 @@ BUILD_LAPACK_DEPRECATED = 1 NO_WARMUP = 1 # If you want to disable CPU/Memory affinity on Linux. -#NO_AFFINITY = 1 +NO_AFFINITY = 1 # if you are compiling for Linux and you have more than 16 numa nodes or more than 256 cpus # BIGNUMA = 1
changelog for v2.4.2
# Change Log +## [v2.4.2](https://github.com/swift-nav/libsbp/tree/v2.4.2) (2018-10-27) +[Full Changelog](https://github.com/swift-nav/libsbp/compare/v2.4.1...v2.4.2) + +**Merged pull requests:** + +- Resource monitor support \[DEVC-1074\] [\#612](https://github.com/swift-nav/libsbp/pull/612) +- Add cmake toolchain support for cortex-m7 [\#610](https://github.com/swift-nav/libsbp/pull/610) +- Deprecate old orbit/clock message [\#609](https://github.com/swift-nav/libsbp/pull/609) +- IOD of the SSR corrections [\#608](https://github.com/swift-nav/libsbp/pull/608) +- Jkretzmer/tcp example [\#607](https://github.com/swift-nav/libsbp/pull/607) +- Make generator for java have deterministic ordering [\#606](https://github.com/swift-nav/libsbp/pull/606) +- Add 2.4.1 pdf [\#605](https://github.com/swift-nav/libsbp/pull/605) + ## [v2.4.1](https://github.com/swift-nav/libsbp/tree/v2.4.1) (2018-10-02) [Full Changelog](https://github.com/swift-nav/libsbp/compare/v2.4.0...v2.4.1)
lv_app_files: sned bugfix (first chunk was not sent)
@@ -768,12 +768,6 @@ static void start_send(lv_app_inst_t * app, const char * path) /*Open the file*/ fs_res_t res = fs_open(&app_data->file, path, FS_MODE_RD); - if(res == FS_RES_OK) { - uint32_t rn; - char rd_buf[LV_APP_FILES_CHUNK_MAX_SIZE]; - - /*Read the first chunk*/ - res = fs_read(&app_data->file, rd_buf, app_data->chunk_size, &rn); if(res == FS_RES_OK) { app_data->send_in_prog = 1; @@ -802,8 +796,6 @@ static void start_send(lv_app_inst_t * app, const char * path) if(app_data->send_fn != 0 || app_data->send_size != 0 || app_data->send_crc != 0) { lv_app_com_send(app, LV_APP_COM_TYPE_CHAR, "\n", 1); } - - } } /*If an error occurred close the file*/
Fix ClrStartup exit
@@ -437,6 +437,11 @@ void ClrStartup(CLR_SETTINGS params) } while( softReboot ); + #if !defined(BUILD_RTM) + CLR_Debug::Printf( "Exiting.\r\n" ); + #endif + + CPU_Reset(); } #endif // WIN32
Unitests/nxwm: Change includes because up_cxxinitialize() is now prototypes in apps/include/platfor/cxxinitialize.h
///////////////////////////////////////////////////////////////////////////// #include <nuttx/config.h> -#include <nuttx/arch.h> #include <cstdio> #include <cstdlib> # include "platform/configdata.hr" #endif +#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE) +# include "platform/cxxinitialize.h" +#endif + #include "ctaskbar.hxx" #include "cstartwindow.hxx"
Fix Set sym end angle
@@ -195,7 +195,7 @@ void lv_rotary_set_value(lv_obj_t * rotary, int16_t value, lv_anim_enable_t anim ext->arc.bg_angle_start, bg_midpoint) ); } else { - lv_arc_set_start_angle( + lv_arc_set_end_angle( rotary, _lv_map(ext->cur_value, range_midpoint, ext->max_value, bg_midpoint, bg_end)
stm32/mboot/README: Fix some typos, describe bootloader and fwupdate.py.
@@ -46,14 +46,14 @@ How to use This assumes that the board declares and defines the relevant SPI flash configuration structs, eg in the board-specific bdev.c file. The - `MBOOT_SPIFLASH2_LAYOUT` string will be seen by the USB DFU utility and + `MBOOT_SPIFLASH_LAYOUT` string will be seen by the USB DFU utility and must describe the SPI flash layout. Note that the number of pages in this layout description (the `64` above) cannot be larger than 99 (it must fit in two digits) so the reported page size (the `32Kg` above) must be made large enough so the number of pages fits in two digits. Alternatively the layout can specify multiple sections like `32*16Kg,32*16Kg`, in which case `MBOOT_SPIFLASH_ERASE_BLOCKS_PER_PAGE` - must be changed to `16 / 4` to match tho `16Kg` value. + must be changed to `16 / 4` to match the `16Kg` value. Mboot supports up to two external SPI flash devices. To configure the second one use the same configuration names as above but with @@ -115,6 +115,10 @@ The last element in the data sequence must be the end element: * END: type=1, len=0 +Note: MicroPython's `machine.bootloader()` function performs steps 1-4 +above, and also accepts an optional bytes argument as additional data to +pass through to Mboot. + Loading firmware from a filesystem ---------------------------------- @@ -130,6 +134,9 @@ are located and what filename to program. The elements to use are: The firmware to load must be a gzip'd DfuSe file (.dfu.gz). +The provided fwupdate.py script contains helper functions to call into Mboot +with the correct data, and also to update Mboot itself. + Example: Mboot on PYBv1.x -------------------------
ames: only forward downward
=/ =task ?. ?=(%soft -.wrapped-task) wrapped-task + ~| our^%ames-fail-soft ;;(task p.wrapped-task) :: %born: set .unix-duct and start draining .queued-events :: on-hear-open :: +on-hear-forward: maybe forward a packet to someone else :: - :: TODO: filter for transitive closure of sponsors/sponsees. + :: Only forward downward, to limit DDoS amplification vectors: + :: Galaxies forward to stars and below. + :: Stars forward to planets and below. + :: Planets forward to moons. + :: + :: Also, only stars forward to comets, since only a star can be a + :: comet's sponsor. :: ++ on-hear-forward |= [=lane =packet ok=?] ^+ event-core + :: only forward downward + :: + ?: %+ lte + rank:(encode-ship-metadata sndr.packet) + rank:(encode-ship-metadata our) + :: + event-core + :: only stars forward to comets + :: + ?: &(=(%pawn (clan:title sndr.packet)) !=(%king (clan:title our))) + event-core :: =/ ship-state (~(get by peers.ames-state) rcvr.packet) :: ignore packets to unfamiliar ships
Disable nlr/fb-alloc function.
@@ -36,7 +36,7 @@ void fb_alloc_mark() // Check if allocation overwrites the framebuffer pixels if (new_pointer < (char *) MAIN_FB_PIXELS()) { - nlr_raise_for_fb_alloc_mark(mp_obj_new_exception_msg(&mp_type_MemoryError, "FB Alloc Collision!!!")); + nlr_raise(mp_obj_new_exception_msg(&mp_type_MemoryError, "FB Alloc Collision!!!")); } // fb_alloc does not allow regions which are a size of 0 to be alloced,
options/ansi: Set tm_gmtoff in localtime and gmtime
@@ -503,6 +503,7 @@ struct tm *gmtime_r(const time_t *unix_gmt, struct tm *res) { res->tm_yday = yday - 1; res->tm_isdst = -1; res->tm_zone = __utc; + res->tm_gmtoff = 0; return res; } @@ -538,6 +539,7 @@ struct tm *localtime_r(const time_t *unix_gmt, struct tm *res) { res->tm_yday = yday - 1; res->tm_isdst = dst; res->tm_zone = tm_zone; + res->tm_gmtoff = offset; return res; }
Don't try to build GPU version if -DHAVE_CUDA=no is specified.
@@ -241,7 +241,12 @@ def build(arc_root, out_root, tail_args): py_trait = PythonTrait(arc_root, out_root, tail_args) ver = get_version(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'version.py')) pkg_name = os.environ.get('CATBOOST_PACKAGE_NAME', 'catboost') - for task_type in ('GPU', 'CPU'): + + try_to_build_gpu_version = True + if '-DHAVE_CUDA=no' in tail_args: + try_to_build_gpu_version = False + + for task_type in (['GPU', 'CPU'] if try_to_build_gpu_version else ['CPU']): try: print('Trying to build {} version'.format(task_type), file=sys.stderr) cmd = py_trait.gen_cmd() + (['-DHAVE_CUDA=yes'] if task_type == 'GPU' else ['-DHAVE_CUDA=no'])
BugID:24827808: Fix a typo in maldriver.
@@ -77,7 +77,7 @@ def update_config(destdir, devicetype, drivername): def update_mk(destdir, devicetype, drivername): mkfile = os.path.join(destdir, "..", "..", "aos.mk") if os.path.isfile(mkfile): - newline = "$(NAME)_COMPONENTS-$(AOS_MAL_%s_%s) := device_sal_%s" % \ + newline = "$(NAME)_COMPONENTS-$(AOS_MAL_%s_%s) := device_mal_%s" % \ (devicetype.upper(), drivername.upper(), drivername) with open(mkfile, 'r') as f:
RenderObject has been found
@@ -106,8 +106,6 @@ classes: Client::Game::Control::TargetSystem::ListFeeder: Client::Game::InstanceContent::ContentSheetWaiterInterface: Client::Game::Object::IGameObjectEventListener: - Client::Graphics::Render::RenderObject: - inherits_from: Client::Graphics::ReferencedClassBase Client::Graphics::RenderObjectList: Client::Graphics::Singleton: Client::Graphics::Vfx::VfxDataListenner: @@ -531,6 +529,9 @@ classes: vtbl: 0x1416ABCD0 funcs: 0x14032CB50: ctor + Client::Graphics::Render::RenderObject: + inherits_from: Client::Graphics::ReferencedClassBase + vtbl: 0x1416ABC50 Client::Graphics::Render::Model: inherits_from: Client::Graphics::Render::RenderObject vtbl: 0x1416ABCE0
qlog: add a handler for the packet_lost event
@@ -25,6 +25,14 @@ import json PACKET_LABELS = ["initial", "0rtt", "handshake", "1rtt"] +def handle_packet_lost(events, idx): + return [events[idx]["time"], "recovery", "packet_lost", { + "packet_type": PACKET_LABELS[events[idx]["packet-type"]], + "header": { + "packet_number": events[idx]["pn"] + } + }] + def handle_packet_received(events, idx): frames = [] acked = [] @@ -270,6 +278,7 @@ def render_ack_frame(ranges): } QLOG_EVENT_HANDLERS = { + "packet-lost": handle_packet_lost, "packet-received": handle_packet_received, "packet-sent": handle_packet_sent }
[tests] slight speed up checking for server ready make connection attempt every 10ms instead of every 20ms
@@ -124,10 +124,10 @@ sub wait_for_port_with_proc { my $self = shift; my $port = shift; my $child = shift; - my $timeout = 10*50; # 10 secs (valgrind might take a while), select waits 0.02 s + my $timeout = 10*100; # 10 secs (valgrind might take a while), select waits 0.01 s while (0 == $self->listening_on($port)) { - select(undef, undef, undef, 0.02); + select(undef, undef, undef, 0.01); $timeout--; # the process is gone, we failed
Add support for carriage return on Apple Watch console
@@ -37,7 +37,27 @@ class SessionDelegate: NSObject, WCSessionDelegate { func session(_ session: WCSession, didReceiveMessageData messageData: Data) { - let str = (String(data: messageData, encoding: .utf8) ?? "") + var str = (String(data: messageData, encoding: .utf8) ?? "") + + if str.hasPrefix("\r") { + if console.hasSuffix("\n") { + str = str.components(separatedBy: "\r").last ?? str + } + + str = "\r\(str.components(separatedBy: "\r").last ?? str)" + + if console.contains("\n") || console.contains("\r") { + var comp = console.components(separatedBy: "\n") + if comp.count > 0 { + comp.removeLast() + } + console = comp.joined(separator: "\n") + } + + } else if str.contains("\r") { + str = str.components(separatedBy: "\r").last ?? str + } + console += str (WKExtension.shared().rootInterfaceController as? InterfaceController)?.label.setText(console) }
linux-raspberrypi: Update 4.19 recipe to 4.19.66
FILESEXTRAPATHS_prepend := "${THISDIR}/linux-raspberrypi:" -LINUX_VERSION ?= "4.19.58" +LINUX_VERSION ?= "4.19.66" LINUX_RPI_BRANCH ?= "rpi-4.19.y" -SRCREV = "d5dc848c982dff2e020f294e384447efe6ea6617" +SRCREV = "fc5826fb999e0b32900d1f487e90c27a92010214" SRC_URI = " \ git://github.com/raspberrypi/linux.git;protocol=git;branch=${LINUX_RPI_BRANCH} \ "
hw/drivers/trng: Add ISR tracing for nRF52 TRNG driver
@@ -57,6 +57,8 @@ nrf52_rng_stop(void) static void nrf52_rng_irq_handler(void) { + os_trace_isr_enter(); + if (NRF_RNG->EVENTS_VALRDY) { NRF_RNG->EVENTS_VALRDY = 0; rng_cache[rng_cache_in] = NRF_RNG->VALUE; @@ -69,6 +71,8 @@ nrf52_rng_irq_handler(void) if ((rng_cache_in + 1) % sizeof(rng_cache) == rng_cache_out) { nrf52_rng_stop(); } + + os_trace_isr_exit(); } static size_t
publish: hide overflow in sidebar
@@ -141,7 +141,7 @@ export class Sidebar extends Component { className={ "bn br-m br-l br-xl b--gray4 b--gray2-d lh-copy h-100 " + "flex-shrink-0 mw-300-ns pt3 pt0-m pt0-l pt0-xl relative " + - activeClasses + + "overflow-y-hidden " + activeClasses + (hiddenClasses ? "flex-basis-100-s flex-basis-30-ns" : "dn") }> <a className="db dn-m dn-l dn-xl f8 pb3 pl3" href="/">
TEST: Clarify and adjust test/recipes/30-test_evp.t There are a few test cases at the end of test/recipes/30-test_evp.t, which are designed to check that loading DSA keys when DSA is disabled, or SM2 keys when SM2 is disables fail in an understandable way. These needed a small adjustment.
@@ -130,19 +130,29 @@ foreach my $f ( @defltfiles ) { "running evp_test -config $conf $f"); } +# test_errors OPTIONS +# +# OPTIONS may include: +# +# key => "filename" # expected to be found in $SRCDIR/test/certs +# out => "filename" # file to write error strings to +# args => [ ... extra openssl pkey args ... ] +# expected => regexps to match error lines against sub test_errors { # actually tests diagnostics of OSSL_STORE - my ($expected, $key, @opts) = @_; - my $infile = srctop_file('test', 'certs', $key); - my @args = qw(openssl pkey -in); - push(@args, $infile, @opts); - my $tmpfile = 'out.txt'; - my $res = !run(app([@args], stderr => $tmpfile)); - my $found = 0; - open(my $in, '<', $tmpfile) or die "Could not open file $tmpfile"; - while(<$in>) { - print; # this may help debugging - $res &&= !m/asn1 encoding/; # output must not include ASN.1 parse errors - $found = 1 if m/$expected/; # output must include $expected + my %opts = @_; + my $infile = srctop_file('test', 'certs', $opts{key}); + my @args = ( qw(openssl pkey -in), $infile, @{$opts{args} // []} ); + my $res = !run(app([@args], stderr => $opts{out})); + my $found = !exists $opts{expected}; + open(my $in, '<', $opts{out}) or die "Could not open file $opts{out}"; + while(my $errline = <$in>) { + print $errline; # this may help debugging + + # output must not include ASN.1 parse errors + $res &&= $errline !~ m/asn1 encoding/; + # output must include what is expressed in $opts{$expected} + $found = 1 + if exists $opts{expected} && $errline =~ m/$opts{expected}/; } close $in; # $tmpfile is kept to help with investigation in case of failure @@ -152,15 +162,19 @@ sub test_errors { # actually tests diagnostics of OSSL_STORE SKIP: { skip "DSA not disabled", 2 if !disabled("dsa"); - ok(test_errors("unsupported algorithm", "server-dsa-key.pem"), - "error loading unsupported dsa private key"); - ok(test_errors("unsupported algorithm", "server-dsa-pubkey.pem", "-pubin"), - "error loading unsupported dsa public key"); + ok(test_errors(key => 'server-dsa-key.pem', + out => 'server-dsa-key.err'), + "expected error loading unsupported dsa private key"); + ok(test_errors(key => 'server-dsa-pubkey.pem', + out => 'server-dsa-pubkey.err', + args => [ '-pubin' ], + expected => 'unsupported algorithm'), + "expected error loading unsupported dsa public key"); } SKIP: { - skip "sm2 not disabled", 1 if !disabled("sm2"); + skip "SM2 not disabled", 1 if !disabled("sm2"); - ok(test_errors("unknown group|unsupported algorithm", "sm2.key"), - "error loading unsupported sm2 private key"); + ok(test_errors(key => 'sm2.key', out => 'sm2.err'), + "expected error loading unsupported sm2 private key"); }
swaybar: fix crash with some tray icon pixmaps Discard pixmaps for icons where width and height are 0 or not equal. Fixes
@@ -56,8 +56,8 @@ static int read_pixmap(sd_bus_message *msg, struct swaybar_sni *sni, goto error; } - int size; - ret = sd_bus_message_read(msg, "ii", NULL, &size); + int width, height; + ret = sd_bus_message_read(msg, "ii", &width, &height); if (ret < 0) { sway_log(SWAY_ERROR, "%s %s: %s", sni->watcher_id, prop, strerror(-ret)); goto error; @@ -71,14 +71,25 @@ static int read_pixmap(sd_bus_message *msg, struct swaybar_sni *sni, goto error; } + if (height > 0 && width == height) { + sway_log(SWAY_DEBUG, "%s %s: found icon w:%d h:%d", sni->watcher_id, prop, width, height); struct swaybar_pixmap *pixmap = malloc(sizeof(struct swaybar_pixmap) + npixels); - pixmap->size = size; + pixmap->size = height; memcpy(pixmap->pixels, pixels, npixels); list_add(pixmaps, pixmap); + } else { + sway_log(SWAY_DEBUG, "%s %s: discard invalid icon w:%d h:%d", sni->watcher_id, prop, width, height); + } sd_bus_message_exit_container(msg); } + + if (pixmaps->length < 1) { + sway_log(SWAY_DEBUG, "%s %s no. of icons = 0", sni->watcher_id, prop); + goto error; + } + list_free_items_and_destroy(*dest); *dest = pixmaps; sway_log(SWAY_DEBUG, "%s %s no. of icons = %d", sni->watcher_id, prop,
dm: add virtio-rnd device to command line When FE virtio devices work in polling mode, sshd.service can't start normally and blocks at generating random bytes. When reading from the random source, getrandom() blocks caused by no random bytes.
@@ -101,6 +101,7 @@ acrn-dm -A -m $mem_size -c $2 -s 0:0,hostbridge -s 1:0,lpc -l com1,stdio \ -s 6,virtio-hyper_dmabuf \ -s 3,virtio-blk,/home/clear/uos/uos.img \ -s 4,virtio-net,tap0 \ + -s 7,virtio-rnd \ $logger_setting \ --mac_seed $mac_seed \ -k /usr/lib/kernel/default-iot-lts2018 \
nimble/host: Fix build with ext adv disabled
@@ -1349,7 +1349,7 @@ ble_gap_rx_conn_complete(struct hci_le_conn_complete *evt, uint8_t instance) */ #if !MYNEWT_VAL(BLE_EXT_ADV) if (ble_gap_adv_active()) { - ble_gap_adv_finished(0, 0, 0); + ble_gap_adv_finished(0, 0, 0, 0); } #endif break; @@ -1588,7 +1588,7 @@ ble_gap_slave_timer(void) ble_gap_slave_reset_state(0); /* Indicate to application that advertising has stopped. */ - ble_gap_adv_finished(0, BLE_HS_ETIMEOUT, 0); + ble_gap_adv_finished(0, BLE_HS_ETIMEOUT, 0, 0); return BLE_HS_FOREVER; }
[numerics] correct tests after merge
@@ -88,9 +88,8 @@ int main(void) printf("========= Starts Numerics tests for NM_add_to_diag3 ========= \n"); - SparseBlockStructuredMatrix * SBM = SBM_new(); FILE *file = fopen("data/SBM1.dat", "r"); - SBM_new_from_file(SBM, file); + SparseBlockStructuredMatrix * SBM = SBM_new_from_file(file); fclose(file); NumericsMatrix * M = NM_create(NM_SPARSE_BLOCK, SBM->blocksize0[SBM->blocknumber0-1],SBM->blocksize1[SBM->blocknumber1-1] );
Added error code for SceAppMgr Credit also to Thanks to
@@ -21,6 +21,7 @@ typedef enum SceAppMgrErrorCode { SCE_APPMGR_ERROR_INVALID = 0x8080201A, //!< Invalid param SCE_APPMGR_ERROR_TOO_LONG_ARGV = 0x8080201D, //!< argv is too long SCE_APPMGR_ERROR_INVALID_SELF_PATH = 0x8080201E, //!< Invalid SELF path + SCE_APPMGR_ERROR_NOEXEC = 0x8080201F, //!< The process is not authorized to run this function SCE_APPMGR_ERROR_BGM_PORT_BUSY = 0x80803000 //!< BGM port was occupied and could not be secured } SceAppMgrErrorCode;
Speed up build_project.sh by removing make install/local and add -j NUMTHREADS to make install
@@ -176,16 +176,11 @@ fi if [ "$1" == "install" ] ; then echo " -----Installing to $INSTALL_PROJECT ---- " - $SUDO make install + $SUDO make -j $NUM_THREADS install if [ $? != 0 ] ; then echo "ERROR make install failed " exit 1 fi - $SUDO make install/local - if [ $? != 0 ] ; then - echo "ERROR make install/local failed " - exit 1 - fi if [ $AOMP_STANDALONE_BUILD == 1 ] ; then echo " " echo "------ Linking $INSTALL_PROJECT to $AOMP -------"
figure if sockaddr structure require sa_len field
@@ -166,6 +166,12 @@ AC_CHECK_LIB([socket], [socket]) AC_CHECK_FUNCS([epoll_create], [AC_DEFINE([HAVE_EPOLL])]) AC_CHECK_FUNCS([kqueue], [AC_DEFINE([HAVE_KQUEUE])]) +dnl Check if struct sockaddr contains sa_len member +AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [], [ +# include <sys/types.h> +# include <sys/socket.h> +]) + ################################################################################ # Libtool # ################################################################################
Clang warnings re shadowed variables
@@ -627,18 +627,18 @@ static char* double_as_string(grib_context* c, double v) static char* get_keyname_without_rank(const char* name) { char* p=(char*)name; - char* end=p; + char* pEnd=p; char* ret=NULL; if (*p=='#') { - strtol(++p,&end,10); - if ( *end != '#') { + strtol(++p,&pEnd,10); + if ( *pEnd != '#') { DebugAssert(!"Badly formed rank in key"); } else { /* Take everything after 2nd '#' */ grib_context* c=grib_context_get_default(); - end++; - ret=grib_context_strdup(c,end); + pEnd++; + ret=grib_context_strdup(c,pEnd); } } return ret;
OcCpuLib: Only read MSR_PKG_POWER_INFO on SNB+
@@ -989,11 +989,19 @@ OcCpuGetMsrReport ( Report->CpuHasMsrTurboRatioLimit = TRUE; Report->CpuMsrTurboRatioLimitValue = AsmReadMsr64 (MSR_NEHALEM_TURBO_RATIO_LIMIT); + if (CpuInfo->CpuGeneration >= OcCpuGenerationSandyBridge) { // // MSR_PKG_POWER_INFO (TODO: To be confirmed) // Report->CpuHasMsrPkgPowerInfo = TRUE; Report->CpuMsrPkgPowerInfoValue = AsmReadMsr64 (MSR_GOLDMONT_PKG_POWER_INFO); + + // + // MSR_BROADWELL_PKG_CST_CONFIG_CONTROL_REGISTER (MSR 0xE2) + // + Report->CpuHasMsrE2 = TRUE; + Report->CpuMsrE2Value = AsmReadMsr64 (MSR_BROADWELL_PKG_CST_CONFIG_CONTROL); + } } else { // // IA32_MISC_ENABLE @@ -1019,14 +1027,6 @@ OcCpuGetMsrReport ( Report->CpuHasMsrIa32PerfStatus = TRUE; Report->CpuMsrIa32PerfStatusValue = AsmReadMsr64 (MSR_IA32_PERF_STATUS); } - - if (CpuInfo->CpuGeneration >= OcCpuGenerationSandyBridge) { - // - // MSR_BROADWELL_PKG_CST_CONFIG_CONTROL_REGISTER (MSR 0xE2) - // - Report->CpuHasMsrE2 = TRUE; - Report->CpuMsrE2Value = AsmReadMsr64 (MSR_BROADWELL_PKG_CST_CONFIG_CONTROL); - } } VOID
pybricks.pupdevices.ColorSensor: ambient mode data This decouples the ambient() method from the hsv() method. They will be scaled differently going forward since their use case is very different.
@@ -125,12 +125,12 @@ MP_DEFINE_CONST_FUN_OBJ_1(pupdevices_ColorSensor_reflection_obj, pupdevices_Colo STATIC mp_obj_t pupdevices_ColorSensor_ambient(mp_obj_t self_in) { pupdevices_ColorSensor_obj_t *self = MP_OBJ_TO_PTR(self_in); - // Read HSV with light off - pbio_color_hsv_t hsv; - pupdevices_ColorSensor__get_hsv(self->pbdev, false, &hsv); + // Get ambient from "V" in SHSV, which ranges from 0 to 10000 + int32_t data[4]; + pb_device_get_values(self->pbdev, PBIO_IODEV_MODE_PUP_COLOR_SENSOR__SHSV, data); - // Return value as ambient intensity - return mp_obj_new_int(hsv.v); + // Return scaled to 100. + return pb_obj_new_fraction(data[2], 100); } MP_DEFINE_CONST_FUN_OBJ_1(pupdevices_ColorSensor_ambient_obj, pupdevices_ColorSensor_ambient);
ames-flows: more fine-grained open flow counting
:- %noun :: =; flows - ^- (list [=ship open=@ closing=@ corked=@]) + ^- (list [=ship open=[out-open=@ out-closing=@ in=@ nax=@] corked=@]) =/ len ?^(arg len.arg 50) - (scag len (sort flows |=([[@ a=@ud *] @ b=@ud *] (gth a b)))) + (scag len (sort flows |=([[@ [a=@ud *] *] @ [b=@ud *] *] (gth a b)))) :: =/ peers-map .^ (map ship ?(%alien %known)) %known (some ship) == :: -^- (list [=ship open=@ closing=@ corked=@]) +^- (list [=ship open=[out-open=@ out-closing=@ in=@ nax=@] corked=@]) %+ turn peers |= =ship =+ .^ =ship-state:ames %ax /(scot %p p.bec)//(scot %da now)/peers/(scot %p ship) == =/ =peer-state:ames ?>(?=(%known -.ship-state) +.ship-state) -=/ closing ~(wyt in closing.peer-state) =/ corked ~(wyt in corked.peer-state) -=/ open (sub ~(wyt by snd.peer-state) closing) -[ship open closing corked] +=- [ship - corked] +:: +=+ %+ roll ~(tap in ~(key by snd.peer-state)) + |= [b=bone [out=(list bone) in=(list bone) nax=(list bone)]] + =/ m (mod b 4) + ?+ m ~|([%odd-bone b] !!) + %0 [[b out] in nax] + %1 [out [b in] nax] + %3 [out in [b nax]] + == +=/ [out-closing=(list bone) out-open=(list bone)] + (skid out ~(has ^in closing.peer-state)) +[(lent out-open) (lent out-closing) (lent in) (lent nax)]
SOVERSION bump to version 7.11.14
@@ -73,7 +73,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_ # with backward compatible change and micro version is connected with any internal change of the library. set(SYSREPO_MAJOR_SOVERSION 7) set(SYSREPO_MINOR_SOVERSION 11) -set(SYSREPO_MICRO_SOVERSION 13) +set(SYSREPO_MICRO_SOVERSION 14) set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION}) set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
Use the correct mode in `File.write_to_path`. Whoops.
@@ -553,7 +553,7 @@ void lily_prelude_File_write(lily_state *s) void lily_prelude_File_write_to_path(lily_state *s) { char *path = lily_arg_string_raw(s, 0); - FILE *f = open_file(s, path, "r"); + FILE *f = open_file(s, path, "w"); lily_value *to_write = lily_arg_value(s, 1); if (to_write->flags & V_STRING_FLAG)
Remove unused variable.
@@ -114,7 +114,6 @@ void ts_internal_bspline_find_u(const tsBSpline *spline, tsReal u, size_t *k, size_t *s, jmp_buf buf) { const size_t deg = ts_bspline_degree(spline); - const size_t order = ts_bspline_order(spline); const size_t num_knots = ts_bspline_num_knots(spline); const tsReal *knots = ts_internal_bspline_access_knots(spline);
Tests: change alert skip in test_listeners_empty after RPC fixes.
@@ -128,7 +128,7 @@ class TestUnitConfiguration(unit.TestUnitControl): def test_listeners_empty(self): self.skip_sanitizer = True self.skip_alerts.extend([ - r'nxt_lvlhsh_is_empty\(&port->rpc_streams\)', + r'failed to apply previous configuration', r'sendmsg.+failed', r'process \d+ exited on signal' ])
Fix server test in Linux only code
@@ -2118,7 +2118,7 @@ int h3_long_file_name_test() #else ret = demo_server_test(PICOHTTP_ALPN_H3_LATEST, h3zero_server_callback, NULL, 0, long_file_name_scenario, nb_long_file_name_scenario, - long_file_name_stream_length, 0, 0, 400000, 0, NULL, NULL, NULL); + long_file_name_stream_length, 0, 0, 400000, 0, NULL, NULL, NULL, 0); #endif return ret; }
BugID:17646749:[example/iot.mk] fix build error when TLS/iTLS neither on
@@ -13,6 +13,11 @@ ifneq (,$(filter -D_PLATFORM_IS_WINDOWS_,$(CFLAGS))) LDFLAGS += -lws2_32 CFLAGS := $(filter-out -DCOAP_COMM_ENABLED,$(CFLAGS)) endif +ifneq (,$(filter -DSUPPORT_ITLS,$(CFLAGS))) +LDFLAGS += -litls +else +LDFLAGS += -liot_tls +endif SRCS_mqtt-example-rrpc := app_entry.c mqtt/mqtt_example_rrpc.c SRCS_mqtt-example := app_entry.c mqtt/mqtt_example.c @@ -41,11 +46,6 @@ $(call Append_Conditional, TARGET, mqtt-example-rrpc, MQTT_COMM_ENABLE $(call Append_Conditional, TARGET, mqtt-example, MQTT_COMM_ENABLED) $(call Append_Conditional, TARGET, mqtt-example-multithread, MQTT_COMM_ENABLED) -$(call Append_Conditional, LDFLAGS, \ - -liot_tls, \ -SUPPORT_TLS, \ -SUPPORT_ITLS) - $(call Append_Conditional, LDFLAGS, \ -litls \ -lid2client \
fuse: fix indents
^- tank =/ received=tape ?~(v "missing" "received") leaf+"{<k>} {received}" - :- leaf+"fusing into {<syd>} from {<bas>} {<con>} - overwriting prior fuse" - discarded + :_ discarded + leaf+"fusing into {<syd>} from {<bas>} {<con>} - overwriting prior fuse" =. fiz (make-melt bas con) ((slog err) (emil moves)) ::
h2olog/quic: support the packet_lost probe
@@ -182,6 +182,24 @@ int trace_packet_acked(struct pt_regs *ctx) { return 0; } + +int trace_packet_lost(struct pt_regs *ctx) { + struct quic_line_t line = {}; + struct st_quicly_conn_t conn = {}; + void *pos = NULL; + sprintf(line.type, "packet_lost"); + + bpf_usdt_readarg(1, ctx, &pos); + bpf_probe_read(&conn, sizeof(conn), pos); + line.master_conn_id = conn.master_id; + bpf_usdt_readarg(2, ctx, &line.at); + bpf_usdt_readarg(3, ctx, &line.packet_num); + + if (events.perf_submit(ctx, &line, sizeof(line)) < 0) + bpf_trace_printk("failed to perf_submit\\n"); + + return 0; +} """ def handle_req_line(cpu, data, size): @@ -211,6 +229,9 @@ def handle_quic_line(cpu, data, size): elif line.type == "packet_acked": for k in ['type', 'at', 'master_conn_id', 'packet_num', 'newly_acked']: rv[k] = getattr(line, k) + elif line.type == "packet_lost": + for k in ['type', 'at', 'master_conn_id', 'packet_num']: + rv[k] = getattr(line, k) print(json.dumps(rv)) @@ -265,6 +286,7 @@ if sys.argv[1] == "quic": u.enable_probe(probe="packet_prepare", fn_name="trace_packet_prepare") u.enable_probe(probe="packet_commit", fn_name="trace_packet_commit") u.enable_probe(probe="packet_acked", fn_name="trace_packet_acked") + u.enable_probe(probe="packet_lost", fn_name="trace_packet_lost") b = BPF(text=quic_bpf, usdt_contexts=[u]) else: u.enable_probe(probe="receive_request", fn_name="trace_receive_req")
record_accessor: allow dot
@@ -182,7 +182,7 @@ static int ra_parse_buffer(struct flb_record_accessor *ra, flb_sds_t buf) /* ignore '.' if it is inside a string/subkey */ continue; } - else if (buf[end] == '.' || buf[end] == ' ' || buf[end] == ',' || buf[end] == '"') { + else if (buf[end] == ' ' || buf[end] == ',' || buf[end] == '"') { break; } }
fix test scry
=. our.alice ~nec =. now.alice ~1111.1.1 =. eny.alice 0xdead.beef +=. scry-gate.alice |=(* ``[%noun !>(*(list turf))]) :: =. our.bob ~doznec-doznec =. now.bob ~1111.1.1 =. eny.bob 0xbeef.dead +=. scry-gate.bob |=(* ``[%noun !>(*(list turf))]) :: =. crypto-core.ames-state.alice (pit:nu:crub:crypto 512 (shaz 'alice')) =. crypto-core.ames-state.bob (pit:nu:crub:crypto 512 (shaz 'bob'))
fix parameter order on mul_overflow to fix static analysis warnings (pr
@@ -150,15 +150,15 @@ bool _mi_page_is_valid(mi_page_t* page); // Overflow detecting multiply #define MI_MUL_NO_OVERFLOW ((size_t)1 << (4*sizeof(size_t))) // sqrt(SIZE_MAX) -static inline bool mi_mul_overflow(size_t size, size_t count, size_t* total) { +static inline bool mi_mul_overflow(size_t count, size_t size, size_t* total) { #if __has_builtin(__builtin_umul_overflow) || __GNUC__ >= 5 #if (MI_INTPTR_SIZE == 4) - return __builtin_umul_overflow(size, count, total); + return __builtin_umul_overflow(count, size, total); #else - return __builtin_umull_overflow(size, count, total); + return __builtin_umull_overflow(count, size, total); #endif #else /* __builtin_umul_overflow is unavailable */ - *total = size * count; + *total = count * size; return ((size >= MI_MUL_NO_OVERFLOW || count >= MI_MUL_NO_OVERFLOW) && size > 0 && (SIZE_MAX / size) < count); #endif
Update changelog for version 1.1.1
## Changelog +### 1.1.1 + +Released 2020-06-02 + +- New module Foreign.Lua.Push: provides functions which marshal + and push Haskell values onto Lua's stack. + + Most functions in Foreign.Lua.Types.Pushable are now defined + using functions from this module. + +- New module Foreign.Lua.Peek: provides functions which unmarshal + and retrieve Haskell values from Lua's stack. Contrary to `peek` + from Foreign.Lua.Types.Peekable, the peeker functions in this + module will never throw errors, but use an `Either` type to + signal retrieval failure. + + The error type `PeekError` should not be considered final and + will likely be subject to change in later versions. + +- Module Foreign.Lua.Utf8: never throw errors when decoding UTF-8 + strings. Invalid UTF-8 input bytes no longer cause exceptions, + but are replaced with the Unicode replacement character U+FFFD. + +- Fixed missing and faulty Haddock documentation. + +- Fixed a bug which caused unnecessary use of strings to represent + floating point numbers under certain configurations. + ### 1.1.0 Released 2020-03-25.
Add macro guard for header file
* limitations under the License. */ +#ifndef MBEDTLS_CONSTANT_TIME_INTERNAL_H +#define MBEDTLS_CONSTANT_TIME_INTERNAL_H + #include "common.h" #if defined(MBEDTLS_BIGNUM_C) @@ -305,3 +308,5 @@ int mbedtls_cf_rsaes_pkcs1_v15_unpadding( unsigned char *input, size_t *olen ); #endif /* MBEDTLS_PKCS1_V15 && MBEDTLS_RSA_C && ! MBEDTLS_RSA_ALT */ + +#endif /* MBEDTLS_CONSTANT_TIME_INTERNAL_H */
Add Build ID docker tag
@@ -47,11 +47,13 @@ stages: repository: 'public/msquic/qns' dockerfile: '$(Build.SourcesDirectory)/Dockerfile' containerRegistry: '9196310f-afae-4a53-8e35-b9e753eeb0f3' - tags: 'latest' + tags: | + latest + 0.9.0.$(Build.BuildId) - template: .\templates\run-qns.yml parameters: dependsOn: publish_docker - clients: [ 'quic-go', 'quicly', 'mvfst', 'quiche' ] + clients: [ 'quant', 'quic-go', 'quicly', 'quiche' ] servers: [ 'msquic' ] - stage: build_dbgext
sys/log/stub: Fix undefined reference error
@@ -46,6 +46,20 @@ log_register(char *name, struct log *log, const struct log_handler *h, return 0; } +static inline int +log_append_typed(struct log *log, uint8_t module, uint8_t level, uint8_t etype, + void *data, uint16_t len) +{ + return 0; +} + +static inline int +log_append_mbuf_typed_no_free(struct log *log, uint8_t module, uint8_t level, + uint8_t etype, struct os_mbuf **om_ptr) +{ + return 0; +} + static inline void log_init(void) {
disable blacklist for gcc
@@ -724,9 +724,14 @@ module _BASE_UNIT { SANITIZER_DEFINED=no when ($SANITIZER_TYPE && $SANITIZER_TYPE != "no" && $SANITIZER_TYPE != "pg") { - CFLAGS+=-fsanitize=$SANITIZER_TYPE -D${SANITIZER_TYPE}_sanitizer_enabled -fsanitize-blacklist=${input:"build/sanitize-blacklist.txt"} $SANITIZER_CFLAGS - LDFLAGS+=-fsanitize=$SANITIZER_TYPE -fsanitize-blacklist=${input:"build/sanitize-blacklist.txt"} + CFLAGS+=-fsanitize=$SANITIZER_TYPE -D${SANITIZER_TYPE}_sanitizer_enabled $SANITIZER_CFLAGS + LDFLAGS+=-fsanitize=$SANITIZER_TYPE SANITIZER_DEFINED=yes + + when ($CLANG) { + CFLAGS+=-fsanitize-blacklist=${input:"build/sanitize-blacklist.txt"} + LDFLAGS+=-fsanitize-blacklist=${input:"build/sanitize-blacklist.txt"} + } } when ($SANITIZE_COVERAGE && $SANITIZE_COVERAGE != "no") {
metadata: do not generate previews for hidden groups
=/ members ~(wyt in (members:grp rid)) =/ =metadatum:store - %- need - %+ mate (peek-metadatum %groups rid) - (peek-metadatum %graph rid) + (need (peek-metadatum %groups rid)) [rid channels members channel-count metadatum] :: ++ channels
parallel-libs/petsc: bump to v3.9.2
@@ -26,7 +26,7 @@ Name: %{pname}-%{compiler_family}-%{mpi_family}%{PROJ_DELIM} Summary: Portable Extensible Toolkit for Scientific Computation License: 2-clause BSD Group: %{PROJ_NAME}/parallel-libs -Version: 3.9.1 +Version: 3.9.2 Release: 1%{?dist} Source0: http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-%{version}.tar.gz Patch1: petsc.rpath.patch
dm: passthru: remove the use of assert() Remove the use of assert() in passthrough driver.
extern uint64_t audio_nhlt_len; -/* TODO: Add support for IO BAR of PTDev */ -static int iofd = -1; - /* reference count for libpciaccess init/deinit */ static int pciaccess_ref_cnt; static pthread_mutex_t ref_cnt_mtx = PTHREAD_MUTEX_INITIALIZER; @@ -404,8 +401,6 @@ init_msix_table(struct vmctx *ctx, struct passthru_dev *ptdev, uint64_t base) uint16_t virt_bdf = PCI_BDF(dev->bus, dev->slot, dev->func); struct ic_ptdev_irq ptirq; - assert(ptdev_msix_table_bar(ptdev) >= 0 && ptdev_msix_pba_bar(ptdev) >= 0); - b = ptdev->sel.bus; s = ptdev->sel.dev; f = ptdev->sel.func; @@ -626,7 +621,11 @@ cfginitbar(struct vmctx *ctx, struct passthru_dev *ptdev) */ if (bartype == PCIBAR_MEM64) { i++; - assert(i <= PCI_BARMAX); + if (i > PCI_BARMAX) { + warnx("BAR count out of range\n"); + return -1; + } + ptdev->bar[i].type = PCIBAR_MEMHI64; } } @@ -1073,21 +1072,14 @@ passthru_write(struct vmctx *ctx, int vcpu, struct pci_vdev *dev, int baridx, uint64_t offset, int size, uint64_t value) { struct passthru_dev *ptdev; - struct iodev_pio_req pio; ptdev = dev->arg; if (baridx == ptdev_msix_table_bar(ptdev)) { msix_table_write(ptdev, offset, size, value); } else { - assert(dev->bar[baridx].type == PCIBAR_IO); - bzero(&pio, sizeof(struct iodev_pio_req)); - pio.access = IODEV_PIO_WRITE; - pio.port = ptdev->bar[baridx].addr + offset; - pio.width = size; - pio.val = value; - - (void)ioctl(iofd, IODEV_PIO, &pio); + /* TODO: Add support for IO BAR of PTDev */ + warnx("Passthru: PIO write not supported, ignored\n"); } } @@ -1096,7 +1088,6 @@ passthru_read(struct vmctx *ctx, int vcpu, struct pci_vdev *dev, int baridx, uint64_t offset, int size) { struct passthru_dev *ptdev; - struct iodev_pio_req pio; uint64_t val; ptdev = dev->arg; @@ -1104,16 +1095,9 @@ passthru_read(struct vmctx *ctx, int vcpu, struct pci_vdev *dev, int baridx, if (baridx == ptdev_msix_table_bar(ptdev)) { val = msix_table_read(ptdev, offset, size); } else { - assert(dev->bar[baridx].type == PCIBAR_IO); - bzero(&pio, sizeof(struct iodev_pio_req)); - pio.access = IODEV_PIO_READ; - pio.port = ptdev->bar[baridx].addr + offset; - pio.width = size; - pio.val = 0; - - (void)ioctl(iofd, IODEV_PIO, &pio); - - val = pio.val; + /* TODO: Add support for IO BAR of PTDev */ + warnx("Passthru: PIO read not supported\n"); + val = (uint64_t)(-1); } return val;
[cmake] fix typos
@@ -67,7 +67,7 @@ option(WITH_XML "Enable xml files i/o. Default = OFF" OFF) # - user --> pip install --user # - standard --> pip install # - prefix --> pip install --prefix=CMAKE_INSTALL_PREFIX -set(siconos_python_install "prefix" CACHE STRING "Install mode for siconos python package")if(UNIX) +set(siconos_python_install "prefix" CACHE STRING "Install mode for siconos python package") # If OFF, headers from libraries in externals will not be installed. option(INSTALL_EXTERNAL_HEADERS
Tests: improved test for $request_uri variable.
@@ -17,7 +17,7 @@ class TestVariables(TestApplicationProto): "5GET": [{"action": {"return": 206}}], "GETGET": [{"action": {"return": 207}}], "localhost": [{"action": {"return": 208}}], - "9*?q": [{"action": {"return": 209}}], + "9?q#a": [{"action": {"return": 209}}], }, }, ), 'configure routes' @@ -35,7 +35,7 @@ class TestVariables(TestApplicationProto): assert self.get(url='/3')['status'] == 203, 'request_uri' assert self.get(url='/4*')['status'] == 204, 'request_uri 2' assert self.get(url='/4%2A')['status'] == 204, 'request_uri 3' - assert self.get(url='/9%2A?q')['status'] == 209, 'request_uri & query' + assert self.get(url='/9?q#a')['status'] == 209, 'request_uri query' def test_variables_uri(self): self.conf_routes("\"routes$uri\"")
[Sensor] Add some class and vendor information of sensor
@@ -45,6 +45,8 @@ extern "C" { #define RT_SENSOR_CLASS_NOISE (11) /* Noise Loudness */ #define RT_SENSOR_CLASS_STEP (12) /* Step sensor */ #define RT_SENSOR_CLASS_FORCE (13) /* Force sensor */ +#define RT_SENSOR_CLASS_DUST (14) /* Dust sensor */ +#define RT_SENSOR_CLASS_ECO2 (15) /* eCO2 sensor */ /* Sensor vendor types */ @@ -56,6 +58,9 @@ extern "C" { #define RT_SENSOR_VENDOR_GOERTEK (5) /* Goertek */ #define RT_SENSOR_VENDOR_MIRAMEMS (6) /* MiraMEMS */ #define RT_SENSOR_VENDOR_DALLAS (7) /* Dallas */ +#define RT_SENSOR_VENDOR_AOSONG (8) /* Aosong */ +#define RT_SENSOR_VENDOR_SHARP (9) /* Sharp */ +#define RT_SENSOR_VENDOR_SENSIRION (10) /* Sensirion */ /* Sensor unit types */ @@ -190,6 +195,8 @@ struct rt_sensor_data rt_int32_t noise; /* Noise Loudness. unit: HZ */ rt_uint32_t step; /* Step sensor. unit: 1 */ rt_int32_t force; /* Force sensor. unit: mN */ + rt_int32_t dust; /* Dust sensor. unit: ug/m3 */ + rt_int32_t eco2; /* eCO2 sensor. unit: ppm */ } data; };
added LED indicator for display refresh on launcher
@@ -62,7 +62,9 @@ def launcher(): graphics.set_pen(0) graphics.text("Hold A + E, then press Reset, to return to the Launcher", 65, 370, 600, 2) + ih.led_warn.on() graphics.update() + ih.led_warn.off() # Now we've drawn the menu to the screen, we wait here for the user to select an app. # Then once an app is selected, we set that as the current app and reset the device and load into it.