message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
graphics/littlevgl: Update theme config symbol name in Kconfig | @@ -228,35 +228,35 @@ config LV_THEME_LIVE_UPDATE
bool "Allow theme switching at run time. Uses 8..10 kB of RAM"
default n
-config USE_LV_THEME_TEMPL
+config LV_USE_THEME_TEMPL
bool "Use Template theme: just for test"
default n
-config USE_LV_THEME_DEFAULT
+config LV_USE_THEME_DEFAULT
bool "Use Default theme: uses the built-in style"
default n
-config USE_LV_THEME_ALIEN
+config LV_USE_THEME_ALIEN
bool "Use Alien theme: dark futuristic theme"
default n
-config USE_LV_THEME_NIGHT
+config LV_USE_THEME_NIGHT
bool "Use Night theme: dark elegant theme"
default n
-config USE_LV_THEME_MONO
+config LV_USE_THEME_MONO
bool "Use Mono theme: mono color theme"
default n
-config USE_LV_THEME_MATERIAL
+config LV_USE_THEME_MATERIAL
bool "Use Material theme: material theme with bold colors"
default n
-config USE_LV_THEME_ZEN
+config LV_USE_THEME_ZEN
bool "Use Zen theme: light, peaceful theme"
default n
-config USE_LV_THEME_NEMO
+config LV_USE_THEME_NEMO
bool "Use Nemo theme: Water-like theme based on the movie 'Finding Nemo'"
default n
|
Remove unused if to fix compile error. | @@ -867,7 +867,6 @@ static void cblk_req_dump(struct cblk_dev *c)
switch (req->status) {
case CBLK_IDLE:
usecs = 0;
- if (req->lba == 0)
break;
case CBLK_READY:
usecs = timediff_usec(&req->etime, &req->stime);
@@ -895,7 +894,6 @@ static void stat_req_dump(struct cblk_dev *c)
switch (req->status) {
case CBLK_IDLE:
usecs = 0;
- if (req->lba == 0)
break;
case CBLK_READY:
usecs = timediff_usec(&req->etime, &req->stime);
|
Reporting wrong variable. | @@ -445,14 +445,12 @@ static PyObject *wsgi_request_metrics(void)
cpu_system_time = cpu_system_time / total_cpu_time;
}
- object = PyFloat_FromDouble(
- (stop_cpu_user_time-start_cpu_user_time)/time_interval);
+ object = PyFloat_FromDouble(cpu_user_time);
PyDict_SetItem(result,
WSGI_INTERNED_STRING(cpu_user_time), object);
Py_DECREF(object);
- object = PyFloat_FromDouble(
- (stop_cpu_system_time-start_cpu_system_time)/time_interval);
+ object = PyFloat_FromDouble(cpu_system_time);
PyDict_SetItem(result,
WSGI_INTERNED_STRING(cpu_system_time), object);
Py_DECREF(object);
|
SOVERSION bump to version 6.4.10 | @@ -68,7 +68,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 6)
set(SYSREPO_MINOR_SOVERSION 4)
-set(SYSREPO_MICRO_SOVERSION 9)
+set(SYSREPO_MICRO_SOVERSION 10)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
Update examples/elf/tests/helloxx/Makefile
Check for the right config variable | @@ -114,7 +114,7 @@ $(BIN3): $(OBJS3)
# NOTE: libstdc++ is not available for NuttX as of this writing
#
ifeq ($(CONFIG_EXAMPLES_ELF_CXX),y)
-ifeq ($(CXX_EXCEPTION),y)
+ifeq ($(CONFIG_CXX_EXCEPTION),y)
$(BIN4): $(OBJS4)
@echo "LD: $<"
$(Q) $(LD) $(LDELFFLAGS) $(LDLIBPATH) -o $@ $(ARCHCRT0OBJ) $^ $(LDLIBS)
|
Support OBP environment | @@ -216,7 +216,7 @@ if (WIN32)
# OpenSSL relies on Perl to generate files (e.g., headers, assembly files, and test cases).
find_program(
OE_PERL perl
- PATHS "C:/Program Files/Git/bin" "${GIT_DIR}/../usr/bin"
+ PATHS "C:/Program Files/Git/bin" "C:/Program Files/Git/usr/bin" "${GIT_DIR}/../usr/bin"
NO_DEFAULT_PATH)
if (NOT OE_PERL)
message(FATAL_ERROR "Perl not found!")
@@ -226,7 +226,7 @@ if (WIN32)
# OpenSSL tests.
find_program(
OE_DOS2UNIX dos2unix
- PATHS "C:/Program Files/Git/bin" "${GIT_DIR}/../usr/bin"
+ PATHS "C:/Program Files/Git/bin" "C:/Program Files/Git/usr/bin" "${GIT_DIR}/../usr/bin"
NO_DEFAULT_PATH)
if (NOT OE_DOS2UNIX)
message(FATAL_ERROR "Dos2unix not found!")
|
Add test for openssl ecparam with fips and base providers | @@ -13,7 +13,7 @@ use warnings;
use File::Spec;
use File::Compare qw/compare_text/;
use OpenSSL::Glob;
-use OpenSSL::Test qw/:DEFAULT data_file/;
+use OpenSSL::Test qw/:DEFAULT data_file srctop_file bldtop_dir/;
use OpenSSL::Test::Utils;
setup("test_ecparam");
@@ -25,7 +25,7 @@ my @valid = glob(data_file("valid", "*.pem"));
my @noncanon = glob(data_file("noncanon", "*.pem"));
my @invalid = glob(data_file("invalid", "*.pem"));
-plan tests => 11;
+plan tests => 12;
sub checkload {
my $files = shift; # List of files
@@ -59,6 +59,8 @@ sub checkcompare {
}
}
+my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0);
+
subtest "Check loading valid parameters by ecparam with -check" => sub {
plan tests => scalar(@valid);
checkload(\@valid, 1, "ecparam", "-check");
@@ -113,3 +115,31 @@ subtest "Check pkeyparam does not change the parameter file on output" => sub {
plan tests => 2 * scalar(@valid);
checkcompare(\@valid, "pkeyparam");
};
+
+subtest "Check loading of fips and non-fips params" => sub {
+ plan skip_all => "FIPS is disabled"
+ if $no_fips;
+ plan tests => 3;
+
+ my $fipsconf = srctop_file("test", "fips-and-base.cnf");
+ my $defaultconf = srctop_file("test", "default.cnf");
+
+ $ENV{OPENSSL_CONF} = $fipsconf;
+
+ ok(run(app(['openssl', 'ecparam',
+ '-in', data_file('valid', 'secp384r1-explicit.pem'),
+ '-check'])),
+ "Loading explicitly encoded valid curve");
+
+ ok(run(app(['openssl', 'ecparam',
+ '-in', data_file('valid', 'secp384r1-named.pem'),
+ '-check'])),
+ "Loading named valid curve");
+
+ ok(!run(app(['openssl', 'ecparam',
+ '-in', data_file('valid', 'secp112r1-named.pem'),
+ '-check'])),
+ "Fail loading named non-fips curve");
+
+ $ENV{OPENSSL_CONF} = $defaultconf;
+};
|
Fixed DCAP path typo | @@ -545,7 +545,7 @@ function Install-DCAP-Dependencies {
'description' = 'Intel(R) Software Guard Extensions Launch Configuration Service'
}
'sgx_dcap' = @{
- 'path' = "$PACKAGES_DIRECTORY\Intel_SGX_DCAP\Intel*SGX*DCAP*\dcap\WindowsServer2019_Windows10""
+ 'path' = "$PACKAGES_DIRECTORY\Intel_SGX_DCAP\Intel*SGX*DCAP*\dcap\WindowsServer2019_Windows10"
'location' = 'root\SgxLCDevice_DCAP'
'description' = 'Intel(R) Software Guard Extensions DCAP Components Device'
}
@@ -557,7 +557,7 @@ function Install-DCAP-Dependencies {
'description' = 'Intel(R) Software Guard Extensions Launch Configuration Service'
}
'sgx_dcap' = @{
- 'path' = "$PACKAGES_DIRECTORY\Intel_SGX_DCAP\Intel*SGX*DCAP*\dcap\WindowsServer2019_Windows10""
+ 'path' = "$PACKAGES_DIRECTORY\Intel_SGX_DCAP\Intel*SGX*DCAP*\dcap\WindowsServer2019_Windows10"
'location' = 'root\SgxLCDevice_DCAP'
'description' = 'Intel(R) Software Guard Extensions DCAP Components Device'
}
|
codeowners: update in_docker owner | /appveyor.yml @niedbalski @patrick-stephens
/dockerfiles/ @niedbalski @patrick-stephens
/packaging/ @niedbalski @patrick-stephens
+/codebase-structure.svg @niedbalski @patrick-stephens
# Core: Signv4
# ------------
# Input Plugins
# -------------
/plugins/in_collectd @fujimotos
-/plugins/in_docker @ashutoshdhundhara
+/plugins/in_docker @nokute78 @edsiper
/plugins/in_dummy @nokute78
/plugins/in_netif @nokute78
/plugins/in_statsd @fujimotos
|
centred text | @@ -25,7 +25,7 @@ def launcher():
graphics.set_pen(5)
graphics.rectangle(0, 0, WIDTH, 50)
graphics.set_pen(0)
- graphics.text("Launcher", 225, 10, WIDTH, 4)
+ graphics.text("Launcher", 245, 10, WIDTH, 4)
graphics.set_pen(4)
graphics.rectangle(30, 60, WIDTH - 100, 50)
|
improve abi include directory for ndk | @@ -172,6 +172,8 @@ function main(platform)
platform:add("cxxflags", format("-I%s/libs/%s/include", cxxstl_sdkdir, toolchains_archs[arch]))
platform:add("ldflags", format("-L%s/libs/%s", cxxstl_sdkdir, toolchains_archs[arch]))
platform:add("shflags", format("-L%s/libs/%s", cxxstl_sdkdir, toolchains_archs[arch]))
+
+ -- link to c++ std library
if cxxstl_sdkdir:find("llvm-libc++", 1, true) then
platform:add("ldflags", "-lc++_static", "-lc++abi")
platform:add("shflags", "-lc++_static", "-lc++abi")
@@ -179,6 +181,18 @@ function main(platform)
platform:add("ldflags", "-lgnustl_static")
platform:add("shflags", "-lgnustl_static")
end
+
+ -- include abi directory
+ if cxxstl_sdkdir:find("llvm-libc++", 1, true) then
+ local abi_path = path.translate(format("%s/sources/cxx-stl/llvm-libc++abi", ndk))
+ local before_r13 = path.translate(path.join(abi_path, "libcxxabi"))
+ local after_r13 = path.translate(path.join(abi_path, "include"))
+ if os.isdir(before_r13) then
+ platform:add("cxxflags", format("-I%s",before_r13))
+ elseif os.isdir(after_r13) then
+ platform:add("cxxflags", format("-I%s",after_r13))
+ end
+ end
end
end
end
|
further improve precision of malloc/free tracking in valgrind | @@ -364,7 +364,6 @@ static mi_decl_noinline void _mi_free_block_mt(mi_page_t* page, mi_block_t* bloc
// The padding check may access the non-thread-owned page for the key values.
// that is safe as these are constant and the page won't be freed (as the block is not freed yet).
mi_check_padding(page, block);
- mi_track_mem_defined(block, mi_page_block_size(page)); // ensure the padding can be accessed
mi_padding_shrink(page, block, sizeof(mi_block_t)); // for small size, ensure we can fit the delayed thread pointers without triggering overflow detection
#if (MI_DEBUG!=0) && !MI_TRACK_ENABLED // note: when tracking, cannot use mi_usable_size with multi-threading
memset(block, MI_DEBUG_FREED, mi_usable_size(block));
@@ -427,7 +426,6 @@ static inline void _mi_free_block(mi_page_t* page, bool local, mi_block_t* block
if mi_unlikely(mi_check_is_double_free(page, block)) return;
mi_check_padding(page, block);
#if (MI_DEBUG!=0) && !MI_TRACK_ENABLED
- mi_track_mem_undefined(block, mi_page_block_size(page)); // note: check padding may set parts to noaccess
memset(block, MI_DEBUG_FREED, mi_page_block_size(page));
#endif
mi_block_set_next(page, block, page->local_free);
@@ -458,11 +456,9 @@ mi_block_t* _mi_page_ptr_unalign(const mi_segment_t* segment, const mi_page_t* p
static void mi_decl_noinline mi_free_generic(const mi_segment_t* segment, bool local, void* p) mi_attr_noexcept {
mi_page_t* const page = _mi_segment_page_of(segment, p);
mi_block_t* const block = (mi_page_has_aligned(page) ? _mi_page_ptr_unalign(segment, page, p) : (mi_block_t*)p);
- const size_t track_bsize = mi_page_block_size(page);
- //mi_track_mem_defined(block,track_bsize);
mi_stat_free(page, block); // stat_free may access the padding
+ mi_track_free(p);
_mi_free_block(page, local, block);
- //mi_track_mem_noaccess(block,track_bsize);
}
// Get the segment data belonging to a pointer
@@ -517,9 +513,9 @@ void mi_free(void* p) mi_attr_noexcept
#if (MI_DEBUG!=0) && !MI_TRACK_ENABLED
memset(block, MI_DEBUG_FREED, mi_page_block_size(page));
#endif
+ mi_track_free(p);
mi_block_set_next(page, block, page->local_free);
page->local_free = block;
- // mi_track_mem_noaccess(block,mi_page_block_size(page));
if mi_unlikely(--page->used == 0) { // using this expression generates better code than: page->used--; if (mi_page_all_free(page))
_mi_page_retire(page);
}
@@ -529,7 +525,6 @@ void mi_free(void* p) mi_attr_noexcept
// note: recalc page in generic to improve code generation
mi_free_generic(segment, tid == segment->thread_id, p);
}
- mi_track_free(p);
}
bool _mi_free_delayed_block(mi_block_t* block) {
|
interface: place priority in understanding state of channel in graphKeys | @@ -46,16 +46,17 @@ export function useGraphModule(
): SidebarAppConfig {
const getStatus = useCallback(
(s: string) => {
- const unreads = graphUnreads?.[s]?.['/']?.unreads;
- if(typeof unreads === 'number' ? unreads > 0 : unreads?.size ?? 0 > 0) {
- return 'unread';
- }
const [, , host, name] = s.split("/");
const graphKey = `${host.slice(1)}/${name}`;
-
if (!graphKeys.has(graphKey)) {
return "unsubscribed";
}
+
+ const unreads = graphUnreads?.[s]?.['/']?.unreads;
+ if (typeof unreads === 'number' ? unreads > 0 : unreads?.size ?? 0 > 0) {
+ return 'unread';
+ }
+
return undefined;
},
[graphs, graphKeys, graphUnreads]
|
schema DOC fix LYS_SET_CONFIG description | @@ -733,7 +733,7 @@ struct lysp_deviation {
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
* 11 LYS_SET_UNITS | | |x|x| | | | | | | | | | | |
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- * 12 LYS_SET_CONFIG |x|x|x|x|x|x|x| | |x|x| | | | |
+ * 12 LYS_SET_CONFIG |x|x|x|x|x|x| | | | | | | | | |
* ---------------------+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*
*/
|
Log unknown input escape codes in xterm. | #endif
#include "error.h"
+#include "logging.h"
#define DOUBLE_CLICK_TIME 500
@@ -278,6 +279,8 @@ static void xterm_handle_mouse_click(int cb, int x, int y) {
state = SDL_RELEASED;
button = g_mouse_state.button_down;
break;
+ default:
+ TCOD_log_debug_f("unknown mouse button %i\n", cb_button);
}
if (type == SDL_MOUSEBUTTONDOWN) {
// We don't get button info on mouse up, so only do one click at once.
@@ -321,6 +324,8 @@ static void xterm_handle_mouse_wheel(int cb) {
case 1:
dy = -1;
break;
+ default:
+ TCOD_log_debug_f("unknown mouse wheel button %i\n", cb_button);
}
SDL_Event wheel_event = {
.wheel = {
@@ -409,6 +414,7 @@ static void xterm_handle_input_escape() {
int arg0, arg1;
if (!xterm_handle_input_escape_code(&start, &end, &arg0, &arg1))
return;
+ bool unknown = false;
switch (start) {
case '[': // CSI
switch (end) {
@@ -514,8 +520,13 @@ static void xterm_handle_input_escape() {
break;
case 24:
send_sdl_key_press(SDLK_F12, false);
+ break;
+ default:
+ unknown = true;
}
break;
+ default:
+ unknown = true;
}
break;
case 'O': // SS3
@@ -532,9 +543,15 @@ static void xterm_handle_input_escape() {
case 'S':
send_sdl_key_press(SDLK_F4, false);
break;
+ default:
+ unknown = true;
}
break;
+ default:
+ unknown = true;
}
+ if (unknown)
+ TCOD_log_debug_f("unknown input escape code '%c' '%c' %i %i\n", start, end, arg0, arg1);
}
static int xterm_handle_input(void *arg) {
|
Turn off demos in cmake when we're not at top level | @@ -54,8 +54,12 @@ if(NOT DEFINED CACHE{AFR_TOOLCHAIN})
set(AFR_TOOLCHAIN ${__toolchain} CACHE INTERNAL "Toolchain to build Amazon FreeRTOS.")
endif()
-# Provide an option to enable demos.
+# Provide an option to enable demos. If we're not at top level, turn off demos build by default.
+if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
option(AFR_ENABLE_DEMOS "Build demos for Amazon FreeRTOS." ON)
+else()
+ option(AFR_ENABLE_DEMOS "Build demos for Amazon FreeRTOS." OFF)
+endif()
# Provide an option to enable tests. Also set an helper variable to use in generator expression.
option(AFR_ENABLE_TESTS "Build tests for Amazon FreeRTOS. Requires recompiling whole library." OFF)
|
Excluded the optional tinyDTLS module from Doxygen | @@ -809,7 +809,8 @@ EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS = */cpu/cc26xx-cc13xx/lib/* \
*/cpu/cc26xx-cc13xx/rf-core/api/* \
- */platform/stm32nucleo-spirit1/stm32cube-lib/*
+ */platform/stm32nucleo-spirit1/stm32cube-lib/* \
+ */os/net/security/tinydtls/*
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
|
build: also add certificate support to .wgetrc for cov script | @@ -34,6 +34,8 @@ matrix:
- cat ~/entrust_l1k.crt >> ~/cacert.pem
- if [ -f ~/.curlrc ]; then echo "Dropping old ~/.curlrc:" ; cat ~/.curlrc ; fi
- echo "cacert=\"$HOME/cacert.pem\"" > ~/.curlrc
+ - if [ -f ~/.wgetrc ]; then echo "Dropping old ~/.wgetrc:" ; cat ~/.wgetrc ; fi
+ - echo "ca_certificate=\"$HOME/cacert.pem\"" > ~/.wgetrc
script:
- echo "This script runs coverity..."
|
Fix error message in memory_read_privatekey
file: userauth.c
note: fix error message
credit:
volund | @@ -687,7 +687,7 @@ memory_read_privatekey(LIBSSH2_SESSION * session,
(unsigned char *) passphrase,
hostkey_abstract)) {
return _libssh2_error(session, LIBSSH2_ERROR_FILE,
- "Unable to initialize private key from file");
+ "Unable to initialize private key from memory");
}
return 0;
|
Correct direction | @@ -1889,7 +1889,7 @@ int DeRestPluginPrivate::setWindowCoveringState(const ApiRequest &req, ApiRespon
if (R_GetProductId(taskRef.lightNode) == QLatin1String("Tuya_COVD AM43-0.45/40-ES-EZ(TY)"))
{
//This device use bad command
- ok = sendTuyaRequest(task, TaskTuyaRequest, DP_TYPE_ENUM, DP_IDENTIFIER_CONTROL, QByteArray("\x01", 1));
+ ok = sendTuyaRequest(task, TaskTuyaRequest, DP_TYPE_ENUM, DP_IDENTIFIER_CONTROL, QByteArray("\x02", 1));
}
else
{
@@ -1901,7 +1901,7 @@ int DeRestPluginPrivate::setWindowCoveringState(const ApiRequest &req, ApiRespon
if (R_GetProductId(taskRef.lightNode) == QLatin1String("Tuya_COVD AM43-0.45/40-ES-EZ(TY)"))
{
//This device use bad command
- ok = sendTuyaRequest(task, TaskTuyaRequest, DP_TYPE_ENUM, DP_IDENTIFIER_CONTROL, QByteArray("\x02", 1));
+ ok = sendTuyaRequest(task, TaskTuyaRequest, DP_TYPE_ENUM, DP_IDENTIFIER_CONTROL, QByteArray("\x01", 1));
}
else
{
|
Disable AVX2 | @@ -2,8 +2,8 @@ CC = gcc
INC_DIRS = -Ixmrig-override -Ixmrig -Ixmrig/3rdparty/argon2/include -Ixmrig/3rdparty/argon2/lib
# Temporarily disable optimizations to debug crashes
-CFLAGS = -g -Wall -c -fPIC -maes -O2 -fno-fast-math -fpermissive -Wno-fpermissive -Wno-strict-aliasing -Wno-sign-compare -DCPU_INTEL -DHAVE_SSE2 -DHAVE_SSSE3 -DHAVE_AVX2 $(INC_DIRS)
-CXXFLAGS = -g -Wall -maes -O2 -fno-fast-math -fexceptions -fno-rtti -Wno-class-memaccess -Wno-unused-function -fPIC -fpermissive -Wno-strict-aliasing -Wno-sign-compare -std=gnu++11 -DCPU_INTEL -DHAVE_SSE2 -DHAVE_SSSE3 -DHAVE_AVX2 $(INC_DIRS)
+CFLAGS = -g -Wall -c -fPIC -maes -Ofast -fno-fast-math -fpermissive -Wno-fpermissive -Wno-strict-aliasing -Wno-sign-compare -DCPU_INTEL -DHAVE_SSE2 -DHAVE_SSSE3 $(INC_DIRS)
+CXXFLAGS = -g -Wall -maes -Ofast -fno-fast-math -fexceptions -fno-rtti -Wno-class-memaccess -Wno-unused-function -fPIC -fpermissive -Wno-strict-aliasing -Wno-sign-compare -std=gnu++11 -DCPU_INTEL -DHAVE_SSE2 -DHAVE_SSSE3 $(INC_DIRS)
LDFLAGS = -shared
TARGET = libcryptonight.so
|
Fix update x,y colors when setting hue saturation | @@ -603,17 +603,35 @@ int DeRestPluginPrivate::setLightState(const ApiRequest &req, ApiResponse &rsp)
if (!hasXy && !hasSat)
{
+ ResourceItem *item = task.lightNode->item(RStateSat);
double r, g, b;
double x, y;
double h = ((360.0f / 65535.0f) * hue);
- double s = task.lightNode->saturation() / 255.0f;
+ double s = (item ? item->toNumber() : 0) / 255.0f;
double v = 1.0f;
Hsv2Rgb(&r, &g, &b, h, s, v);
Rgb2xy(&x, &y, r, g, b);
DBG_Printf(DBG_INFO, "x: %f, y: %f\n", x, y);
- task.lightNode->setColorXY(x * 65279.0f, y * 65279.0f);
+ x *= 65279.0f;
+ y *= 65279.0f;
+
+ item = task.lightNode->item(RStateX);
+ if (item && item->toNumber() != (quint16)x)
+ {
+ item->setValue((quint16)x);
+ Event e(RLights, RStateX, task.lightNode->id());
+ enqueueEvent(e);
+ }
+
+ item = task.lightNode->item(RStateY);
+ if (item && item->toNumber() != (quint16)y)
+ {
+ item->setValue((quint16)y);
+ Event e(RLights, RStateY, task.lightNode->id());
+ enqueueEvent(e);
+ }
}
if (hasSat || // merge later to set hue and saturation
@@ -662,17 +680,34 @@ int DeRestPluginPrivate::setLightState(const ApiRequest &req, ApiResponse &rsp)
if (!hasXy && !hasHue)
{
+ ResourceItem *item = task.lightNode->item(RStateHue);
double r, g, b;
double x, y;
- double h = ((360.0f / 65535.0f) * task.lightNode->enhancedHue());
- double s = sat / 254.0f;
+ double h = ((360.0f / 65535.0f) * (item ? item->toNumber() : 0));
+ double s = sat / 255.0f;
double v = 1.0f;
Hsv2Rgb(&r, &g, &b, h, s, v);
Rgb2xy(&x, &y, r, g, b);
- DBG_Printf(DBG_INFO, "x: %f, y: %f\n", x, y);
- task.lightNode->setColorXY(x * 65279.0f, y * 65279.0f);
+ x *= 65279.0f;
+ y *= 65279.0f;
+
+ item = task.lightNode->item(RStateX);
+ if (item && item->toNumber() != (quint16)x)
+ {
+ item->setValue((quint16)x);
+ Event e(RLights, RStateX, task.lightNode->id());
+ enqueueEvent(e);
+ }
+
+ item = task.lightNode->item(RStateY);
+ if (item && item->toNumber() != (quint16)y)
+ {
+ item->setValue((quint16)y);
+ Event e(RLights, RStateY, task.lightNode->id());
+ enqueueEvent(e);
+ }
}
if (hasXy || hasCt
|
Change mbedtls_set_err_add_hook to use doxygen style comment | @@ -114,19 +114,17 @@ extern "C" {
#define MBEDTLS_ERR_ERROR_GENERIC_ERROR -0x0001 /**< Generic error */
#define MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED -0x006E /**< This is a bug in the library */
-/** Helper macro and function to combine a high and low level error code.
+
+#if defined(MBEDTLS_TEST_HOOKS)
+/**
+ * \brief Set a function pointer (hook) to allow for invasive testing of error
+ * code addition.
*
- * This function uses a hook (`mbedtls_test_err_add_hook`) to allow invasive
- * testing of its inputs. This is used in the test infrastructure to report
- * on errors when combining two error codes of the same level (e.g: two high
- * or two low level errors).
+ * This hook is used in the test infrastructure to report on errors when
+ * combining two error codes of the same level.
*
- * To set a hook use
- * ```
- * mbedtls_set_err_add_hook(&mbedtls_check_foo);
- * ```
+ * \param hook hook to invasive testing function
*/
-#if defined(MBEDTLS_TEST_HOOKS)
void mbedtls_set_err_add_hook( void *hook );
int mbedtls_err_add( int high, int low, const char *file, int line );
#define MBEDTLS_ERR_ADD( high, low ) \
|
Stop at non-option argparse | @@ -221,7 +221,7 @@ int main(int argc, char *argv[]) {
};
struct argparse argparse;
- argparse_init(&argparse, options, usage, 0);
+ argparse_init(&argparse, options, usage, ARGPARSE_STOP_AT_NON_OPTION);
argc = argparse_parse(&argparse, argc, (const char **)argv);
if (version) {
|
Fix missing isgraph() from baselibc | @@ -77,6 +77,11 @@ __extern_inline int isprint(int __c)
return (__c >= 0x20 && __c <= 0x7e);
}
+__extern_inline int isgraph(int __c)
+{
+ return (__c > 0x20 && __c < 0x7f);
+}
+
__extern_inline int toupper(int __c)
{
return islower(__c) ? (__c & ~32) : __c;
|
Enable internal for all languages with some exceptions | @@ -92,6 +92,18 @@ PEERDIRS_RULES_PATH=\
build/rules/std_filesystem.policy \
build/rules/yp.policy
+CHECK_INTERNAL=yes
+INTERNAL_EXCEPTIONS=\
+ contrib \
+ search/begemot/rules/internal \
+ mssngr/router/lib/protos/internal \
+ cv/imageproc/ocr/api/mobile_c/internal \
+ kernel/ugc/security/lib/internal \
+ maps/automotive/store/internal \
+ maps/mobile/libs/mapkit/internal \
+ security/ant-secret/secret-search/internal \
+ security/ant-secret/snooper/internal
+
when ($MAPSMOBI_BUILD_TARGET == "yes" && $OS_LINUX != "yes") {
USE_STL_SYSTEM=yes
}
|
Srvdot has announcement strings now. | use std
use http
-const main = {
- var srv //, router
+const main = {args
+ var srv, ann, cmd
- match http.announce("tcp!localhost!8080")
+ cmd = std.optparse(args, &[
+ .maxargs=0,
+ .opts = [[.opt='a', .arg="ann", .desc="announce on `ann`"]][:]
+ ])
+ ann = "tcp!localhost!8080"
+ for opt in cmd.opts
+ match opt
+ | ('a', a): ann = a
+ | _: std.die("unreachable")
+ ;;
+ ;;
+
+ match http.announce(ann)
| `std.Ok s: srv = s
| `std.Err e: std.fatal("unable to announce: {}\n", e)
;;
|
More strict section order check | @@ -591,30 +591,29 @@ _ (Read_u32 (& version, & pos, end));
_throwif (m3Err_wasmMalformed, magic != 0x6d736100);
_throwif (m3Err_incompatibleWasmVersion, version != 1);
- m3log (parse, "found magic + version");
- u8 previousSection = 0;
+
+ static const u8 sectionsOrder[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 10, 11, 0 }; // 0 is a placeholder
+ u8 expectedSection = 0;
while (pos < end)
{
u8 section;
_ (ReadLEB_u7 (& section, & pos, end));
- if (section > previousSection or // from the spec: sections must appear in order
- section == 0 or // custom section
- (section == 12 and previousSection == 9) or // if present, DataCount goes after Element
- (section == 10 and previousSection == 12)) // and before Code
- {
+ if (section != 0) {
+ // Ensure sections appear only once and in order
+ while (sectionsOrder[expectedSection++] != section) {
+ _throwif(m3Err_misorderedWasmSection, expectedSection >= 12);
+ }
+ }
+
u32 sectionLength;
_ (ReadLEB_u32 (& sectionLength, & pos, end));
_throwif(m3Err_wasmMalformed, pos + sectionLength > end);
+
_ (ParseModuleSection (module, section, pos, sectionLength));
pos += sectionLength;
-
- if (section)
- previousSection = section;
- }
- else _throw (m3Err_misorderedWasmSection);
}
} _catch:
|
OpenCoreMisc: Fix compilation and add version for logging | @@ -265,11 +265,11 @@ OcMiscEarlyInit (
DEBUG ((
DEBUG_INFO,
- "OC: OpenCore is now loading (Vault: %d/%d, Sign %d/%d)...\n",
+ "OC: OpenCore %a is loading in %a mode (%d/%d)...\n",
+ OcMiscGetVersionString (),
+ Config->Misc.Security.Vault,
Storage->HasVault,
- Config->Misc.Security.RequireVault,
- VaultKey != NULL,
- Config->Misc.Security.RequireSignature
+ VaultKey != NULL
));
Status = gRT->GetTime (&BootTime, NULL);
|
TestBmf: Convert to EDK-II codestyle | @@ -53,19 +53,23 @@ GuiBmpToImage (
return EFI_SUCCESS;
}
-int main (int argc, char** argv)
+int main (int argc, const char *argv[])
{
BOOLEAN Result;
GUI_FONT_CONTEXT Context;
- uint8_t *FontImage;
- uint32_t FontImageSize;
- uint8_t *FontMetrics;
- uint32_t FontMetricsSize;
+ UINT8 *FontImage;
+ UINT32 FontImageSize;
+ UINT8 *FontMetrics;
+ UINT32 FontMetricsSize;
GUI_IMAGE Label;
EFI_STATUS Status;
VOID *BmpImage;
UINT32 BmpImageSize;
- FILE *write_ptr;
+
+ if (argc != 3) {
+ DEBUG ((DEBUG_ERROR, "./Bmf <FontImage> <FontMetrics>"));
+ return -1;
+ }
FontImage = UserReadFile (argv[1], &FontImageSize);
FontMetrics = UserReadFile (argv[2], &FontMetricsSize);
@@ -75,7 +79,7 @@ int main (int argc, char** argv)
return -1;
}
- Result = GuiGetLabel (&Label, &Context, L"Time Machine HD", sizeof ("Time Machine HD") - 1, FALSE);
+ Result = GuiGetLabel (&Label, &Context, L"Time Machine HD", L_STR_LEN ("Time Machine HD"), FALSE);
if (!Result) {
DEBUG ((DEBUG_WARN, "BMF: label failed\n"));
return -1;
@@ -96,11 +100,7 @@ int main (int argc, char** argv)
return -1;
}
- write_ptr = fopen ("Label.bmp", "wb");
- if (write_ptr != NULL) {
- fwrite (BmpImage, BmpImageSize, 1, write_ptr);
- }
- fclose (write_ptr);
+ UserWriteFile ("Label.bmp", BmpImage, BmpImageSize);
FreePool (BmpImage);
|
refactor(warning):
Warning(boatplatform_internal.c.c) : passing 'BUINT8 *const' (aka 'unsigned char *const') to parameter of type 'BCHAR *' | @@ -549,7 +549,7 @@ static BOAT_RESULT sBoatPort_keyCreate_external_injection_pkcs(const BoatWalletP
return BOAT_ERROR_COMMON_OUT_OF_MEMORY;
}
- result = UtilityPKCS2Native(config->prikey_content.field_ptr,&keypair);
+ result = UtilityPKCS2Native((BCHAR*)(config->prikey_content.field_ptr),&keypair);
if(result != BOAT_SUCCESS){
BoatLog(BOAT_LOG_NORMAL, ">>>>>>>>>> UtilityPKCS2Native err.");
UtilityFreeKeypair(keypair);
|
Use yaml safe_load in gppkg
Commit added in PR
updated yaml and changed yaml.load to yaml.safe_load in gpload.
gppkg uses yaml as well, but references were not updated - this commit
resolves that discrepancy. | @@ -240,7 +240,7 @@ class Gppkg:
for cur_file in archive_list:
if cur_file.endswith(SPECFILE_NAME):
specfile = tarinfo.extractfile(cur_file)
- yamlfile = yaml.load(specfile)
+ yamlfile = yaml.safe_load(specfile)
keys = yamlfile.keys()
break
@@ -1345,7 +1345,7 @@ class BuildGppkg(Operation):
cur_file = None
with open(specfile) as cur_file:
- yamlfile = yaml.load(cur_file)
+ yamlfile = yaml.safe_load(cur_file)
tags = yamlfile.keys()
@@ -1368,7 +1368,7 @@ class BuildGppkg(Operation):
try:
with open(specfile) as cur_file:
- yamlfile = yaml.load(cur_file)
+ yamlfile = yaml.safe_load(cur_file)
if not self._verify_tags(yamlfile):
return False
|
bletiny: Add support to modify privacy mode | @@ -2463,6 +2463,46 @@ static struct kv_pair cmd_set_addr_types[] = {
{ NULL }
};
+static void
+bletiny_set_priv_mode_help(void)
+{
+ console_printf("Available set priv_mode params: \n");
+ help_cmd_kv_dflt("addr_type", cmd_set_addr_types, BLE_ADDR_PUBLIC);
+ help_cmd_byte_stream_exact_length("addr", 6);
+ help_cmd_uint8("mode");
+}
+
+static int
+cmd_set_priv_mode(void)
+{
+ ble_addr_t addr;
+ uint8_t priv_mode;
+ int rc;
+
+ addr.type = parse_arg_kv_default("addr_type", cmd_set_addr_types,
+ BLE_ADDR_PUBLIC, &rc);
+ if (rc != 0) {
+ console_printf("invalid 'addr_type' parameter\n");
+ help_cmd_kv_dflt("addr_type", cmd_set_addr_types, BLE_ADDR_PUBLIC);
+ return rc;
+ }
+
+ rc = parse_arg_mac("addr", addr.val);
+ if (rc != 0) {
+ console_printf("invalid 'addr' parameter\n");
+ help_cmd_byte_stream_exact_length("addr", 6);
+ return rc;
+ }
+
+ priv_mode = parse_arg_uint8("mode", &rc);
+ if (rc != 0) {
+ console_printf("missing mode\n");
+ return rc;
+ }
+
+ return ble_gap_set_priv_mode(&addr, priv_mode);
+}
+
static void
bletiny_set_addr_help(void)
{
@@ -2544,6 +2584,7 @@ cmd_set(int argc, char **argv)
bletiny_set_adv_data_help();
bletiny_set_sm_data_help();
bletiny_set_addr_help();
+ bletiny_set_priv_mode_help();
return 0;
}
@@ -2557,6 +2598,11 @@ cmd_set(int argc, char **argv)
return rc;
}
+ if (argc > 1 && strcmp(argv[1], "priv_mode") == 0) {
+ rc = cmd_set_priv_mode();
+ return rc;
+ }
+
good = 0;
rc = parse_arg_find_idx("addr");
|
Update: Implications working again!! | @@ -339,6 +339,7 @@ void Cycle_Perform(long currentTime)
for(int j=0; j<concepts.itemsAmount; j++)
{
Concept *c = concepts.items[j].address;
+ //first filter based on common term (semantic relationship)
bool has_common_term = false;
for(int k=0; k<5; k++)
{
@@ -355,7 +356,22 @@ void Cycle_Perform(long currentTime)
}
}
}
- PROCEED:
+ PROCEED:;
+ //second filter based on precondition implication (temporal relationship)
+ bool is_temporally_related = false;
+ if(is_temporally_related)
+ {
+ for(int k=0; k<c->precondition_beliefs[0].itemsAmount; k++)
+ {
+ Implication imp = c->precondition_beliefs[0].array[k];
+ Term subject = Term_ExtractSubterm(&imp.term, 1);
+ if(Variable_Unify(&subject, &e->term).success)
+ {
+ is_temporally_related = true;
+ break;
+ }
+ }
+ }
if(has_common_term)
{
countConceptsMatched++;
@@ -403,7 +419,7 @@ void Cycle_Perform(long currentTime)
RuleTable_Apply(e->term, c->term, e->truth, belief->truth, e->occurrenceTime, stamp, currentTime, priority, c->priority, true);
}
}
- if(has_common_term && e->type == EVENT_TYPE_BELIEF)
+ if(is_temporally_related && e->type == EVENT_TYPE_BELIEF)
{
for(int i=0; i<c->precondition_beliefs[0].itemsAmount; i++)
{
|
Redefine IP structure. Temporary broken compatibility and won't compile | @@ -119,12 +119,32 @@ typedef enum {
LWESP_IPTYPE_V6 /*!< IP type is V6 */
} lwesp_iptype_t;
+/**
+ * \ingroup LWESP_TYPEDEFS
+ * \brief IPv4 address structure
+ */
+typedef struct {
+ uint8_t addr[4];
+} lwesp_ip4_addr_t;
+
+/**
+ * \ingroup LWESP_TYPEDEFS
+ * \brief IPv6 address structure
+ */
+typedef struct {
+ uint16_t addr[6]; /*!< IP address data */
+} lwesp_ip6_addr_t;
+
/**
* \ingroup LWESP_TYPEDEFS
* \brief IP structure
*/
typedef struct {
- uint8_t ip[4]; /*!< IPv4 address */
+ union {
+ lwesp_ip4_addr_t ip4; /*!< IPv4 address */
+ lwesp_ip6_addr_t ip6; /*!< IPv6 address */
+ } addr;
+ lwesp_iptype_t type; /*!< IP type, either V4 or V6 */
} lwesp_ip_t;
/**
|
BugID:18679699: otaapp support diff test | #endif
#include "ota/ota_service.h"
+#include "ota_hal_plat.h"
+#include "ota_hal_os.h"
static ota_service_t ctx = {0};
@@ -72,16 +74,6 @@ static void handle_ota_cmd(char *buf, int blen, int argc, char **argv)
aos_task_new("ota_example", ota_work, &ctx, 1024 * 6);
}
-typedef struct
-{
- uint32_t ota_len;
- uint32_t ota_crc;
- uint32_t ota_type;
- uint32_t update_type;
- uint32_t splict_size;
- uint8_t diff_version;
-} ota_reboot_info_t;
-
static void handle_diff_cmd(char *pwbuf, int blen, int argc, char **argv)
{
const char *rtype = argc > 1 ? argv[0] : "";
@@ -91,12 +83,13 @@ static void handle_diff_cmd(char *pwbuf, int blen, int argc, char **argv)
}
uint32_t ota_size = atoi(argv[1]);
uint32_t splict_size = atoi(argv[2]);
- ota_reboot_info_t ota_info;
- ota_info.ota_len = ota_size;
- ota_info.ota_type = 1;
- ota_info.diff_version = 1;
+ ota_boot_param_t ota_info;
+ ota_info.rec_size = ota_size;
ota_info.splict_size = splict_size;
+ ota_info.upg_flag = OTA_DIFF;
+ ota_info.res_type = OTA_FINISH;
LOG("%s %d %d %p\n", rtype, ota_size, splict_size, &ota_info);
+ ota_hal_boot(&ota_info);
//hal_ota_switch_to_new_fw(&ota_info);
}
}
|
Remove a pointless "#if 0" block from BN_mul. | @@ -587,46 +587,6 @@ int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
rr->top = top;
goto end;
}
-# if 0
- if (i == 1 && !BN_get_flags(b, BN_FLG_STATIC_DATA)) {
- BIGNUM *tmp_bn = (BIGNUM *)b;
- if (bn_wexpand(tmp_bn, al) == NULL)
- goto err;
- tmp_bn->d[bl] = 0;
- bl++;
- i--;
- } else if (i == -1 && !BN_get_flags(a, BN_FLG_STATIC_DATA)) {
- BIGNUM *tmp_bn = (BIGNUM *)a;
- if (bn_wexpand(tmp_bn, bl) == NULL)
- goto err;
- tmp_bn->d[al] = 0;
- al++;
- i++;
- }
- if (i == 0) {
- /* symmetric and > 4 */
- /* 16 or larger */
- j = BN_num_bits_word((BN_ULONG)al);
- j = 1 << (j - 1);
- k = j + j;
- t = BN_CTX_get(ctx);
- if (al == j) { /* exact multiple */
- if (bn_wexpand(t, k * 2) == NULL)
- goto err;
- if (bn_wexpand(rr, k * 2) == NULL)
- goto err;
- bn_mul_recursive(rr->d, a->d, b->d, al, t->d);
- } else {
- if (bn_wexpand(t, k * 4) == NULL)
- goto err;
- if (bn_wexpand(rr, k * 4) == NULL)
- goto err;
- bn_mul_part_recursive(rr->d, a->d, b->d, al - j, j, t->d);
- }
- rr->top = top;
- goto end;
- }
-# endif
}
#endif /* BN_RECURSION */
if (bn_wexpand(rr, top) == NULL)
|
Make isSetup return false if the app is locked | @@ -460,6 +460,13 @@ func Py_DecodeLocale(_: UnsafePointer<Int8>!, _: UnsafeMutablePointer<Int>!) ->
/// Set to `true` when the REPL is ready to run scripts.
@objc var isSetup: Bool {
+
+ #if MAIN
+ if !isUnlocked {
+ return false
+ }
+ #endif
+
return ProcessInfo.processInfo.environment.keys.contains("IS_PYTHON_RUNNING")
}
|
SLW: fix running in mambo
Fixes: | @@ -1729,8 +1729,10 @@ void slw_init(void)
{
struct proc_chip *chip;
- if (proc_chip_quirks & QUIRK_MAMBO_CALLOUTS)
+ if (proc_chip_quirks & QUIRK_MAMBO_CALLOUTS) {
wakeup_engine_state = WAKEUP_ENGINE_NOT_PRESENT;
+ return;
+ }
if (proc_gen == proc_gen_p8) {
for_each_chip(chip) {
slw_init_chip_p8(chip);
|
fix other (potential) problems related | @@ -835,6 +835,10 @@ htparser_run(htparser * p, htparse_hooks * hooks, const char * data, size_t len)
HTP_SET_BUF(ch);
}
+ if (evhtp_unlikely(i + 1 >= len)) {
+ break;
+ }
+
ch = data[++i];
} while (i < len);
@@ -1319,6 +1323,10 @@ htparser_run(htparser * p, htparse_hooks * hooks, const char * data, size_t len)
break;
}
+ if (evhtp_unlikely(i + 1 >= len)) {
+ break;
+ }
+
ch = data[++i];
} while (i < len);
@@ -1734,6 +1742,10 @@ hdrline_start:
break;
}
+ if (evhtp_unlikely(i + 1 >= len)) {
+ break;
+ }
+
ch = data[++i];
} while (i < len);
|
rust/bitbox02/ui: sync label size with the C label component | @@ -81,7 +81,7 @@ where
let component = unsafe {
bitbox02_sys::trinary_input_string_create_password(
- crate::str_to_cstr_force!(title, 100).as_ptr(),
+ crate::str_to_cstr_force!(title, 199).as_ptr(), // same as label.c max size
special_chars,
Some(c_confirm_callback::<F>),
// TODO: from_raw
@@ -148,8 +148,8 @@ where
F: FnMut(bool) + 'a,
{
let params = bitbox02_sys::confirm_params_t {
- title: crate::str_to_cstr_force!(params.title, 200).as_ptr(),
- body: crate::str_to_cstr_force!(params.body, 200).as_ptr(),
+ title: crate::str_to_cstr_force!(params.title, 199).as_ptr(), // same as label.c max size
+ body: crate::str_to_cstr_force!(params.body, 199).as_ptr(), // same as label.c max size
font: params.font.as_ptr(),
scrollable: params.scrollable,
longtouch: params.longtouch,
@@ -221,7 +221,7 @@ where
let component = unsafe {
bitbox02_sys::status_create(
- crate::str_to_cstr_force!(text, 200).as_ptr(),
+ crate::str_to_cstr_force!(text, 199).as_ptr(), // same as label.c max size
status_success,
Some(c_callback::<F>),
// TODO: from_raw
|
core: moved formerly static fields to mk_server | @@ -172,6 +172,16 @@ struct mk_server
/* FIXME: temporal map of Network Layer plugin */
struct mk_plugin_network *network;
+ /* Thread initializator helpers (sched_launch_thread) */
+ int pth_init;
+ pthread_cond_t pth_cond;
+ pthread_mutex_t pth_mutex;
+
+ /* worker_id as used by mk_sched_register_thread, it was moved here
+ * because it has to be local to each mk_server instance.
+ */
+ int worker_id;
+
/* Direct map to Stage plugins */
struct mk_list stage10_handler;
struct mk_list stage20_handler;
|
Remove sensor setting from deep sleep example | @@ -15,15 +15,6 @@ print(rtc.datetime())
sensor.reset()
-# Enable sensor softsleep
-sensor.sleep(True)
-
-# Optionally bypass the regulator on OV7725
-# for the lowest possible power consumption.
-if (sensor.get_id() == sensor.OV7725):
- # Bypass internal regulator
- sensor.__write_reg(0x4F, 0x18)
-
# Shutdown the sensor (pulls PWDN high).
sensor.shutdown(True)
|
The inline cache pointer can be a restrict pointer
In the tests I ran on GCC it didn't have a measurable difference. But it
shouldn't hurt to make this a restrict pointer. | @@ -227,11 +227,13 @@ void pallene_renormalize_array(
}
}
+/* This function is a version of luaH_getshortstr that uses an inline cache for
+ * the hash function */
+
static const TValue PALLENE_ABSENTKEY = {ABSTKEYCONSTANT};
-/* This function is a speciallization of luaH_getshortstr from ltable.c */
static inline
-TValue *pallene_getshortstr(Table *t, TString *key, size_t *pos)
+TValue *pallene_getshortstr(Table *t, TString *key, size_t * restrict pos)
{
if (*pos < sizenode(t)) {
Node *n = gnode(t, *pos);
|
Don't try to bind power configuration cluster for Ikea Tradfri remote with old firmware
The attribute isn't supported in old firmware, and binding would be done
in an infinite loop. | @@ -1537,6 +1537,11 @@ bool DeRestPluginPrivate::checkSensorBindingsForAttributeReporting(Sensor *senso
val = sensor->getZclValue(*i, 0x0021); // battery percentage remaining
}
+ if (sensor->modelId() == QLatin1String("TRADFRI remote control") && sensor->swVersion() == QLatin1String("0.9.8.1-5.7.0.0"))
+ {
+ continue; // too old doesn't support battery percentage remaining attribute
+ }
+
if (val.timestampLastConfigured.isValid() && val.timestampLastConfigured.secsTo(now) < (val.maxInterval * 1.5))
{
continue;
|
Added some rudimentary error checking in mateltwise kernel | @@ -275,6 +275,16 @@ void libxsmm_generator_cvtfp32bf16_avx512_microkernel( libxsmm_generated_code*
unsigned int i = 0, im, m, n, m_trips, use_m_masking, mask_in_count, mask_out_count, reg_0, reg_1;
+ /* Some rudimentary checking of M, N and LDs*/
+ if ( (i_mateltwise_desc->m > i_mateltwise_desc->ldi) || (i_mateltwise_desc->m > i_mateltwise_desc->ldo) ) {
+ LIBXSMM_HANDLE_ERROR( io_generated_code, LIBXSMM_ERR_LDA );
+ return;
+ }
+ if ( (i_mateltwise_desc->m < 0) || (i_mateltwise_desc->n < 0) ) {
+ LIBXSMM_HANDLE_ERROR( io_generated_code, LIBXSMM_ERR_GENERAL );
+ return;
+ }
+
/* Configure the register mapping for this eltwise kernel */
i_gp_reg_mapping->gp_reg_in = LIBXSMM_X86_GP_REG_R8;
i_gp_reg_mapping->gp_reg_out = LIBXSMM_X86_GP_REG_R9;
@@ -483,7 +493,6 @@ void libxsmm_generator_mateltwise_avx_avx512_kernel( libxsmm_generated_code*
libxsmm_mateltwise_kernel_config l_kernel_config;
libxsmm_mateltwise_gp_reg_mapping l_gp_reg_mapping;
libxsmm_loop_label_tracker l_loop_label_tracker;
-
/* define loop_label_tracker */
libxsmm_reset_loop_label_tracker( &l_loop_label_tracker );
@@ -503,7 +512,17 @@ void libxsmm_generator_mateltwise_avx_avx512_kernel( libxsmm_generated_code*
/* Depending on the elementwise function, dispatch the proper code JITer */
if (i_mateltwise_desc->operation == LIBXSMM_MELTW_OPERATION_CVTFP32BF16) {
+ if ( (LIBXSMM_GEMM_PRECISION_F32 == LIBXSMM_GETENUM_INP( i_mateltwise_desc->datatype )) && (LIBXSMM_GEMM_PRECISION_BF16 == LIBXSMM_GETENUM_OUT( i_mateltwise_desc->datatype ))) {
libxsmm_generator_cvtfp32bf16_avx512_microkernel( io_generated_code, &l_loop_label_tracker, &l_gp_reg_mapping, &l_kernel_config, i_mateltwise_desc );
+ } else {
+ /* This should not happen */
+ LIBXSMM_HANDLE_ERROR( io_generated_code, LIBXSMM_ERR_UNSUP_DATATYPE );
+ return;
+ }
+ } else {
+ /* This should not happen */
+ LIBXSMM_HANDLE_ERROR( io_generated_code, LIBXSMM_ERR_GENERAL );
+ return;
}
/* close asm */
|
jenkins: do not build date and fcrypt | @@ -443,11 +443,15 @@ def generateFullBuildStages() {
tasks << buildAndTestMingwW64()
// Build Elektra on alpine
+ // TODO: Remove bash after #2077 is resolved
+ // TODO: Add more deps to test them with musl
+ // TODO: add date + fcrypt when their issues are resolved
tasks << buildAndTest(
"alpine",
DOCKER_IMAGES.alpine,
CMAKE_FLAGS_BUILD_ALL + [
- 'BUILD_STATIC': 'ON'
+ 'BUILD_STATIC': 'ON',
+ 'PLUGINS': 'ALL;-date;-fcrypt;-passwd'
],
[TEST.ALL]
)
|
Default data viewer implementation is very strict and breaks common functionality, i.e. events without a level are getting blocked by default.
Temporarily disable it in common shared codebase. Office guys should enable in their build. | #if defined(HAVE_PRIVATE_MODULES)
#define HAVE_MAT_EXP
#define HAVE_MAT_FIFOSTORAGE
-#define HAVE_MAT_DEFAULTDATAVIEWER
+//#define HAVE_MAT_DEFAULTDATAVIEWER
#endif
#define HAVE_MAT_JSONHPP
#define HAVE_MAT_ZLIB
|
include/debug.h: change a format of vaargs to ...
"x..." makes a warning with some toolchain version.
Let's use "...". | #ifdef CONFIG_DEBUG_BINFMT_ERROR
# define berr(format, ...) dbg(format, ##__VA_ARGS__)
#else
-# define berr(x...)
+# define berr(...)
#endif
#ifdef CONFIG_DEBUG_BINFMT_WARN
# define bwarn(format, ...) wdbg(format, ##__VA_ARGS__)
#else
-# define bwarn(x...)
+# define bwarn(...)
#endif
#ifdef CONFIG_DEBUG_BINFMT_INFO
# define binfo(format, ...) vdbg(format, ##__VA_ARGS__)
#else
-# define binfo(x...)
+# define binfo(...)
#endif
#ifdef CONFIG_DEBUG_BINMGR_ERROR
|
BugID:18542485: optimize CLI/KV/VFS component macro | @@ -50,7 +50,7 @@ else
$(NAME)_SOURCES += rhino.c
endif
-ifeq ($(AOS_COMP_KV), 1)
+ifeq ($(AOS_COMP_KV),y)
$(NAME)_SOURCES += kv.c
endif
@@ -58,11 +58,11 @@ ifeq ($(AOS_COMP_MBMASTER),y)
$(NAME)_SOURCES += mbmaster.c
endif
-ifeq ($(AOS_COMP_CLI),1)
+ifeq ($(AOS_COMP_CLI),y)
$(NAME)_SOURCES += cli.c
endif
-ifeq ($(AOS_COMP_VFS),1)
+ifeq ($(AOS_COMP_VFS),y)
$(NAME)_SOURCES += vfs.c
endif
|
CONTRIBUTING: swith documentation from CMake to Meson. | @@ -30,14 +30,13 @@ SIMDe contains an extensive test suite used for development. Most
users will never need to build the suite, but if you're contributing
code to SIMDe you'll need to build them.
-Here is the basic procedure for compiling the tests:
+Here is the basic procedure for compiling and running the tests:
```bash
-mkdir test/build
-cd test/build
-CFLAGS="-march=native" CXXFLAGS="-march=native" cmake ..
-make -j
-./run-tests
+mkdir build
+cd build
+CFLAGS="-march=native" CXXFLAGS="-march=native" meson ..
+ninja test
```
Note that `-march=native` may not be the right flag for your compiler.
@@ -48,7 +47,8 @@ what flags you should use to enable the SIMD extension for your target
platform. Here are a few to try:
* ARM:
- * `-march=armv8-a+simd` (for ARMv8)
+ * `-march=armv8-a+simd` (for AArch64)
+ * `-march=armv8-a+simd -mfpu=auto` (for ARMv8)
* `-march=armv7-a -mfpu=neon` (for ARMv7)
* POWER
* `-mcpu=native`
@@ -56,6 +56,10 @@ platform. Here are a few to try:
If you need a flag not listed above, please let us know so we can add
it to the list.
+You may also want to take a look at the
+[Docker container](https://github.com/simd-everywhere/simde/tree/master/docker)
+which has many builds pre-configured, including cross-compilers and emulators.
+
## Coding Style
SIMDe has an [EditorConfig](https://editorconfig.org/) file to
|
Ignore errors on unloading UEFI driver | @@ -1813,19 +1813,16 @@ NvmDimmDriverDriverBindingStop(
TempReturnCode = gBS->UninstallMultipleProtocolInterfaces(gNvmDimmData->DriverHandle,
&gNvmDimmConfigProtocolGuid, &gNvmDimmDriverNvmDimmConfig, NULL);
if (EFI_ERROR(TempReturnCode)) {
- FIRST_ERR(ReturnCode, TempReturnCode);
NVDIMM_WARN("Failed to uninstall the NvmDimmConfig protocol, error = " FORMAT_EFI_STATUS ".\n", TempReturnCode);
}
TempReturnCode = UninitializeSmbusAccess();
if (EFI_ERROR(TempReturnCode)) {
- FIRST_ERR(ReturnCode, TempReturnCode);
NVDIMM_DBG("Failed to uninstall smbus access, error = 0x%llx.", TempReturnCode);
}
TempReturnCode = SmbusDeinit();
if (EFI_ERROR(TempReturnCode)) {
- FIRST_ERR(ReturnCode, TempReturnCode);
NVDIMM_DBG("Failed to Smbus deinit, error = " FORMAT_EFI_STATUS ".\n", TempReturnCode);
}
/**
@@ -1833,7 +1830,6 @@ NvmDimmDriverDriverBindingStop(
**/
TempReturnCode = FreeDimmList();
if (EFI_ERROR(TempReturnCode)) {
- FIRST_ERR(ReturnCode, TempReturnCode);
NVDIMM_DBG("Failed to free dimm list, error = " FORMAT_EFI_STATUS ".\n", TempReturnCode);
}
|
Format and mark exposed/documented members. | @@ -2473,10 +2473,10 @@ typedef struct entity
unsigned pathblocked;
s_axis_principal_float *waypoints;
int numwaypoints;
- unsigned int animpos; // Current animation frame.
- unsigned int animnum; // animation id.
+ unsigned int animpos; // Current animation frame. ~~ animation_frame
+ unsigned int animnum; // Current animation id. ~~ animation_id
unsigned int prevanimnum; // previous animation id.
- s_anim *animation;
+ s_anim *animation; // Pointer to animation collection. ~~ animation_collection
float knockdowncount;
s_damage_on_landing damage_on_landing; // ~~
int die_on_landing; // flag for damageonlanding (active if self->health <= 0)
|
flash_ec: leverage new ftdii2c_cmd interface for ite flash
This adopts the change to the ftdii2c controls
CQ-DEPEND=CL:1156425
BRANCH=None
TEST=None
Tested-by: Matthew Blecker | @@ -487,9 +487,9 @@ cleanup() {
if [ "${CHIP}" == "it83xx" ] ; then
info "Reinitialize ftdi_i2c interface"
- dut_control --ftdii2c init
- dut_control --ftdii2c open
- dut_control --ftdii2c setclock
+ dut_control ftdii2c_cmd:init
+ dut_control ftdii2c_cmd:open
+ dut_control ftdii2c_cmd:setclock
# Reset the dut mux if it exists
if $(servo_has_dut_i2c_mux); then
@@ -1000,7 +1000,7 @@ function flash_it83xx() {
servo_ec_hard_reset
info "Close connection to ftdi_i2c interface"
- dut_control --ftdii2c close
+ dut_control ftdii2c_cmd:close
info "Run iteflash..."
sudo ${ITEFLASH} -w ${IMG}
|
Makefile: add publish target | @@ -29,3 +29,9 @@ release-date:
-exec sed -i'' \
-e "s/^Release pending/Released $$(date '+%d-%m-%Y')/" \
'{}' ';'
+
+.PHONY: publish
+publish:
+ for archive in $$(cabal sdist all | grep -v '^Wrote tarball sdist to'); do \
+ cabal upload "$$archive" --publish; \
+ done
|
[mod_openssl] inherit cipherlist from global scope
inherit cipherlist from global scope if not set in $SERVER["socket"] | @@ -1236,8 +1236,18 @@ SETDEFAULTS_FUNC(mod_openssl_set_defaults)
s->ssl_read_ahead = (0 == i)
? 0
: p->config_storage[0]->ssl_read_ahead;
- if (0 != i) buffer_copy_buffer(s->ssl_ca_crl_file, p->config_storage[0]->ssl_ca_crl_file);
- if (0 != i) buffer_copy_buffer(s->ssl_ca_dn_file, p->config_storage[0]->ssl_ca_dn_file);
+ if (0 != i) {
+ buffer *b;
+ b = p->config_storage[0]->ssl_ca_crl_file;
+ if (!buffer_string_is_empty(b))
+ buffer_copy_buffer(s->ssl_ca_crl_file, b);
+ b = p->config_storage[0]->ssl_ca_dn_file;
+ if (!buffer_string_is_empty(b))
+ buffer_copy_buffer(s->ssl_ca_dn_file, b);
+ b = p->config_storage[0]->ssl_cipher_list;
+ if (!buffer_string_is_empty(b))
+ buffer_copy_buffer(s->ssl_cipher_list, b);
+ }
s->ssl_conf_cmd = (0 == i)
? array_init()
: array_init_array(p->config_storage[0]->ssl_conf_cmd);
|
common CHANGE move enumerations of YANG_POSITION and YANG_VALUE closer to each other | @@ -285,7 +285,6 @@ enum yang_keyword {
YANG_OUTPUT,
YANG_PATH,
YANG_PATTERN,
- YANG_POSITION,
YANG_PREFIX,
YANG_PRESENCE,
YANG_RANGE,
@@ -302,6 +301,7 @@ enum yang_keyword {
YANG_UNIQUE,
YANG_UNITS,
YANG_USES,
+ YANG_POSITION,
YANG_VALUE,
YANG_WHEN,
YANG_YANG_VERSION,
|
add family for openmpi3 | @@ -32,6 +32,8 @@ fi
if [ "$OHPC_MPI_FAMILY" = "openmpi" ]; then
module load openmpi
+elif [ "$OHPC_MPI_FAMILY" = "openmpi3" ]; then
+ module load openmpi
elif [ "$OHPC_MPI_FAMILY" = "impi" ]; then
module load impi
elif [ "$OHPC_MPI_FAMILY" = "mvapich2" ]; then
|
fixed error in tinker 2008 hmf and removed bugtesting printf statement | @@ -217,6 +217,7 @@ static double massfunc_f(ccl_cosmology *cosmo, double halomass, double a, double
fit_c = gsl_spline_eval(cosmo->data.phihmf, log10(odelta), cosmo->data.accelerator_d);
fit_d = pow(10, -1.0*pow(0.75 / log10(odelta / 75.0), 1.2));
+ fit_A = fit_A*pow(a, 0.14);
fit_a = fit_a*pow(a, 0.06);
fit_b = fit_b*pow(a, fit_d);
@@ -249,8 +250,6 @@ static double massfunc_f(ccl_cosmology *cosmo, double halomass, double a, double
fit_c = gsl_spline_eval(cosmo->data.gammahmf, log10(odelta), cosmo->data.accelerator_d)*pow(a, 0.01); //gamma in Eq. 8
fit_d = gsl_spline_eval(cosmo->data.phihmf, log10(odelta), cosmo->data.accelerator_d)*pow(a, 0.08); //phi in Eq. 8;
- printf("%le %le %le %le %le\n", fit_A, fit_a, fit_b, fit_c, fit_d);
-
return nu*fit_A*(1.+pow(fit_b*nu,-2.*fit_d))*pow(nu, 2.*fit_a)*exp(-0.5*fit_c*nu*nu);
break;
|
[cmake] append utf-8 coding indicator only if unix commands exist | @@ -182,9 +182,15 @@ macro(add_siconos_swig_sub_module fullname)
ENDIF()
# Add a post-build step that prepends utf-8 coding indicator to .py files
+ find_program(SH_COMMAND sh)
+ find_program(TAR_COMMAND tar)
+ find_program(MV_COMMAND mv)
+ if(SH_COMMAND AND TAR_COMMAND)
+ if(MV_COMMAND)
add_custom_command(TARGET ${SWIG_MODULE_${_name}_REAL_NAME}
POST_BUILD COMMAND sh -c "(echo '# -*- coding: utf-8 -*-'; cat ${SICONOS_SWIG_ROOT_DIR}/${_path}/${_name}.py) > ${SICONOS_SWIG_ROOT_DIR}/${_path}/${_name}.tmp; mv ${SICONOS_SWIG_ROOT_DIR}/${_path}/${_name}.tmp ${SICONOS_SWIG_ROOT_DIR}/${_path}/${_name}.py" VERBATIM)
-
+ endif()
+ endif()
# Check dependencies and then link ...
add_dependencies(${SWIG_MODULE_${_name}_REAL_NAME} ${COMPONENT})
if(UNIX AND NOT APPLE)
|
Change conduit version used to 0.8.3. | @@ -159,8 +159,8 @@ VISIT_OPTION_DEFAULT(VISIT_HDF5_LIBDEP
##
## CONDUIT
##
-SETUP_APP_VERSION(CONDUIT 0.8.2)
-VISIT_OPTION_DEFAULT(VISIT_CONDUIT_DIR ${VISITHOME}/conduit/0.8.2)
+SETUP_APP_VERSION(CONDUIT 0.8.3)
+VISIT_OPTION_DEFAULT(VISIT_CONDUIT_DIR ${VISITHOME}/conduit/0.8.3)
VISIT_OPTION_DEFAULT(VISIT_CONDUIT_LIBDEP
HDF5_LIBRARY_DIR HDF5_LIB ${VISIT_HDF5_LIBDEP} TYPE STRING)
|
stm32h7\stm32_fdcan_sock: reserve space for timeval struct in the intermediate storage of tx and rx CAN frames when timestamp is enabled | #include <nuttx/net/can.h>
#include <netpacket/can.h>
-#ifdef CONFIG_NET_CAN_RAW_TX_DEADLINE
+#if defined(CONFIG_NET_CAN_RAW_TX_DEADLINE) || defined(CONFIG_NET_TIMESTAMP)
#include <sys/time.h>
#endif
#define POOL_SIZE 1
-#ifdef CONFIG_NET_CAN_RAW_TX_DEADLINE
+#if defined(CONFIG_NET_CAN_RAW_TX_DEADLINE) || defined(CONFIG_NET_TIMESTAMP)
#define MSG_DATA sizeof(struct timeval)
#else
#define MSG_DATA 0
|
Update face detection script. | @@ -40,7 +40,7 @@ while (True):
# Find objects.
# Note: Lower scale factor scales-down the image more and detects smaller objects.
# Higher threshold results in a higher detection rate, with more false positives.
- objects = img.find_features(face_cascade, threshold=0.75, scale_factor=1.35)
+ objects = img.find_features(face_cascade, threshold=0.75, scale_factor=1.25)
# Draw objects
for r in objects:
|
mbedtls: use SOC capability macros instead of target names | @@ -347,7 +347,7 @@ menu "mbedTLS"
config MBEDTLS_HARDWARE_AES
bool "Enable hardware AES acceleration"
default y
- depends on !SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST && !IDF_TARGET_ESP32C2
+ depends on !SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST && SOC_AES_SUPPORTED
help
Enable hardware accelerated AES encryption & decryption.
@@ -366,7 +366,7 @@ menu "mbedTLS"
config MBEDTLS_HARDWARE_GCM
bool "Enable partially hardware accelerated GCM"
- depends on IDF_TARGET_ESP32S2 && MBEDTLS_HARDWARE_AES
+ depends on SOC_AES_SUPPORT_GCM && MBEDTLS_HARDWARE_AES
default y
help
Enable partially hardware accelerated GCM. GHASH calculation is still done
@@ -379,7 +379,7 @@ menu "mbedTLS"
config MBEDTLS_HARDWARE_MPI
bool "Enable hardware MPI (bignum) acceleration"
default y
- depends on !SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST && !IDF_TARGET_ESP32C2
+ depends on !SPIRAM_CACHE_WORKAROUND_STRATEGY_DUPLDST && SOC_MPI_SUPPORTED
help
Enable hardware accelerated multiple precision integer operations.
@@ -1001,7 +1001,7 @@ menu "mbedTLS"
config MBEDTLS_LARGE_KEY_SOFTWARE_MPI
bool "Fallback to software implementation for larger MPI values"
depends on MBEDTLS_HARDWARE_MPI
- default y if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32H2 || IDF_TARGET_ESP32C2 # HW max 3072 bits
+ default y if SOC_RSA_MAX_BIT_LEN <= 3072 # HW max 3072 bits
default n
help
Fallback to software implementation for RSA key lengths
|
Try different commit ID | #build last picotls master (for Travis)
# Build at a known-good commit
-COMMIT_ID=4e6080b6a1ede0d3b23c72a8be73b46ecaf1a084
+COMMIT_ID=03674790ae42c0d3675c5b462c52988f67454e11
cd ..
git clone --branch master --single-branch --shallow-submodules --recurse-submodules --no-tags https://github.com/h2o/picotls
cd picotls
git checkout "$COMMIT_ID"
-git submodule init
-git submodule update
+# git submodule init
+# git submodule update
cmake $CMAKE_OPTS .
make -j$(nproc) all
cd ..
|
VERSION bump to version 1.3.60 | @@ -31,7 +31,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 59)
+set(SYSREPO_MICRO_VERSION 60)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
hw/fake-nvram: Remove init of static variable to null | #include <mem_region.h>
#include <lock.h>
-static struct mem_region *nvram_region = NULL;
+static struct mem_region *nvram_region;
static struct lock fake_nvram_lock = LOCK_UNLOCKED;
int fake_nvram_info(uint32_t *total_size)
|
[stm32F4] adapt 168M frequency of 1M can baud, remember to add the define of BSP_USING_CAN168M in kconfig while using 168M frequency | @@ -54,7 +54,11 @@ static const struct stm32_baud_rate_tab can_baud_rate_tab[] =
#else /* APB1 45MHz(max) */
static const struct stm32_baud_rate_tab can_baud_rate_tab[] =
{
+#ifdef BSP_USING_CAN168M
+ {CAN1MBaud, (CAN_SJW_1TQ | CAN_BS1_3TQ | CAN_BS2_3TQ | 6)},
+#else
{CAN1MBaud, (CAN_SJW_2TQ | CAN_BS1_9TQ | CAN_BS2_5TQ | 3)},
+#endif
{CAN800kBaud, (CAN_SJW_2TQ | CAN_BS1_8TQ | CAN_BS2_5TQ | 4)},
{CAN500kBaud, (CAN_SJW_2TQ | CAN_BS1_9TQ | CAN_BS2_5TQ | 6)},
{CAN250kBaud, (CAN_SJW_2TQ | CAN_BS1_9TQ | CAN_BS2_5TQ | 12)},
|
server: plugin: disable context for now | @@ -251,7 +251,7 @@ void mk_plugin_api_init(struct mk_server *server)
__builtin_prefetch(api);
/* Setup and connections list */
- api->config = server;
+ /* FIXME: api->config = server; */
/* API plugins funcions */
|
Add more clojure functions in the examples | (++ n))
reversed)
-
-(defn reverse [t]
+'(arrays are more efficient so reverse-tuple will not be used)
+(defn reverse
+ "Reverses order of give array or tuple"
+ [t]
(def the-type (type t))
- (cond (= the-type :tuple) (reverse-tuple t)
+ (cond (= the-type :tuple) (->> t iter2array reverse-array (apply tuple) )
(= the-type :array) (reverse-array t)))
exp-1
exp-2))
+(defmacro when-not
+"Sorthand for (if (not ... "
+ [condition exp-1]
+ (tuple 'when (tuple 'not condition) exp-1))
+
+
+(defmacro if-let
+ [bindings then else]
+ (def head (ast-unwrap1 bindings))
+ (tuple 'let head
+ (tuple 'if (get head 1)
+ then
+ else)))
+
+
+(defmacro when-let
+ [bindings & then]
+ (def head (ast-unwrap1 bindings))
+ (tuple 'let head
+ (tuple
+ 'when
+ (get head 1) (apply tuple (array-concat ['do] (ast-unwrap1 then))) )))
+
+
(defn comp0-
"Compose two functions. Second function must accept only one argument)"
[f g] (fn [x] (f (g x))))
(do
(def f (get functions 0))
(def g (get functions 1))
- (apply comp (comp0 f g) (array-slice functions 2 -1))) )))
+ (apply comp (comp0- f g) (array-slice functions 2 -1))) )))
|
fixes http zombies | #include "../oidc_error.h"
#include <fcntl.h>
+#include <signal.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/select.h>
@@ -71,6 +72,7 @@ char* httpsGET(const char* url, struct curl_slist* headers,
handleChild(res, fd[1]);
return NULL;
} else { // parent
+ signal(SIGCHLD, SIG_IGN);
return _handleParent(fd);
}
}
|
Set sig_algs map to NULL after freeing the connection | @@ -373,18 +373,6 @@ static int s2n_connection_wipe_io(struct s2n_connection *conn)
return 0;
}
-static int s2n_connection_wipe_handshake_params(struct s2n_connection *conn)
-{
- if (conn->handshake_params.client_sig_hash_algs != NULL) {
- GUARD(s2n_map_free(conn->handshake_params.client_sig_hash_algs));
- }
- if (conn->handshake_params.server_sig_hash_algs != NULL) {
- GUARD(s2n_map_free(conn->handshake_params.server_sig_hash_algs));
- }
-
- return 0;
-}
-
static int s2n_connection_free_hashes(struct s2n_connection *conn)
{
/* Free all of the Connection's hash states */
@@ -457,14 +445,22 @@ static int s2n_connection_free_handshake_params(struct s2n_connection *conn)
{
if (conn->handshake_params.client_sig_hash_algs != NULL) {
GUARD(s2n_map_free(conn->handshake_params.client_sig_hash_algs));
+ conn->handshake_params.client_sig_hash_algs = NULL;
}
if (conn->handshake_params.server_sig_hash_algs != NULL) {
GUARD(s2n_map_free(conn->handshake_params.server_sig_hash_algs));
+ conn->handshake_params.server_sig_hash_algs = NULL;
}
return 0;
}
+static int s2n_connection_wipe_handshake_params(struct s2n_connection *conn)
+{
+ s2n_connection_free_handshake_params(conn);
+ return 0;
+}
+
int s2n_connection_free(struct s2n_connection *conn)
{
struct s2n_blob blob = {0};
|
[core] fix chunkqueue_compact_mem w/ partial chunk
(bug on master branch; never released) | @@ -779,7 +779,11 @@ void chunkqueue_compact_mem(chunkqueue *cq, size_t clen) {
}
for (chunk *fc = c; ((clen -= len) && (c = fc->next)); ) {
len = buffer_string_length(c->mem) - c->offset;
- if (len > clen) len = clen;
+ if (len > clen) {
+ buffer_append_string_len(b, c->mem->ptr + c->offset, clen);
+ c->offset += clen;
+ break;
+ }
buffer_append_string_len(b, c->mem->ptr + c->offset, len);
fc->next = c->next;
if (NULL == c->next) cq->last = fc;
|
Small formatting cleanup and remove an unnecessary space and cast. | @@ -690,7 +690,7 @@ ScanIntelProcessor (
DEBUG ((DEBUG_INFO, "OCCPU: TSC Adjust %Lu\n", TscAdjust));
ASSERT (Cpu->ARTFrequency > 0ULL);
- Cpu->CPUFrequencyFromART = MultThenDivU64x64x32 (Cpu->ARTFrequency, CpuidEbx, (UINT32) CpuidEax, NULL);
+ Cpu->CPUFrequencyFromART = MultThenDivU64x64x32 (Cpu->ARTFrequency, CpuidEbx, CpuidEax, NULL);
DEBUG ((
DEBUG_INFO,
@@ -1126,7 +1126,7 @@ OcIsSandyOrIvy (
"OCCPU: Discovered CpuFamily %d CpuModel %d SandyOrIvy %a\n",
CpuFamily,
CpuModel,
- SandyOrIvy
+ SandyOrIvy ? "YES" : "NO"
));
return SandyOrIvy;
|
iokernel: don't let PMC hurt lat-critical apps. | @@ -395,8 +395,26 @@ static void mis_sample_pmc(uint64_t sel)
if (!sd1 && !sd2)
continue;
- if (sd1 && (!sd2 ||
- sd1->threads_monitored <= sd2->threads_monitored)) {
+ bool sd1_no_kick_out = sd1 &&
+ (sd1->threads_limit <= sd1->threads_guaranteed);
+ bool sd2_no_kick_out = sd2 &&
+ (sd2->threads_limit <= sd2->threads_guaranteed);
+ /* don't let PMC req hurts the kthread that cannot be kicked out */
+ if (sd1_no_kick_out && sd2_no_kick_out)
+ continue;
+ bool perfer_sample_sd2 = false;
+ if (!sd2) {
+ perfer_sample_sd2 = true;
+ } else if (!sd1) {
+ perfer_sample_sd2 = false;
+ } else if (sd1_no_kick_out && !sd2_no_kick_out) {
+ perfer_sample_sd2 = true;
+ } else if (!sd1_no_kick_out && sd2_no_kick_out) {
+ perfer_sample_sd2 = false;
+ } else if (sd1->threads_monitored <= sd2->threads_monitored) {
+ perfer_sample_sd2 = true;
+ }
+ if (perfer_sample_sd2) {
sd1->threads_monitored++;
ksched_enqueue_pmc(sib, sel);
bitmap_set(mis_sampled_cores, sib);
|
PHP: rearranged feature checks in ./configure.
Now it prints version even if PHP was built without embed SAPI. | @@ -110,6 +110,30 @@ if /bin/sh -c "${NXT_PHP_CONFIG} --version" >> $NXT_AUTOCONF_ERR 2>&1; then
fi
fi
+else
+ $echo
+ $echo $0: error: no PHP found.
+ $echo
+ exit 1;
+fi
+
+
+nxt_feature="PHP version"
+nxt_feature_name=""
+nxt_feature_run=value
+nxt_feature_incs="${NXT_PHP_INCLUDE}"
+nxt_feature_libs="${NXT_PHP_LIB} ${NXT_PHP_LDFLAGS}"
+nxt_feature_test="
+ #include <php.h>
+
+ int main() {
+ printf(\"%s\", PHP_VERSION);
+ return 0;
+ }"
+
+. auto/feature
+
+
nxt_feature="PHP embed SAPI"
nxt_feature_name=""
nxt_feature_run=no
@@ -133,6 +157,7 @@ if /bin/sh -c "${NXT_PHP_CONFIG} --version" >> $NXT_AUTOCONF_ERR 2>&1; then
exit 1;
fi
+
# Bug #71041 (https://bugs.php.net/bug.php?id=71041).
nxt_feature="PHP zend_signal_startup()"
@@ -157,29 +182,6 @@ if /bin/sh -c "${NXT_PHP_CONFIG} --version" >> $NXT_AUTOCONF_ERR 2>&1; then
NXT_ZEND_SIGNAL_STARTUP=0
fi
-else
- $echo
- $echo $0: error: no PHP found.
- $echo
- exit 1;
-fi
-
-
-nxt_feature="PHP version"
-nxt_feature_name=""
-nxt_feature_run=value
-nxt_feature_incs="${NXT_PHP_INCLUDE}"
-nxt_feature_libs="${NXT_PHP_LIB} ${NXT_PHP_LDFLAGS}"
-nxt_feature_test="
- #include <php.h>
-
- int main() {
- printf(\"%s\", PHP_VERSION);
- return 0;
- }"
-
-. auto/feature
-
if grep ^$NXT_PHP_MODULE: $NXT_MAKEFILE 2>&1 > /dev/null; then
$echo
|
test
just for test | * distributed under the License 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.
*/
|
Update preprocessor macro names indicating CCI-P encodings available. | // after the initial release, allowing RTL to work with multiple versions.
//
-// Speculative loads: eREQ_RDLSPEC and the error flag in t_ccip_c0_RspMemHdr
+// The fields required to encode speculative loads are available when
+// CCIP_ENCODING_HAS_RDLSPEC is defined.
+//
+// Speculative loads may be useful for emitting a load prefetch with virtual
+// addresses when it is possible that the virtual address is invalid (has no
+// translation). Speculative reads return a flag indicating failure and
+// don't trigger a hard failure. The MPF BBB can be configured to honor
+// eREQ_RDLSPEC. FIM's that take only physical addresses do not support
+// speculative reads.
+`define CCIP_ENCODING_HAS_RDLSPEC 1
+// CCIP_RDLSPEC_AVAIL is maintained for legacy code support. In new code
+// use the new name, CCIP_ENCODING_HAS_RDLSPEC. They are equivalent.
`define CCIP_RDLSPEC_AVAIL 1
-// Byte enable, controlling which bytes in a line are updated.
+// The fields required to encode partial-line writes are present when
+// CCIP_ENCODING_HAS_BYTE_WR is defined.
+//
// Be careful! This flag only indicates whether the CCI-P data structures
// can encode byte enable. The flag does not indicate whether the platform
// actually honors the encoding. For that, AFUs must check the value of
// ccip_cfg_pkg::BYTE_EN_SUPPORTED.
-`define CCIP_BYTE_EN_AVAIL 1
+`define CCIP_ENCODING_HAS_BYTE_WR 1
import ccip_if_pkg::*;
|
Removes unittest2 from shipped gpdb
We only want to copy the file if it exists | @@ -75,13 +75,27 @@ install: generate_greenplum_path_file
# Setup /lib/python contents
cp -rp bin/gppylib $(DESTDIR)$(prefix)/lib/python
- cp -rp bin/ext/Crypto $(DESTDIR)$(prefix)/lib/python
- cp -rp bin/ext/__init__.py $(DESTDIR)$(prefix)/lib/python
- cp -rp bin/ext/lockfile $(DESTDIR)$(prefix)/lib/python
- cp -rp bin/ext/paramiko $(DESTDIR)$(prefix)/lib/python
- cp -rp bin/ext/psutil $(DESTDIR)$(prefix)/lib/python
- cp -rp bin/ext/pygresql $(DESTDIR)$(prefix)/lib/python
- cp -rp bin/ext/yaml $(DESTDIR)$(prefix)/lib/python
+ if [ -e bin/ext/Crypto ]; then \
+ cp -rp bin/ext/Crypto $(DESTDIR)$(prefix)/lib/python ; \
+ fi
+ if [ -e bin/ext/__init__.py ]; then \
+ cp -rp bin/ext/__init__.py $(DESTDIR)$(prefix)/lib/python ; \
+ fi
+ if [ -e bin/ext/lockfile ]; then \
+ cp -rp bin/ext/lockfile $(DESTDIR)$(prefix)/lib/python ; \
+ fi
+ if [ -e bin/ext/paramiko ]; then \
+ cp -rp bin/ext/paramiko $(DESTDIR)$(prefix)/lib/python ; \
+ fi
+ if [ -e bin/ext/psutil ]; then \
+ cp -rp bin/ext/psutil $(DESTDIR)$(prefix)/lib/python ; \
+ fi
+ if [ -e bin/ext/pygresql ]; then \
+ cp -rp bin/ext/pygresql $(DESTDIR)$(prefix)/lib/python ; \
+ fi
+ if [ -e bin/ext/yaml ]; then \
+ cp -rp bin/ext/yaml $(DESTDIR)$(prefix)/lib/python ; \
+ fi
# Setup /bin contents
cp -rp bin $(DESTDIR)$(prefix)
|
zz: platform_ocapi can be static
Acked-by: Andrew Donnellan | #include "lxvpd.h"
/* We don't yet create NPU device nodes on ZZ, but these values are correct */
-const struct platform_ocapi zz_ocapi = {
+static const struct platform_ocapi zz_ocapi = {
.i2c_engine = 1,
.i2c_port = 4,
.i2c_reset_addr = 0x20,
|
Coverity certs are fixed. | @@ -12,11 +12,9 @@ jobs:
run: sudo apt-get update --fix-missing -y
- name: install prerequisites
run: sudo apt-get install -y avahi-daemon cppcheck libavahi-client-dev libcups2-dev libcupsimage2-dev libgnutls28-dev libjpeg-dev libpam-dev libpng-dev libusb-1.0-0-dev zlib1g-dev
- - name: Download current Entrust root cert chain...
- run: wget -q https://abnf.msweet.org/entrust.pem -O entrust.pem
- name: Download Coverity Build Tool
run: |
- wget -q --ca-certificate=entrust.pem https://scan.coverity.com/download/linux64 --post-data token="$TOKEN&project=$GITHUB_REPOSITORY" -O cov-analysis-linux64.tar.gz
+ wget -q https://scan.coverity.com/download/linux64 --post-data token="$TOKEN&project=$GITHUB_REPOSITORY" -O cov-analysis-linux64.tar.gz
mkdir cov-analysis-linux64
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64
env:
@@ -33,7 +31,6 @@ jobs:
run: |
tar czvf cov.tgz cov-int
curl \
- --cacert entrust.pem \
--form token=$TOKEN \
--form [email protected] \
--form [email protected] \
|
api,misc: remove redundant cri_asserts_passed_incr declaration | #include "designated-initializer-compat.h"
#include "common.h"
+#include "assert.h"
#ifdef __OBJC__
# import <Foundation/Foundation.h>
@@ -68,7 +69,6 @@ CR_BEGIN_C_API
CR_API void criterion_internal_test_setup(void);
CR_API void criterion_internal_test_main(void (*fn)(void));
CR_API void criterion_internal_test_teardown(void);
-CR_API void cri_asserts_passed_incr(void);
CR_END_C_API
|
Update section header on Verilog support in chipyard tools | @@ -158,8 +158,8 @@ write.
:start-after: DOC include start: GCD test
:end-before: DOC include end: GCD test
-Support for Verilog in Downstream Berkeley Tools
-------------------------------------------------
+Support for Verilog Within Chipyard Tool Flows
+----------------------------------------------
There are important differences in how Verilog blackboxes are treated
by downstream tools. Since they remain blackboxes in FIRRTL, their
|
options/ansi: Implement wcrtomb() | @@ -85,8 +85,27 @@ size_t mbrtowc(wchar_t *wcp, const char *mbs, size_t mb_limit, mbstate_t *stp) {
}
}
-size_t wcrtomb(char *__restrict, wchar_t, mbstate_t *__restrict)
- MLIBC_STUB_BODY
+size_t wcrtomb(char *mbs, wchar_t wc, mbstate_t *stp) {
+ auto cc = mlibc::current_charcode();
+
+ // wcrtomb() always takes a mbstate_t.
+ __ensure(stp);
+
+ // TODO: Implement the following case:
+ __ensure(mbs);
+
+ mlibc::code_seq<const wchar_t> wseq{&wc, &wc + 1};
+ mlibc::code_seq<char> nseq{mbs, mbs + 4}; // TODO: Replace 4 by some named constant.
+ if(auto e = cc->encode_wtranscode(nseq, wseq, *stp); e != mlibc::charcode_error::null) {
+ __ensure(!"encode_wtranscode() errors are not handled");
+ __builtin_unreachable();
+ }else{
+ size_t n = nseq.it - mbs;
+ if(!n) // Null-terminate resulting wide string.
+ *mbs = 0;
+ return n;
+ }
+}
size_t mbsrtowcs(wchar_t *wcs, const char **mbsp, size_t wc_limit, mbstate_t *stp) {
__ensure(mbsp);
|
Tweak the pip PATH callouts. | @@ -188,7 +188,7 @@ West can be installed by using the `pip` python package manager.
pip3 install --user -U west
```
-:::tip pip user packages
+:::danger pip user packages
If you haven't done so yet, you may need to add the Python Pip user package directory to your `PATH`, e.g.:
```
@@ -306,7 +306,7 @@ cd zmk
west init -l app/
```
-:::note
+:::caution Command Not Found?
If you encounter errors like `command not found: west` then your `PATH` environment variable is likely
missing the Python 3 user packages directory. See the [West Build Command](#west-build-command)
section again for links to how to do this
|
Updated masternode list full command | @@ -217,9 +217,9 @@ Value masternode(const Array& params, bool fHelp)
strCommand = params[1].get_str().c_str();
}
- if (strCommand != "active" && strCommand != "vin" && strCommand != "pubkey" && strCommand != "lastseen" && strCommand != "activeseconds" && strCommand != "rank" && strCommand != "protocol"){
+ if (strCommand != "active" && strCommand != "vin" && strCommand != "pubkey" && strCommand != "lastseen" && strCommand != "lastpaid" && strCommand != "activeseconds" && strCommand != "rank" && strCommand != "txindex" && strCommand != "full" && strCommand != "protocol"){
throw runtime_error(
- "list supports 'active', 'vin', 'pubkey', 'lastseen', 'activeseconds', 'rank', 'protocol'\n");
+ "list supports 'active', 'vin', 'pubkey', 'lastseen', 'lastpaid', 'activeseconds', 'rank', 'txindex', 'protocol', 'full'\n");
}
Object obj;
@@ -240,12 +240,36 @@ Value masternode(const Array& params, bool fHelp)
obj.push_back(Pair(mn.addr.ToString().c_str(), address2.ToString().c_str()));
} else if (strCommand == "protocol") {
obj.push_back(Pair(mn.addr.ToString().c_str(), (int64_t)mn.protocolVersion));
+ } else if (strCommand == "txindex") {
+ obj.push_back(Pair(mn.addr.ToString().c_str(), (int64_t)mn.vin.prevout.n));
+ } else if (strCommand == "lastpaid") {
+ obj.push_back(Pair(mn.addr.ToString().c_str(), mn.nBlockLastPaid));
} else if (strCommand == "lastseen") {
obj.push_back(Pair(mn.addr.ToString().c_str(), (int64_t)mn.lastTimeSeen));
} else if (strCommand == "activeseconds") {
obj.push_back(Pair(mn.addr.ToString().c_str(), (int64_t)(mn.lastTimeSeen - mn.now)));
} else if (strCommand == "rank") {
obj.push_back(Pair(mn.addr.ToString().c_str(), (int)(GetMasternodeRank(mn, pindexBest->nHeight))));
+ }
+ else if (strCommand == "full") {
+ Object list;
+ list.push_back(Pair("active", (int)mn.IsEnabled()));
+ list.push_back(Pair("vin", mn.vin.prevout.hash.ToString().c_str()));
+ list.push_back(Pair("txindex", (int64_t)mn.vin.prevout.n));
+
+ CScript pubkey;
+ pubkey =GetScriptForDestination(mn.pubkey.GetID());
+ CTxDestination address1;
+ ExtractDestination(pubkey, address1);
+ CBitcoinAddress address2(address1);
+
+ list.push_back(Pair("pubkey", address2.ToString().c_str()));
+ list.push_back(Pair("protocol", (int64_t)mn.protocolVersion));
+ list.push_back(Pair("lastseen", (int64_t)mn.lastTimeSeen));
+ list.push_back(Pair("activeseconds", (int64_t)(mn.lastTimeSeen - mn.now)));
+ list.push_back(Pair("rank", (int)(GetMasternodeRank(mn, pindexBest->nHeight))));
+ list.push_back(Pair("lastpaid", mn.nBlockLastPaid));
+ obj.push_back(Pair(mn.addr.ToString().c_str(), list));
}
}
return obj;
|
unix: cane before root removal | @@ -280,13 +280,13 @@ u3_unix_save(c3_c* pax_c, u3_atom pad)
c3_y* pad_y;
c3_c* ful_c;
- if ( '/' == *pax_c) {
- pax_c++;
- }
if ( !u3_unix_cane(pax_c) ) {
u3l_log("%s: non-canonical path\n", pax_c);
u3z(pad); u3m_bail(c3__fail);
}
+ if ( '/' == *pax_c) {
+ pax_c++;
+ }
lod_w = strlen(u3_Host.dir_c);
len_w = lod_w + sizeof("/.urb/put/") + strlen(pax_c);
ful_c = c3_malloc(len_w);
|
Simplify the RFC-derived handshake specification: remove the
keyExchangeEphemeral predicate and adjust the connectionParameters relation. | @@ -118,24 +118,18 @@ type Parameters = {keyExchange : KeyExchange
connectionParameters : connection -> Parameters -> Bit
connectionParameters conn params =
conn.server_can_send_ocsp == params.sendCertificateStatus
- /\ ((conn.key_exchange_eph /\ keyExchangeEphemeral params) \/
+ /\ ((conn.key_exchange_eph /\ ~keyExchangeNonEphemeral params /\ params.keyExchange != DH_anon) \/
(~conn.key_exchange_eph /\ keyExchangeNonEphemeral params))
/\ (conn.is_caching_enabled /\ ~conn.resume_from_cache) == params.sessionTicket
/\ (~params.includeSessionTicket) // s2n server does not issue tickets at this time
/\ (~params.renewSessionTicket) // s2n server does not issue tickets at this time
/\ conn.client_auth_flag == params.requestClientCert
-// A predicate that tells whether key-exchange is non-ephemeral (doesn't use
-// Diffie-Hellman key exchange). In this case the key exchange algorithm does not
-// require KeyExchange messages.
+// A predicate that tells whether key-exchange is non-ephemeral and uses server certificate
+// data for exchanging a premaster secret (RFC 5246 7.4.3). In this case the key exchange
+// algorithm does not require KeyExchange messages.
keyExchangeNonEphemeral : Parameters -> Bit
-keyExchangeNonEphemeral params = params.keyExchange == RSA \/ params.keyExchange == DH_DSS \/ params.keyExchange == DH_RSA //
-
-// A predicate that tells whether key-exchange is ephemeral (uses Diffie-Hellman
-// key exchange). In this case the key exchange algorithm does not require
-// KeyExchange messages.
-keyExchangeEphemeral : Parameters -> Bit
-keyExchangeEphemeral params = params.keyExchange == DHE_DSS \/ params.keyExchange == DHE_RSA
+keyExchangeNonEphemeral params = params.keyExchange == RSA \/ params.keyExchange == DH_DSS \/ params.keyExchange == DH_RSA
// Handshake state transition relation per the RFCs. Given handshake parameters
// and a handshake state, return the next state. If there is no valid next state,
|
[test] test some important ladder corner cases
and catch corner cases better and earlier | @@ -31,6 +31,7 @@ static int group_order_tests(EC_GROUP *group)
{
BIGNUM *n1 = NULL, *n2 = NULL, *order = NULL;
EC_POINT *P = NULL, *Q = NULL, *R = NULL, *S = NULL;
+ const EC_POINT *G = NULL;
BN_CTX *ctx = NULL;
int i = 0, r = 0;
@@ -38,6 +39,7 @@ static int group_order_tests(EC_GROUP *group)
|| !TEST_ptr(n2 = BN_new())
|| !TEST_ptr(order = BN_new())
|| !TEST_ptr(ctx = BN_CTX_new())
+ || !TEST_ptr(G = EC_GROUP_get0_generator(group))
|| !TEST_ptr(P = EC_POINT_new(group))
|| !TEST_ptr(Q = EC_POINT_new(group))
|| !TEST_ptr(R = EC_POINT_new(group))
@@ -49,7 +51,15 @@ static int group_order_tests(EC_GROUP *group)
|| !TEST_true(EC_POINT_is_at_infinity(group, Q))
|| !TEST_true(EC_GROUP_precompute_mult(group, ctx))
|| !TEST_true(EC_POINT_mul(group, Q, order, NULL, NULL, ctx))
- || !TEST_true(EC_POINT_is_at_infinity(group, Q)))
+ || !TEST_true(EC_POINT_is_at_infinity(group, Q))
+ || !TEST_true(EC_POINT_copy(P, G))
+ || !TEST_true(BN_one(n1))
+ || !TEST_true(EC_POINT_mul(group, Q, n1, NULL, NULL, ctx))
+ || !TEST_int_eq(0, EC_POINT_cmp(group, Q, P, ctx))
+ || !TEST_true(BN_sub(n1, order, n1))
+ || !TEST_true(EC_POINT_mul(group, Q, n1, NULL, NULL, ctx))
+ || !TEST_true(EC_POINT_invert(group, Q, ctx))
+ || !TEST_int_eq(0, EC_POINT_cmp(group, Q, P, ctx)))
goto err;
for (i = 1; i <= 2; i++) {
@@ -62,6 +72,7 @@ static int group_order_tests(EC_GROUP *group)
* EC_GROUP_precompute_mult has set up precomputation.
*/
|| !TEST_true(EC_POINT_mul(group, P, n1, NULL, NULL, ctx))
+ || (i == 1 && !TEST_int_eq(0, EC_POINT_cmp(group, P, G, ctx)))
|| !TEST_true(BN_one(n1))
/* n1 = 1 - order */
|| !TEST_true(BN_sub(n1, n1, order))
|
parallel-libs/mumps: bump version to v5.2.1 | %define pname mumps
Name: %{pname}-%{compiler_family}-%{mpi_family}%{PROJ_DELIM}
-Version: 5.2.0
+Version: 5.2.1
Release: 1%{?dist}
Summary: A MUltifrontal Massively Parallel Sparse direct Solver
License: CeCILL-C
|
hw/bsp/da1469x: Fix help text in serial load script
Match the script help with the serial load functionality
provided. | @@ -24,7 +24,7 @@ import os
@click.argument('infile')
@click.option('-u', '--uart', required=True, help='uart port')
[email protected](help='Close out OTP configuration script')
[email protected](help='Load the provided file using serial load protocol')
def load(infile, uart):
try:
ser = serial.Serial(port=uart, baudrate=115200, timeout=10,
|
hw/sensor: Make sure evt pool is properly initialized | @@ -648,6 +648,7 @@ sensor_mgr_init(void)
{
struct os_timeval ostv;
struct os_timezone ostz;
+ int rc;
#ifdef MYNEWT_VAL_SENSOR_MGR_EVQ
sensor_mgr_evq_set(MYNEWT_VAL(SENSOR_MGR_EVQ));
@@ -655,10 +656,11 @@ sensor_mgr_init(void)
sensor_mgr_evq_set(os_eventq_dflt_get());
#endif
- os_mempool_init(&sensor_notify_evt_pool,
+ rc = os_mempool_init(&sensor_notify_evt_pool,
MYNEWT_VAL(SENSOR_NOTIF_EVENTS_MAX),
sizeof(struct sensor_notify_os_ev), sensor_notify_evt_area,
"sensor_notif_evts");
+ assert(rc == OS_OK);
/**
* Initialize sensor polling callout and set it to fire on boot.
|
framework/wifi_manager: unlock before return fail | @@ -1404,6 +1404,7 @@ wifi_manager_result_e wifi_manager_get_info(wifi_manager_info_s *info)
wret = dhcpc_fetch_ipaddr(&ip_ref);
if (wret != WIFI_MANAGER_SUCCESS) {
ndbg("[WM] T%d Failed to fetch ip4 address\n", getpid());
+ UNLOCK_WIFIMGR;
return WIFI_MANAGER_FAIL;
}
|
Fix for rescheduling a timer that is currently in progress.
Also fix a typo which uses the wrong mutex for a condition wait. | @@ -113,6 +113,21 @@ sctp_os_timer_start(sctp_os_timer_t *c, int to_ticks, void (*ftn) (void *),
SCTP_TIMERQ_LOCK();
/* check to see if we're rescheduling a timer */
+ if (c == sctp_os_timer_current) {
+ /*
+ * We're being asked to reschedule a callout which is
+ * currently in progress.
+ */
+ if (sctp_os_timer_waiting) {
+ /*
+ * This callout is already being stopped.
+ * callout. Don't reschedule.
+ */
+ SCTP_TIMERQ_UNLOCK();
+ return;
+ }
+ }
+
if (c->c_flags & SCTP_CALLOUT_PENDING) {
if (c == sctp_os_timer_next) {
sctp_os_timer_next = TAILQ_NEXT(c, tqe);
@@ -172,7 +187,7 @@ sctp_os_timer_stop(sctp_os_timer_t *c)
INFINITE);
#else
pthread_cond_wait(&sctp_os_timer_wait_cond,
- &SCTP_BASE_VAR(timer_mtx));
+ &sctp_os_timerwait_mtx);
#endif
}
SCTP_TIMERWAIT_UNLOCK();
|
Fix buffer overflow in FTP client
Function ftpc_dequote that converts quoted hexadecimal constants to binary values goes outside input data buffer -str pointer is checked, while str[1] and str[2] are read.
while parsing the server response end of string should be checked | @@ -173,7 +173,7 @@ void ftpc_stripcrlf(FAR char *str)
len = strlen(str);
if (len > 0) {
ptr = str + len - 1;
- while (*ptr == '\r' || *ptr == '\n') {
+ while ((ptr >= str) && (*ptr == '\r' || *ptr == '\n')) {
*ptr = '\0';
ptr--;
}
@@ -237,6 +237,9 @@ FAR char *ftpc_dequote(FAR const char *str)
if (str[0] == '%') {
/* Extract the hex value */
+ if (!str[1] || !str[2]) {
+ break;
+ }
ms = ftpc_nibble(str[1]);
if (ms >= 0) {
ls = ftpc_nibble(str[2]);
|
win, simd: make sure that CGLM_ALL_UNALIGNED is defined for older visual studios | # define __SSE__
# endif
# endif
+/* do not use alignment for older visual studio versions */
+# if _MSC_VER < 1913 /* Visual Studio 2017 version 15.6 */
+# define CGLM_ALL_UNALIGNED
+# endif
#endif
#if defined( __SSE__ ) || defined( __SSE2__ )
|
Fixed loopback test for new GMLAN 'can4' behavior. | @@ -28,6 +28,8 @@ def run_test(can_speeds, gmlan_speeds, sleep_duration=0):
pandas.append("WIFI")
run_test_w_pandas(pandas, can_speeds, gmlan_speeds, sleep_duration)
+GMLAN_BUS = 3 # Virtual 'CAN 4'
+
def run_test_w_pandas(pandas, can_speeds, gmlan_speeds, sleep_duration=0):
h = list(map(lambda x: Panda(x), pandas))
print("H", h)
@@ -85,7 +87,9 @@ def run_test_w_pandas(pandas, can_speeds, gmlan_speeds, sleep_duration=0):
print("Setting GMLAN %d Speed to %d" % (bus, gmlan_speeds[bus]))
panda_snd.set_can_baud(bus, gmlan_speeds[bus])
panda_rcv.set_can_baud(bus, gmlan_speeds[bus])
+ bus = GMLAN_BUS
else:
+ print("bus", bus)
print("Setting CanBus %d Speed to %d" % (bus, can_speeds[bus]))
panda_snd.set_can_baud(bus, can_speeds[bus])
panda_rcv.set_can_baud(bus, can_speeds[bus])
|
wasm: Link against jemalloc if enabled | @@ -88,8 +88,15 @@ set(src
${UNCOMMON_SHARED_SOURCE}) # link wasm-micro-runtime's uncommon object symbols (for bh_read_file_to_buffer)
add_library(flb-wasm-static STATIC ${src})
+
+if (FLB_JEMALLOC AND ${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+ set(${JEMALLOC_LIBS} libjemalloc)
+ add_dependencies(flb-wasm-static libjemalloc)
+ include_directories("${CMAKE_BINARY_DIR}/include/")
+endif ()
+
if (WAMR_BUILD_LIBC_UVWASI)
target_link_libraries(flb-wasm-static vmlib-static ${UV_A_LIBS})
else ()
- target_link_libraries(flb-wasm-static vmlib-static)
+ target_link_libraries(flb-wasm-static vmlib-static ${JEMALLOC_LIBS})
endif()
|
add a test for [tree]%A | @@ -72,12 +72,22 @@ int main () {
}
*/
+ printf ("test []%%A\n");
struct json_token * tokens = NULL;
json_scanf(array_tok.start, array_tok.length, "[]%A", &tokens);
for (i = 0; tokens[i].start; i++) {
printf ("token [%p, %d]\n", tokens[i].start, tokens[i].length);
printf ("token %.*s\n", tokens[i].length, tokens[i].start);
}
+ free(tokens);
+
+ printf ("test [tree]%%A\n");
+ json_scanf(json_str, s, "[tree]%A", &tokens);
+ for (i = 0; tokens[i].start; i++) {
+ printf ("token [%p, %d]\n", tokens[i].start, tokens[i].length);
+ printf ("token %.*s\n", tokens[i].length, tokens[i].start);
+ }
+
return 0;
}
|
Fixes issue with when running code multiple times
This fixes issue with James disappearing. See: elishacloud/Silent-Hill-2-Enhancements@#455 | @@ -568,8 +568,8 @@ void Init()
if (bLightingFix)
{
static auto pattern_1 = hook::pattern("8B 10 75 ? 8B 0D");
- auto dword_1F81298 = *pattern_1.count(2).get(0).get<uintptr_t>(6) - 0x10;
- auto dword_1F8129C = *pattern_1.count(2).get(1).get<uintptr_t>(6) - 0x10;
+ static auto dword_1F81298 = *pattern_1.count(2).get(0).get<uintptr_t>(6) - 0x10;
+ static auto dword_1F8129C = *pattern_1.count(2).get(1).get<uintptr_t>(6) - 0x10;
injector::WriteMemory(pattern_1.count(2).get(0).get<void*>(6), dword_1F81298, true); //50002A solves flashlight bug for NPCs
injector::WriteMemory(pattern_1.count(2).get(1).get<void*>(6), dword_1F8129C, true); //5039FB solves flashlight bug for reflective objects
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.