message
stringlengths
6
474
diff
stringlengths
8
5.22k
BugID:18314846: Add armlibc/sys to include path
@@ -14,7 +14,7 @@ endif else $(NAME)_SOURCES := compilers/armlibc/armcc_libc.c endif -GLOBAL_INCLUDES += compilers/armlibc +GLOBAL_INCLUDES += compilers/armlibc compilers/armlibc/sys else ifeq ($(COMPILER),rvct) $(NAME)_SOURCES := compilers/armlibc/armcc_libc.c GLOBAL_INCLUDES += compilers/armlibc \
nimble/host: Fix checking dst_len in adv_set_fields This function assumes that dst_len is always a valid pointer.
@@ -237,9 +237,8 @@ adv_set_fields(const struct ble_hs_adv_fields *adv_fields, int8_t tx_pwr_lvl; int rc; - if (dst_len) { + BLE_HS_DBG_ASSERT(dst_len); *dst_len = 0; - } /*** 0x01 - Flags. */ /* The application has two options concerning the flags field:
filter_grep: adjust record accessor api usage
@@ -149,7 +149,7 @@ static inline int grep_filter_data(msgpack_object map, struct grep_ctx *ctx) mk_list_foreach(head, &ctx->rules) { rule = mk_list_entry(head, struct grep_rule, _head); - ret = flb_ra_regex_match(rule->ra, map, rule->regex); + ret = flb_ra_regex_match(rule->ra, map, rule->regex, NULL); if (ret <= 0) { /* no match */ if (rule->type == GREP_REGEX) { return GREP_RET_EXCLUDE;
Prototyping for select model support functions.
@@ -2818,10 +2818,16 @@ int check_blocking_pain(entity *ent, s_collision_attack *attack); void set_blocking_action(entity *ent, entity *other, s_collision_attack *attack); void set_blocking_animation(entity *ent, s_collision_attack *attack); -// Select player model & colors +// Select player models. int find_selectable_model_count (); int is_model_cache_index_selectable (int cache_index); int is_model_selectable (s_model *model); +s_model *nextplayermodel (s_model *current); +s_model *nextplayermodeln (s_model *current, int player_index); +s_model *prevplayermodel (s_model *current); +s_model *prevplayermodeln (s_model *current, int player_index); + +// Select player maps (colors). int is_map_hidden (s_model *model, int map_index); int nextcolourmap (s_model *model, int map_index); int nextcolourmapn (s_model *model, int map_index, int player_index);
Forget to drop input_data
@@ -289,6 +289,7 @@ def _fix_user_data(orig_cmd, shell, user_input, user_output, strategy): dst.update(srcs) # Drop data marked by user with None destination + input_data = {k: v for k, v in input_data.iteritems() if v} output_data = {k: v for k, v in output_data.iteritems() if v} return subprocess.list2cmdline(cmd) if shell else cmd, input_data, output_data
Do not use the new TLS code for non-threaded builds even if USE_TLS is set Workaround for as that exposed a problem in the new code (which was intended to speed up multithreaded code only anyway).
@@ -73,7 +73,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "common.h" -#if defined(USE_TLS) +#if defined(USE_TLS) && defined(SMP) #define COMPILE_TLS #if defined(__GLIBC_PREREQ) #if !__GLIBC_PREREQ(2,20)
fix error code on mprotect failure
@@ -651,6 +651,7 @@ static bool mi_os_commitx(void* addr, size_t size, bool commit, bool conservativ // WebAssembly guests can't control memory protection #else err = mprotect(start, csize, (commit ? (PROT_READ | PROT_WRITE) : PROT_NONE)); + if (err != 0) { err = errno; } #endif if (err != 0) { _mi_warning_message("commit/decommit error: start: 0x%p, csize: 0x%x, err: %i\n", start, csize, err); @@ -687,7 +688,7 @@ static bool mi_os_resetx(void* addr, size_t size, bool reset, mi_stats_t* stats) if (!reset) return true; // nothing to do on unreset! #if (MI_DEBUG>1) - if (!mi_option_is_enabled(mi_option_secure)) { + if (MI_SECURE==0) { memset(start, 0, csize); // pretend it is eagerly reset } #endif @@ -767,6 +768,7 @@ static bool mi_os_protectx(void* addr, size_t size, bool protect) { err = 0; #else err = mprotect(start, csize, protect ? PROT_NONE : (PROT_READ | PROT_WRITE)); + if (err != 0) { err = errno; } #endif if (err != 0) { _mi_warning_message("mprotect error: start: 0x%p, csize: 0x%x, err: %i\n", start, csize, err);
Added server side port block in accept().
@@ -569,7 +569,7 @@ getProtocol(int type, char *proto, size_t len) } static int -doBlockConnection(int fd, const struct sockaddr *addr, socklen_t addrlen) +doBlockConnection(int fd, const struct sockaddr *addr) { in_port_t port; @@ -4478,6 +4478,13 @@ accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen) WRAP_CHECK(accept, -1); sd = g_fn.accept(sockfd, addr, addrlen); + + if ((sd != -1) && (doBlockConnection(sockfd, addr) == 1)) { + if (g_fn.close) g_fn.close(sd); + errno = ECONNABORTED; + return -1; + } + if (sd != -1) { doAccept(sd, addr, addrlen, "accept"); } else { @@ -4509,11 +4516,6 @@ bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen) int rc; WRAP_CHECK(bind, -1); - if (doBlockConnection(sockfd, addr, addrlen) == 1) { - errno = EBADF; - return -1; - } - rc = g_fn.bind(sockfd, addr, addrlen); if (rc != -1) { doSetConnection(sockfd, addr, addrlen, LOCAL); @@ -4531,7 +4533,7 @@ connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen) { int rc; WRAP_CHECK(connect, -1); - if (doBlockConnection(sockfd, addr, addrlen) == 1) { + if (doBlockConnection(sockfd, addr) == 1) { errno = ECONNREFUSED; return -1; }
Add check on zero returned by EVP_CIPHER_CTX_ctrl.
@@ -150,7 +150,7 @@ static int s2n_composite_cipher_aes_sha_initial_hmac(struct s2n_session_key *key */ int ctrl_ret = EVP_CIPHER_CTX_ctrl(key->evp_cipher_ctx, EVP_CTRL_AEAD_TLS1_AAD, S2N_TLS12_AAD_LEN, ctrl_buf); - S2N_ERROR_IF(ctrl_ret < 0, S2N_ERR_INITIAL_HMAC); + S2N_ERROR_IF(ctrl_ret <= 0, S2N_ERR_INITIAL_HMAC); *extra = ctrl_ret; return 0;
integration: Add test for profile.
@@ -258,6 +258,25 @@ func TestProcessCollector(t *testing.T) { runCommands(commands, t) } +func TestProfile(t *testing.T) { + commands := []*command{ + { + name: "Run test pod", + cmd: busyboxPodCommand("while true; do echo foo > /dev/null; done"), + expectedRegexp: "pod/test-pod created", + }, + waitUntilTestPodReady, + { + name: "Run profile gadget", + cmd: "$KUBECTL_GADGET profile -n test-ns -p test-pod -K & sleep 15; kill $!", + expectedRegexp: `sh;\w+;\w+;\w+open`, // echo is builtin. + }, + deleteTestPod, + } + + runCommands(commands, t) +} + func TestSocketCollector(t *testing.T) { if *githubCI { t.Skip("Cannot run socket-collector within GitHub CI.")
update ya tool arc restore algorithm
}, "arc": { "formula": { - "sandbox_id": [357846697], + "sandbox_id": [358313625], "match": "arc" }, "executable": {
Add missing prototype wsmc_set_selectors_from_uri
@@ -752,6 +752,8 @@ typedef enum { void wsmc_clear_action_option(client_opt_t * options, unsigned long); + void wsmc_set_selectors_from_uri(const char *resource_uri, + client_opt_t * options); void wsmc_set_options_from_uri(const char *resource_uri, client_opt_t * options);
Added center() function to blit::Rect
@@ -118,8 +118,13 @@ namespace blit { return Point(x + w, y + h); } + Point center() const { + return Point(x + w/2, y + h/2); + } + }; inline Rect operator* (Rect lhs, const float a) { lhs *= a; return lhs; } } +
VERSION bump to version 1.3.13
@@ -27,7 +27,7 @@ endif() # micro version is changed with a set of small changes or bugfixes anywhere in the project. set(SYSREPO_MAJOR_VERSION 1) set(SYSREPO_MINOR_VERSION 3) -set(SYSREPO_MICRO_VERSION 12) +set(SYSREPO_MICRO_VERSION 13) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
Make test dependent on num devices
@@ -16,6 +16,11 @@ int check_res(double * v, int n) { } int main() { + int max_devs = omp_get_num_devices(); + + // not enough devices for testing? + if (max_devs < 2) return 0; + int devnums = 3; int devids[] = {0,1, omp_get_initial_device()}; int n = N;
build: adapt build.bat to work in EWDK environment EWDK environment works with msbuild.
@@ -37,10 +37,6 @@ set BUILD_SPEC= set BUILD_ARCH= set BUILD_FAILED= -set VSFLAVOR=Professional -if exist "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.com" set VSFLAVOR=Community -echo USING !VSFLAVOR! Visual Studio - rem Parse arguments :argloop shift /2 @@ -166,14 +162,13 @@ if %BUILD_ARCH%==amd64 set BUILD_ARCH=x64 set TARGET_VS_CONFIG="%TARGET_PROJ_CONFIG% %BUILD_FLAVOR%|%BUILD_ARCH%" pushd %BUILD_DIR% -call "%~dp0\SetVsEnv.bat" x86 if /I "!TAG!"=="SDV" ( echo Running SDV for %BUILD_FILE%, configuration %TARGET_VS_CONFIG% call :runsdv "%TARGET_PROJ_CONFIG% %BUILD_FLAVOR%" %BUILD_ARCH% ) else ( echo Building %BUILD_FILE%, configuration %TARGET_VS_CONFIG%, command %BUILD_COMMAND% - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\!VSFLAVOR!\Common7\IDE\devenv.com" %BUILD_FILE% %BUILD_COMMAND% %TARGET_VS_CONFIG% /Out %BUILD_LOG_FILE% + call :runbuild "%TARGET_PROJ_CONFIG% %BUILD_FLAVOR%" %BUILD_ARCH% ) popd endlocal @@ -183,6 +178,16 @@ IF ERRORLEVEL 1 ( ) goto :eof +:runbuild: +:: %1 - configuration (as "Win10 Release") +:: %2 - platform (as x64) +:: %3 - build command (as "/Build") +set __TARGET__=%BUILD_COMMAND:/=% +::(n)ormal(d)etailed,(disg)nostic +set __VERBOSITY__=n +msbuild.exe %BUILD_FILE% /t:%__TARGET__% /p:Configuration="%~1" /P:Platform=%2 -fileLoggerParameters:Verbosity=%__VERBOSITY__%;LogFile=%BUILD_LOG_FILE% +goto :eof + :configure_sdv echo Set SDV mode to LEGACY set SDVLEGACY=1 @@ -196,7 +201,6 @@ goto :eof :runsdv call :configure_sdv %BUILD_FILE% -call "%~dp0\SetVsEnv.bat" x64 msbuild.exe %BUILD_FILE% /t:clean /p:Configuration="%~1" /P:Platform=%2 IF ERRORLEVEL 1 (
client session BUGFIX missing config header
* * This source is compiled only with libssh. * - * Copyright (c) 2015 CESNET, z.s.p.o. + * Copyright (c) 2015 - 2021 CESNET, z.s.p.o. * * This source code is licensed under BSD 3-Clause License (the "License"). * You may not use this file except in compliance with the License. #ifdef ENABLE_DNSSEC # include <validator/resolver.h> # include <validator/validator.h> +# include <validator/validator-config.h> + # include <validator/validator-compat.h> #endif
Add Copyright notice to run_kwstyle.sh
#! /bin/bash +# Copyright 2016 Amazon.com, Inc. or its affiliates. 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. +# A copy of the License is located at +# +# http://aws.amazon.com/apache2.0 +# +# or in the "license" file accompanying this file. This file is distributed +# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either +# express or implied. See the License for the specific language governing +# permissions and limitations under the License. +# S2N_FILES=`find $PWD -type f -name "s2n_*.[ch]" | grep -v "test"`
oc_pstat: fix bug in oc_pstat_handle_state()
@@ -124,7 +124,7 @@ oc_pstat_handle_state(oc_sec_pstat_t *ps, int device) ps->tm = 2; pstat->om = 3; ps->sm = 4; - memset(pstat[device].rowneruuid.id, 0, 16); + memset(ps->rowneruuid.id, 0, 16); oc_core_regen_unique_ids(device); oc_sec_doxm_default(device); oc_sec_cred_default(device);
pbio/int_math: Fix assert for large product. Now it matches the limits in the docstring.
@@ -266,7 +266,7 @@ int32_t pbio_int_math_mult_then_div(int32_t a, int32_t b, int32_t c) { // Get long product. uint64_t x = (uint64_t)(a < 0 ? -a : a) * (uint64_t)(b < 0 ? -b : b); - assert(x < ((int64_t)1) << 48); + assert(x < ((int64_t)1) << 47); assert(c != 0); uint32_t div = (c < 0 ? -c : c);
OcTimerLib: TimerResolution was undefined for AMD CPU case Is '10' the right value for AMD case?
@@ -49,13 +49,12 @@ RecalculateTSC ( EFI_TPL PrevTpl; TimerAddr = 0; + TimerResolution = 10; // // Intel timer support. // if (PciRead16 (PCI_ICH_LPC_ADDRESS (0)) == CPUID_VENDOR_INTEL) { - TimerResolution = 10; - // // Check if ACPI I/O Space Is Enabled On LPC device. //
Add missing ConnectIcon
@@ -403,6 +403,25 @@ export const VariableIcon = () => ( </svg> ); +interface ConnectIconProps { + connected: boolean; +} + +export const ConnectIcon = ({ connected }: ConnectIconProps) => ( + <svg width="24" height="24" viewBox="0 0 24 24"> + <ellipse + ry="10" + id="svg_1" + cy="12" + cx="12" + strokeWidth="3" + stroke="#ccc" + fill="transparent" + /> + <circle cx="12" cy="12" r={connected ? 6 : 2} /> + </svg> +); + export const CheckIcon = () => ( <svg width="24" height="24" viewBox="0 0 24 24"> <path d="M20.285 2l-11.285 11.567-5.286-5.011-3.714 3.716 9 8.728 15-15.285z" />
tests/basics/class_super.py: Add tests for store/delete of super attr.
@@ -34,3 +34,14 @@ class B(A): print(super().bar) # accessing attribute after super() return super().foo().count(2) # calling a subsequent method print(B().foo()) + +# store/delete of super attribute not allowed +assert hasattr(super(B, B()), 'foo') +try: + super(B, B()).foo = 1 +except AttributeError: + print('AttributeError') +try: + del super(B, B()).foo +except AttributeError: + print('AttributeError')
Makefile.include: added support for Makefile in MODULES
@@ -152,6 +152,8 @@ ifdef MODULES UNIQUEMODULES = $(call uniq,$(MODULES)) MODULEDIRS = ${wildcard ${addprefix $(CONTIKI)/, $(UNIQUEMODULES)}} MODULES_SOURCES = ${foreach d, $(MODULEDIRS), ${subst ${d}/,,${wildcard $(d)/*.c}}} + MODULES_INCLUDES = ${wildcard ${foreach d, $(MODULEDIRS), $(d)/Makefile.${notdir $(d)}}} + -include $(MODULE_INCLUDES) CONTIKI_SOURCEFILES += $(MODULES_SOURCES) APPDS += $(MODULEDIRS) endif
Rust: Rename get_size and get_cursor
@@ -125,7 +125,7 @@ impl KeySet { } /// Return the number of keys that ks contains. - pub fn get_size(&self) -> usize { + pub fn size(&self) -> usize { unsafe { elektra_sys::ksGetSize(self.as_ref()).try_into().unwrap() } } @@ -172,7 +172,7 @@ impl KeySet { } /// Get the KeySet internal cursor. - pub fn get_cursor(&self) -> Cursor { + pub fn cursor(&self) -> Cursor { unsafe { elektra_sys::ksGetCursor(self.as_ref()) } } @@ -278,7 +278,7 @@ fn next<T: ReadableKey>( if key_ptr.is_null() { (None, None) } else { - let new_cursor = Some(keyset.get_cursor()); + let new_cursor = Some(keyset.cursor()); (new_cursor, Some(unsafe { T::from_ptr(key_ptr) })) } } @@ -405,7 +405,7 @@ mod tests { } assert!(did_iterate); // Check that the iterator did not consume the keyset - assert_eq!(ks.get_size(), 3); + assert_eq!(ks.size(), 3); Ok(()) } @@ -434,7 +434,7 @@ mod tests { // Test append ks.append(&ks2); - assert_eq!(ks.get_size(), 2); + assert_eq!(ks.size(), 2); assert_eq!(ks.tail().unwrap().name(), "user/test/key"); assert_eq!(ks.tail().unwrap().value(), ""); @@ -443,7 +443,7 @@ mod tests { ks2.rewind(); ksext.extend(ks2.iter_mut()); - assert_eq!(ksext.get_size(), 2); + assert_eq!(ksext.size(), 2); assert_eq!(ksext.tail().unwrap().name(), "user/test/key"); assert_eq!(ksext.tail().unwrap().value(), ""); } @@ -454,7 +454,7 @@ mod tests { let lookup_key = StringKey::new("/test/key").unwrap(); let ret_val = ks.lookup(lookup_key, LookupOption::KDB_O_NONE); assert_eq!(ret_val.unwrap().name(), "user/test/key"); - assert_eq!(ks.get_size(), 2); + assert_eq!(ks.size(), 2); assert_eq!(ks.tail().unwrap().name(), "user/test/key"); } @@ -464,7 +464,7 @@ mod tests { let lookup_key = StringKey::new("/test/key").unwrap(); let key = ks.lookup(lookup_key, LookupOption::KDB_O_DEL); assert_eq!(key.unwrap().name(), "user/test/key"); - assert_eq!(ks.get_size(), 2); + assert_eq!(ks.size(), 2); assert_eq!(ks.head().unwrap().name(), "system/test/key"); } @@ -480,7 +480,7 @@ mod tests { .lookup_by_name("/test/key", LookupOption::KDB_O_DEL)? .unwrap() .duplicate(); - assert_eq!(ks.get_size(), 2); + assert_eq!(ks.size(), 2); assert_eq!(ks.head().unwrap().name(), "system/test/key"); } assert_eq!(key.name(), "user/test/key");
v2.0.41 landed
-ejdb2 (2.0.41) UNRELEASED; urgency=medium +ejdb2 (2.0.41) testing; urgency=medium * Fixed race condition on database open on slow devices - -- Anton Adamansky <[email protected]> Tue, 18 Feb 2020 18:30:56 +0700 + -- Anton Adamansky <[email protected]> Tue, 18 Feb 2020 18:55:57 +0700 ejdb2 (2.0.40) testing; urgency=medium
Parser: Don't try to print frame 0 (whoops).
@@ -4528,7 +4528,7 @@ static void build_error(lily_parse_state *parser) if (parser->vm->include_last_frame_in_trace == 0) frame = frame->prev; - while (frame->function) { + while (frame->prev) { lily_function_val *func = frame->function; const char *class_name = func->class_name; const char *func_name = func->trace_name;
fixed bug in john skipped hashes counter
@@ -1068,12 +1068,12 @@ while(1) eapa = (eapauth_t*)hcptr->eapol; if(eapa->type != EAPOL_KEY) { - hccapcapskipped++; + johnskipped++; continue; } if(hcptr->eapol_size != ntohs(eapa->len) +4) { - hccapcapskipped++; + johnskipped++; continue; } @@ -1081,18 +1081,18 @@ while(1) keyver = ntohs(wpak->keyinfo) & WPA_KEY_INFO_TYPE_MASK; if(keyver != hcptr->keyver) { - hccapcapskipped++; + johnskipped++; continue; } if(keyver > 3) { - hccapcapskipped++; + johnskipped++; continue; } keyinfo = (getkeyinfo(ntohs(wpak->keyinfo))); if(keyinfo == 3) { - hccapcapskipped++; + johnskipped++; continue; } rc = wpak->replaycount;
remove NvmDimmDriverBindingStart error checking WA
@@ -106,11 +106,7 @@ NVM_API int nvm_init() if(!g_fast_path) { - if (EFI_SUCCESS != NvmDimmDriverDriverBindingStart(&gNvmDimmDriverDriverBinding, FakeBindHandle, NULL)) - { - NVDIMM_ERR("Nvm Dimm driver binding start failed.\n"); - return NVM_ERR_UNKNOWN; - } + NvmDimmDriverDriverBindingStart(&gNvmDimmDriverDriverBinding, FakeBindHandle, NULL); } g_nvm_initialized = 1; return rc;
neon/cvt: fix a couple of s390x implementations' NaN handling The s390x functions return *_MAX not 0 on NaN. Luckily the fix is easy and should perform well.
@@ -353,8 +353,10 @@ simde_int64x2_t simde_vcvtq_s64_f64(simde_float64x2_t a) { #if defined(SIMDE_ARM_NEON_A64V8_NATIVE) return vcvtq_s64_f64(a); - #elif defined(SIMDE_ZARCH_ZVECTOR_13_NATIVE) + #elif defined(SIMDE_ZARCH_ZVECTOR_13_NATIVE) && defined(SIMDE_FAST_NANS) return vec_signed(a); + #elif defined(SIMDE_ZARCH_ZVECTOR_13_NATIVE) + return (a == a) & vec_signed(a); #else simde_float64x2_private a_ = simde_float64x2_to_private(a); simde_int64x2_private r_; @@ -383,8 +385,10 @@ simde_uint64x2_t simde_vcvtq_u64_f64(simde_float64x2_t a) { #if defined(SIMDE_ARM_NEON_A64V8_NATIVE) && !defined(SIMDE_BUG_CLANG_46844) return vcvtq_u64_f64(a); + #elif defined(SIMDE_ZARCH_ZVECTOR_13_NATIVE) && defined(SIMDE_FAST_NANS) + return vec_unsigned(a); #elif defined(SIMDE_ZARCH_ZVECTOR_13_NATIVE) - return vec_ctul(a, 0); + return HEDLEY_REINTERPRET_CAST(simde_uint64x2_t, (a == a)) & vec_unsigned(a); #else simde_float64x2_private a_ = simde_float64x2_to_private(a); simde_uint64x2_private r_;
pnmdec,PAM: validate depth before calculating bytes_per_px fixes potential integer overflow with corrupt files.
@@ -117,8 +117,13 @@ static size_t ReadPAMFields(PNMInfo* const info, size_t off) { } } if (!(info->seen_flags & TUPLE_FLAG)) { + if (info->depth > 0 && info->depth <= 4) { info->seen_flags |= TUPLE_FLAG; info->bytes_per_px = info->depth * (info->max_value > 255 ? 2 : 1); + } else { + fprintf(stderr, "PAM: invalid bitdepth (%d).\n", info->depth); + return 0; + } } if (info->seen_flags != ALL_NEEDED_FLAGS) { fprintf(stderr, "PAM: incomplete header.\n");
Load cached sensor state buttonevent from db
@@ -526,11 +526,6 @@ void Sensor::jsonToState(const QString &json) ResourceItem *item = itemForIndex(i); const ResourceItemDescriptor &rid = item->descriptor(); - if (item->descriptor().suffix == RStateButtonEvent) - { // set only from live data - continue; - } - if (strncmp(rid.suffix, "state/", 6) == 0) { const char *key = item->descriptor().suffix + 6;
Added Nextron Systems to the list we use YARA a lot ... created a rule base of over 9000 rules in 6 years
@@ -89,6 +89,7 @@ awesome list of [YARA-related stuff](https://github.com/InQuest/awesome-yara). * [McAfee Advanced Threat Defense](http://mcafee.com/atd) * [Metaflows](http://www.metaflows.com) * [NBS System](https://www.nbs-system.com/) +* [Nextron Systems](https://www.nextron-systems.com) * [Nozomi Networks](http://www.nozominetworks.com) * [osquery](http://www.osquery.io) * [Payload Security](https://www.payload-security.com)
Dockerfile: update some Python deps Protobuf linting somehow broken (run `./scripts/lint-python`). We take the opportunity to update mypy and all Python linting tools.
@@ -84,11 +84,11 @@ RUN rm /tmp/requirements.txt # Python modules for CI RUN python3 -m pip install --upgrade \ - pylint==2.11.1 \ + pylint==2.13.9 \ pylint-protobuf==0.20.2 \ - black==21.11b1 \ - mypy==0.910 \ - mypy-protobuf==3.0.0 + black==22.3.0 \ + mypy==0.960 \ + mypy-protobuf==3.2.0 # Python modules for packaging RUN python3 -m pip install --upgrade \
out_logdna: register upstream with instance
@@ -324,6 +324,7 @@ static struct flb_logdna *logdna_config_create(struct flb_output_instance *ins, return NULL; } ctx->u = upstream; + flb_output_upstream_set(ctx->u, ins); /* Set networking defaults */ flb_output_net_default(FLB_LOGDNA_HOST, atoi(FLB_LOGDNA_PORT), ins);
Python 3.5 was updated
@@ -37,10 +37,10 @@ if [ "${CB_BUILD_AGENT}" == 'python34-linux-x86_64-release' ]; then fi if [ "${CB_BUILD_AGENT}" == 'python35-linux-x86_64-release' ]; then - ln -s /home/travis/virtualenv/python3.5.4/bin/python-config /home/travis/virtualenv/python3.5.4/bin/python3-config; + ln -s /home/travis/virtualenv/python3.5.5/bin/python-config /home/travis/virtualenv/python3.5.5/bin/python3-config; install_cuda_linux; cd catboost/python-package; - python3 ./mk_wheel.py --no-emit-status -T -j 1 -DCUDA_ROOT=/usr/local/cuda-8.0 -DPYTHON_CONFIG=/home/travis/virtualenv/python3.5.4/bin/python3-config; + python3 ./mk_wheel.py --no-emit-status -T -j 1 -DCUDA_ROOT=/usr/local/cuda-8.0 -DPYTHON_CONFIG=/home/travis/virtualenv/python3.5.5/bin/python3-config; python ../../ci/webdav_upload.py *.whl fi
Fix device reset after build updates when using custom services
@@ -1110,6 +1110,18 @@ VOID PhInitializeKph( PPH_STRING kphSigFileName = NULL; PPH_STRING kphServiceName = NULL; + if (!(kphDirectory = PhGetApplicationDirectory())) + return; + + kphServiceName = PhGetStringSetting(L"KphServiceName"); + + if (kphServiceName && PhIsNullOrEmptyString(kphServiceName)) + PhClearReference(&kphServiceName); + + kphFileName = PhConcatStringRefZ(&kphDirectory->sr, L"kprocesshacker.sys"); + kphSigFileName = PhConcatStringRefZ(&kphDirectory->sr, L"processhacker.sig"); + + // Reset KPH after a Windows build update. (dmex) { ULONG latestBuildNumber = PhGetIntegerSetting(L"KphBuildNumber"); @@ -1121,8 +1133,7 @@ VOID PhInitializeKph( { if (latestBuildNumber != PhOsVersion.dwBuildNumber) { - // Reset KPH after a Windows build update. (dmex) - if (NT_SUCCESS(KphResetParameters(KPH_DEVICE_SHORT_NAME))) + if (NT_SUCCESS(KphResetParameters(PhGetStringOrDefault(kphServiceName, KPH_DEVICE_SHORT_NAME)))) { PhSetIntegerSetting(L"KphBuildNumber", PhOsVersion.dwBuildNumber); } @@ -1130,17 +1141,6 @@ VOID PhInitializeKph( } } - if (!(kphDirectory = PhGetApplicationDirectory())) - return; - - kphServiceName = PhGetStringSetting(L"KphServiceName"); - - if (kphServiceName && PhIsNullOrEmptyString(kphServiceName)) - PhClearReference(&kphServiceName); - - kphFileName = PhConcatStringRefZ(&kphDirectory->sr, L"kprocesshacker.sys"); - kphSigFileName = PhConcatStringRefZ(&kphDirectory->sr, L"processhacker.sig"); - if (PhDoesFileExistsWin32(kphFileName->Buffer)) { KPH_PARAMETERS parameters;
fec/autotest: removing exit() call from golay2412 autotest
/* - * Copyright (c) 2007 - 2015 Joseph Gaeddert + * Copyright (c) 2007 - 2020 Joseph Gaeddert * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal unsigned int golay2412_generate_error_vector(unsigned int _n) { if (_n > 24) { - fprintf(stderr,"error: golay2412_generate_error_vector(), cannot generate more than 24 errors\n"); - exit(1); + liquid_error(LIQUID_EINT,"golay2412_generate_error_vector(), cannot generate more than 24 errors"); + return 0; } unsigned int i;
remove undesirable parenthesis from output
@@ -271,17 +271,17 @@ ShowErrorCommand( if (pCommandStatus->GeneralStatus != NVM_SUCCESS) { ReturnCode = MatchCliReturnCode(pCommandStatus->GeneralStatus); } - Print(L"Failed to get error logs from DIMM (" FORMAT_STR L")\n", DimmStr); + Print(L"Failed to get error logs from DIMM " FORMAT_STR L"\n", DimmStr); continue; } if (ReturnedCount == 0) { - Print(L"No errors found on DIMM (" FORMAT_STR L")\n", DimmStr); + Print(L"No errors found on DIMM " FORMAT_STR L"\n", DimmStr); } else { for (Index2 = 0; Index2 < ReturnedCount; Index2++) { pErrorType = (ErrorsArray[Index2].ErrorType == THERMAL_ERROR ? ERROR_THERMAL_OCCURRED_STR : ERROR_MEDIA_OCCURRED_STR); - Print(FORMAT_STR_SPACE L"on DIMM (" FORMAT_STR L"):\n", pErrorType, DimmStr); + Print(FORMAT_STR_SPACE L"on DIMM " FORMAT_STR L":\n", pErrorType, DimmStr); pTempStr = GetTimeFormatString(ErrorsArray[Index2].SystemTimestamp); Print(FORMAT_16STR L" : " FORMAT_STR_NL, ERROR_SYSTEM_TIMESTAMP_STR, pTempStr); FREE_POOL_SAFE(pTempStr);
Comment node loader parts to allow it to compile.
@@ -359,14 +359,18 @@ void node_loader_impl_async_discover(uv_async_t * async) assert(status == napi_ok); /* Create node function */ + /* loader_impl_node_function node_func = malloc(sizeof(struct loader_impl_py_function_type)); + */ /* TODO: Check if function_ptr has to be persistent */ + /* node_func->func = function_ptr; node_func->node_impl = async_data->node_impl; function f = function_create(function_name_str, (size_t)function_signature_length, node_func, &function_node_singleton); + */ /* TODO */ /*
Fixed for loop range in eptest code
TEST(OCEndpoints, StringToEndpoint) { - const char *spu[10] = { "coaps://10.211.55.3:56789/a/light", + const char *spu[4] = { "coaps://10.211.55.3:56789/a/light", "coap://openconnectivity.org", "coap://openconnectivity.org/alpha", "coaps://openconnectivity.org:3456/alpha" }; - for (int i = 0; i < 10; i++) { + for (int i = 0; i < 4; i++) { oc_string_t s; oc_new_string(&s, spu[i], strlen(spu[i])); oc_endpoint_t ep; @@ -81,7 +81,7 @@ TEST(OCEndpoints, StringToEndpoint) "coap+tcp://[ff02::158]", "coaps+tcp://[ff02::158]/a/light", "coaps+tcp://[fe80::12]:2439/a/light" }; - for (int i = 0; i < 10; i++) { + for (int i = 0; i < 6; i++) { oc_string_t s; oc_new_string(&s, spu2[i], strlen(spu2[i])); oc_endpoint_t ep;
examples/chrono: fix typo in log message
@@ -157,7 +157,7 @@ static int chrono_daemon(int argc, char *argv[]) if (ret < 0) { int errcode = errno; - printf("chrono_daemon: ERROR: ioctl(BTNIOC_SUPPORTED) failed: %d\n", + printf("chrono_daemon: ERROR: ioctl(BTNIOC_REGISTER) failed: %d\n", errcode); goto errout_with_fd; }
[control] use simulation to access timestep
@@ -44,7 +44,7 @@ void PID::initialize(const Model& m) _u.reset(new SiconosVector(1, 0)); Actuator::initialize(m); - _curDeltaT = m.simulation()->eventsManager()->timeDiscretisation()->currentTimeStep(0); + _curDeltaT = m.simulation()->currentTimeStep(); // initialize _err _err.reset(new boost::circular_buffer<double> (3));
cleanup tabs and spaces
@@ -296,7 +296,6 @@ int config_parse_conf(struct config *cfg, const struct conf *conf) if (!conf_get(conf, "sip_trans_def", &tr)) cfg->sip.transp = sip_transp_decode(&tr); - /* Call */ (void)conf_get_u32(conf, "call_local_timeout", &cfg->call.local_timeout); @@ -577,7 +576,6 @@ static const char *default_avcodec_hwaccel(void) #else return "none"; #endif - } @@ -875,7 +873,6 @@ int config_write_template(const char *file, const struct config *cfg) (void)re_fprintf(f, "#module\t\t\t" "aufile" MOD_EXT "\n"); (void)re_fprintf(f, "#module\t\t\t" "ausine" MOD_EXT "\n"); - (void)re_fprintf(f, "\n# Video codec Modules (in order)\n"); (void)re_fprintf(f, "#module\t\t\t" "avcodec" MOD_EXT "\n"); (void)re_fprintf(f, "#module\t\t\t" "vp8" MOD_EXT "\n"); @@ -1074,6 +1071,7 @@ int config_write_template(const char *file, const struct config *cfg) "#httpreq_hostname\tmyserver\n" "#httpreq_cert\t\tcert.pem\n" "#httpreq_key\t\tkey.pem\n"); + (void)re_fprintf(f, "\n# multicast receivers (in priority order)" "- port number must be even\n"
[core] config_vars_init() separate func to init config var.CWD and var.PID using stack for getcwd() result
@@ -2167,10 +2167,18 @@ static void context_free(config_t *context) { buffer_free(context->basedir); } +__attribute_noinline__ +static void config_vars_init (array *a) { + char dcwd[PATH_MAX]; + if (NULL != getcwd(dcwd, sizeof(dcwd))) + array_set_key_value(a, CONST_STR_LEN("var.CWD"), dcwd, strlen(dcwd)); + + *array_get_int_ptr(a, CONST_STR_LEN("var.PID")) = getpid(); +} + int config_read(server *srv, const char *fn) { config_t context; data_config *dc; - buffer *dcwd; int ret; char *pos; @@ -2188,22 +2196,13 @@ int config_read(server *srv, const char *fn) { dc = data_config_init(); buffer_copy_string_len(&dc->key, CONST_STR_LEN("global")); + config_vars_init(dc->value); /* default context */ force_assert(context.all_configs->used == 0); dc->context_ndx = context.all_configs->used; array_insert_unique(context.all_configs, (data_unset *)dc); context.current = dc; - /* default context */ - *array_get_int_ptr(dc->value, CONST_STR_LEN("var.PID")) = getpid(); - - dcwd = srv->tmp_buf; - buffer_string_prepare_copy(dcwd, PATH_MAX-1); - if (NULL != getcwd(dcwd->ptr, buffer_string_space(dcwd)+1)) { - buffer_commit(dcwd, strlen(dcwd->ptr)); - array_set_key_value(dc->value, CONST_STR_LEN("var.CWD"), CONST_BUF_LEN(dcwd)); - } - ret = config_parse_file_stream(srv, &context, fn); /* remains nothing if parser is ok */
Fix Integration CI Task
@@ -116,6 +116,7 @@ stages: runCodesignValidationInjection: false steps: - checkout: self + persistCredentials: true - task: PowerShell@2 displayName: Integrate Branch inputs:
Yan LR: Add example showing error output to ReadMe
@@ -100,6 +100,35 @@ kdb rm -r user/tests/yanlr sudo kdb umount user/tests/yanlr ``` +### Error Messages + +```sh +# Mount plugin +sudo kdb mount config.yaml user/tests/yanlr yanlr + +# Manually add syntactically incorrect data +printf -- 'key: - element 1\n' > `kdb file user/tests/yanlr` +printf -- '- element 2 # Incorrect Indentation!' >> `kdb file user/tests/yanlr` + +# The plugin reports the location of the error +kdb ls user/tests/yanlr +# RET: 5 +# STDERR-REGEX: Reason: .*/config.yaml:2:18: extraneous input 'BLOCK END' expecting {STREAM_END, COMMENT} + +# Fix syntax error +printf -- 'key: - element 1\n' > `kdb file user/tests/yanlr` +printf -- ' - element 2 # Fixed!' >> `kdb file user/tests/yanlr` + +kdb ls user/tests/yanlr +#> user/tests/yanlr/key +#> user/tests/yanlr/key/#0 +#> user/tests/yanlr/key/#1 + +# Undo modifications +kdb rm -r user/tests/yanlr +sudo kdb umount user/tests/yanlr +``` + ## Limitations - The plugin does **not support**
esp32/modnetwork: Allow to get ESSID of AP that STA is connected to. Following the same addition to esp8266 port.
@@ -509,8 +509,11 @@ STATIC mp_obj_t esp_config(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs return mp_obj_new_bytes(mac, sizeof(mac)); } case QS(MP_QSTR_essid): - req_if = WIFI_IF_AP; + if (self->if_id == WIFI_IF_STA) { + val = mp_obj_new_str((char*)cfg.sta.ssid, strlen((char*)cfg.sta.ssid)); + } else { val = mp_obj_new_str((char*)cfg.ap.ssid, cfg.ap.ssid_len); + } break; case QS(MP_QSTR_hidden): req_if = WIFI_IF_AP;
Remove session from cache before clearing it.
@@ -398,8 +398,12 @@ apr_byte_t oidc_session_free(request_rec *r, oidc_session_t *z) { * terminate a session */ apr_byte_t oidc_session_kill(request_rec *r, oidc_session_t *z) { - oidc_session_free(r, z); - return oidc_session_save(r, z, FALSE); + if (z->state) { + json_decref(z->state); + z->state = NULL; + } + oidc_session_save(r, z, FALSE); + return oidc_session_free(r, z); } /*
Set default USDT argument parser This sets the default USDT argument parser for all the architectures that currently do not implement one to the parser for x86_64. This is to avoid a compilation error about the architecture being not supported yet.
@@ -34,10 +34,8 @@ namespace USDT { Location::Location(uint64_t addr, const char *arg_fmt) : address_(addr) { #ifdef __powerpc64__ ArgumentParser_powerpc64 parser(arg_fmt); -#elif defined(__x86_64__) - ArgumentParser_x64 parser(arg_fmt); #else -#error "bcc does not support this platform yet" + ArgumentParser_x64 parser(arg_fmt); #endif while (!parser.done()) { Argument arg;
Silly allignment tweaks in lexer_spec.lua
@@ -196,7 +196,7 @@ describe("Titan lexer", function() assert_lex('"A\\u{64}B"', {"STRING"}, {"AdB"}) end) - it("errors out on invalid excape sequences (instead of backtracking)", function() + it("errors out on invalid escape sequences (instead of backtracking)", function() assert_error([["\o"]], "InvalidEscape") assert_error([["\x"]], "MalformedEscape_x") assert_error([["\xa"]], "MalformedEscape_x")
Change to use CMSIS_DAP for flash driver
<Cpu>IROM(0x10000000,0x00200000) IRAM(0x20000000,0x00040000) IRAM2(0x00100000,0x00010000) CPUTYPE(&quot;Cortex-M4&quot;) FPU2 CLOCK(12000000) ELITTLE</Cpu> <FlashUtilSpec/> <StartupFile/> - <FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF07687_32M_MXIC -FS010000000 -FL0200000 -FP0($$Device:MT7687F$tools\keil\mt7687\7687_32M_MXIC.FLM))</FlashDriverDll> + <FlashDriverDll>CMSIS_DAP(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF07687_32M_MXIC -FS010000000 -FL0200000 -FP0($$Device:MT7687F$tools\keil\mt7687\7687_32M_MXIC.FLM))</FlashDriverDll> <DeviceId>0</DeviceId> <RegisterFile>$$Device:MT7687F$driver\CMSIS\Device\MTK\mt7687\Include\mt7687.h</RegisterFile> <MemoryEnv/> <DriverSelection>4096</DriverSelection> </Flash1> <bUseTDR>1</bUseTDR> - <Flash2>BIN\UL2CM3.DLL</Flash2> + <Flash2>BIN\CMSIS_DAP.DLL</Flash2> <Flash3>&quot;&quot; ()</Flash3> <Flash4>.\flash_e3.ini</Flash4> <pFcarmOut/>
minor changes to the new Nodes doc
@@ -255,7 +255,7 @@ That brings us to the output attributes. All of the output attributes are parent <tr> <td>.........outputPartExtraAttributes(Multi)</td> <td></td> - <td></td> + <td>includes attributes with information about how to reconstruct\n maya mesh material assignment and other mesh properties\n as well as purely user-defined attributes from the asset</td> </tr> <tr> <td>............outputPartExtraAttributeName</td> @@ -305,7 +305,7 @@ That brings us to the output attributes. All of the output attributes are parent <tr> <td>outputMaterials(Multi)</td> <td></td> - <td></td> + <td>new materials exported from the asset</td> </tr> <tr> <td>...outputMaterialPath</td>
docs: edits for nagios section
-\Nagios{} is an open source infrastructure monitoring package that monitors -servers, switches, applications, and services and offers user-defined +\Nagios{} is an open source infrastructure network monitoring package designed +to watch servers, switches, and various services and offers user-defined alerting facilities for monitoring various aspects of an HPC cluster. The core \Nagios{} daemon and a variety of monitoring plugins -are provided by the underlying distro and the following commands can +are provided by the underlying OS distro and the following commands can be used to install and configure a \Nagios{} server on the {\em master} node, and add the facility to run tests and gather metrics from provisioned {\em compute} nodes. This simple configuration @@ -11,7 +11,7 @@ compute host group and enabling an ssh check for the computes. Users are encouraged to consult \Nagios{} \href{https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/}{\color{blue} documentation} for more information and can install additional plugins -as desired on on login nodes, service nodes, or compute hosts. +as desired on login nodes, service nodes, or compute hosts. % begin_ohpc_run % ohpc_command if [[ ${enable_nagios} -eq 1 ]];then @@ -21,7 +21,7 @@ as desired on on login nodes, service nodes, or compute hosts. # Install nagios, nrep, and all available plugins on master host [sms](*\#*) (*\install*) nagios nrpe nagios-plugins-* -# Install nrpe and two additional plugins into compute node image +# Install nrpe and an example plugin into compute node image [sms](*\#*) (*\chrootinstall*) nrpe nagios-plugins-ssh # Enable and configure Nagios NRPE daemon in compute image @@ -31,7 +31,7 @@ as desired on on login nodes, service nodes, or compute hosts. [sms](*\#*) echo "nrpe : ALL : DENY" >> $CHROOT/etc/hosts.allow # Copy example Nagios config file to define a compute group and ssh check -# (edit as desired to add all desired compute hosts) +# (note: edit as desired to add all desired compute hosts) [sms](*\#*) cp /opt/ohpc/pub/examples/compute.cfg /etc/nagios/objects # Register the config file with nagios [sms](*\#*) echo "cfg_file=/etc/nagios/objects/compute.cfg" >> /etc/nagios/nagios.cfg @@ -43,8 +43,7 @@ as desired on on login nodes, service nodes, or compute hosts. [sms](*\#*) perl -pi -e "s/nagios\@localhost/root\@${sms_name}/" /etc/nagios/objects/contacts.cfg # Add check_ssh command for remote hosts -[sms](*\#*) echo command[check_ssh]=/usr/lib64/nagios/plugins/check_ssh localhost \ - >> $CHROOT/etc/nagios/nrpe.cfg +[sms](*\#*) echo command[check_ssh]=/usr/lib64/nagios/plugins/check_ssh localhost $CHROOT/etc/nagios/nrpe.cfg # define password for nagiosadmin to be able to connect to web interface [sms](*\#*) htpasswd -bc /etc/nagios/passwd nagiosadmin ${nagios_web_password} @@ -52,7 +51,7 @@ as desired on on login nodes, service nodes, or compute hosts. # Enable Nagios on master, and configure [sms](*\#*) systemctl enable nagios [sms](*\#*) systemctl start nagios -# Update perms on ping command to allow nagios user to execute +# Update permissions on ping command to allow nagios user to execute [sms](*\#*) chmod u+s `which ping` \end{lstlisting} % ohpc_indent 0
solisten: fix address endianness
@@ -108,7 +108,6 @@ int kprobe__inet_listen(struct pt_regs *ctx, struct socket *sock, int backlog) // Get IP if (family == AF_INET) { evt.laddr[0] = inet->inet_rcv_saddr; - evt.laddr[0] = be32_to_cpu(evt.laddr[0]); } else if (family == AF_INET6) { bpf_probe_read(evt.laddr, sizeof(evt.laddr), sk->__sk_common.skc_v6_rcv_saddr.in6_u.u6_addr32);
Skip tests using KTLS RX if KTLS RX is not supported. This skips tests using KTLS RX when run on systems that only support KTLS TX.
@@ -1203,6 +1203,11 @@ static int test_ktls(int test) sis_ktls_tx = (test & 4) != 0; sis_ktls_rx = (test & 8) != 0; +#if defined(OPENSSL_NO_KTLS_RX) + if (cis_ktls_rx || sis_ktls_rx) + return 1; +#endif + testresult = 1; #ifdef OPENSSL_KTLS_AES_GCM_128 testresult &= execute_test_ktls(cis_ktls_tx, cis_ktls_rx, sis_ktls_tx,
Removed glew fix
@@ -172,11 +172,6 @@ jobs: CXX: ${{ matrix.cxx-compiler }} CC: ${{ matrix.cc-compiler }} steps: - # TODO: Remove this workaround following resolution of: - # https://github.com/AcademySoftwareFoundation/aswf-docker/issues/43 - - name: Setup container - run: sudo rm -rf /usr/local/lib64/cmake/glew - if: matrix.vfx-cy == 2020 - name: Checkout uses: actions/checkout@v2 - name: Create build directories
SR: Add info about multiline command support
@@ -127,7 +127,32 @@ The Shell Recorder provides the following checks ## Commands -A command starts with `<` followed by kdb or shell commands. +A command starts with `<` followed by `kdb` or shell commands. + +### Multiline Commands + +The Shell Recorder supports multiline commands. Just add an additional line, a `<` characters and continue with your command. For +example, the following text specifies a multiline command spanning over three lines: + +``` +> cat <<EOF +> The Raging Sun +> EOF +``` + +. To separate commands either add a check (such as `RET:`) or at least one empty line. For example, the following text specifies three +commands, the last of them being a multiline command: + +``` +> echo 'I Knew' +STDOUT: You +> echo 'You' + +> echo 'Were' +> echo 'Trouble' +``` + +. ## Examples @@ -144,10 +169,15 @@ mountpoint and a list of commands: Mountpoint: /user/test/ls < kdb set user/test/ls/level1 'one' + < kdb ls user/test/ls + < kdb set user/test/ls/level1/level2 'two' + < kdb set user/test/ls/the 'roots' + < kdb ls user/test/ls + < kdb set user/test/ls/the/next/level ```
initialize spi at beginning of radio_init function.
@@ -81,6 +81,8 @@ void radio_init(void) { //power it on and configure pins radio_powerOn(); + spi_init(); + // clear variables memset(&radio_vars,0,sizeof(radio_vars_t)); @@ -180,7 +182,7 @@ void radio_rfOff(void) { at86rf215_spiStrobe(CMD_RF_TRXOFF); // wiggle debug pin debugpins_radio_clr(); - leds_debug_off(); + leds_radio_off(); // change state radio_vars.state = RADIOSTATE_RFOFF; @@ -208,7 +210,7 @@ void radio_txEnable(void) { at86rf215_spiStrobe(CMD_RF_TXPREP); // wiggle debug pin debugpins_radio_set(); - leds_debug_on(); + leds_radio_on(); } void radio_txNow(void) { @@ -241,7 +243,7 @@ void radio_rxEnable(void) { radio_vars.state = RADIOSTATE_ENABLING_RX; // wiggle debug pin debugpins_radio_set(); - leds_debug_on(); + leds_radio_on(); at86rf215_spiStrobe(CMD_RF_RX); // change state
test: update beegfs test names for rm_commands
@@ -20,17 +20,17 @@ fi check_rms -@test "[BeeGFS] beegfs-df - $BEEGFS_TEST_PATH ($RESOURCE_MANAGER)" { +@test "[BeeGFS] beegfs-df - $BEEGFS_TEST_PATH (compute node)" { run ssh c1 /usr/bin/beegfs-df $BEEGFS_TEST_PATH assert_success } -@test "[BeeGFS] beegfs-ctl --getentryinfo - $BEEGFS_TEST_PATH ($RESOURCE_MANAGER)" { +@test "[BeeGFS] beegfs-ctl --getentryinfo - $BEEGFS_TEST_PATH (compute node)" { run ssh c1 beegfs-ctl --getentryinfo $BEEGFS_TEST_PATH assert_success } -@test "[BeeGFS] set target count=2 test - $BEEGFS_TEST_PATH ($RESOURCE_MANAGER)" { +@test "[BeeGFS] set target count=2 test - $BEEGFS_TEST_PATH (compute node)" { local testdir="tempdir-$RANDOM" run ssh c1 mkdir $BEEGFS_TEST_PATH/$testdir
GLib: Disable binding if `BUILD_SHARED` is off
@@ -14,6 +14,11 @@ if (ENABLE_ASAN) return () endif (ENABLE_ASAN) +if (NOT ENABLE_SHARED) + exclude_binding (glib "it can only be built if `BUILD_SHARED` is enabled") + return () +endif (NOT ENABLE_SHARED) + # Add binding add_binding (glib)
tools/dual-boot: back up original boot vector Simply swapping reset vectors breaks the online update procedure, since the value it needs jumps around. This keeps it at a fixed location.
@@ -20,6 +20,9 @@ FLASH_SIZE = 1024 * 1024 # 1MiB BIN1_BASE_OFFSET = 0x8000 BIN2_BASE_OFFSET = 0xC0000 +# Size of data inserted into empty space just before second binary. +EXTRA_SIZE = 4 + def build_blob(bin1: FileIO, bin2: FileIO, out: FileIO) -> None: """Combines two firmware binary blobs ``bin1`` and ``bin2`` into a single @@ -31,7 +34,7 @@ def build_blob(bin1: FileIO, bin2: FileIO, out: FileIO) -> None: size = bin2_offset + bin2_size max_size = FLASH_SIZE - BIN1_BASE_OFFSET - if bin1_size >= bin2_offset: + if bin1_size + EXTRA_SIZE >= bin2_offset: raise ValueError(f"{bin1.name} is too big!") if size >= max_size: raise ValueError(f"{bin2.name} is too big!") @@ -43,7 +46,7 @@ def build_blob(bin1: FileIO, bin2: FileIO, out: FileIO) -> None: # Read Reset_Handler pointers in vector tables. bin1_reset_handler = blob[4:8].tobytes() - bin2_reset_handler = blob[bin2_offset + 4 : bin2_offset + 8] + bin2_reset_handler = blob[bin2_offset + 4 : bin2_offset + 8].tobytes() # Swap Reset_Handler pointers. This will cause the second # firmware to boot first. @@ -55,6 +58,11 @@ def build_blob(bin1: FileIO, bin2: FileIO, out: FileIO) -> None: BytesIO(blob[:bin1_size]), bin2_offset ).to_bytes(4, "little") + # Keep a copy of the original bin1_reset_handler at a known location, + # which is required for online firmware updates. It is placed just + # before the second firmware. + blob[bin2_offset - 4 : bin2_offset] = bin1_reset_handler + # The final checksum is for the entire new blob # This overrides the checksum of the second firmware. blob[-4:] = crc32_checksum(BytesIO(blob), max_size).to_bytes(4, "little")
Check Meta: Properly match plugin name Before this change `check_meta.sh` would only use the postfix of a plugin name to check if a plugin supports certain metadata. For example, the command wrongly assumed that `ni` supported the metadata `order`, since `ni` is a postfix of the text `ini`. This fixes
- infos/needs = - infos/placements = getstorage setstorage - infos/status = maintained unittest libc nodep -- infos/metadata = order +- infos/metadata = - infos/description = Reads and writes the nickel ini format ## Introduction
hv: memory order: use mfence to strengthen the fast string operations order Use MFENCE to strengthen the fast string operations execute order to ensure all trampoline code was updated before flush it into the memory.
@@ -119,6 +119,7 @@ uint64_t prepare_trampoline(void) (size_t)size); update_trampoline_code_refs(dest_pa); + cpu_memory_barrier(); for (i = 0UL; i < size; i = i + CACHE_LINE_SIZE) { clflush(hpa2hva(dest_pa + i)); }
fixed pointer exception on disconnect
@@ -112,7 +112,7 @@ DWORD PandaJ2534Device::can_recv_thread() { } } else { for (auto& conn : this->connections) - if (conn->isProtoCan() && conn->getPort() == msg_in.bus) + if (conn != nullptr && conn->isProtoCan() && conn->getPort() == msg_in.bus) conn->processMessage(msg_out); } }
tools: add esp32c6, esp32h2 to roms.json
"build_date_str_addr": "0x3ff1a374", "build_date_str": "Feb 7 2021" } + ], + "esp32c6": [ + { + "rev": 0, + "build_date_str_addr": "0x4004a798", + "build_date_str": "Sep 19 2022" + } + ], + "esp32h2": [ + { + "rev": 0, + "build_date_str_addr": "0x4001c7dc", + "build_date_str": "Nov 1 2022" + } ] }
fix http1 integ test
@@ -604,10 +604,9 @@ endtest # # tlsClientDynamicHTTP1 # -GODEBUG=http2client=0,http2server=0 starttest tlsClientDynamicHTTP1 cd /go/net -ldscope ./tlsClientDynamic +GODEBUG=http2client=0,http2server=0 ldscope ./tlsClientDynamic ERR+=$? # this sleep gives tlsClientDynamic a chance to report its events on exit @@ -641,17 +640,15 @@ evalPayload ERR+=$? endtest -unset GODEBUG # # tlsServerDynamicHTTP1 # -GODEBUG=http2client=0,http2server=0 starttest tlsServerDynamicHTTP1 cd /go/net PORT=4430 -ldscope ./tlsServerDynamic ${PORT} & +GODEBUG=http2client=0,http2server=0 ldscope ./tlsServerDynamic ${PORT} & # this sleep gives the server a chance to bind to the port # before we try to hit it with curl @@ -693,7 +690,6 @@ evalPayload ERR+=$? endtest -unset GODEBUG #
feat: add NTL_FOREACH, a utility ntl.h macro
@@ -62,6 +62,13 @@ typedef void** ntl_t; */ #define NTL_T(t) t** +/* + * a conventional foreach loop that can be used with NTLs + */ +#define NTL_FOREACH(element, ntl) \ + for (int __i=0,__=1;__;__=0) \ + for (element = *ntl; ntl[__i]; element = ntl[++__i]) + /* * this is the preferred method to allocate a ntl
README: document 64 bit r-pi3 variant for MACHINE
@@ -81,6 +81,7 @@ c. Set MACHINE in local.conf to one of the supported boards: - raspberrypi0-wifi - raspberrypi2 - raspberrypi3 + - raspberrypi3-64 (64 bit kernel & userspace) - raspberrypi-cm (dummy alias for raspberrypi) - raspberrypi-cm3 (dummy alias for raspberrypi2) d. bitbake rpi-hwup-image
zero division checking
@@ -43,12 +43,12 @@ STATIC_ASSERT(tic_sound_state_size, sizeof(tic_music_state) == 4); static s32 tick2row(const tic_music_params* params, s32 tick) { // BPM = tempo * 6 / speed - return tick * params->tempo * DEFAULT_SPEED / params->speed / NOTES_PER_MUNUTE; + return params->speed > 0 ? tick * params->tempo * DEFAULT_SPEED / params->speed / NOTES_PER_MUNUTE : 0; } static s32 row2tick(const tic_music_params* params, s32 row) { - return row * params->speed * NOTES_PER_MUNUTE / params->tempo / DEFAULT_SPEED; + return params->tempo > 0 ? row * params->speed * NOTES_PER_MUNUTE / params->tempo / DEFAULT_SPEED : 0; } static inline s32 param2val(const tic_track_row* row)
[awm2] Fetch remote framebuffers all at once
@@ -364,6 +364,7 @@ pub struct Desktop { pub background_gradient_inner_color: Color, pub background_gradient_outer_color: Color, next_desktop_element_id: usize, + windows_to_render_remote_layers_this_cycle: Vec<Rc<Window>>, } impl Desktop { @@ -394,6 +395,7 @@ impl Desktop { background_gradient_inner_color, background_gradient_outer_color, next_desktop_element_id: 0, + windows_to_render_remote_layers_this_cycle: vec![], } } @@ -568,6 +570,12 @@ impl Desktop { } pub fn draw_frame_composited(&mut self) { + // First, fetch the remote framebuffers for windows that requested it + logs.push(format!("Fetching framebufs for windows:")); + for window_to_fetch in self.windows_to_render_remote_layers_this_cycle.drain(..) { + window_to_fetch.render_remote_layer(); + } + self.compute_extra_draws_from_total_update_rects(); // Composite each desktop element that needs to be composited this frame @@ -1163,7 +1171,16 @@ impl Desktop { pub fn handle_window_requested_redraw(&mut self, window_owner: &str) { let window = self.window_for_owner(window_owner); // Render the framebuffer to the visible window layer - window.render_remote_layer(); + if !self + .windows_to_render_remote_layers_this_cycle + .iter() + .any(|w| Rc::ptr_eq(w, &window)) + { + self.windows_to_render_remote_layers_this_cycle + .push(Rc::clone(&window)); + } else { + println!("Ignoring extra draw request for {}", window.name()); + } self.compositor_state .queue_composite(Rc::clone(&window) as Rc<dyn DesktopElement>) }
BugID:19721288: Fix bk7231s board compile issue
-config AOS_MCU_BK7231U +config AOS_MCU_BK7231S bool select AOS_COMP_LWIP select AOS_COMP_NEWLIB_STUB @@ -9,8 +9,8 @@ config AOS_MCU_BK7231U select AOS_COMP_LIBPROV select AOS_ARCH_ARMV5 help - driver & sdk for platform/mcu bk7231u + driver & sdk for platform/mcu bk7231s -if AOS_MCU_BK7231U -# Configurations for mcu bk7231u +if AOS_MCU_BK7231S +# Configurations for mcu bk7231s endif
Fix generating tileset for blank sprites
@@ -606,7 +606,7 @@ export const compileTileset = (tileset: Uint8Array, tilesetIndex: number) => `// Tileset: ${tilesetIndex}`, { n_tiles: Math.ceil(tileset.length / 16), - tiles: Array.from(tileset).map(toHex), + tiles: Array.from(tileset.length > 0 ? tileset : [0]).map(toHex), } );
[Rust] LayerSlice tracks damaged rects
@@ -22,6 +22,7 @@ pub struct LayerSlice { parent_framebuffer_size: Size, bytes_per_pixel: isize, pub frame: Rect, + pub damaged_rects: RefCell<Vec<Rect>>, } impl LayerSlice { @@ -36,11 +37,21 @@ impl LayerSlice { parent_framebuffer_size: framebuffer_size, bytes_per_pixel, frame, + damaged_rects: RefCell::new(Vec::new()), } } + + fn record_damaged_rect(&self, rect: Rect) { + let mut damaged_rects = self.damaged_rects.borrow_mut(); + damaged_rects.push(rect); + } + pub fn fill_rect(&self, raw_rect: Rect, color: Color, thickness: StrokeThickness) { let rect = self.frame.constrain(raw_rect); + // Note that this rect has been damaged + self.record_damaged_rect(rect); + let bpp = self.bytes_per_pixel; let parent_bytes_per_row = self.parent_framebuffer_size.width * bpp; let bpp_multiple = Point::new(bpp, parent_bytes_per_row);
doc: remove TODOs about redesigning the AEAD API The changes would be significant and the benefits not likely to be too great. Fixes
@@ -292,10 +292,6 @@ The length of the "taglen" parameter should not exceed that of a B<size_t>. =item "tlsaad" (B<OSSL_CIPHER_PARAM_AEAD_TLS1_AAD>) <octet string> -=for comment TODO(3.0): Consider changing this interface so that all ciphers -use the standard AEAD interface - rather than having this special purpose -interface for TLS - Sets TLSv1.2 AAD information for the associated cipher ctx. TLSv1.2 AAD information is always 13 bytes in length and is as defined for the "additional_data" field described in section 6.2.3.3 of RFC5246. @@ -308,8 +304,6 @@ The length of the "tlsaadpad" parameter should not exceed that of a B<size_t>. =item "tlsivfixed" (B<OSSL_CIPHER_PARAM_AEAD_TLS1_IV_FIXED>) <octet string> -=for comment TODO(3.0): This interface needs completely redesigning! - Sets the fixed portion of an IV for an AEAD cipher used in a TLS record encryption/ decryption for the associated cipher ctx. TLS record encryption/decryption always occurs "in place" so that the input and
AH encrypt; don't double enqueue nor emit clib_warnings when seq-num max exceeded
@@ -125,13 +125,8 @@ ah_encrypt_inline (vlib_main_t * vm, if (PREDICT_FALSE (esp_seq_advance (sa0))) { - clib_warning ("sequence number counter has cycled SPI %u", - sa0->spi); vlib_node_increment_counter (vm, node->node_index, AH_ENCRYPT_ERROR_SEQ_CYCLED, 1); - //TODO need to confirm if below is needed - to_next[0] = i_bi0; - to_next += 1; goto trace; }
Add more outputto hip_host_register test
@@ -22,6 +22,7 @@ int main() { fprintf(stderr, "hipHostMalloc: %d\n", *ipt); return 1; } + fprintf(stderr, "hipHostMalloc: success %d\n", *ipt); } if (use_hip_register) { @@ -32,14 +33,16 @@ int main() { fprintf(stderr, "hipHostRegister ret %u\n", err); return 1; } + fprintf(stderr, "hipHostRegister success\n"); int *ipt = (int *)pt; *ipt = 0; write_kernel<<<1, 1>>>(ipt); hipDeviceSynchronize(); if (*ipt != expect) { - fprintf(stderr, "hipHostRegister: %d\n", *ipt); + fprintf(stderr, "hipHostRegister: usage %d\n", *ipt); return 1; } + fprintf(stderr, "hipHostRegister: usage success %d\n", *ipt); } return 0;
Log ssl errors after processing handshake.
@@ -1534,6 +1534,21 @@ int picoquic_add_proposed_alpn(void* tls_context, const char* alpn) return ret; } +/* Log OPENSSL errors */ +void picoquic_log_openssl_errors(picoquic_cnx_t* cnx, int ret) +{ + unsigned long openssl_err; + char const* err_file = NULL; + int err_line = 0; + + while ((openssl_err = ERR_get_error_line(&err_file, &err_line)) != 0) { + picoquic_log_app_message(cnx->quic, &cnx->initial_cnxid, "OpenSSL error: %lu, file %s, line %d", openssl_err, + (err_file == NULL) ? "?" : err_file, err_line); + } + + picoquic_log_app_message(cnx->quic, &cnx->initial_cnxid, "Picotls returns error: %d (0x%x) ", ret, ret); +} + /* Prepare the initial message when starting a connection. */ @@ -1603,6 +1618,9 @@ int picoquic_initialize_tls_stream(picoquic_cnx_t* cnx, uint64_t current_time) ptls_buffer_init(&sendbuf, "", 0); + /* Clearing the global error state of openssl before calling handle message. + * This allows detection of errors during processing. */ + ERR_clear_error(); ret = ptls_handle_message(ctx->tls, &sendbuf, epoch_offsets, 0, NULL, 0, &ctx->handshake_properties); /* assume that all the data goes to epoch 0, initial */ @@ -1622,6 +1640,7 @@ int picoquic_initialize_tls_stream(picoquic_cnx_t* cnx, uint64_t current_time) ret = 0; } } else { + picoquic_log_openssl_errors(cnx, ret); ret = -1; } @@ -1839,6 +1858,10 @@ int picoquic_tls_stream_process(picoquic_cnx_t* cnx) ptls_buffer_init(&sendbuf, "", 0); + /* Clearing the global error state of openssl before calling handle message. + * This allows detection of errors during processing. */ + ERR_clear_error(); + ret = ptls_handle_message(ctx->tls, &sendbuf, send_offset, epoch, data->bytes + start, epoch_data, &ctx->handshake_properties); @@ -1884,6 +1907,9 @@ int picoquic_tls_stream_process(picoquic_cnx_t* cnx) } } } + else { + picoquic_log_openssl_errors(cnx, ret); + } stream->consumed_offset += epoch_data; processed += epoch_data;
hatch/baseboard: Enable the Search key button in mask Enable the search key located at TEST=Check search key while debugging BRANCH=firmware-hatch-12672.B
@@ -64,7 +64,7 @@ struct keyboard_scan_config keyscan_config = { .min_post_scan_delay_us = 1000, .poll_timeout_us = 100 * MSEC, .actual_key_mask = { - 0x14, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff, + 0x1c, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff, 0xa4, 0xff, 0xfe, 0x55, 0xfa, 0xca /* full set */ }, };
doc: explain H2O_ROOT for H2O developers
@@ -46,6 +46,15 @@ Start the installed server using the example configuration to confirm that it ac EOT ?> +<p> +Or if you'd like to start H2O without installing it, you can use the <code>H2O_ROOT</code> environment variable. +</p> + +<?= $ctx->{code}->(<< 'EOT') +% H2O_ROOT=$PWD build/h2o -c examples/h2o/h2o.conf +EOT +?> + <p> The example configuration starts a server that listens to port 8080 (HTTP) and port 8081 (HTTPS). Try to access the ports using the protocols respectively (note: when accessing via HTTPS it is likely that you would see hostname mismatch errors reported by the web browsers). </p>
Add OP_SSENDB
@@ -1039,6 +1039,30 @@ static inline int op_ssend( mrbc_vm *vm, mrbc_value *regs ) +//================================================================ +/*! OP_SSENDB + + R[a] = self.send(Syms[b],R[a+1]..,R[a+n+1]:R[a+n+2]..,&R[a+n+2k+1]) + + @param vm pointer of VM. + @param regs pointer to regs + @retval 0 No error. +*/ +static inline int op_ssendb( mrbc_vm *vm, mrbc_value *regs ) +{ + FETCH_BBB(); + + mrbc_value *self = mrbc_get_self( vm, regs ); + + mrbc_decref( &regs[a] ); + regs[a] = *self; + mrbc_incref( &regs[a] ); + + return send_by_name( vm, mrbc_irep_symbol_id(vm->cur_irep, b), regs, a, c, 1 ); +} + + + //================================================================ /*! OP_SEND @@ -2767,6 +2791,7 @@ int mrbc_vm_run( struct VM *vm ) case OP_RESCUE: ret = op_rescue (vm, regs); break; case OP_RAISEIF: ret = op_raiseif (vm, regs); break; case OP_SSEND: ret = op_ssend (vm, regs); break; + case OP_SSENDB: ret = op_ssendb (vm, regs); break; case OP_SEND: ret = op_send (vm, regs); break; case OP_SENDB: ret = op_sendb (vm, regs); break; case OP_CALL: ret = op_dummy_Z (vm, regs); break;
Improve error handling in ocf_volume_init()
/* - * Copyright(c) 2012-2021 Intel Corporation + * Copyright(c) 2012-2022 Intel Corporation * SPDX-License-Identifier: BSD-3-Clause */ @@ -94,38 +94,39 @@ int ocf_volume_init(ocf_volume_t volume, ocf_volume_type_t type, return -OCF_ERR_INVAL; priv_size = type->properties->volume_priv_size; - - volume->opened = false; - volume->type = type; - volume->priv = env_zalloc(priv_size, ENV_MEM_NORMAL); if (!volume->priv) return -OCF_ERR_NO_MEM; - ocf_refcnt_init(&volume->refcnt); - ocf_refcnt_freeze(&volume->refcnt); + volume->opened = false; + volume->type = type; - if (!uuid) { volume->uuid.size = 0; volume->uuid.data = NULL; volume->uuid_copy = false; + + ocf_refcnt_init(&volume->refcnt); + ocf_refcnt_freeze(&volume->refcnt); + + if (!uuid) return 0; - } volume->uuid_copy = uuid_copy; if (uuid_copy) { data = env_vmalloc(uuid->size); - if (!data) + if (!data) { + ret = -OCF_ERR_NO_MEM; goto err; + } + + volume->uuid.data = data; ret = env_memcpy(data, uuid->size, uuid->data, uuid->size); if (ret) { - env_vfree(data); + ret = -OCF_ERR_INVAL; goto err; } - - volume->uuid.data = data; } else { volume->uuid.data = uuid->data; } @@ -137,7 +138,11 @@ int ocf_volume_init(ocf_volume_t volume, ocf_volume_type_t type, err: ocf_refcnt_unfreeze(&volume->refcnt); env_free(volume->priv); - return -OCF_ERR_NO_MEM; + if (volume->uuid_copy && volume->uuid.data) + env_vfree(volume->uuid.data); + volume->uuid.data = NULL; + volume->uuid.size = 0; + return ret; } void ocf_volume_deinit(ocf_volume_t volume)
parser yin FIX remove xmlns definitions after parsing text fields
@@ -138,11 +138,12 @@ parse_xmlns(struct lyxml_context *xml_ctx, const char **data, const char *prefix * @brief Parse content of whole element as text. * * @param[in] xml_ctx Xml context. + * @param[in] element_name Name of element, name is necesary to remove xmlns definitions at the end of element * @param[in] data Data to read from. * @param[out] value Where content of element should be stored. */ LY_ERR -parse_text_element(struct lyxml_context *xml_ctx, const char **data, const char **value) +parse_text_element(struct lyxml_context *xml_ctx, char *element_name, const char **data, const char **value) { LY_ERR ret = LY_SUCCESS; char *buf = NULL, *out = NULL; @@ -175,7 +176,6 @@ parse_text_element(struct lyxml_context *xml_ctx, const char **data, const char } } - LY_CHECK_RET(xml_ctx->status != LYXML_ELEM_CONTENT, LY_EVALID); if (xml_ctx->status == LYXML_ELEM_CONTENT) { @@ -186,8 +186,8 @@ parse_text_element(struct lyxml_context *xml_ctx, const char **data, const char } lyxml_get_element(xml_ctx, data, &prefix, &prefix_len, &name, &name_len); - - return 0; + lyxml_ns_rm(xml_ctx, element_name); + return LY_SUCCESS; } // LY_ERR @@ -551,16 +551,16 @@ parse_mod(struct lyxml_context *xml_ctx, const char **data, struct lysp_module * /* meta */ case YANG_ORGANIZATION: - LY_CHECK_RET(parse_text_element(xml_ctx, data, &(*mod)->mod->org)); + LY_CHECK_RET(parse_text_element(xml_ctx, "organization", data, &(*mod)->mod->org)); break; case YANG_CONTACT: - LY_CHECK_RET(parse_text_element(xml_ctx, data, &(*mod)->mod->contact)); + LY_CHECK_RET(parse_text_element(xml_ctx, "contact", data, &(*mod)->mod->contact)); break; case YANG_DESCRIPTION: - LY_CHECK_RET(parse_text_element(xml_ctx, data, &(*mod)->mod->dsc)); + LY_CHECK_RET(parse_text_element(xml_ctx, "description", data, &(*mod)->mod->dsc)); break; case YANG_REFERENCE: - LY_CHECK_RET(parse_text_element(xml_ctx, data, &(*mod)->mod->ref)); + LY_CHECK_RET(parse_text_element(xml_ctx, "reference", data, &(*mod)->mod->ref)); break; default:
Slightly better perf, but make sure it works under cross traffic
@@ -379,10 +379,10 @@ void ngtcp2_cc_cubic_cc_on_pkt_acked(ngtcp2_cc *ccx, ngtcp2_conn_stat *cstat, cc->pending_add = m % (100 * cstat->cwnd); } - m = cc->pending_w_add + cstat->max_udp_payload_size * pkt->pktlen * 9; + m = cc->pending_w_add + cstat->max_udp_payload_size * pkt->pktlen; - cc->w_tcp += m / (17 * cstat->cwnd); - cc->pending_w_add = m % (17 * cstat->cwnd); + cc->w_tcp += m / cstat->cwnd; + cc->pending_w_add = m % cstat->cwnd; if (cc->w_tcp > cstat->cwnd) { tcp_add =
Split help string.
@@ -195,7 +195,10 @@ COMPRESSION Run a preprocess over the image that scales RGB components in the image by the alpha value. Preprocessing applies before any codec encoding swizzle, so color data must be in the RGB - channels in the source image. + channels in the source image.)" +// This split in the literals is needed for Visual Studio; the compiler +// will concatenate these two strings together ... +R"( COMPRESSION TIPS & TRICKS ASTC is a block-based format that can be prone to block artifacts.
tools: acrntrace: fix a variable uninitialized issue 'err' may be used uninitialized and be dereferenced NULL. This commit fix the reported issue via initializing 'err' to 0, and return 'err' at the end of the func.
@@ -154,7 +154,7 @@ static int get_cpu_num(void) static int create_trace_file_dir(char *dir) { - int err; + int err = 0; char cmd[CMD_MAX_LEN]; char time_str[TIME_STR_LEN]; time_t timep; @@ -193,7 +193,7 @@ static int create_trace_file_dir(char *dir) pr_dbg("dir %s creted\n", dir); - return WIFEXITED(err) ? WEXITSTATUS(err) : EXIT_FAILURE; + return err; } /* function executed in each consumer thread */
wpa_supplicant: Fix formatting of file esp_wpa3.c Replace tabs with spaces in esp_wpa3.c.
@@ -192,8 +192,7 @@ static int wpa3_parse_sae_msg(u8 *buf, u32 len, u32 sae_msg_type, u16 status) ret = wpa3_parse_sae_confirm(buf, len); break; default: - wpa_printf(MSG_ERROR, "wpa3: Invalid SAE msg type(%d)!", - sae_msg_type); + wpa_printf(MSG_ERROR, "wpa3: Invalid SAE msg type(%d)!", sae_msg_type); ret = ESP_FAIL; break; }
ignore post-build-checks for sles
@@ -40,6 +40,7 @@ Source4: OHPC_macros BuildRoot: %{_tmppath}/%{pname}-%{version}-%{release}-root DocDir: %{OHPC_PUB}/doc/contrib +#!BuildIgnore: post-build-checks rpmlint-Factory # Disable debug packages %define debug_package %{nil} # Default library install path
Ruby: add environment debugging output
@@ -277,6 +277,13 @@ int main (int argc, char ** argv) init (argc, argv); + // some debugging + char * ld_library_path = getenv ("LD_LIBRARY_PATH"); + char * rubylib = getenv ("RUBYLIB"); + + printf ("env LD_LIBRARY_PATH: %s\n", ld_library_path); + printf ("env RUBYLIB: %s\n", rubylib); + // Plugin open // test_plugin_open_without_script ();
adds lmdb to library version report
@@ -456,6 +456,10 @@ report(void) H2O_LIBRARY_VERSION_MAJOR, H2O_LIBRARY_VERSION_MINOR, H2O_LIBRARY_VERSION_PATCH); + printf("lmdb: %d.%d.%d\n", + MDB_VERSION_MAJOR, + MDB_VERSION_MINOR, + MDB_VERSION_PATCH); printf("curl: %d.%d.%d\n", LIBCURL_VERSION_MAJOR, LIBCURL_VERSION_MINOR,
CMake: stats clients depend on the .api header generation
@@ -78,6 +78,8 @@ install(TARGETS vpp_get_metrics DESTINATION bin) ############################################################################## add_executable(summary_stats_client api/summary_stats_client.c) add_executable(stat_client app/stat_client.c) +add_dependencies(summary_stats_client api_headers) +add_dependencies(stat_client api_headers) target_link_libraries(summary_stats_client vppinfra svm vlibmemoryclient) target_link_libraries(stat_client vppinfra svm vlibmemoryclient)
quic: add a note on crypto timestamps
@@ -640,8 +640,8 @@ def handle_resp_line(cpu, data, size): def load_common_fields(hsh, line): for k in ['at', 'type', 'master_conn_id']: v = getattr(line, k) + # FIXME: This hack is no longer needed as of: https://github.com/h2o/quicly/pull/279 if v == 0 and k == 'at': - # TODO: This is a synthetic hack v = int(time.time() * 1000) hsh[k] = v
added future definition
@@ -305,7 +305,7 @@ The module that holds the representation of types, values and functions is calle | Map | List of elements formed by a key (String) value (Any) pair (Array) | | Pointer | Low level representation of a memory reference | | Null | Representation of NULL value type | -| Future | | +| Future | Promise in Node Loader, and any other type equivalent in other languages. | | Function| Block of code that takes inputs (Arguments) and produces output (Return value)| | Class | Defines properties and methods that are common to all objects | | Object | An instance of Class |
Fix ambiguous if-statement causing a crash. Resolves and fixes regression failure.
@@ -279,6 +279,10 @@ ColorsAreDifferent(double a[3], double b[3]) // Programmer: Kathleen Biagas // Creation: June 30, 2016 // +// Modifications: +// Kathleen Biagas, Thu Jun 18 09:12:22 PDT 2020 +// Fix ambiguous if statement. +// // **************************************************************************** void @@ -291,9 +295,9 @@ avtMeshPlotMapper::SetMeshColor(double rgb[3]) linesColor[2] = rgb[2]; for (int i = 0; i < nMappers; ++i) { - if (actors[i] != NULL && !labels.empty() && + if (actors[i] != NULL && (!labels.empty() && (labels[i].compare(0, 11, string("mesh_lines_")) == 0) || - (labels[i].compare(0, 12, string("mesh_points_")) == 0)) + (labels[i].compare(0, 12, string("mesh_points_")) == 0))) { actors[i]->GetProperty()->SetColor(rgb); }
fix *&foo to actually be invokable
== ++ dp-value :: ++dojo-source ;~ pose + (stag %sa ;~(pfix tar pam sym)) (stag %ex dp-twig) (stag %tu (ifix [sel ser] (most ace dp-source))) - (stag %sa ;~(pfix tar pam sym)) == :: ++ dp-config :: ++dojo-config
filter_kubernetes: Tweak FLB_KUBE_TAG_PREFIX for Windows A typical setup on Windows pods includes something like this: [INPUT] Name Tail Path c:\var\log\containers\* Tag kube.* In this case, in_tail emits events with a tag prefixed with "kube.c.var.log.containers". Let's make it the default value on Windows build.
* Default expected Kubernetes tag prefix, this is used mostly when source * data comes from in_tail with custom tags like: kube.service.* */ +#ifdef FLB_SYSTEM_WINDOWS +#define FLB_KUBE_TAG_PREFIX "kube.c.var.log.containers." +#else #define FLB_KUBE_TAG_PREFIX "kube.var.log.containers." +#endif struct kube_meta;
Add named pipe ClientSessionId/ServerSessionId
@@ -9058,6 +9058,47 @@ NTSTATUS PhGetNamedPipeClientProcessId( return status; } +NTSTATUS PhGetNamedPipeClientSessionId( + _In_ HANDLE PipeHandle, + _Out_ PHANDLE ClientSessionId + ) +{ + NTSTATUS status; + IO_STATUS_BLOCK isb; + ULONG processId = 0; + + status = NtFsControlFile( + PipeHandle, + NULL, + NULL, + NULL, + &isb, + FSCTL_PIPE_GET_CONNECTION_ATTRIBUTE, + "ClientSessionId", + sizeof("ClientSessionId"), + &processId, + sizeof(ULONG) + ); + + if (status == STATUS_PENDING) + { + status = NtWaitForSingleObject(PipeHandle, FALSE, NULL); + + if (NT_SUCCESS(status)) + status = isb.Status; + } + + if (NT_SUCCESS(status)) + { + if (ClientSessionId) + { + *ClientSessionId = UlongToHandle(processId); + } + } + + return status; +} + NTSTATUS PhGetNamedPipeServerProcessId( _In_ HANDLE PipeHandle, _Out_ PHANDLE ServerProcessId @@ -9073,7 +9114,7 @@ NTSTATUS PhGetNamedPipeServerProcessId( NULL, NULL, &isb, - FSCTL_PIPE_GET_CONNECTION_ATTRIBUTE, + FSCTL_PIPE_GET_PIPE_ATTRIBUTE, "ServerProcessId", sizeof("ServerProcessId"), &processId, @@ -9099,6 +9140,47 @@ NTSTATUS PhGetNamedPipeServerProcessId( return status; } +NTSTATUS PhGetNamedPipeServerSessionId( + _In_ HANDLE PipeHandle, + _Out_ PHANDLE ServerSessionId + ) +{ + NTSTATUS status; + IO_STATUS_BLOCK isb; + ULONG processId = 0; + + status = NtFsControlFile( + PipeHandle, + NULL, + NULL, + NULL, + &isb, + FSCTL_PIPE_GET_PIPE_ATTRIBUTE, + "ServerSessionId", + sizeof("ServerSessionId"), + &processId, + sizeof(ULONG) + ); + + if (status == STATUS_PENDING) + { + status = NtWaitForSingleObject(PipeHandle, FALSE, NULL); + + if (NT_SUCCESS(status)) + status = isb.Status; + } + + if (NT_SUCCESS(status)) + { + if (ServerSessionId) + { + *ServerSessionId = UlongToHandle(processId); + } + } + + return status; +} + NTSTATUS PhGetThreadName( _In_ HANDLE ThreadHandle, _Out_ PPH_STRING *ThreadName
2nd order: make the optimised routines the same as original contrib
@@ -1278,12 +1278,36 @@ static int pack_double_optimised(grib_accessor* a, const double* val, size_t *le != GRIB_SUCCESS) return ret; - Assert(optimize_scaling_factor); + if (optimize_scaling_factor) + { if((ret=grib_optimize_decimal_factor (a, self->reference_value, max, min, bits_per_value, compat_gribex, 1, &decimal_scale_factor, &binary_scale_factor, &reference_value)) != GRIB_SUCCESS) return ret; + } + else + { + /* For constant fields set decimal scale factor to 0 (See GRIB-165) */ + if (min==max) { + grib_set_long_internal(handle,self->decimal_scale_factor, 0); + } + if((ret = grib_get_long_internal(handle,self->decimal_scale_factor, &decimal_scale_factor)) + != GRIB_SUCCESS) + return ret; + + if (grib_get_nearest_smaller_value(handle,self->reference_value,min,&reference_value) + !=GRIB_SUCCESS) { + grib_context_log(handle->context,GRIB_LOG_ERROR, + "unable to find nearest_smaller_value of %g for %s",min,self->reference_value); + exit(GRIB_INTERNAL_ERROR); + } + binary_scale_factor = grib_get_binary_scale_fact(max,reference_value,bits_per_value,&ret); + + if((ret = grib_set_long_internal(handle,self->binary_scale_factor, binary_scale_factor)) != + GRIB_SUCCESS) + return ret; + } decimal = grib_power(decimal_scale_factor,10); divisor = grib_power(-binary_scale_factor,2);
Add TpSetPoolThreadBasePriority
@@ -459,6 +459,35 @@ Exit: PhReleaseRundownProtection(&KphpCommsRundown); } +static VOID KphpTpSetPoolThreadBasePriority( + _Inout_ PTP_POOL Pool, + _In_ ULONG BasePriority + ) +{ + static PH_INITONCE initOnce = PH_INITONCE_INIT; + static NTSTATUS (NTAPI* TpSetPoolThreadBasePriority_I)( + _Inout_ PTP_POOL Pool, + _In_ ULONG BasePriority + ) = NULL; + + if (PhBeginInitOnce(&initOnce)) + { + PVOID baseAddress; + + if (baseAddress = PhGetLoaderEntryDllBase(L"ntdll.dll")) + { + TpSetPoolThreadBasePriority_I = PhGetDllBaseProcedureAddress(baseAddress, "TpSetPoolThreadBasePriority", 0); + } + + PhEndInitOnce(&initOnce); + } + + if (TpSetPoolThreadBasePriority_I) + { + TpSetPoolThreadBasePriority_I(Pool, BasePriority); + } +} + /** * \brief Starts the communications infrastructure. * @@ -513,11 +542,14 @@ NTSTATUS KphCommsStart( if (!NT_SUCCESS(status)) goto Exit; - TpInitializeCallbackEnviron(&KphpCommsThreadPoolEnv); TpSetPoolMinThreads(KphpCommsThreadPool, KPH_COMMS_MIN_THREADS); TpSetPoolMaxThreads(KphpCommsThreadPool, numberOfThreads); - TpSetCallbackThreadpool(&KphpCommsThreadPoolEnv, KphpCommsThreadPool); + KphpTpSetPoolThreadBasePriority(KphpCommsThreadPool, THREAD_PRIORITY_HIGHEST); + + TpInitializeCallbackEnviron(&KphpCommsThreadPoolEnv); + TpSetCallbackNoActivationContext(&KphpCommsThreadPoolEnv); TpSetCallbackPriority(&KphpCommsThreadPoolEnv, TP_CALLBACK_PRIORITY_HIGH); + TpSetCallbackThreadpool(&KphpCommsThreadPoolEnv, KphpCommsThreadPool); //TpSetCallbackLongFunction(&KphpCommsThreadPoolEnv); PhSetFileCompletionNotificationMode(KphpCommsFltPortHandle,
cups-browsed: Do not update the network interface information on every call of the is_local_hostname() function.
@@ -8736,7 +8736,6 @@ int is_local_hostname(const char *host_name) { char *host; - update_netifs(NULL); for (host = (char *)cupsArrayFirst (local_hostnames); host != NULL; host = (char *)cupsArrayNext (local_hostnames)) @@ -8959,6 +8958,14 @@ examine_discovered_printer_record(const char *host, goto fail; } + + /* Update network interface info if we were discovered by LDAP + or legacy CUPS, needed for the is_local_hostname() function calls. + During DNS-SD discovery the update is already done by the Avahi + event handler function. */ + if (type == NULL || type[0] == '\0') + update_netifs(NULL); + /* Check if we have already created a queue for the discovered printer */ for (p = (remote_printer_t *)cupsArrayFirst(remote_printers); @@ -9312,6 +9319,7 @@ static void resolve_callback(AvahiServiceResolver *r, } /* Ignore local queues on the port of the cupsd we are serving for */ + update_netifs(NULL); if (port == ippPort() && ((flags & AVAHI_LOOKUP_RESULT_LOCAL) || !strcasecmp(ifname, "lo") || is_local_hostname(host_name))) {