message
stringlengths
6
474
diff
stringlengths
8
5.22k
proc/nommu: Show log if bad relocations are found DONE:
@@ -551,7 +551,7 @@ int process_load(process_t *process, vm_object_t *o, offs_t base, size_t size, v Elf32_Shdr *shdr; Elf32_Rel *rel; unsigned prot, flags, reloffs; - int i, j, relocsz = 0, reltype; + int i, j, relocsz = 0, reltype, badreloc = 0; void *relptr; char *snameTab; ptr_t *got; @@ -670,8 +670,10 @@ int process_load(process_t *process, vm_object_t *o, offs_t base, size_t size, v return -ENOEXEC; /* Don't modify ELF file! */ - if ((ptr_t)relptr >= (ptr_t)base && (ptr_t)relptr < (ptr_t)base + size) + if ((ptr_t)relptr >= (ptr_t)base && (ptr_t)relptr < (ptr_t)base + size) { + ++badreloc; continue; + } if (process_relocate(reloc, relocsz, relptr) < 0) return -ENOEXEC; @@ -688,6 +690,15 @@ int process_load(process_t *process, vm_object_t *o, offs_t base, size_t size, v threads_canaryInit(proc_current(), stack); + if (badreloc) { + if (process->path != NULL && process->path[0] != '\0') + lib_printf("app %s: ", process->path); + else + lib_printf("process %d: ", process->id); + + lib_printf("Found %d badreloc%c\n", badreloc, (badreloc > 1) ? 's' : ' '); + } + return EOK; }
Sort the results of os.listdir to ensure consistent ordering of contents.
@@ -6,11 +6,11 @@ import os import json h = {"hosts" : [] } -for x in os.listdir("."): +for x in sorted(os.listdir(".")): if os.path.isdir(x): d = {'network' :os.path.basename(x)} d["files"] = [] - for y in os.listdir(x): + for y in sorted(os.listdir(x)): d["files"].append({'name' : os.path.basename(y)}) h["hosts"].append(d)
Fix header index with HeaderMenu widget
<script type="text/javascript" src="js/AjaxFranceLabs/widgets/LanguageSelector.widget.js"></script> <script type="text/javascript" - src="js/AjaxFranceLabs/widgets/LoginDatafariLinks.widget.js"></script> + src="js/AjaxFranceLabs/widgets/HeaderMenus.widget.js"></script> <script type="text/javascript" src="js/AjaxFranceLabs/widgets/LoginDatafariForm.widget.js"></script> <!-- JS library useful to extract parameters value from URL -->
tests: runtime: out_forward: disable message_mode test if record accessor is not available
@@ -347,8 +347,10 @@ void flb_test_forward_compat_mode() /* Test list */ TEST_LIST = { +#ifdef FLB_HAVE_RECORD_ACCESSOR {"message_mode" , flb_test_message_mode }, {"message_compat_mode", flb_test_message_compat_mode }, +#endif {"forward_mode" , flb_test_forward_mode }, {"forward_compat_mode", flb_test_forward_compat_mode }, {NULL, NULL}
QUIC RXDP: Remove non-actionable TODOs
@@ -333,8 +333,7 @@ static int depack_do_frame_max_data(PACKET *pkt, QUIC_CONNECTION *connection, /* This frame makes the packet ACK eliciting */ ackm_data->is_ack_eliciting = 1; - /* TODO(QUIC): ADD CODE to send |max_data| to flow control */ - + /* No-op - informative/debugging frame. */ return 1; } @@ -386,8 +385,7 @@ static int depack_do_frame_data_blocked(PACKET *pkt, /* This frame makes the packet ACK eliciting */ ackm_data->is_ack_eliciting = 1; - /* TODO(QUIC): ADD CODE to send |max_data| to flow control */ - + /* No-op - informative/debugging frame. */ return 1; } @@ -422,8 +420,7 @@ static int depack_do_frame_streams_blocked(PACKET *pkt, /* This frame makes the packet ACK eliciting */ ackm_data->is_ack_eliciting = 1; - /* TODO(QUIC): ADD CODE to send |max_data| to connection manager */ - + /* No-op - informative/debugging frame. */ return 1; }
Re-enable C17 testing
@@ -39,8 +39,7 @@ if (${CLAP_BUILD_TESTS}) clap_compile_cpp(c11 c 11 11) clap_compile_cpp(cpp11 cc 11 11) clap_compile_cpp(cpp14 cc 11 14) - # This configuration isn't supported by MSVC or older gccs so leave it off for now - # clap_compile_cpp(c17 c 17 17) + clap_compile_cpp(c17 c 17 17) clap_compile_cpp(cpp17 cc 17 17) clap_compile_cpp(cpp20 cc 17 20)
add init tool pose
@@ -125,6 +125,8 @@ void initManipulator() manipulator.initJointTrajectory(CHAIN); manipulator.setControlTime(ACTUATOR_CONTROL_TIME); + manipulator.toolMove(CHAIN, TOOL, false); + #ifdef PLATFORM////////////////////////////////////Actuator init manipulator.setAllActiveJointAngle(CHAIN, manipulator.receiveAllActuatorAngle(CHAIN)); #endif///////////////////////////////////////////// @@ -163,7 +165,7 @@ void THREAD::Actuator_Control(void const *argument) { (void)argument; - static uint16_t last_time = 0; + // static uint16_t last_time = 0; for (;;) {
mmapstorage: disable build for now, as COW implementation is in progress
+#[[ include (LibAddPlugin) if (DEPENDENCY_PHASE) @@ -24,3 +25,4 @@ add_plugin ( SOURCES ${MMAPSTORAGE_SOURCES} LINK_ELEKTRA elektra-core ADD_TEST TEST_README COMPONENT libelektra${SO_VERSION}) +]]
uds: update security access and i/o control services
@@ -586,13 +586,16 @@ class UdsClient(): power_down_time = resp[0] return power_down_time - def security_access(self, access_type: ACCESS_TYPE, security_key: bytes = None): + def security_access(self, access_type: ACCESS_TYPE, security_key: bytes = b'', data_record: bytes = b''): request_seed = access_type % 2 != 0 - if request_seed and security_key is not None: + if request_seed and len(security_key) != 0: raise ValueError('security_key not allowed') - if not request_seed and security_key is None: + if not request_seed and len(security_key) == 0: raise ValueError('security_key is missing') - resp = self._uds_request(SERVICE_TYPE.SECURITY_ACCESS, subfunction=access_type, data=security_key) + if not request_seed and len(data_record) != 0: + raise ValueError('data_record not allowed') + data = security_key + data_record + resp = self._uds_request(SERVICE_TYPE.SECURITY_ACCESS, subfunction=access_type, data=data) if request_seed: security_seed = resp return security_seed @@ -792,7 +795,7 @@ class UdsClient(): return resp def input_output_control_by_identifier(self, data_identifier_type: DATA_IDENTIFIER_TYPE, control_parameter_type: CONTROL_PARAMETER_TYPE, - control_option_record: bytes, control_enable_mask_record: bytes = b''): + control_option_record: bytes = b'', control_enable_mask_record: bytes = b''): data = struct.pack('!H', data_identifier_type) + bytes([control_parameter_type]) + control_option_record + control_enable_mask_record resp = self._uds_request(SERVICE_TYPE.INPUT_OUTPUT_CONTROL_BY_IDENTIFIER, subfunction=None, data=data) resp_id = struct.unpack('!H', resp[0:2])[0] if len(resp) >= 2 else None
Put thread-fork-init inside a run-once guard Thanks to Christian Heimes for pointing this out.
@@ -169,11 +169,20 @@ int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock) return 1; } +# ifdef OPENSSL_SYS_UNIX +static pthread_once_t fork_once_control = PTHREAD_ONCE_INIT; + +static void fork_once_func(void) +{ + pthread_atfork(OPENSSL_fork_prepare, + OPENSSL_fork_parent, OPENSSL_fork_child); +} +# endif + int openssl_init_fork_handlers(void) { # ifdef OPENSSL_SYS_UNIX - if (pthread_atfork(OPENSSL_fork_prepare, - OPENSSL_fork_parent, OPENSSL_fork_child) == 0) + if (pthread_once(&fork_once_control, fork_once_func) == 0) return 1; # endif return 0;
Fix Error: chip/max32660/max32660_serial.c:304:20: error: unused function 'max326_modifyreg' [-Werror,-Wunused-function]
@@ -297,28 +297,6 @@ static inline void max326_serialout(struct max326_dev_s *priv, putreg32(value, priv->uartbase + offset); } -/**************************************************************************** - * Name: max326_modifyreg - ****************************************************************************/ - -static inline void max326_modifyreg(struct max326_dev_s *priv, - unsigned int offset, uint32_t setbits, - uint32_t clrbits) -{ - irqstate_t flags; - uintptr_t regaddr = priv->uartbase + offset; - uint32_t regval; - - flags = enter_critical_section(); - - regval = getreg32(regaddr); - regval &= ~clrbits; - regval |= setbits; - putreg32(regval, regaddr); - - leave_critical_section(flags); -} - /**************************************************************************** * Name: max326_int_enable ****************************************************************************/
perfmon: topdown events as peusdo events Topdown events are peusdo events exposed by linux, and are only present on Intel platforms. Change to clarifies this. Type: fix
/* EventCode, UMask, EdgeDetect, AnyThread, Invert, CounterMask * counter_unit, name, suffix, description */ -#define foreach_perf_intel_core_event \ - _ (0x00, 0x02, 0, 0, 0, 0x00, CPU_CLK_UNHALTED, THREAD, \ - "Core cycles when the thread is not in halt state") \ - _ (0x00, 0x03, 0, 0, 0, 0x00, CPU_CLK_UNHALTED, REF_TSC, \ - "Reference cycles when the core is not in halt state.") \ - _ (0x00, 0x04, 0, 0, 0, 0x00, TOPDOWN, SLOTS, \ - "TMA slots available for an unhalted logical processor.") \ +#define foreach_perf_intel_peusdo_event \ _ (0x00, 0x80, 0, 0, 0, 0x00, TOPDOWN, L1_RETIRING_METRIC, \ "TMA retiring slots for an unhalted logical processor.") \ _ (0x00, 0x81, 0, 0, 0, 0x00, TOPDOWN, L1_BAD_SPEC_METRIC, \ _ (0x00, 0x82, 0, 0, 0, 0x00, TOPDOWN, L1_FE_BOUND_METRIC, \ "TMA fe bound slots for an unhalted logical processor.") \ _ (0x00, 0x83, 0, 0, 0, 0x00, TOPDOWN, L1_BE_BOUND_METRIC, \ - "TMA be bound slots for an unhalted logical processor.") \ + "TMA be bound slots for an unhalted logical processor.") + +/* EventCode, UMask, EdgeDetect, AnyThread, Invert, CounterMask + * counter_unit, name, suffix, description */ +#define foreach_perf_intel_core_event \ + _ (0x00, 0x02, 0, 0, 0, 0x00, CPU_CLK_UNHALTED, THREAD, \ + "Core cycles when the thread is not in halt state") \ + _ (0x00, 0x03, 0, 0, 0, 0x00, CPU_CLK_UNHALTED, REF_TSC, \ + "Reference cycles when the core is not in halt state.") \ + _ (0x00, 0x04, 0, 0, 0, 0x00, TOPDOWN, SLOTS, \ + "TMA slots available for an unhalted logical processor.") \ _ (0x03, 0x02, 0, 0, 0, 0x00, LD_BLOCKS, STORE_FORWARD, \ "Loads blocked due to overlapping with a preceding store that cannot be" \ " forwarded.") \ @@ -192,7 +196,7 @@ typedef enum { #define _(event, umask, edge, any, inv, cmask, name, suffix, desc) \ INTEL_CORE_E_##name##_##suffix, - foreach_perf_intel_core_event + foreach_perf_intel_core_event foreach_perf_intel_peusdo_event #undef _ INTEL_CORE_N_EVENTS, } perf_intel_core_event_t;
Temporarily remove autofetching until version scaffolding is done
@@ -1542,34 +1542,10 @@ _boot_home(c3_c *dir_c, c3_c *pil_c) exit(1); } } else { - c3_c *url_c = "https://bootstrap.urbit.org/latest.pill"; - CURL *curl; - CURLcode result; - FILE *file; - - snprintf(ful_c, 2048, "%s/.urb/%s", dir_c, nam_c); - printf("fetching %s to %s\r\n", url_c, ful_c); - if ( !(curl = curl_easy_init()) ) { - fprintf(stderr, "failed to initialize libcurl\n"); - exit(1); - } - if ( !(file = fopen(ful_c, "w")) ) { - fprintf(stderr, "failed to open %s\n", ful_c); + fprintf(stderr, "no pill - get one from bootstrap.urbit.org\n" + "by arvo commit hash, then specify it with -B\n"); exit(1); } - curl_easy_setopt(curl, CURLOPT_URL, url_c); - curl_easy_setopt(curl, CURLOPT_WRITEDATA, file); - result = curl_easy_perform(curl); - fclose(file); - if ( result != CURLE_OK ) { - fprintf(stderr, "failed to fetch %s: %s\n", - url_c, - curl_easy_strerror(result)); - fprintf(stderr, "please fetch it by hand, then run -B $filename\n"); - exit(1); - } - curl_easy_cleanup(curl); - } } }
ovn-northd-ddlog: Remove unused function. Acked-by: Mark Michelson
@@ -23,7 +23,6 @@ import ipam import vec function is_enabled(lsp: nb::Logical_Switch_Port): bool { is_enabled(lsp.enabled) } -function is_enabled(lsp: Ref<nb::Logical_Switch_Port>): bool { lsp.deref().is_enabled() } function is_enabled(sp: SwitchPort): bool { sp.lsp.is_enabled() } function is_enabled(sp: Intern<SwitchPort>): bool { sp.lsp.is_enabled() }
sysdeps/sigma: Update to the new sys_futex_wait signature
@@ -37,7 +37,7 @@ namespace mlibc { #endif // TODO: Actually implement this - int sys_futex_wait(int *pointer, int expected){ + int sys_futex_wait(int *pointer, int expected, const struct timespec *time){ return 0; }
UI: Ensure there will be no race condition when getting the UI_METHOD ex_data
*/ #include <string.h> +#include "internal/thread_once.h" #include "ui_locl.h" #ifndef BUFSIZ @@ -83,18 +84,12 @@ static void ui_free_method_data(void *parent, void *ptr, CRYPTO_EX_DATA *ad, OPENSSL_free(ptr); } -static int ui_method_data_index() +static CRYPTO_ONCE get_index_once = CRYPTO_ONCE_STATIC_INIT; +DEFINE_RUN_ONCE_STATIC(ui_method_data_index) { - static int idx = -1; - - if (idx == -1) - idx = CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_UI_METHOD, - 0, NULL, - ui_new_method_data, - ui_dup_method_data, + return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_UI_METHOD, 0, NULL, + ui_new_method_data, ui_dup_method_data, ui_free_method_data); - - return idx; } static int ui_open(UI *ui) @@ -109,7 +104,8 @@ static int ui_read(UI *ui, UI_STRING *uis) char result[PEM_BUFSIZE]; const struct pem_password_cb_data *data = UI_method_get_ex_data(UI_get_method(ui), - ui_method_data_index()); + RUN_ONCE(&get_index_once, + ui_method_data_index)); int maxsize = UI_get_result_maxsize(uis); int len = data->cb(result, maxsize > PEM_BUFSIZE ? PEM_BUFSIZE : maxsize, @@ -143,6 +139,7 @@ UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int rwflag) { struct pem_password_cb_data *data = NULL; UI_METHOD *ui_method = NULL; + int idx = 0; if ((data = OPENSSL_zalloc(sizeof(*data))) == NULL || (ui_method = UI_create_method("PEM password callback wrapper")) == NULL @@ -150,7 +147,8 @@ UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int rwflag) || UI_method_set_reader(ui_method, ui_read) < 0 || UI_method_set_writer(ui_method, ui_write) < 0 || UI_method_set_closer(ui_method, ui_close) < 0 - || UI_method_set_ex_data(ui_method, ui_method_data_index(), data) < 0) { + || (idx = RUN_ONCE(&get_index_once, ui_method_data_index)) <= 0 + || UI_method_set_ex_data(ui_method, idx, data) < 0) { UI_destroy_method(ui_method); OPENSSL_free(data); return NULL;
valloc and pvalloc is deprecated in bionic on Android memleak -p PID will failed on Android
@@ -434,9 +434,9 @@ if not kernel_trace: attach_probes("calloc") attach_probes("realloc") attach_probes("posix_memalign") - attach_probes("valloc") + attach_probes("valloc", can_fail=True) # failed on Android, is deprecated in libc.so from bionic directory attach_probes("memalign") - attach_probes("pvalloc") + attach_probes("pvalloc", can_fail=True) # failed on Android, is deprecated in libc.so from bionic directory attach_probes("aligned_alloc", can_fail=True) # added in C11 bpf.attach_uprobe(name=obj, sym="free", fn_name="free_enter", pid=pid)
Fix valgrind warning.
@@ -522,6 +522,7 @@ void janet_ev_init_common(void) { /* Common deinit code */ void janet_ev_deinit_common(void) { janet_q_deinit(&janet_vm_spawn); + free(janet_vm_tq); free(janet_vm_listeners); janet_vm_listeners = NULL; }
libc/math: Typo Fix
/**************************************************************************** * - * Copyright 2016 Samsung Electronics All Rights Reserved. + * Copyright 2016-2017 Samsung Electronics All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Included Files ************************************************************************/ -#include <tinyara/compiler.h> - #include <math.h> /************************************************************************
Modification of the verbosity parameter of MA57.
@@ -180,7 +180,7 @@ static int Process_Error_Code( Ma57_Data *ma57, int nerror ) { ma57->icntl[1] = -1; // Stream for warning messages. ma57->icntl[2] = -1; // Stream for monitoring printing. ma57->icntl[3] = -1; // Stream for printing of statistics. - ma57->icntl[4] = 0; // Verbosity: 0=none, 1=errors, 2=1+warnings, + ma57->icntl[4] = 4; // Verbosity: 0=none, 1=errors, 2=1+warnings, // 3=2+monitor, 4=3+input,output ma57->icntl[5] = 5; // Pivot selection strategy: // 0: AMD using MC47
include/driver/usb_mux/ps8743_public.h: Format with clang-format BRANCH=none TEST=none
#define PS8743_MODE_DP_ENABLE BIT(6) #define PS8743_MODE_DP_REG_CONTROL BIT(7) /* To reset the state machine to default */ -#define PS8743_MODE_POWER_DOWN (PS8743_MODE_USB_REG_CONTROL | \ - PS8743_MODE_DP_REG_CONTROL) +#define PS8743_MODE_POWER_DOWN \ + (PS8743_MODE_USB_REG_CONTROL | PS8743_MODE_DP_REG_CONTROL) /* DP output setting */ #define PS8743_REG_DP_SETTING 0x07 #define PS8743_DP_SWG_ADJ_DFLT 0x00
BugID:17394649:fix compile error when FEATURE_ALCS_ENABLED=n
@@ -1286,7 +1286,6 @@ int dm_mgr_upstream_thing_property_get_response(_IN_ int devid, _IN_ char *msgid int res = 0; dm_msg_request_payload_t request; dm_msg_response_t response; - dm_server_alcs_context_t *alcs_context = (dm_server_alcs_context_t *)ctx; if (devid < 0 || msgid == NULL || msgid_len <= 0 || payload == NULL || payload_len <= 0) { @@ -1307,11 +1306,15 @@ int dm_mgr_upstream_thing_property_get_response(_IN_ int devid, _IN_ char *msgid /* Send Property Get Response Message To Local */ dm_msg_response(DM_MSG_DEST_LOCAL, &request, &response, payload, payload_len, ctx); +#ifdef ALCS_ENABLED + dm_server_alcs_context_t *alcs_context = (dm_server_alcs_context_t *)ctx; + if (alcs_context) { DM_free(alcs_context->ip); DM_free(alcs_context->token); DM_free(alcs_context); } +#endif return SUCCESS_RETURN; }
hv: fix failed to build release version build with Kconfig setting Hardcode "RELEASE=0" will cause the value of "CONFIG_RELEASE" to be 'n' in kconfig.mk, it will be overwritten "CONFIG_RELEASE" with Kconfig setting.
@@ -19,7 +19,6 @@ HV_OBJDIR ?= $(CURDIR)/build HV_MODDIR ?= $(HV_OBJDIR)/modules HV_FILE := acrn SUB_MAKEFILES := $(wildcard */Makefile) -RELEASE ?= 0 LIB_MOD = $(HV_MODDIR)/lib_mod.a BOOT_MOD = $(HV_MODDIR)/boot_mod.a @@ -111,7 +110,7 @@ else LDFLAGS += -static endif -ifeq ($(RELEASE),y) +ifeq (y, $(CONFIG_RELEASE)) LDFLAGS += -s endif
Build: Add missing make command in Windows
@@ -83,7 +83,7 @@ matrix: script: - BUILD_UTILITIES=0 - - choco install microsoft-build-tools visualcpp-build-tools nasm python zip + - choco install microsoft-build-tools visualcpp-build-tools make nasm python zip - "./build_oc.tool" - "./build_duet.tool"
Cleanup Android build script, explicitly disable NEON on 32-bit ARM targets
@@ -5,14 +5,7 @@ import argparse import string from build.sdk_build_utils import * -ANDROID_TOOLCHAINS = { - 'armeabi-v7a': 'arm-linux-androideabi', - 'x86': 'x86', - 'arm64-v8a': 'aarch64-linux-android', - 'x86_64': 'x86_64' -} - -ANDROID_ABIS = list(ANDROID_TOOLCHAINS.keys()) +ANDROID_ABIS = ['armeabi-v7a', 'x86', 'arm64-v8a', 'x86_64'] def javac(args, dir, *cmdArgs): return execute(args.javac, dir, *cmdArgs) @@ -71,6 +64,7 @@ def buildAndroidSO(args, abi): "-DANDROID_STL='c++_static'", "-DANDROID_ABI='%s'" % abi, "-DANDROID_PLATFORM='%d'" % (api64 if '64' in abi else api32), + "-DANDROID_ARM_NEON=%s" % ('true' if abi == 'arm64-v8a' else 'false'), "-DSDK_CPP_DEFINES=%s" % " ".join(defines), "-DSDK_VERSION='%s'" % version, "-DSDK_PLATFORM='Android'",
Apply ATK_BOSS_DEATH to engine logic.
@@ -31461,7 +31461,7 @@ void kill_all_enemies() entity *tmpself = NULL; attack = emptyattack; - attack.attack_type = ATK_NORMAL; + attack.attack_type = ATK_BOSS_DEATH; //attack.attack_type = max_attack_types - 1; attack.dropv.y = default_model_dropv.y; attack.dropv.x = default_model_dropv.x;
get-schema BUGFIX correct interpretation of empty version value if version value is empty, it was'n interpreted as NULL, but as "" which was recognized as invalid version format, so the error was returned instead of searching for the latest version of the schema.
@@ -358,6 +358,9 @@ nc_clb_default_get_schema(struct lyd_node *rpc, struct nc_session *UNUSED(sessio identifier = ((struct lyd_node_leaf_list *)child)->value_str; } else if (!strcmp(child->schema->name, "version")) { version = ((struct lyd_node_leaf_list *)child)->value_str; + if (version && version[0] == '\0') { + version = NULL; + } } else if (!strcmp(child->schema->name, "format")) { format = ((struct lyd_node_leaf_list *)child)->value_str; }
Makefile: keep using 'PLATFORM' variable for existing documentation
# global helper variables T := $(CURDIR) -PLAT := uefi -RELEASE := 0 +PLATFORM ?= uefi +RELEASE ?= 0 ROOT_OUT := $(T)/build HV_OUT := $(ROOT_OUT)/hypervisor @@ -13,8 +13,8 @@ TOOLS_OUT := $(ROOT_OUT)/tools all: hypervisor devicemodel tools hypervisor: - make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) PLATFORM=$(PLAT) RELEASE=$(RELEASE) clean - make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) PLATFORM=$(PLAT) RELEASE=$(RELEASE) + make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) PLATFORM=$(PLATFORM) RELEASE=$(RELEASE) clean + make -C $(T)/hypervisor HV_OBJDIR=$(HV_OUT) PLATFORM=$(PLATFORM) RELEASE=$(RELEASE) devicemodel: make -C $(T)/devicemodel DM_OBJDIR=$(DM_OUT) clean
7X: Remove extra layer in RC source code Authored-by: Bhanu Kiran Atturu
@@ -22,4 +22,4 @@ run: - | server_version="$(./gpdb_src/getversion --short)" echo "Creating a tarball of the source git repo" - tar -czf "server_tar/server-src-rc-${server_version}${RC_BUILD_TYPE_GCS}.tar.gz" gpdb_src + tar -czf "server_tar/server-src-rc-${server_version}${RC_BUILD_TYPE_GCS}.tar.gz" -C gpdb_src .
Update LDR_DATA_TABLE_ENTRY types
// DLLs +typedef BOOLEAN (NTAPI *PLDR_INIT_ROUTINE)( + _In_ PVOID DllHandle, + _In_ ULONG Reason, + _In_opt_ PVOID Context + ); + // symbols typedef struct _LDR_SERVICE_TAG_RECORD { @@ -98,6 +104,7 @@ typedef enum _LDR_DLL_LOAD_REASON #define LDR_DATA_TABLE_ENTRY_SIZE_WINXP FIELD_OFFSET(LDR_DATA_TABLE_ENTRY, DdagNode) #define LDR_DATA_TABLE_ENTRY_SIZE_WIN7 FIELD_OFFSET(LDR_DATA_TABLE_ENTRY, BaseNameHashValue) #define LDR_DATA_TABLE_ENTRY_SIZE_WIN8 FIELD_OFFSET(LDR_DATA_TABLE_ENTRY, ImplicitPathOptions) +#define LDR_DATA_TABLE_ENTRY_SIZE sizeof(LDR_DATA_TABLE_ENTRY) // symbols typedef struct _LDR_DATA_TABLE_ENTRY @@ -110,7 +117,7 @@ typedef struct _LDR_DATA_TABLE_ENTRY LIST_ENTRY InProgressLinks; }; PVOID DllBase; - PVOID EntryPoint; + PLDR_INIT_ROUTINE EntryPoint; ULONG SizeOfImage; UNICODE_STRING FullDllName; UNICODE_STRING BaseDllName; @@ -172,12 +179,6 @@ typedef struct _LDR_DATA_TABLE_ENTRY UCHAR SigningLevel; // since REDSTONE2 } LDR_DATA_TABLE_ENTRY, *PLDR_DATA_TABLE_ENTRY; -typedef BOOLEAN (NTAPI *PDLL_INIT_ROUTINE)( - _In_ PVOID DllHandle, - _In_ ULONG Reason, - _In_opt_ PCONTEXT Context - ); - NTSYSAPI NTSTATUS NTAPI
examples/chrono: Rename button_daemon to chrono_daemon
@@ -113,10 +113,10 @@ static struct slcd_chrono_s g_slcd; ****************************************************************************/ /**************************************************************************** - * Name: button_daemon + * Name: chrono_daemon ****************************************************************************/ -static int button_daemon(int argc, char *argv[]) +static int chrono_daemon(int argc, char *argv[]) { FAR struct slcd_chrono_s *priv = &g_slcd; struct btn_notify_s btnevents; @@ -128,16 +128,16 @@ static int button_daemon(int argc, char *argv[]) UNUSED(i); - printf("button_daemon: Running\n"); + printf("chrono_daemon: Running\n"); /* Open the BUTTON driver */ - printf("button_daemon: Opening %s\n", BUTTON_DEVPATH); + printf("chrono_daemon: Opening %s\n", BUTTON_DEVPATH); fd = open(BUTTON_DEVPATH, O_RDONLY | O_NONBLOCK); if (fd < 0) { int errcode = errno; - printf("button_daemon: ERROR: Failed to open %s: %d\n", + printf("chrono_daemon: ERROR: Failed to open %s: %d\n", BUTTON_DEVPATH, errcode); goto errout; } @@ -149,12 +149,12 @@ static int button_daemon(int argc, char *argv[]) if (ret < 0) { int errcode = errno; - printf("button_daemon: ERROR: ioctl(BTNIOC_SUPPORTED) failed: %d\n", + printf("chrono_daemon: ERROR: ioctl(BTNIOC_SUPPORTED) failed: %d\n", errcode); goto errout_with_fd; } - printf("button_daemon: Supported BUTTONs 0x%02x\n", + printf("chrono_daemon: Supported BUTTONs 0x%02x\n", (unsigned int)supported); /* Define the notifications events */ @@ -172,7 +172,7 @@ static int button_daemon(int argc, char *argv[]) if (ret < 0) { int errcode = errno; - printf("button_daemon: ERROR: ioctl(BTNIOC_SUPPORTED) failed: %d\n", + printf("chrono_daemon: ERROR: ioctl(BTNIOC_SUPPORTED) failed: %d\n", errcode); goto errout_with_fd; } @@ -192,7 +192,7 @@ static int button_daemon(int argc, char *argv[]) if (ret < 0) { int errcode = errno; - printf("button_daemon: ERROR: sigwaitinfo() failed: %d\n", + printf("chrono_daemon: ERROR: sigwaitinfo() failed: %d\n", errcode); goto errout_with_fd; } @@ -219,7 +219,7 @@ errout_with_fd: errout: - printf("button_daemon: Terminating\n"); + printf("chrono_daemon: Terminating\n"); return EXIT_FAILURE; } @@ -317,12 +317,12 @@ int main(int argc, FAR char *argv[]) /* Create a thread to wait for the button events */ - ret = task_create("button_daemon", BUTTON_PRIORITY, - BUTTON_STACKSIZE, button_daemon, NULL); + ret = task_create("chrono_daemon", BUTTON_PRIORITY, + BUTTON_STACKSIZE, chrono_daemon, NULL); if (ret < 0) { int errcode = errno; - printf("buttons_main: ERROR: Failed to start button_daemon: %d\n", + printf("buttons_main: ERROR: Failed to start chrono_daemon: %d\n", errcode); return EXIT_FAILURE; }
Call va_end after va_copy in json_vsprintf As said in man doc: "Each invocation of va_copy() must be matched by a corresponding invocation of va_end() in the same function." va_copy may alloc memory in some system, it's necessay to free it by va_end. Fixes: ("Add json_sprintf and json_vsprintf")
@@ -781,26 +781,33 @@ static json_t *json_string_copy(const json_t *string) } json_t *json_vsprintf(const char *fmt, va_list ap) { + json_t *json = NULL; int length; char *buf; va_list aq; va_copy(aq, ap); length = vsnprintf(NULL, 0, fmt, ap); - if (length == 0) - return json_string(""); + if (length == 0) { + json = json_string(""); + goto out; + } buf = jsonp_malloc(length + 1); if (!buf) - return NULL; + goto out; vsnprintf(buf, length + 1, fmt, aq); if (!utf8_check_string(buf, length)) { jsonp_free(buf); - return NULL; + goto out; } - return jsonp_stringn_nocheck_own(buf, length); + json = jsonp_stringn_nocheck_own(buf, length); + +out: + va_end(aq); + return json; } json_t *json_sprintf(const char *fmt, ...) {
Fix an include issue in epsdb hip-openmp/matrixmul_omp_target
@@ -76,7 +76,8 @@ else endif # These HIPFLAGS provide HIP+OpenMP for CPU only. No target offload -HIPFLAGS = -x hip $(PLATFORM) -O2 --offload-arch=$(AOMP_GPU) -target $(AOMP_CPUTARGET) -fopenmp -lamdhip64 +AOMPHIP ?= $(AOMP) +HIPFLAGS = -x hip $(PLATFORM) -O2 --offload-arch=$(AOMP_GPU) -target $(AOMP_CPUTARGET) -fopenmp -lamdhip64 -I $(AOMPHIP)/include # These OMP_TARGET_FLAGS added to HIPFLAGS provide HIP+OpenMP with GPU target offload OMP_TARGET_FLAGS = -fopenmp-targets=$(TRIPLE) -Xopenmp-target=$(TRIPLE) -march=$(AOMP_GPU)
fix rox crash
@@ -1321,7 +1321,7 @@ enternotify(XEvent *e) if ((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root) return; c = wintoclient(ev->window); - if (selmon->sel && selmon->sel->isfloating && c != selmon->sel && + if (c && selmon->sel && selmon->sel->isfloating && c != selmon->sel && (ev->window == root || (c->tags & selmon->sel->tags && c->mon == selmon) || selmon->sel->issticky)) { if (!resizeborder(NULL)) return;
Assert computed gotos work on clang
@@ -63,8 +63,8 @@ static int dst_continue(Dst *returnreg) { * Values stored here should be used immediately */ Dst retreg; -/* Use computed gotos for GCC, otherwise use switch */ -#ifdef __GNUCC__ +/* Use computed gotos for GCC and clang, otherwise use switch */ +#ifdef __GNUC__ #define VM_START() {vm_next(); #define VM_END() } #define VM_OP(op) label_##op :
Fix link of apr in travis
@@ -54,13 +54,15 @@ install: - make install - popd - rm -rf ./json-c + - ln -s /usr/local/opt/apr/libexec/lib/libapr-1.0.dylib /usr/local/lib/ + - ln -s /usr/local/opt/apr/libexec/lib/libapr-1.dylib /usr/local/lib/ + - ln -s /usr/local/opt/apr/libexec/bin/apr-1-config /usr/local/bin/apr-1-config - brew uninstall boost --ignore-dependencies - brew install homebrew/core/[email protected] - brew link [email protected] --force - brew outdated maven || brew upgrade maven - brew install iproute2mac - brew list --versions - - brew link apr --force - sudo curl https://bootstrap.pypa.io/get-pip.py |sudo python - sudo pip install pycrypto - sudo cpanm install JSON
e_dasync: remove empty statement
@@ -209,7 +209,6 @@ static int dasync_cipher_nids[] = { static int bind_dasync(ENGINE *e) { /* Setup RSA */ - ; if ((dasync_rsa_orig = EVP_PKEY_meth_find(EVP_PKEY_RSA)) == NULL || (dasync_rsa = EVP_PKEY_meth_new(EVP_PKEY_RSA, EVP_PKEY_FLAG_AUTOARGLEN)) == NULL)
Update: Increment goal states
@@ -314,7 +314,7 @@ void buildMaze(int x1, int y1, int x2, int y2) int lastpX = 5; int lastpY = 5; -int goalMode = 0; +int goalMode = 1; void Agent_Invoke() { Perception percept = Agent_View(); @@ -333,11 +333,11 @@ void Agent_Invoke() } lastpX = pX; lastpY = pY; - if(goalMode == 1) + if(goalMode == 2) { NAR_AddInputNarsese("eaten! :|:"); } - if(goalMode == 0) + if(goalMode == 1) { NAR_AddInputNarsese("moved! :|:"); } @@ -357,7 +357,7 @@ void NAR_Chamber(long iterations) { if(t >= 1000) { - goalMode = 1; + goalMode = 2; } t++; if(iterations != -1 && t++ > iterations)
invoke/deferred calls: call direct and defer; fix return codes
@@ -348,13 +348,13 @@ void elektraInvokeClose (ElektraInvokeHandle * handle, Key * errorKey) * @param elektraPluginFunctionName function name * @param parameters parameter key set * @retval 0 on success - * @retval 1 when function not exported and deferring is unsupported by plugin + * @retval -1 when the call failed (direct call and deferring not available) */ int elektraInvokeCallDeferable (ElektraInvokeHandle * handle, const char * elektraPluginFunctionName, KeySet * parameters) { if (!handle) { - return 1; + return -1; } return elektraDeferredCall (handle->plugin, elektraPluginFunctionName, parameters); } @@ -380,43 +380,48 @@ void elektraInvokeExecuteDeferredCalls (ElektraInvokeHandle * handle, ElektraDef * Call a deferable function on a plugin handle. * If the function is exported by the plugin it is directly invoked, * if the plugin supports deferring calls, the call is deferred. - * - * The parameters key set can be freed afterwards. + * If both is possible (function is exported and deferred calls are supported), + * the function is directly called and the call is deferred (i.e. for nested plugins). * * @param handle invoke handle * @param elektraPluginFunctionName function name - * @param parameters parameter key set + * @param parameters parameter key set. Can bee freed afterwards. * @retval 0 on success - * @retval 1 when function not exported and deferring is unsupported by plugin + * @retval -1 when the call failed (direct call and deferring not available) */ int elektraDeferredCall (Plugin * handle, const char * elektraPluginFunctionName, KeySet * parameters) { ELEKTRA_NOT_NULL (handle); ELEKTRA_NOT_NULL (elektraPluginFunctionName); + int result; size_t direct = elektraPluginGetFunction (handle, elektraPluginFunctionName); if (direct) { ElektraDeferredCallable directFn = (ElektraDeferredCallable) direct; directFn (handle, parameters); + result = 0; // success } else { + // no direct call possible + result = -1; + } + size_t deferredCall = elektraPluginGetFunction (handle, "deferredCall"); if (deferredCall) { ElektraDeferredCall deferredCallFn = (ElektraDeferredCall) deferredCall; deferredCallFn (handle, elektraPluginFunctionName, parameters); + result = 0; // success } else { - // no direct call and deferring possible - return 1; - } + // deferred calls not possible + result = -1; } - // success - return 0; + return result; } /**
fixed buffer overflow in output wpa lists
@@ -1476,21 +1476,16 @@ if((apstaessidlistecleaned != NULL) && (hccapxbestoutname != NULL)) { if(zeigeressid->essid[ec] < 0x20) { - zeigeressid++; - continue; + break; } } - - for(ec = 0; ec < zeigeressid->essidlen; ec++) + for(ec = 0; ec < 10; ec++) { if((zeigeressid->essid[ec] > 0x7e) && (essidchangecount > 2)) { - zeigeressid++; - continue; + break; } } - - zeiger->essidlen = zeigeressid->essidlen; memset(zeiger->essid, 0, 32); memcpy(zeiger->essid, zeigeressid->essid, zeigeressid->essidlen); @@ -1554,8 +1549,14 @@ if((apstaessidlistecleaned != NULL) && (hccapbestoutname != NULL)) { if(zeigeressid->essid[ec] < 0x20) { - zeigeressid++; - continue; + break; + } + } + for(ec = 0; ec < 10; ec++) + { + if((zeigeressid->essid[ec] > 0x7e) && (essidchangecount > 2)) + { + break; } } zeiger->essidlen = zeigeressid->essidlen; @@ -1617,8 +1618,14 @@ if((apstaessidlistecleaned != NULL) && (johnbestoutname != NULL)) { if(zeigeressid->essid[ec] < 0x20) { - zeigeressid++; - continue; + break; + } + } + for(ec = 0; ec < 10; ec++) + { + if((zeigeressid->essid[ec] > 0x7e) && (essidchangecount > 2)) + { + break; } } zeiger->essidlen = zeigeressid->essidlen;
Fix cbor_tag_item usage in cbor_describe
@@ -317,7 +317,7 @@ static void _cbor_nested_describe(cbor_item_t *item, FILE *out, int indent) { case CBOR_TYPE_TAG: { fprintf(out, "%*s[CBOR_TYPE_TAG] ", indent, " "); fprintf(out, "Value: %" PRIu64 "\n", cbor_tag_value(item)); - _cbor_nested_describe(cbor_tag_item(item), out, indent + 4); + _cbor_nested_describe(cbor_move(cbor_tag_item(item)), out, indent + 4); break; }; case CBOR_TYPE_FLOAT_CTRL: {
CoreValidation: Fixed pattern for test result file.
@@ -122,7 +122,7 @@ def images(step, config): return images def storeResult(step, config, cmd): - result = format("{dev}/{cc}/result_{target}_{now}.xml", config['device'], config['compiler'], config['target'], now = datetime.now().strftime("%Y%m%d%H%M%S")) + result = format("result_{dev}_{cc}_{target}_{now}.xml", config['device'], config['compiler'], config['target'], now = datetime.now().strftime("%Y%m%d%H%M%S")) step.storeResult(cmd, result) def create():
test/runtest: Size buffer according to modlog Prior to this commit, the runtest result buffer had a size equal to LOG_PRINTF_MAX_ENTRY_LEN. Since we are now using modlog, this old constant is not relevant anymore. Now, we use the modlog buffer size.
@@ -155,8 +155,8 @@ static void runtest_log_result(const char *msg, bool passed) { #if MYNEWT_VAL(RUNTEST_LOG) - /* Must log valid json with a strlen less than LOG_PRINTF_MAX_ENTRY_LEN */ - char buf[LOG_PRINTF_MAX_ENTRY_LEN]; + /* Must log valid json with a strlen less than MODLOG_MAX_PRINTF_LEN */ + char buf[MYNEWT_VAL(MODLOG_MAX_PRINTF_LEN)]; char *n; int n_len; char *s; @@ -172,8 +172,8 @@ runtest_log_result(const char *msg, bool passed) /* How much of the test name can we log? */ n_len = strlen(tu_case_name); - if (len + n_len >= LOG_PRINTF_MAX_ENTRY_LEN) { - n_len = LOG_PRINTF_MAX_ENTRY_LEN - len - 1; + if (len + n_len >= MYNEWT_VAL(MODLOG_MAX_PRINTF_LEN)) { + n_len = MYNEWT_VAL(MODLOG_MAX_PRINTF_LEN) - len - 1; } len += n_len; n = buf; @@ -182,8 +182,8 @@ runtest_log_result(const char *msg, bool passed) /* How much of the suite name can we log? */ s_len = strlen(runtest_current_ts->ts_name); - if (len + s_len >= LOG_PRINTF_MAX_ENTRY_LEN) { - s_len = LOG_PRINTF_MAX_ENTRY_LEN - len - 1; + if (len + s_len >= MYNEWT_VAL(MODLOG_MAX_PRINTF_LEN)) { + s_len = MYNEWT_VAL(MODLOG_MAX_PRINTF_LEN) - len - 1; } len += s_len; s = n + n_len + 2; @@ -192,8 +192,8 @@ runtest_log_result(const char *msg, bool passed) /* How much of the message can we log? */ m_len = strlen(msg); - if (len + m_len >= LOG_PRINTF_MAX_ENTRY_LEN) { - m_len = LOG_PRINTF_MAX_ENTRY_LEN - len - 1; + if (len + m_len >= MYNEWT_VAL(MODLOG_MAX_PRINTF_LEN)) { + m_len = MYNEWT_VAL(MODLOG_MAX_PRINTF_LEN) - len - 1; } m = s + s_len + 2; strncpy(m, msg, m_len);
fix bsp_radio project.
@@ -43,8 +43,6 @@ typedef enum { } app_state_t; typedef struct { - uint8_t num_radioTimerOverflows; - uint8_t num_radioTimerCompare; uint8_t num_startFrame; uint8_t num_endFrame; uint8_t num_timer; @@ -66,8 +64,6 @@ app_vars_t app_vars; //=========================== prototypes ====================================== -void cb_radioTimerOverflows(void); -void cb_radioTimerCompare(void); void cb_startFrame(PORT_TIMER_WIDTH timestamp); void cb_endFrame(PORT_TIMER_WIDTH timestamp); void cb_timer(void); @@ -87,7 +83,6 @@ int mote_main(void) { board_init(); // add callback functions radio - sctimer_set_callback(cb_radioTimerOverflows); radio_setStartFrameCb(cb_startFrame); radio_setEndFrameCb(cb_endFrame); @@ -99,7 +94,7 @@ int mote_main(void) { // start bsp timer sctimer_set_callback(cb_timer); - sctimer_setCompare(TIMER_PERIOD); + sctimer_setCompare(sctimer_readCounter()+TIMER_PERIOD); sctimer_enable(); // prepare radio @@ -222,16 +217,6 @@ int mote_main(void) { //=========================== callbacks ======================================= -void cb_radioTimerOverflows(void) { - // update debug stats - app_dbg.num_radioTimerOverflows++; -} - -void cb_radioTimerCompare(void) { - // update debug stats - app_dbg.num_radioTimerCompare++; -} - void cb_startFrame(PORT_TIMER_WIDTH timestamp) { // set flag app_vars.flags |= APP_FLAG_START_FRAME; @@ -254,4 +239,6 @@ void cb_timer(void) { // update debug stats app_dbg.num_timer++; + + sctimer_setCompare(sctimer_readCounter()+TIMER_PERIOD); }
SOVERSION bump to version 4.0.4
@@ -35,7 +35,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 4) set(SYSREPO_MINOR_SOVERSION 0) -set(SYSREPO_MICRO_SOVERSION 3) +set(SYSREPO_MICRO_SOVERSION 4) set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION}) set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
prevents ub in u3x_cap and u3x_mas
/* u3x_cap(): root axis, 2 or 3. */ -# define u3x_cap(a_w) (0x2 | (a_w >> (u3x_dep(a_w) - 1))) +# define u3x_cap(a_w) ({ \ + c3_assert( 1 < a_w ); \ + (0x2 | (a_w >> (u3x_dep(a_w) - 1))); }) /* u3x_mas(): remainder after cap. */ -# define u3x_mas(a_w) \ - ( (a_w & ~(1 << u3x_dep(a_w))) | (1 << (u3x_dep(a_w) - 1)) ) +# define u3x_mas(a_w) ({ \ + c3_assert( 1 < a_w ); \ + ( (a_w & ~(1 << u3x_dep(a_w))) | (1 << (u3x_dep(a_w) - 1)) ); }) /* u3x_peg(): connect two axes. */
[cmake] link mod_cml with memcached
@@ -691,6 +691,9 @@ if(WITH_LUA) add_and_install_library(mod_cml "mod_cml.c;mod_cml_lua.c;mod_cml_funcs.c") target_link_libraries(mod_cml ${LUA_LDFLAGS}) add_target_properties(mod_cml COMPILE_FLAGS ${LUA_CFLAGS}) + if(WITH_MEMCACHED) + target_link_libraries(mod_cml memcached) + endif() endif() if(WITH_GEOIP)
invite-json: first pass
/- *invite-store +/+ resource |% ++ slan |=(mod/@tas |=(txt/@ta (need (slaw mod txt)))) :: ^- json %- pairs:enjs:format %+ turn ~(tap by inv) - |= [=path =invitatory] + |= [=term =invitatory] ^- [cord json] - [(spat path) (invitatory-to-json invitatory)] + [term (invitatory-to-json invitatory)] :: ++ invitatory-to-json |= =invitatory %- pairs :~ [%ship (ship ship.invite)] [%app [%s app.invite]] - [%path (path path.invite)] + [%resource (enjs:resource resource.invite)] [%recipient (ship recipient.invite)] [%text [%s text.invite]] == [%initial (invites-to-json invites.upd)] ?: =(%create -.upd) ?> ?=(%create -.upd) - [%create (pairs [%path (path path.upd)]~)] + [%create (pairs [%term s+term.upd]~)] ?: =(%delete -.upd) ?> ?=(%delete -.upd) - [%delete (pairs [%path (path path.upd)]~)] + [%delete (pairs [%term s+term.upd]~)] ?: =(%accepted -.upd) ?> ?=(%accepted -.upd) :- %accepted %- pairs - :~ [%path (path path.upd)] + :~ [%term s+term.upd] [%uid s+(scot %uv uid.upd)] [%invite (invite-to-json invite.upd)] == ?> ?=(%decline -.upd) :- %decline %- pairs - :~ [%path (path path.upd)] + :~ [%term s+term.upd] [%uid s+(scot %uv uid.upd)] == ?: =(%invite -.upd) ?> ?=(%invite -.upd) :- %invite %- pairs - :~ [%path (path path.upd)] + :~ [%term s+term.upd] [%uid s+(scot %uv uid.upd)] [%invite (invite-to-json invite.upd)] == |% ++ parse-json %- of - :~ [%create create] - [%delete delete] + :~ [%create so] + [%delete so] [%invite invite] [%accept accept] [%decline decline] == :: - ++ create - (ot [%path pa]~) - :: - ++ delete - (ot [%path pa]~) - :: - ++ invite %- ot - :~ [%path pa] + :~ [%term so] [%uid seri] [%invite invi] == :: ++ accept %- ot - :~ [%path pa] + :~ [%term so] [%uid seri] == :: ++ decline %- ot - :~ [%path pa] + :~ [%term so] [%uid seri] == :: ++ invi %- ot :~ [%ship (su ;~(pfix sig fed:ag))] - [%app (se %tas)] - [%path pa] + [%app so] + [%resource dejs:resource] [%recipient (su ;~(pfix sig fed:ag))] [%text so] ==
[kernel] add deleter for shared pointer on internal NumericsMatrix
@@ -336,7 +336,7 @@ void SimpleMatrix::PLUFactorize() } if(_num == DENSE) { - _numericsMatrix.reset(NM_new()); + _numericsMatrix.reset(NM_new(),NM_clear); NumericsMatrix * NM = _numericsMatrix.get(); double * data = (double*)(getArray()); DEBUG_EXPR(NV_display(data,size(0)*size(1));); @@ -361,7 +361,7 @@ void SimpleMatrix::PLUFactorize() else { // We build a sparse matrix and we call numerics for the LU factorization of a sparse matrix. - _numericsMatrix.reset(NM_create(NM_SPARSE, size(0), size(1))); + _numericsMatrix.reset(NM_create(NM_SPARSE, size(0), size(1)),NM_clear); NumericsMatrix * NM = _numericsMatrix.get(); _numericsMatrix->matrix2->origin = NSM_CSC; NM_csc_alloc(NM, nnz());
Fix Coverity use after free Another false positive tagged as such
@@ -215,6 +215,8 @@ OSSL_STORE_open_ex(const char *uri, OSSL_LIB_CTX *libctx, const char *propq, */ (void)ossl_store_close_it(&tmpctx); } + /* Coverity false positive, the reference counting is confusing it */ + /* coverity[pass_freed_arg] */ OSSL_STORE_LOADER_free(fetched_loader); OPENSSL_free(propq_copy); OPENSSL_free(ctx);
serf: plugs leak of error-notification event
@@ -583,7 +583,7 @@ _serf_work(u3_serf* sef_u, u3_noun job) c3_assert( sef_u->sen_d == sef_u->dun_d); sef_u->sen_d++; - gon = _serf_poke(sef_u, "work", job); + gon = _serf_poke(sef_u, "work", job); // retain // event accepted // @@ -613,7 +613,7 @@ _serf_work(u3_serf* sef_u, u3_noun job) // job = _serf_make_crud(job, dud); - gon = _serf_poke(sef_u, "crud", u3k(job)); + gon = _serf_poke(sef_u, "crud", job); // retain // error notification accepted //
Homestar:Battery:Modify battery parameters for SMP and Sunwoda 1.Currently SMP and Sunwoda batteries are used 2.fix batterycutoff fail TEST=make -j BOARD=homestar Verify build on EVT board BRANCH=Trogdo
@@ -153,10 +153,10 @@ const struct board_batt_params board_battery_info[] = { [BATTERY_L21D4PG0] = { .fuel_gauge = { .manuf_name = "Sunwoda", - .device_name = "L21D4PG", + .device_name = "L21D4PG0", .ship_mode = { .reg_addr = 0x34, - .reg_data = { 0x0000, 0x0100 }, + .reg_data = { 0x0000, 0x1000 }, }, .fet = { .mfgacc_support = 1, @@ -182,10 +182,10 @@ const struct board_batt_params board_battery_info[] = { [BATTERY_L21M4PG0] = { .fuel_gauge = { .manuf_name = "SMP", - .device_name = "L21M4PG", + .device_name = "L21M4PG0", .ship_mode = { .reg_addr = 0x34, - .reg_data = { 0x0000, 0x0100 }, + .reg_data = { 0x0000, 0x1000 }, }, .fet = { .mfgacc_support = 1,
[CUDA] Add basic support for %s in printf
@@ -56,6 +56,12 @@ _cl_printf(__attribute__((address_space(3))) char* restrict format, ...) vprintf("%lf", arg_data); break; } + case 's': + { + _cl_va_arg(ap, arg_data, 2); + vprintf("%s", arg_data); + break; + } default: goto error; } ch = *++format;
Fix pkg-config file of tinysplinecpp.
prefix=@CMAKE_INSTALL_PREFIX@ -exec_prefix=@CMAKE_INSTALL_PREFIX@ -libdir=@INSTALL_LIB_DIR@ -includedir=@INSTALL_INC_DIR@ +exec_prefix=${prefix} +libdir=${prefix}/@TINYSPLINE_INSTALL_LIBRARY_DIR@ +includedir=${prefix}/@TINYSPLINE_INSTALL_INCLUDE_DIR@ Name: @TINYSPLINE_PACKAGE_NAME@ Description: @TINYSPLINE_DESCRIPTION@ Version: @TINYSPLINE_VERSION@ Libs: -L${libdir} -ltinysplinecpp +Libs.private: @TINYSPLINE_CXX_STATIC_LIBRARIES@ Cflags: -I${includedir} @TINYSPLINE_PKGCONFIG_CXX_FLAGS@ \ No newline at end of file -
sdl/version: update GetRevisionNumber() to show deprecation warning on staticcheck only when users use it
package sdl -// #include "sdl_wrapper.h" +/* +#include "sdl_wrapper.h" + +#if SDL_VERSION_ATLEAST(2,0,16) + +static inline int GetRevisionNumber(void) +{ + return 0; +} + +#else + +static inline int GetRevisionNumber(void) +{ + return SDL_GetRevisionNumber(); +} + +#endif +*/ import "C" import "unsafe" @@ -62,8 +80,7 @@ func GetRevision() string { return (string)(C.GoString(C.SDL_GetRevision())) } -// GetRevisionNumber returns the revision number of SDL that is linked against your program. -// (https://wiki.libsdl.org/SDL_GetRevisionNumber) +// Deprecated: GetRevisionNumber is deprecated in SDL2 2.0.16 and will return 0. Users should use GetRevision instead. func GetRevisionNumber() int { - return (int)(C.SDL_GetRevisionNumber()) + return (int)(C.GetRevisionNumber()) }
Setting request error flag in error handler. Absence of this flag is the reason of memory leak in case when client disconnected before receiving all response data.
@@ -523,6 +523,8 @@ nxt_http_request_error_handler(nxt_task_t *task, void *obj, void *data) nxt_debug(task, "http request error handler"); + r->error = 1; + if (proto.any != NULL) { nxt_http_proto_discard[r->protocol](task, r, nxt_http_buf_last(r)); }
flash/spiflash; set flash alignment restrictions to 1 byte.
@@ -85,7 +85,7 @@ struct spiflash_dev spiflash_dev = { .hf_size = MYNEWT_VAL(SPIFLASH_SECTOR_COUNT) * MYNEWT_VAL(SPIFLASH_SECTOR_SIZE), .hf_sector_cnt = MYNEWT_VAL(SPIFLASH_SECTOR_COUNT), - .hf_align = 0, + .hf_align = 1, }, /* SPI settings */
Cast to void *
@@ -79,7 +79,7 @@ esp_pbuf_new(size_t len) { p->next = NULL; /* No next element in chain */ p->tot_len = len; /* Set total length of pbuf chain */ p->len = len; /* Set payload length */ - p->payload = (uint8_t *)(((char *)p) + SIZEOF_PBUF_STRUCT); /* Set pointer to payload data */ + p->payload = (void *)(((char *)p) + SIZEOF_PBUF_STRUCT);/* Set pointer to payload data */ p->ref = 1; /* Single reference is used on this pbuf */ } return p;
fixed missing OPTIONCODE_RC in pcapng custom block
@@ -71,7 +71,7 @@ optionhdr->option_length = colen -OH_SIZE; return colen; } /*===========================================================================*/ -bool writecb(int fd, uint8_t *macorig, uint8_t *macap, uint64_t rcrandom, uint8_t *anonce, uint8_t *macsta, uint8_t *snonce, uint8_t wclen, char *wc) +bool writecb(int fd, uint8_t *macap, uint64_t rcrandom, uint8_t *anonce, uint8_t *macsta, uint8_t *snonce, uint8_t wclen, char *wc) { int cblen; int written; @@ -88,12 +88,12 @@ cbhdr->total_length = CB_SIZE; memcpy(cbhdr->pen, &hcxmagic, 4); memcpy(cbhdr->hcxm, &hcxmagic, 32); -cblen += addoption(cb +cblen, OPTIONCODE_MACORIG, 6, (char*)macorig); cblen += addoption(cb +cblen, OPTIONCODE_MACAP, 6, (char*)macap); of = (optionfield64_t*)(cb +cblen); of->option_code = OPTIONCODE_RC; of->option_length = 8; of->option_value = rcrandom; +cblen += 12; cblen += addoption(cb +cblen, OPTIONCODE_ANONCE, 32, (char*)anonce); cblen += addoption(cb +cblen, OPTIONCODE_MACCLIENT, 6, (char*)macsta); cblen += addoption(cb +cblen, OPTIONCODE_SNONCE, 32, (char*)snonce); @@ -292,7 +292,7 @@ if(writeidb(fd, macorig, interfacestr) == false) return -1; } -if(writecb(fd, macorig, macap, rc, anonce, macsta, snonce, wclen, wc) == false) +if(writecb(fd, macap, rc, anonce, macsta, snonce, wclen, wc) == false) { return -1; }
pbio/drivebase: Fix angle definition. This makes the angle work like on EV3 tank blocks. This means that the angle defines how far the faster motor travels, while the other motor drives by an angle that is scaled down to match the given speed.
@@ -577,20 +577,16 @@ pbio_error_t pbio_spikebase_drive_angle(pbio_drivebase_t *db, int32_t speed_left // In the classic tank drive, we flip the left motor here instead of at the low level. speed_left *= -1; - // Get relative angle, signed by the direction in which we want to go. - int32_t angle_left = (abs(angle) * 2 * speed_left) / (abs(speed_left) + abs(speed_right)); - int32_t angle_right = (abs(angle) * 2 * speed_right) / (abs(speed_left) + abs(speed_right)); + // Work out angles for each motor. + int32_t max_speed = max(abs(speed_left), abs(speed_right)); + int32_t angle_left = angle * speed_left / max_speed; + int32_t angle_right = angle * speed_right / max_speed; // Work out the required total and difference angles to achieve this. int32_t sum = angle_left + angle_right; int32_t dif = angle_left - angle_right; int32_t rate = abs(speed_left) + abs(speed_right); - // If the angle was negative, we need to reverse the result. - if (angle < 0) { - rate *= -1; - } - // Execute the maneuver. return pbio_drivebase_drive_counts_relative(db, sum, rate, dif, rate, after_stop); }
hv: flush cache after update the trampoline code Trampoline code is updated as data when preparing the trampoline code and doing relocation. In this case, we need to flush cache to make sure the updated code is in RAM. Acked-by: Anthony Xu
@@ -157,6 +157,7 @@ void write_trampoline_sym(const void *sym, uint64_t val) hva = hpa2hva(trampoline_start16_paddr) + trampoline_relo_addr(sym); *hva = val; + clflush(hva); } static void update_trampoline_code_refs(uint64_t dest_pa) @@ -214,7 +215,7 @@ static void update_trampoline_code_refs(uint64_t dest_pa) uint64_t prepare_trampoline(void) { - uint64_t size, dest_pa; + uint64_t size, dest_pa, i; size = (uint64_t)(&ld_trampoline_end - &ld_trampoline_start); #ifndef CONFIG_EFI_STUB @@ -229,6 +230,11 @@ uint64_t prepare_trampoline(void) (void)memcpy_s(hpa2hva(dest_pa), (size_t)size, &ld_trampoline_load, (size_t)size); update_trampoline_code_refs(dest_pa); + + for (i = 0UL; i < size; i = i + CACHE_LINE_SIZE) { + clflush(hpa2hva(dest_pa + i)); + } + trampoline_start16_paddr = dest_pa; return dest_pa;
appveyor.yml: split {build,test}_scripts to avoid exit code masking. Last modification effectively masked test failures, so that builds were reported successful even if they failed.
@@ -39,26 +39,29 @@ before_build: } build_script: + - cd _build - ps: >- If ($env:Configuration -Match "shared" -or $env:EXTENDED_TESTS) { - cd _build cmd /c "nmake 2>&1" - cd .. } + - cd .. test_script: + - cd _build - ps: >- If ($env:Configuration -Match "shared" -or $env:EXTENDED_TESTS) { - cd _build if ($env:EXTENDED_TESTS) { cmd /c "nmake test V=1 2>&1" - mkdir ..\_install - cmd /c "nmake install install_docs DESTDIR=..\_install 2>&1" } Else { cmd /c "nmake test V=1 TESTS=-test_fuzz 2>&1" } - cd .. } + - ps: >- + if ($env:EXTENDED_TESTS) { + mkdir ..\_install + cmd /c "nmake install install_docs DESTDIR=..\_install 2>&1" + } + - cd .. notifications: - provider: Email
Minor improvements of doc for ca and x509 app
@@ -182,6 +182,12 @@ L<ps(1)> on Unix), this option should be used with caution. Better use B<-passin>. +=item B<-passin> I<arg> + +The key password source for key files and certificate PKCS#12 files. +For more information about the format of B<arg> +see L<openssl(1)/Pass Phrase Options>. + =item B<-selfsign> Indicates the issued certificates are to be signed with the key @@ -196,12 +202,6 @@ certificate appears among the entries in the certificate database serial number counter as all other certificates sign with the self-signed certificate. -=item B<-passin> I<arg> - -The password source for key files and certificate PKCS#12 files. -For more information about the format of B<arg> -see L<openssl(1)/Pass Phrase Options>. - =item B<-notext> Don't output the text form of a certificate to the output file.
moba/iter_l1.c: fix segfault using some T1 models
@@ -95,11 +95,16 @@ static void pos_value(iter_op_data* _data, float* dst, const float* src) { auto data = CAST_DOWN(T1inv_s, _data); + + // filter coils here, as we want to leave the coil sensitivity part untouched + long img_dims[DIMS]; + md_select_dims(DIMS, ~COIL_FLAG, img_dims, data->dims); + long strs[DIMS]; - md_calc_strides(DIMS, strs, data->dims, CFL_SIZE); + md_calc_strides(DIMS, strs, img_dims, CFL_SIZE); long dims1[DIMS]; - md_select_dims(DIMS, FFT_FLAGS, dims1, data->dims); + md_select_dims(DIMS, FFT_FLAGS, dims1, img_dims); long pos[DIMS] = { 0 }; @@ -113,7 +118,7 @@ static void pos_value(iter_op_data* _data, float* dst, const float* src) data->conf->lower_bound); } - } while(md_next(DIMS, data->dims, ~FFT_FLAGS, pos)); + } while(md_next(DIMS, img_dims, ~FFT_FLAGS, pos)); }
Add decision for version display
@@ -36,8 +36,17 @@ res = os.popen('git branch').read().strip() for line in res.split("\n"): if line[0] == '*': git_branch = line[1:].strip() -if git_branch == 'develop' or git_branch == 'origin/develop': + +# Decision for display version +try: + if git_branch.index('develop') >= 0: version = "latest-develop" +except Exception: + printf("Exception for index check") + +# For debugging purpose +print("GIT BRANCH: " + git_branch) +print("VERSION: " + version) # -- General configuration ---------------------------------------------------
test/README: clarify test number groups
@@ -19,15 +19,17 @@ digit number and {name} is a unique name of your choice. The number {nn} is (somewhat loosely) grouped as follows: -05 individual symmetric cipher algorithms -10 math (bignum) -15 individual asymmetric cipher algorithms -20 openssl commands (some otherwise not tested) -25 certificate forms, generation and verification -30 engine and evp +00-04 sanity, internal and essential API tests +05-09 individual symmetric cipher algorithms +10-14 math (bignum) +15-19 individual asymmetric cipher algorithms +20-24 openssl commands (some otherwise not tested) +25-29 certificate forms, generation and verification +30-35 engine and evp +60-79 APIs 70 PACKET layer -80 "larger" protocols (CA, CMS, OCSP, SSL, TSA) -90 misc +80-89 "larger" protocols (CA, CMS, OCSP, SSL, TSA) +90-99 misc A recipe that just runs a test executable
check only the critical attributes for eBPF maps
@@ -1645,6 +1645,16 @@ static int return_map_fd = -1; // for h2o_return int h2o_socket_ebpf_setup(void) { + const struct { + int type; + uint32_t key_size; + uint32_t value_size; + } map_attr = { + .type = BPF_MAP_TYPE_LRU_HASH, + .key_size = sizeof(pid_t), + .value_size = sizeof(uint64_t), + }; + int success = 0; int fd = -1; if (getuid() != 0) { @@ -1654,7 +1664,7 @@ int h2o_socket_ebpf_setup(void) if (!file_exist(H2O_EBPF_RETURN_MAP_PATH)) { // creates a map and pinns the map to BPF fs - fd = ebpf_map_create(BPF_MAP_TYPE_LRU_HASH, sizeof(pid_t), sizeof(uint64_t), H2O_EBPF_RETURN_MAP_SIZE, + fd = ebpf_map_create(map_attr.type, map_attr.key_size, map_attr.value_size, H2O_EBPF_RETURN_MAP_SIZE, H2O_EBPF_RETURN_MAP_NAME); if (fd < 0) { if (errno == EPERM) { @@ -1682,19 +1692,24 @@ int h2o_socket_ebpf_setup(void) h2o_perror("BPF_MAP_CREATE failed"); goto Exit; } - // make sure the map type and map name are as expected - struct bpf_map_info map_info; - if (ebpf_obj_get_info_by_fd(fd, &map_info) != 0) { + // make sure the critical attributes (type, key size, value size) are correct. + // otherwise usdt-selective-tracing does not work. + struct bpf_map_info m; + if (ebpf_obj_get_info_by_fd(fd, &m) != 0) { h2o_perror("BPF_OBJ_GET_INFO_BY_FD failed"); goto Exit; } - if (map_info.type != BPF_MAP_TYPE_LRU_HASH) { - h2o_error_printf("Unexpected map type: expected BPF_MAP_TYPE_LRU_HASH (%d) but got %d\n", BPF_MAP_TYPE_LRU_HASH, - map_info.type); + if (m.type != map_attr.type) { + h2o_error_printf("Unexpected map type: expected %d but got %d\n", map_attr.type, m.type); + goto Exit; + } + if (m.key_size != map_attr.key_size) { + h2o_error_printf("Unexpected map key size: expected %" PRIu32 " but got %" PRIu32 "\n", map_attr.key_size, m.key_size); goto Exit; } - if (!h2o_memis(map_info.name, strlen(map_info.name), H2O_EBPF_RETURN_MAP_NAME, strlen(H2O_EBPF_RETURN_MAP_NAME))) { - h2o_error_printf("Unexpected map name: expected %s but got %s\n", H2O_EBPF_RETURN_MAP_NAME, map_info.name); + if (m.key_size != map_attr.key_size) { + h2o_error_printf("Unexpected map value size: expected %" PRIu32 " but got %" PRIu32 "\n", map_attr.value_size, + m.key_size); goto Exit; } success = 1;
fix multi monitor
@@ -2541,7 +2541,7 @@ movemouse(const Arg *arg) } while (ev.type != ButtonRelease); bardragging = 0; - if (ev.xmotion.y_root < bh) { + if (ev.xmotion.y_root < selmon->my + bh) { if (!tagwidth) tagwidth = gettagwidth(); @@ -2595,7 +2595,7 @@ movemouse(const Arg *arg) c->snapstatus = 3; applysnap(c, c->mon); } else { - if (ev.xmotion.y_root < (2 * selmon->mh) / 3) + if (ev.xmotion.y_root < selmon->my + (2 * selmon->mh) / 3) moveright(arg); else tagtoright(arg); @@ -2621,7 +2621,7 @@ movemouse(const Arg *arg) c->snapstatus = 7; applysnap(c, c->mon); } else { - if (ev.xmotion.y_root < (2 * selmon->mh) / 3) + if (ev.xmotion.y_root < selmon->my + (2 * selmon->mh) / 3) moveleft(arg); else tagtoleft(arg);
Don't reset Sonoff presence Wait for IAS Zone status since the motion will always be reset after 60 seconds otherwise, regardless of actual motion.
@@ -3013,7 +3013,10 @@ void DeRestPluginPrivate::checkSensorStateTimerFired() { QDateTime now = QDateTime::currentDateTime(); - if (sensor->modelId() == QLatin1String("TY0202")) // Lidl/SILVERCREST motion sensor + + const std::array<QLatin1String, 5> iasZoneOffSensors = {QLatin1String("TY0202"), QLatin1String("MS01"), QLatin1String("MSO1"), QLatin1String("ms01") ,QLatin1String("66666")}; + const auto resetByIasZone = std::find(iasZoneOffSensors.cbegin(), iasZoneOffSensors.cend(), sensor->modelId()) != iasZoneOffSensors.cend(); + if (resetByIasZone) { continue; // will be only reset via IAS Zone status }
Plug memory leak in xmlwf's end of doctype declaration handler
@@ -369,8 +369,12 @@ endDoctypeDecl(void *userData) /* How many notations do we have? */ for (p = data->notationListHead; p != NULL; p = p->next) notationCount++; - if (notationCount == 0) - return; /* Nothing to report */ + if (notationCount == 0) { + /* Nothing to report */ + free((void *)data->currentDoctypeName); + data->currentDoctypeName = NULL; + return; + } notations = malloc(notationCount * sizeof(NotationList *)); if (notations == NULL) {
rpz-triggers, remove unused test.
@@ -131,18 +131,6 @@ SECTION ADDITIONAL ns1.ff. IN A 8.8.6.8 ENTRY_END -ENTRY_BEGIN -MATCH opcode subdomain -ADJUST copy_id copy_query -REPLY QR NOERROR -SECTION QUESTION -bar. IN A -SECTION AUTHORITY -bar. IN NS gotham.ff. -SECTION ADDITIONAL -gotham.ff. IN A 192.0.5.2 -ENTRY_END - RANGE_END ; com. ----------------------------------------------------------------------- @@ -415,23 +403,4 @@ SECTION ANSWER gotham.ff. IN A 127.0.0.1 ENTRY_END -; query with a referral that tries to get the -; just faked A record as nameserver glue (from cache). -STEP 50 QUERY -ENTRY_BEGIN -REPLY RD -SECTION QUESTION -gotham.bar. IN A -ENTRY_END - -STEP 51 CHECK_ANSWER -ENTRY_BEGIN -MATCH all -REPLY QR RD RA NOERROR -SECTION QUESTION -gotham.bar. IN A -SECTION ANSWER -gotham.bar. IN A 127.0.0.1 -ENTRY_END - SCENARIO_END
[chainmaker][#436]add tests test_03Contract_00012InvokeFailureResponseNull
@@ -304,6 +304,20 @@ START_TEST(test_03Contract_00011QueryFailureContractNoExist) } END_TEST +START_TEST(test_03Contract_00012InvokeFailureResponseNull) +{ + BOAT_RESULT result; + BoatHlchainmakerTx tx_ptr; + + + result = test_contrct_query_prepara(&tx_ptr); + ck_assert_int_eq(result, BOAT_SUCCESS); + + result = BoatHlchainmakerContractQuery(&tx_ptr, "save", "fact", NULL); + ck_assert(result == BOAT_ERROR_INVALID_ARGUMENT); +} +END_TEST + Suite *make_contract_suite(void) { @@ -328,6 +342,7 @@ Suite *make_contract_suite(void) tcase_add_test(tc_contract_api, test_03Contract_0009QueryFailureMethodNull); tcase_add_test(tc_contract_api, test_03Contract_00010QueryFailureContractNull); tcase_add_test(tc_contract_api, test_03Contract_00011QueryFailureContractNoExist); + tcase_add_test(tc_contract_api, test_03Contract_00012InvokeFailureResponseNull);
webrtc: Add OPTIONS handling for demo
@@ -248,6 +248,13 @@ static void http_req_handler(struct http_conn *conn, return; } } + else if (0 == pl_strcasecmp(&msg->met, "OPTIONS")) { + http_reply(conn, 204, "OK", + "Content-Length: 0\r\n" + "Access-Control-Allow-Origin: *\r\n" + "Access-Control-Allow-Headers: *\r\n" + "\r\n"); + } else { warning("demo: not found: %r %r\n", &msg->met, &msg->path); http_ereply(conn, 404, "Not Found");
fix the bug that ESP32 sends broadcast to phone after smartconfig done
@@ -85,7 +85,7 @@ static void sc_ack_send_task(void *pvParameters) bzero(&server_addr, sizeof(struct sockaddr_in)); server_addr.sin_family = AF_INET; - server_addr.sin_addr.s_addr = inet_addr((const char*)remote_ip); + memcpy(&server_addr.sin_addr.s_addr, remote_ip, sizeof(remote_ip)); server_addr.sin_port = htons(remote_port); esp_wifi_get_mac(WIFI_IF_STA, ack->ctx.mac);
pipe: return immediately from read_all/write_all on IO errors This adds missing return paths to these functions, so that they can exit immdeidately if any IO operation fails with -1. Without this, these function can enter into a bogus infnite loop, repeatedly adding -1 to the total byte count.
@@ -129,6 +129,7 @@ ssize_t flb_pipe_read_all(int fd, void *buf, size_t count) flb_time_msleep(50); continue; } + return -1; } else if (bytes == 0) { /* Broken pipe ? */ @@ -160,6 +161,7 @@ ssize_t flb_pipe_write_all(int fd, const void *buf, size_t count) flb_time_msleep(50); continue; } + return -1; } else if (bytes == 0) { /* Broken pipe ? */
min and max util
@@ -61,4 +61,20 @@ glm_pow2(float x) { return x * x; } +CGLM_INLINE +float +glm_min(float a, float b) { + if (a < b) + return a; + return b; +} + +CGLM_INLINE +float +glm_max(float a, float b) { + if (a < b) + return a; + return b; +} + #endif /* cglm_util_h */
dec_sse41: harmonize function suffixes
#include "src/dec/vp8i_dec.h" #include "src/utils/utils.h" -static void HE16(uint8_t* dst) { // horizontal +static void HE16_SSE41(uint8_t* dst) { // horizontal int j; const __m128i kShuffle3 = _mm_set1_epi8(3); for (j = 16; j > 0; --j) { @@ -36,7 +36,7 @@ static void HE16(uint8_t* dst) { // horizontal extern void VP8DspInitSSE41(void); WEBP_TSAN_IGNORE_FUNCTION void VP8DspInitSSE41(void) { - VP8PredLuma16[3] = HE16; + VP8PredLuma16[3] = HE16_SSE41; } #else // !WEBP_USE_SSE41
common/peripheral.c: Format with clang-format BRANCH=none TEST=none
@@ -30,7 +30,8 @@ static enum ec_status hc_locate_chip(struct host_cmd_handler_args *args) #endif /* CONFIG_CBI_EEPROM */ break; case EC_CHIP_TYPE_TCPC: -#if defined(CONFIG_USB_POWER_DELIVERY) && defined(CONFIG_USB_PD_PORT_MAX_COUNT) && !defined(CONFIG_USB_PD_TCPC) +#if defined(CONFIG_USB_POWER_DELIVERY) && \ + defined(CONFIG_USB_PD_PORT_MAX_COUNT) && !defined(CONFIG_USB_PD_TCPC) if (params->index >= board_get_usb_pd_port_count()) return EC_RES_OVERFLOW; resp->bus_type = tcpc_config[params->index].bus_type;
removed "AppScope - " from docs titles
@@ -8,7 +8,7 @@ export default function MarkDownBlock({ data }) { const post = data.markdownRemark; return ( <> - <Helmet title={"AppScope - " + post.frontmatter.title} /> + <Helmet title={post.frontmatter.title} /> <Layout> <div className="code-container"
Removed some unused flags from linux compiler
-SHELL = /bin/bash - # Generic makefile MARCH = -march=i686 -m32 -OPTDEFAULT = -fno-strict-aliasing -fno-omit-frame-pointer -ffast-math -fpermissive $(MARCH) -COPTDEFAULT = -fno-strict-aliasing -fno-omit-frame-pointer -ffast-math $(MARCH) -OPT = -Os $(OPTDEFAULT) -COPT = -Os $(COPTDEFAULT) -WARN = -Wall -Wno-unknown-pragmas -Wno-unused-but-set-variable -Wno-unused-result -Wno-maybe-uninitialized -Wno-switch -Wno-invalid-offsetof -CWARN = -Wall -Wno-unknown-pragmas -Wno-unused-but-set-variable -Wno-unused-result -Wno-maybe-uninitialized -Wno-switch -Wno-implicit-function-declaration +OPT = -Os -fno-strict-aliasing -fno-omit-frame-pointer -ffast-math $(MARCH) +COPT = -Os -fno-strict-aliasing -fno-omit-frame-pointer -ffast-math $(MARCH) -# DB includes + libs -DBINCLUDE = -L/usr/lib/mysql -DBLIBS = -lmysqlclient +WARN = -Wall -Wno-unknown-pragmas -Wno-unused-result -Wno-maybe-uninitialized -Wno-switch -Wno-invalid-offsetof +CWARN = -Wall -Wno-unknown-pragmas -Wno-unused-result -Wno-maybe-uninitialized -Wno-switch -Wno-implicit-function-declaration -# Linux -INCLUDE = $(DBINCLUDE) -LIBS = -dynamic -lpthread -lrt -ldl $(DBLIBS) +INCLUDE = -L/usr/lib/mysql +LIBS = -lmysqlclient -lpthread -ldl ifdef NIGHTLY NIGHTLYDEFS = -D_NIGHTLYBUILD # -DTHREAD_TRACK_CALLSTACK
Add PhGetApplicationDataFileName and PhGetApplicationDataDirectory
@@ -2988,14 +2988,20 @@ PPH_STRING PhGetApplicationDirectoryWin32( return directoryPath; } -PPH_STRING PhGetApplicationDirectoryFileNameWin32( - _In_ PPH_STRINGREF FileName +PPH_STRING PhGetApplicationDirectoryFileName( + _In_ PPH_STRINGREF FileName, + _In_ BOOLEAN NativeFileName ) { PPH_STRING applicationFileName = NULL; PPH_STRING applicationDirectory; - if (applicationDirectory = PhGetApplicationDirectoryWin32()) + if (NativeFileName) + applicationDirectory = PhGetApplicationDirectory(); + else + applicationDirectory = PhGetApplicationDirectoryWin32(); + + if (applicationDirectory) { applicationFileName = PhConcatStringRef2(&applicationDirectory->sr, FileName); PhReferenceObject(applicationDirectory); @@ -3038,6 +3044,70 @@ PPH_STRING PhGetTemporaryDirectoryRandomAlphaFileName( return randomAlphaFileName; } +PPH_STRING PhGetApplicationDataDirectory( + _In_ PPH_STRINGREF FileName + ) +{ + static PH_STRINGREF directoryPath = PH_STRINGREF_INIT(L"%APPDATA%\\SystemInformer\\"); + PPH_STRING applicationDataDirectory = NULL; + PPH_STRING applicationDirectory; + + if (applicationDirectory = PhExpandEnvironmentStrings(&directoryPath)) + { + applicationDataDirectory = PhConcatStringRef2(&applicationDirectory->sr, FileName); + PhReferenceObject(applicationDirectory); + } + + return applicationDataDirectory; +} + +PPH_STRING PhGetApplicationDataFileName( + _In_ PPH_STRINGREF FileName, + _In_ BOOLEAN NativeFileName + ) +{ + static PH_STRINGREF directoryPath = PH_STRINGREF_INIT(L"\\??\\%APPDATA%\\SystemInformer\\"); + static PH_STRINGREF directoryPathWin32 = PH_STRINGREF_INIT(L"%APPDATA%\\SystemInformer\\"); + PPH_STRING applicationDataFileName = NULL; + PPH_STRING applicationDirectory; + + // Check current directory. (dmex) + + if (applicationDataFileName = PhGetApplicationDirectoryFileName(FileName, NativeFileName)) + { + if (NativeFileName) + { + if (PhDoesFileExist(&applicationDataFileName->sr)) + return applicationDataFileName; + } + else + { + if (PhDoesFileExistWin32(PhGetString(applicationDataFileName))) + return applicationDataFileName; + } + + PhClearReference(&applicationDataFileName); + } + + // Check appdata directory. (dmex) + if (NativeFileName) + { + applicationDirectory = PhExpandEnvironmentStrings(&directoryPath); + } + else + { + applicationDirectory = PhExpandEnvironmentStrings(&directoryPathWin32); + } + + if (applicationDirectory) + { + applicationDataFileName = PhConcatStringRef2(&applicationDirectory->sr, FileName); + PhReferenceObject(applicationDirectory); + } + + return applicationDataFileName; +} + /** * Gets a known location as a file name. * @@ -7800,7 +7870,7 @@ NTSTATUS PhLoaderEntryLoadDll( 0, NULL, &imageBaseOffset, - ViewShare, + ViewUnmap, 0, PAGE_EXECUTE ); @@ -8306,7 +8376,7 @@ NTSTATUS PhLoadLibraryAsResource( 0, NULL, &imageBaseSize, - ViewShare, + ViewUnmap, WindowsVersion < WINDOWS_10_RS2 ? 0 : MEM_MAPPED, PAGE_READONLY );
Fix wine param not properly detecting proton experimental
@@ -628,7 +628,7 @@ void init_system_info(){ string preloader = wineProcess.substr(n + 1); if (preloader == "wine-preloader" || preloader == "wine64-preloader") { // Check if using Proton - if (wineProcess.find("/bin/wine") != std::string::npos) { + if (wineProcess.find("/dist/bin/wine") != std::string::npos || wineProcess.find("/files/bin/wine") != std::string::npos) { stringstream ss; ss << dirname((char*)wineProcess.c_str()) << "/../../version"; string protonVersion = ss.str();
override to disarmed after turtle event or when switching off turtle mode during a turtle event
@@ -47,6 +47,7 @@ int flipindex = 0; int flipdir = 0; extern profile_t profile; +extern int binding_while_armed; extern int onground; extern float GEstG[3]; extern float rx[]; @@ -90,6 +91,7 @@ void flip_sequencer() { flipstage = STAGE_FLIP_NONE; controls_override = 0; motortest_override = 0; + binding_while_armed = 1; //just in case absolutely require that the quad be disarmed return; //turtle mode off or flying away from a successful turtle will return here } // a disarmed quad with turtle mode on will continue past @@ -161,6 +163,7 @@ void flip_sequencer() { controls_override = 0; motortest_override = 0; pwmdir = FORWARD; + binding_while_armed = 1; break; } #endif
Convert bools to int before arithmetic
@@ -131,7 +131,7 @@ class BignumCmp(BignumOperation): def __init__(self, val_l, val_r): super().__init__(val_l, val_r) - self._result = (self.int_l > self.int_r) - (self.int_l < self.int_r) + self._result = int(self.int_l > self.int_r) - int(self.int_l < self.int_r) self.symbol = ["<", "==", ">"][self._result + 1] def result(self):
fix device-tester failure to start due to unity confingure
<v6Rtti>0</v6Rtti> <VariousControls> <MiscControls>--diag_suppress=550,177,C4017,111,2770,223</MiscControls> - <Define>MBEDTLS_USER_CONFIG_FILE=\"mbedtls_user_config.h\" RVDS_ARMCM4_NUC4xx __LITTLE_ENDIAN__ AMAZON_FREERTOS_ENABLE_UNIT_TESTS M487</Define> + <Define>MBEDTLS_USER_CONFIG_FILE=\"mbedtls_user_config.h\" UNITY_INCLUDE_CONFIG_H RVDS_ARMCM4_NUC4xx __LITTLE_ENDIAN__ AMAZON_FREERTOS_ENABLE_UNIT_TESTS M487</Define> <Undefine></Undefine> <IncludePath>..\..\..\..\lib\include;..\..\..\..\lib\include\private;..\..\..\..\lib\include\FreeRTOS_POSIX;..\..\..\..\lib\third_party\mcu_vendor\nuvoton\M480\Device\Nuvoton\M480\Include;..\..\..\..\lib\third_party\mcu_vendor\nuvoton\M480\StdDriver\inc;..\..\..\..\lib\third_party\mcu_vendor\nuvoton\M480\middleware\wifi_esp8266;..\..\..\..\tests\common\include;..\..\..\..\lib\FreeRTOS\portable\RVDS\ARM_CM4F;..\;..\..\..\..\lib\FreeRTOS-Plus-TCP\include;..\..\..\..\lib\FreeRTOS-Plus-TCP\source\protocols\include;..\..\..\..\lib\FreeRTOS-Plus-TCP\source\portable\NetworkInterface\M487;..\..\..\..\lib\FreeRTOS-Plus-TCP\source\portable\Compiler\Keil;..\..\..\..\lib\third_party\mcu_vendor\nuvoton\M480\CMSIS\Include;..\common\config_files;..\..\..\..\lib\third_party\mbedtls\include;..\..\..\..\lib\third_party\mbedtls\\library;..\..\..\common\include;..\..\..\..\lib\third_party\jsmn;..\..\..\..\lib\third_party\unity\src;..\..\..\..\lib\third_party\unity\extras\fixture\src;..\..\..\..\lib\third_party\pkcs11;..\..\..\..\lib\FreeRTOS-Plus-POSIX\include;..\..\..\..\lib\FreeRTOS-Plus-POSIX\include\portable\nuvoton\m480;..\common\application_code\nuvoton_code</IncludePath> </VariousControls>
lv_label: remove old test code
@@ -514,15 +514,7 @@ static bool lv_label_design(lv_obj_t * label, const area_t * mask, lv_design_mod if(ext->recolor != 0) flag |= TXT_FLAG_RECOLOR; if(ext->expand != 0) flag |= TXT_FLAG_EXPAND; - if(strcmp("Folder1", ext->txt) == 0) { - uint8_t i; - i = 0; - i++; - } - lv_draw_label(&cords, mask, style, ext->txt, flag, &ext->offset); - - } return true; }
contributing: add hoon style guide link
@@ -142,9 +142,11 @@ compound statement. One thing to watch out for is top-level sections in source files that are denoted by comments and are actually indented one level. -Hoon will be a less familiar language to many contributors. Until we publish -an 'official' style guide, the best advice is again to mimic the code around -you. In general: the more recent the code, the more standard the style. +Hoon will be a less familiar language to many contributors. We've published +some [style guidelines for Hoon][hoon], but above all you should try to mimic +the style of the code around you. With regards to the style used throughout +the codebase: the more recently the code was written, the more standard and +accepted its style is likely to be. ## Kernel development @@ -241,3 +243,4 @@ Questions or other communications about contributing to Urbit can go to [repo]: https://github.com/urbit/urbit [reba]: https://www.atlassian.com/git/tutorials/merging-vs-rebasing [issu]: https://github.com/urbit/urbit/issues +[hoon]: https://urbit.org/docs/learn/hoon/style/
Fix the OCSP responder mode Broken by commit Fixes
@@ -551,7 +551,7 @@ int ocsp_main(int argc, char **argv) } if (ridx_filename != NULL - && (rkey != NULL || rsigner != NULL || rca_cert != NULL)) { + && (rkey == NULL || rsigner == NULL || rca_cert == NULL)) { BIO_printf(bio_err, "Responder mode requires certificate, key, and CA.\n"); goto end;
Disable CRT __delayLoadHelper2 workaround
@@ -6753,10 +6753,10 @@ PVOID PhGetDllBaseProcedureAddressWithHint( PIMAGE_EXPORT_DIRECTORY exportDirectory; // This is a workaround for the CRT __delayLoadHelper2. - if (PhEqualBytesZ(ProcedureName, "GetProcAddress", FALSE)) - { - return PhGetDllBaseProcAddress; - } + //if (PhEqualBytesZ(ProcedureName, "GetProcAddress", FALSE)) + //{ + // return PhGetDllBaseProcAddress; + //} if (!NT_SUCCESS(PhGetLoaderEntryImageNtHeaders(BaseAddress, &imageNtHeader))) return NULL;
docs: fix typo in esp_http_client_init return type
@@ -6,7 +6,7 @@ Overview ``esp_http_client`` provides an API for making HTTP/S requests from ESP-IDF applications. The steps to use this API are as follows: - * :cpp:func:`esp_http_client_init`: Creates an :cpp:type:`esp_http_client_config_t` instance i.e. a HTTP client handle based on the given :cpp:type:`esp_http_client_config_t` configuration. This function must be the first to be called; default values will be assumed for the configuration values that are not explicitly defined by the user. + * :cpp:func:`esp_http_client_init`: Creates an :cpp:type:`esp_http_client_handle_t` instance i.e. a HTTP client handle based on the given :cpp:type:`esp_http_client_config_t` configuration. This function must be the first to be called; default values will be assumed for the configuration values that are not explicitly defined by the user. * :cpp:func:`esp_http_client_perform`: Performs all operations of the esp_http_client - opening the connection, exchanging data and closing the connection (as required), while blocking the current task until its completion. All related events will be invoked through the event handler (as specified in :cpp:type:`esp_http_client_config_t`). * :cpp:func:`esp_http_client_cleanup`: Closes the connection (if any) and frees up all the memory allocated to the HTTP client instance. This must be the last function to be called after the completion of operations.
Fix complete version numbers (though I can't really figure out where else they are used).
* versions below. VERSION = string formatting, VERNUM = numbered * version for inline testing: increment both or none at all.*/ #define RUBY_LIBXML_VERSION "3.2.3-dev" -#define RUBY_LIBXML_VERNUM 321 +#define RUBY_LIBXML_VERNUM 323 #define RUBY_LIBXML_VER_MAJ 3 #define RUBY_LIBXML_VER_MIN 2 -#define RUBY_LIBXML_VER_MIC 2 +#define RUBY_LIBXML_VER_MIC 3 #define RUBY_LIBXML_VER_PATCH 0
Remove obsolete limit/mark comment
@@ -74,18 +74,14 @@ const ( // pointer retreats, undoing a read or write, it cannot retreat past io0_etc. // // At the start of a function, these pointers are initialized from an -// io_buffer's fields (ptr, ri, wi, len), or possibly a limit field. For an -// io_reader: +// io_buffer's fields (ptr, ri, wi, len). For an io_reader: // - io0_etc = ptr + ri // - iop_etc = ptr + ri -// - io1_etc = ptr + wi or limit +// - io1_etc = ptr + wi // and for an io_writer: // - io0_etc = ptr + wi // - iop_etc = ptr + wi -// - io1_etc = ptr + len or limit -// -// TODO: discuss marks and limits, and how (if at all) auxilliary pointers can -// change over a function's lifetime. +// - io1_etc = ptr + len const ( io0Prefix = "io0_" // Lower bound. io1Prefix = "io1_" // Upper bound.
build: do lustre available check only if --enable-lustre is set
@@ -7,18 +7,20 @@ AC_DEFUN([X_AC_LUSTRE], [ [], [enable_lustre="no"]) AC_MSG_RESULT([$enable_lustre]) + if [[ "x$enable_lustre" == xyes ]]; then AC_MSG_CHECKING([for Lustre]) AS_IF([test -e "/usr/include/lustre/lustre_user.h" && test -e "/usr/include/lustre/lustreapi.h"], - [enable_lustre="yes"], - [enable_lustre="no"]) - AC_MSG_RESULT([$enable_lustre]) + [lustre_available="yes"], + [lustre_available="no"]) + AC_MSG_RESULT([$lustre_available]) # AC_SEARCH_LIBS([llapi_file_create], [lustreapi], [], [ # AC_MSG_ERROR([couldn't find liblustreapi])], []) - AS_IF([test "x$enable_lustre" = xyes], [ + AS_IF([test "x$lustre_available" = xyes], [ AC_DEFINE(LUSTRE_SUPPORT, 1, [enable Lustre support]) LUSTRE_LIBS="-llustreapi" AC_SUBST(LUSTRE_LIBS) ]) + fi ])
Renaming to AFR_METADATA_MODE
@@ -326,9 +326,11 @@ set(output_file "$<TARGET_FILE_DIR:${exe_target}>/${exe_target}.hex") # Locate microchip hexmate. set(MCHP_HEXMATE_PATH "" CACHE STRING "Path to microchip hexmate, usually this should be mplab's path") find_program(hexmate_path hexmate PATHS ${MCHP_HEXMATE_PATH} PATH_SUFFIXES bin) +if (NOT AFR_METADATA_MODE) if(NOT hexmate_path) message(FATAL_ERROR "Cannot find microchip's hexmate tool.") endif() +endif() # These locations have to be generalized through the toolchain # We may have to re-build the bootloader hex file?
Move set version outside of _generate_doxyfile as they keeps changing Generate doxyfile in project root
@@ -30,7 +30,7 @@ import("private.action.require.impl.install_packages") function _generate_doxyfile() -- generate the default doxyfile - local doxyfile = path.join(os.tmpdir(), "doxyfile") + local doxyfile = path.join(project.directory(), "doxyfile") os.vrunv(doxygen.program, {"-g", doxyfile}) -- enable recursive @@ -58,15 +58,6 @@ function _generate_doxyfile() os.mkdir(outputdir) end - -- set the project version - -- - -- PROJECT_NUMBER = - -- - local version = project.version() - if version then - io.gsub(doxyfile, "PROJECT_NUMBER%s-=.-\n", format("PROJECT_NUMBER = %s\n", version)) - end - -- set the project name -- -- PROJECT_NAME = @@ -111,6 +102,15 @@ function main() end assert(os.isfile(doxyfile), "%s not found!", doxyfile) + -- set the project version + -- + -- PROJECT_NUMBER = + -- + local version = project.version() + if version then + io.gsub(doxyfile, "PROJECT_NUMBER%s-=.-\n", format("PROJECT_NUMBER = %s\n", version)) + end + -- generate document cprint("generating ..${beer}") os.vrunv(doxygen.program, {doxyfile}, {curdir = project.directory()})
Remove trailing whitespace and fix answer file. TINC isolation parser fails to deal with lines that have trailing whitespace after ";".
@@ -17,8 +17,13 @@ COMMIT ALTER 2: COMMIT; COMMIT -3: Insert into reindex_crtabforadd_part_ao_btree values(9,'2013-05-22',14.22); 3: select count(*) from reindex_crtabforadd_part_ao_btree where id = 29; +3: Insert into reindex_crtabforadd_part_ao_btree values(9,'2013-05-22',14.22); INSERT 1 +3: select count(*) from reindex_crtabforadd_part_ao_btree where id = 29; +count +----- +4 +(1 row) 3: set enable_seqscan=false; SET 3: set enable_indexscan=true; @@ -32,10 +37,10 @@ count 3: select c_relname, 1 as different_relfilenode from before_reindex_crtabforadd_part_ao_btree b where exists (select oid, gp_segment_id, relfilenode from gp_dist_random('pg_class') where relname like 'idx_reindex_crtabforadd_part_ao_btree%' and b.c_oid = oid and b.c_gp_segment_id = gp_segment_id and b.c_relfilenode != relfilenode) group by b.c_oid, b.c_relname; c_relname |different_relfilenode -------------------------------------------------------+--------------------- -idx_reindex_crtabforadd_part_ao_btree_1_prt_sales_jul13|1 +idx_reindex_crtabforadd_part_ao_btree_1_prt_sales_aug13|1 idx_reindex_crtabforadd_part_ao_btree |1 +idx_reindex_crtabforadd_part_ao_btree_1_prt_sales_jul13|1 idx_reindex_crtabforadd_part_ao_btree_1_prt_sales_sep13|1 -idx_reindex_crtabforadd_part_ao_btree_1_prt_sales_aug13|1 (4 rows) 3: select 1 AS oid_same_on_all_segs_partition_new_data from gp_dist_random('pg_class') WHERE relname = 'reindex_crtabforadd_part_ao_btree_1_prt_p1' GROUP BY oid having count(*) = (SELECT count(*) FROM gp_segment_configuration WHERE role='p' AND content > -1);
nimble/gap: Increase GAP update timeout We want to make it longer just to make sure that peer device has time to reply (LL_RESPONSE_TIMEOUT is 40 sec)
*/ #define BLE_GAP_CANCEL_RETRY_TIMEOUT_MS 100 /* ms */ -#define BLE_GAP_UPDATE_TIMEOUT_MS 30000 /* ms */ +#define BLE_GAP_UPDATE_TIMEOUT_MS 40000 /* ms */ static const struct ble_gap_conn_params ble_gap_conn_params_dflt = { .scan_itvl = 0x0010,
change creation TTbbLocalExecutor by using GetCachedLocalExecutor
@@ -4239,7 +4239,7 @@ cdef class _PoolBase: feature matrix : np.ndarray of shape (object_count, feature_count) """ cdef int thread_count = UpdateThreadCount(-1) - cdef THolder[TTbbLocalExecutor] local_executor = MakeHolder[TTbbLocalExecutor](thread_count) + cdef TAtomicSharedPtr[TTbbLocalExecutor] local_executor = GetCachedLocalExecutor(thread_count) cdef TFeaturesLayout* features_layout =self.__pool.Get()[0].MetaInfo.FeaturesLayout.Get() cdef TRawObjectsDataProvider* raw_objects_data_provider = dynamic_cast_to_TRawObjectsDataProvider( self.__pool.Get()[0].ObjectsData.Get() @@ -5621,7 +5621,7 @@ cdef class _StagedPredictIterator: cdef TVector[TVector[double]] __approx cdef TVector[TVector[double]] __pred cdef TFullModel* __model - cdef THolder[TTbbLocalExecutor] __executor + cdef TAtomicSharedPtr[TTbbLocalExecutor] __executor cdef TModelCalcerOnPool* __modelCalcerOnPool cdef EPredictionType predictionType cdef int ntree_start, ntree_end, eval_period, thread_count @@ -5634,7 +5634,7 @@ cdef class _StagedPredictIterator: self.eval_period = eval_period self.thread_count = UpdateThreadCount(thread_count) self.verbose = verbose - self.__executor = MakeHolder[TTbbLocalExecutor](thread_count) + self.__executor = GetCachedLocalExecutor(thread_count) cdef _initialize_model_calcer(self, TFullModel* model, _PoolBase pool): self.__model = model
Fix format specifier from 'unsigned long long' to the argument type 'unsigned long'
@@ -274,7 +274,7 @@ print_csv_summary (FILE * fp) { fprintf (fp, fmt, i++, GENER_ID, (intmax_t) get_log_sizes (), OVERALL_LOGSIZE); /* bandwidth */ - fmt = "\"%d\",,\"%s\",,,,,,,,\"%llu\",\"%s\"\r\n"; + fmt = "\"%d\",,\"%s\",,,,,,,,\"%lu\",\"%s\"\r\n"; fprintf (fp, fmt, i++, GENER_ID, ht_sum_bw (), OVERALL_BANDWIDTH); /* log path */
acl-plugin: move the acl epoch calculation into inline function
@@ -66,6 +66,18 @@ typedef enum /* *INDENT-ON* */ +always_inline u16 +get_current_policy_epoch (acl_main_t * am, int is_input, u32 sw_if_index0) +{ + u32 **p_epoch_vec = + is_input ? &am->input_policy_epoch_by_sw_if_index : + &am->output_policy_epoch_by_sw_if_index; + u16 current_policy_epoch = + sw_if_index0 < vec_len (*p_epoch_vec) ? vec_elt (*p_epoch_vec, + sw_if_index0) + : (is_input * FA_POLICY_EPOCH_IS_INPUT); + return current_policy_epoch; +} always_inline uword acl_fa_node_fn (vlib_main_t * vm, @@ -124,14 +136,10 @@ acl_fa_node_fn (vlib_main_t * vm, else lc_index0 = am->output_lc_index_by_sw_if_index[sw_if_index0]; - - u32 **p_epoch_vec = - is_input ? &am->input_policy_epoch_by_sw_if_index : - &am->output_policy_epoch_by_sw_if_index; u16 current_policy_epoch = - sw_if_index0 < vec_len (*p_epoch_vec) ? vec_elt (*p_epoch_vec, - sw_if_index0) - : (is_input * FA_POLICY_EPOCH_IS_INPUT); + get_current_policy_epoch (am, is_input, sw_if_index0); + + /* * Extract the L3/L4 matching info into a 5-tuple structure. */