message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Use named constant for magic number in external_entity_duff_loader | @@ -8104,9 +8104,10 @@ external_entity_duff_loader(XML_Parser parser,
{
XML_Parser new_parser;
unsigned int i;
+#define MAX_ALLOC_COUNT 10
/* Try a few different allocation levels */
- for (i = 0; i < 10; i++)
+ for (i = 0; i < MAX_ALLOC_COUNT; i++)
{
allocation_count = i;
new_parser = XML_ExternalEntityParserCreate(parser, context, NULL);
@@ -8118,14 +8119,15 @@ external_entity_duff_loader(XML_Parser parser,
}
if (i == 0)
fail("External parser creation ignored failing allocator");
- else if (i == 10)
- fail("Extern parser not created with allocation count 10");
+ else if (i == MAX_ALLOC_COUNT)
+ fail("Extern parser not created with max allocation count");
/* Make sure other random allocation doesn't now fail */
allocation_count = ALLOC_ALWAYS_SUCCEED;
/* Make sure the failure code path is executed too */
return XML_STATUS_ERROR;
+#undef MAX_ALLOC_COUNT
}
/* Test that external parser creation running out of memory is
|
fix img/sdl_image_test.go | @@ -2,7 +2,6 @@ package img
import (
"testing"
- "unsafe"
"github.com/veandco/go-sdl2/sdl"
)
@@ -188,8 +187,7 @@ func TestIsFormat(t *testing.T) {
}
for _, test := range tests {
- rwops := sdl.RWFromMem(unsafe.Pointer(&test.data[0]), len(test.data))
- defer rwops.RWclose()
+ rwops,_ := sdl.RWFromMem(test.data)
for fname, function := range functions {
got, want := function(rwops), fname == test.name
if got != want {
@@ -210,8 +208,7 @@ func TestLoad_RW(t *testing.T) {
defer Quit()
// test expected success
- rwops := sdl.RWFromMem(unsafe.Pointer(&testPNG[0]), len(testPNG))
- defer rwops.RWclose()
+ rwops,_ := sdl.RWFromMem(testPNG)
surf, err := LoadRW(rwops, false)
if surf != nil {
defer surf.Free()
@@ -221,8 +218,7 @@ func TestLoad_RW(t *testing.T) {
}
// test expected failure
- rwops = sdl.RWFromMem(unsafe.Pointer(&testBadData[0]), len(testBadData))
- defer rwops.RWclose()
+ rwops,_ = sdl.RWFromMem(testBadData)
surf, err = LoadRW(rwops, false)
if surf != nil {
defer surf.Free()
@@ -247,8 +243,7 @@ func TestLoadFormat(t *testing.T) {
for _, test := range tests {
// test expected success
- rwops := sdl.RWFromMem(unsafe.Pointer(&test.data[0]), len(test.data))
- defer rwops.RWclose()
+ rwops,_ := sdl.RWFromMem(test.data)
surf, err := test.function(rwops)
if surf != nil {
defer surf.Free()
@@ -264,8 +259,7 @@ func TestLoadFormat(t *testing.T) {
continue
}
- rwops = sdl.RWFromMem(unsafe.Pointer(&testBadData[0]), len(testBadData))
- defer rwops.RWclose()
+ rwops,_ = sdl.RWFromMem(testBadData)
surf, err = test.function(rwops)
if surf != nil {
defer surf.Free()
@@ -281,8 +275,7 @@ func TestLoadTyped_RW(t *testing.T) {
defer Quit()
// test expected success
- rwops := sdl.RWFromMem(unsafe.Pointer(&testPNG[0]), len(testPNG))
- defer rwops.RWclose()
+ rwops,_ := sdl.RWFromMem(testPNG)
surf, err := LoadTypedRW(rwops, false, "PNG")
if surf != nil {
defer surf.Free()
@@ -293,8 +286,7 @@ func TestLoadTyped_RW(t *testing.T) {
}
// test expected failure
- rwops = sdl.RWFromMem(unsafe.Pointer(&testBadData[0]), len(testBadData))
- defer rwops.RWclose()
+ rwops,_ = sdl.RWFromMem(testBadData)
surf, err = LoadTypedRW(rwops, false, "PNG")
if surf != nil {
defer surf.Free()
|
parallel-libs/scotch: package parmetis compatibility header | @@ -80,6 +80,10 @@ popd
pushd src
make prefix=%{buildroot}%{install_path} install
+
+# install parmetis compatibility header
+install -m644 libscotchmetis/parmetis.h %{buildroot}%{install_path}/include/
+
# make dynamic, remove static linkings
pushd %{buildroot}%{install_path}/lib
for static_lib in *.a; do \
|
add Joe Security to "who's using yara" | @@ -68,6 +68,7 @@ helpful extension to YARA developed and open-sourced by Bayshore Networks.
* [Hornetsecurity](https://www.hornetsecurity.com/en/)
* [InQuest](http://www.inquest.net/)
* [JASK](http://jask.io)
+* [Joe Security](https://www.joesecurity.org)
* [jsunpack-n](http://jsunpack.jeek.org/)
* [Kaspersky Lab](http://www.kaspersky.com)
* [Koodous](https://koodous.com/)
|
[Smoke]-Added -lm back into Makefile for math_sqrt_float, -lm is not automatically added for C | @@ -9,7 +9,7 @@ CLANG = clang
OMP_BIN = $(AOMP)/bin/$(CLANG)
CC = $(OMP_BIN) $(VERBOSE)
EXTRA_CFLAGS =
-EXTRA_LDFLAGS =
+EXTRA_LDFLAGS = -lm
EXTRA_OMP_FLAGS =
include ../Makefile.rules
|
Increase segment connect timeout in fts job
The job runs FTS tests and has failed intermittently. By increasing
gp_segment_connect_timeout, we reduce the chance that test environment will
cause failures. | @@ -800,7 +800,7 @@ jobs:
image: centos-gpdb-dev-6
params:
MAKE_TEST_COMMAND: fts_transitions_part01
- BLDWRAP_POSTGRES_CONF_ADDONS: gp_segment_connect_timeout=20 gp_fts_probe_interval=20
+ BLDWRAP_POSTGRES_CONF_ADDONS: gp_segment_connect_timeout=35 gp_fts_probe_interval=20
TEST_OS: centos
CONFIGURE_FLAGS: {{configure_flags}}
- task: fts_transitions_part02
@@ -808,7 +808,7 @@ jobs:
image: centos-gpdb-dev-6
params:
MAKE_TEST_COMMAND: fts_transitions_part02
- BLDWRAP_POSTGRES_CONF_ADDONS: gp_segment_connect_timeout=20 gp_fts_probe_interval=20
+ BLDWRAP_POSTGRES_CONF_ADDONS: gp_segment_connect_timeout=35 gp_fts_probe_interval=20
TEST_OS: centos
CONFIGURE_FLAGS: {{configure_flags}}
- task: fts_transitions_part03
@@ -816,7 +816,7 @@ jobs:
image: centos-gpdb-dev-6
params:
MAKE_TEST_COMMAND: fts_transitions_part03
- BLDWRAP_POSTGRES_CONF_ADDONS: gp_segment_connect_timeout=20 gp_fts_probe_interval=20
+ BLDWRAP_POSTGRES_CONF_ADDONS: gp_segment_connect_timeout=35 gp_fts_probe_interval=20
TEST_OS: centos
CONFIGURE_FLAGS: {{configure_flags}}
|
swapping andate/antime for date/time | @@ -15,5 +15,5 @@ meta timeOfAnalysis time(hourOfAnalysis,minuteOfAnalysis,secondsOfAnalysis) : d
#alias mars.refdate = dateOfAnalysis;
#alias mars.reftime = timeOfAnalysis;
-alias mars.andate = dateOfAnalysis;
-alias mars.antime = timeOfAnalysis;
+alias mars.date = dateOfAnalysis;
+alias mars.time = timeOfAnalysis;
|
AWS ENA: remove dependency on x86_64 architecture
The existing code is using atomic functions from
hyperv/include/atomic.h, which are only implemented for x86_64.
This commit replaces calls to atomic_add32() with calls to
fetch_and_add_32(); this will allow the AWS ENA driver to work on
aarch64. | #ifndef ENA_PLAT_H_
#define ENA_PLAT_H_
-#include <atomic.h>
-
#define __STRING(x) #x
#define __XSTRING(x) __STRING(x)
@@ -283,8 +281,8 @@ static inline u32 ena_reg_read32(struct ena_bus *bus, u64 offset)
#define prefetch(x) (void)(x)
#define prefetchw(x) (void)(x)
-#define ATOMIC32_INC(I32_PTR) atomic_add32(I32_PTR, 1)
-#define ATOMIC32_DEC(I32_PTR) atomic_add32(I32_PTR, -1)
+#define ATOMIC32_INC(I32_PTR) fetch_and_add_32(I32_PTR, 1)
+#define ATOMIC32_DEC(I32_PTR) fetch_and_add_32(I32_PTR, -1)
#define ATOMIC32_READ(I32_PTR) (*(I32_PTR))
#define ATOMIC32_SET(I32_PTR, VAL) *(I32_PTR) = (VAL)
|
Travis: Treat warnings as errors (macOS/GCC) | @@ -83,7 +83,10 @@ before_script:
- SYSTEM_DIR="$PWD/kdbsystem"
- mkdir build && cd build
- CMAKE_OPT=()
- - if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "clang" ]]; then CMAKE_OPT+=("-DCOMMON_FLAGS=-Werror"); fi;
+ - |
+ if [[ "$TRAVIS_OS_NAME" == "linux" && "$CC" == "clang" || "$TRAVIS_OS_NAME" == "osx" && "${CC:0:3}" == "gcc" ]]; then
+ CMAKE_OPT+=("-DCOMMON_FLAGS=-Werror");
+ fi
- echo $PATH
- plugins="ALL;-jni";
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
options/posix: Stubbed shmget() | #include <sys/shm.h>
#include <bits/ensure.h>
+#include <mlibc/debug.hpp>
void *shmat(int, const void *, int) {
__ensure(!"Function is not implemented");
@@ -18,6 +19,6 @@ int shmdt(const void *) {
}
int shmget(key_t, size_t, int) {
- __ensure(!"Function is not implemented");
- __builtin_unreachable();
+ mlibc::infoLogger() << "mlibc: shmget() is a no-op!" << frg::endlog;
+ return -1;
}
|
change sanity check in stringvectorattribute to prevent overflow | @@ -84,7 +84,7 @@ StringVectorAttribute::readValueFrom (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &i
// check there is enough space remaining in attribute to
// contain claimed string length
- if( strSize < 0 || strSize+read > size)
+ if( strSize < 0 || strSize > size - read)
{
throw IEX_NAMESPACE::InputExc("Invalid size field reading stringvector attribute");
}
|
Fix blinking UIDs in YQL_UDF | @@ -7,12 +7,13 @@ def onllvm_bc(unit, *args):
free_args, kwds = sort_by_keywords({'SYMBOLS': -1, 'NAME': 1}, args)
name = kwds['NAME'][0]
symbols = kwds.get('SYMBOLS')
- merged_bc = name + '_merged.bc'
- out_bc = name + '_optimized.bc'
+ obj_suf = unit.get('OBJ_SUF')
+ merged_bc = name + '_merged' + obj_suf + '.bc'
+ out_bc = name + '_optimized' + obj_suf + '.bc'
bcs = []
for x in free_args:
rel_path = rootrel_arc_src(x, unit)
- bc_path = '${ARCADIA_BUILD_ROOT}/' + skip_build_root(rel_path) + '.bc'
+ bc_path = '${ARCADIA_BUILD_ROOT}/' + skip_build_root(rel_path) + obj_suf + '.bc'
if x.endswith('.c'):
llvm_compile = unit.onllvm_compile_c
elif x.endswith('.ll'):
|
fix IO_off64_t datatype after glibc update | @@ -507,7 +507,7 @@ static int gzip_cookie_close(void *cookie) { return gzclose((gzFile)cookie); }
static ssize_t gzip_cookie_read(void *cookie, char *buf, size_t nbytes) { return gzread((gzFile)cookie, buf, nbytes); }
-int gzip_cookie_seek(void *cookie, _IO_off64_t *pos, int __w) { return gzseek((gzFile)cookie, *pos, __w); }
+int gzip_cookie_seek(void *cookie, off64_t *pos, int __w) { return gzseek((gzFile)cookie, *pos, __w); }
cookie_io_functions_t gzip_cookie = {
.close = gzip_cookie_close, .write = gzip_cookie_write, .read = gzip_cookie_read, .seek = gzip_cookie_seek};
|
again minor tweak to default VRAM setup | #include "font.h"
-#define WINDOW_DEFAULT 0xF000 // multiple of 0x1000 (0x0800 in H32)
-#define HSCRL_DEFAULT 0xD800 // multiple of 0x0400
-#define SLIST_DEFAULT 0xDC00 // multiple of 0x0400 (0x0200 in H32)
+#define WINDOW_DEFAULT 0xD000 // multiple of 0x1000 (0x0800 in H32)
+#define HSCRL_DEFAULT 0xF000 // multiple of 0x0400
+#define SLIST_DEFAULT 0xF400 // multiple of 0x0400 (0x0200 in H32)
#define APLAN_DEFAULT 0xE000 // multiple of 0x2000
#define BPLAN_DEFAULT 0xC000 // multiple of 0x2000
@@ -89,9 +89,9 @@ void VDP_init()
regValues[0x00] = 0x04;
regValues[0x01] = 0x74; /* reg. 1 - Enable display, VBL, DMA + VCell size */
regValues[0x02] = aplan_addr / 0x400; /* reg. 2 - Plane A = $E000 */
- regValues[0x03] = window_addr / 0x400; /* reg. 3 - Window = $F000 */
+ regValues[0x03] = window_addr / 0x400; /* reg. 3 - Window = $D000 */
regValues[0x04] = bplan_addr / 0x2000; /* reg. 4 - Plane B = $C000 */
- regValues[0x05] = slist_addr / 0x200; /* reg. 5 - Sprite table = $DC00 */
+ regValues[0x05] = slist_addr / 0x200; /* reg. 5 - Sprite table = $F400 */
regValues[0x06] = 0x00; /* reg. 6 - not used */
regValues[0x07] = 0x00; /* reg. 7 - Background Color number*/
regValues[0x08] = 0x00; /* reg. 8 - not used */
@@ -99,7 +99,7 @@ void VDP_init()
regValues[0x0A] = 0x01; /* reg 10 - HInterrupt timing */
regValues[0x0B] = 0x00; /* reg 11 - $0000abcd a=extr.int b=vscr cd=hscr */
regValues[0x0C] = 0x81; /* reg 12 - hcell mode + shadow/highight + interlaced mode (40 cell, no shadow, no interlace) */
- regValues[0x0D] = hscrl_addr / 0x400; /* reg 13 - HScroll Table = $D800 */
+ regValues[0x0D] = hscrl_addr / 0x400; /* reg 13 - HScroll Table = $F000 */
regValues[0x0E] = 0x00; /* reg 14 - not used */
regValues[0x0F] = 0x02; /* reg 15 - auto increment data */
regValues[0x10] = 0x01; /* reg 16 - scrl screen v&h size (32x64) */
|
profile: fix compile error on older gcc | #include "drv_usb.h"
// Default values for our profile
-const profile_t default_profile = {
+const profile_t profile = {
.setup = {
#ifdef INVERT_YAW_PID
.invert_yaw = 1,
@@ -180,7 +180,8 @@ const profile_t default_profile = {
},
};
// the actual profile
-profile_t profile = default_profile;
+// todo: reactivate
+//profile_t profile = default_profile;
int8_t buf_equal(const uint8_t *str1, size_t len1, const uint8_t *str2, size_t len2) {
if (len2 != len1) {
|
lib: lwrb: adjust CMake rule to support older versions | @@ -5,7 +5,7 @@ message("Entering ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt")
# Register core library
add_library(lwrb INTERFACE)
-target_sources(lwrb PUBLIC ${CMAKE_CURRENT_LIST_DIR}/src/lwrb/lwrb.c)
+target_sources(lwrb INTERFACE ${CMAKE_CURRENT_LIST_DIR}/src/lwrb/lwrb.c)
target_include_directories(lwrb INTERFACE ${CMAKE_CURRENT_LIST_DIR}/src/include)
# Register other modules
|
android: fixing double casting in arrays and hashes | @@ -209,7 +209,7 @@ VALUE rho_cast_helper<VALUE, jobject>::getInteger(jobject jInteger)
VALUE rho_cast_helper<VALUE, jobject>::getDouble(jobject jDouble)
{
- jboolean jRes = m_env->CallDoubleMethod(jDouble, midDoubleValue);
+ jdouble jRes = m_env->CallDoubleMethod(jDouble, midDoubleValue);
return rho_ruby_create_double(jRes);
}
|
Fix parsing of source length in filters.
This fixes a bug that was introduced in commit and prevented
non-source-specific IPv4 routes from being redistributed. Thanks
to Niklas Yann Wettengel for the detective work. | @@ -479,9 +479,13 @@ parse_filter(int c, gnc_t gnc, void *closure, struct filter **filter_return)
filter->src_plen_le < 128 || filter->src_plen_ge > 0)
filter->af = AF_INET6;
} else if(filter->af == AF_INET) {
+ if(filter->plen_le < 128)
filter->plen_le += 96;
+ if(filter->plen_ge > 0)
filter->plen_ge += 96;
+ if(filter->src_plen_le < 128)
filter->src_plen_le += 96;
+ if(filter->src_plen_ge > 0)
filter->src_plen_ge += 96;
}
*filter_return = filter;
|
Work around XCode assembler SVE bug | @@ -124,7 +124,11 @@ ifeq ($(CORE), NEOVERSEN2)
ifeq (1, $(filter 1,$(GCCVERSIONGTEQ7) $(ISCLANG)))
ifeq ($(GCCVERSIONGTEQ9), 1)
ifeq (1, $(filter 1,$(GCCMINORVERSIONGTEQ4) $(GCCVERSIONGTEQ10)))
+ifneq ($(OSNAME), Darwin)
CCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2
+else
+CCOMMON_OPT += -march=armv8.5-a+sve -mtune=neoverse-n2
+endif
ifneq ($(F_COMPILER), NAG)
FCOMMON_OPT += -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2
endif
|
zephyr: bmi160: Test temperature sensor routine
Verify that we can read from the temperature registers in the BMI160 and
get an accurate result.
BRANCH=None
TEST=zmake -D configure --test test-drivers | @@ -1951,6 +1951,44 @@ static void test_bmi_perform_calib_invalid_type(void)
EC_RES_INVALID_PARAM, ret);
}
+/** Test reading the onboard temperature sensor */
+static void test_bmi_temp_sensor(void)
+{
+ struct i2c_emul *emul = bmi_emul_get(BMI_ORD);
+ int ret;
+
+ /* Part 1:
+ * Set up the register so we read 300 Kelvin. 0x0000 is 23 deg C, and
+ * each LSB is 0.5^9 deg C. See BMI160 datasheet for more details.
+ */
+ int actual_read_temp_k, expected_temp_k = 300;
+ uint16_t temp_reg_value = (K_TO_C(expected_temp_k) - 23) << 9;
+
+ bmi_emul_set_reg(emul, BMI160_TEMPERATURE_0, temp_reg_value & 0xFF);
+ bmi_emul_set_reg(emul, BMI160_TEMPERATURE_1, temp_reg_value >> 8);
+
+ /* The output will be in Kelvin */
+ ret = bmi160_get_sensor_temp(BMI_ACC_SENSOR_ID, &actual_read_temp_k);
+
+ zassert_equal(ret, EC_RES_SUCCESS, "Expected %d but got %d",
+ EC_RES_SUCCESS, ret);
+ zassert_equal(expected_temp_k, actual_read_temp_k,
+ "Expected %dK but got %dK", expected_temp_k,
+ actual_read_temp_k);
+
+ /* Part 2:
+ * Have the chip return an invalid reading.
+ */
+ temp_reg_value = BMI_INVALID_TEMP;
+ bmi_emul_set_reg(emul, BMI160_TEMPERATURE_0, temp_reg_value & 0xFF);
+ bmi_emul_set_reg(emul, BMI160_TEMPERATURE_1, temp_reg_value >> 8);
+
+ ret = bmi160_get_sensor_temp(BMI_ACC_SENSOR_ID, &actual_read_temp_k);
+
+ zassert_equal(ret, EC_ERROR_NOT_POWERED, "Expected %d but got %d",
+ EC_ERROR_NOT_POWERED, ret);
+}
+
void test_suite_bmi160(void)
{
ztest_test_suite(bmi160,
@@ -1976,6 +2014,7 @@ void test_suite_bmi160(void)
ztest_user_unit_test(test_bmi_sec_raw_write8),
ztest_user_unit_test(test_bmi_set_offset_invalid_type),
ztest_user_unit_test(
- test_bmi_perform_calib_invalid_type));
+ test_bmi_perform_calib_invalid_type),
+ ztest_user_unit_test(test_bmi_temp_sensor));
ztest_run_test_suite(bmi160);
}
|
Properly test is_worker. | @@ -312,7 +312,7 @@ static VALUE iodine_master_is(VALUE self) {
* a single process mode (the master is also a worker), `false` otherwise.
*/
static VALUE iodine_worker_is(VALUE self) {
- return fio_is_master() ? Qtrue : Qfalse;
+ return fio_is_worker() ? Qtrue : Qfalse;
}
/**
|
docs: fix recipe comment title for charliecloud customization | @@ -8,7 +8,7 @@ to build and run containers there.
% begin_ohpc_run
% ohpc_validation_newline
-% ohpc_validation_comment Optionally, enable console redirection
+% ohpc_validation_comment Optionally, enable user namespaces
\begin{lstlisting}[language=bash,keywords={},upquote=true]
# Define node kernel arguments to support user namespaces
[sms](*\#*) export kargs="${kargs} namespace.unpriv_enable=1"
|
XFAIL the external symbols test with cryptopp enabled
The crypto library will export a lot of symbols that will cause
test_external_symbols to fail. If we're built with cryptopp enabled,
ignore it with XFAIL instead of totally FAILing. | @@ -50,6 +50,8 @@ kvazaar_tests_LDFLAGS = -static $(top_builddir)/src/libkvazaar.la $(LIBS)
nodist_EXTRA_kvazaar_tests_SOURCES = cpp.cpp
if USE_CRYPTOPP
+XFAIL_TESTS = \
+ test_external_symbols.sh
kvazaar_tests_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(kvazaar_tests_CFLAGS) $(CXXFLAGS) \
$(kvazaar_tests_LDFLAGS) $(LDFLAGS) -o $@
|
updated symbolslots-test | (import ./helper :prefix "" :exit true)
(start-suite 15)
-(assert (deep= (in (disasm (defn a [] (def x 10) x)) :symbolslots)
- @[])
+(assert (deep= (in (disasm (defn a [] (def x 10) x)) :symbolslots) nil)
"no symbolslots when *debug* is false")
(setdyn *debug* true)
"symbolslots when *debug* is true")
(setdyn *debug* false)
-
# need to fix assembling functions
(comment
(setdyn *debug* true)
|
Update script for run_sollve to work for upstream OpenMP
In case of upstream OpenMP, use `amdgpu-arch` if `mygpu` is not found to
detect the AOMP GPU. | @@ -487,6 +487,8 @@ function setaompgpu (){
echo Set AOMP_GPU with mygpu.
if [ -a $AOMP/bin/mygpu ]; then
detected_gpu=$($AOMP/bin/mygpu)
+ elif [ -a $AOMP/bin/amdgpu-arch ]; then
+ detected_gpu=$($AOMP/bin/amdgpu-arch)
else
detected_gpu=$($AOMP/../bin/mygpu)
fi
|
Tools: Add hint to resolve [u]int32_t formatting errors | -
re: "The keyword signature for target_link_libraries has already been used"
hint: "Projects using target_link_libraries with project_elf explicitly and custom CMake projects must specify PRIVATE, PUBLIC or INTERFACE arguments."
+
+-
+ re: "format '([^']+)' expects argument of type '((unsigned )?int|long)', but argument (\\w+) has type '([u]?int32_t)'( {aka '([^']+)'})?"
+ hint: "The issue is better to resolve by replacing format specifiers to 'PRI'-family macros (include <inttypes.h> header file)."
|
mmx: fix NEON implementation of _mm_srai_pi16
There was a missing closing parenthesis. It wasn't caught before
since we prefer the vector extension version, and most compilers
which support NEON also support vector extensions. | @@ -1775,7 +1775,7 @@ simde_mm_srai_pi16 (simde__m64 a, int count) {
#if defined(SIMDE_VECTOR_SUBSCRIPT_SCALAR)
r_.i16 = a_.i16 >> (count & 0xff);
#elif defined(SIMDE_ARM_NEON_A32V7_NATIVE)
- r_.neon_i16 = vshl_s16(a_.neon_i16, vmov_n_s16(-HEDLEY_STATIC_CAST(int16_t, count));
+ r_.neon_i16 = vshl_s16(a_.neon_i16, vmov_n_s16(-HEDLEY_STATIC_CAST(int16_t, count)));
#elif defined(SIMDE_MIPS_LOONGSON_MMI_NATIVE)
r_.mmi_i16 = psrah_s(a_.mmi_i16, count);
#else
|
Disable RSA_PSS on openssl 1.1.1d because it's broken. | #include "crypto/s2n_hash.h"
#include "utils/s2n_blob.h"
-#if S2N_OPENSSL_VERSION_AT_LEAST(1, 1, 0) && !defined(LIBRESSL_VERSION_NUMBER)
+/* OpenSSL 1.1.1d 10 Sep 2019 is broken, so disable on that version. For further info see: crypto/evp/p_lib.c:469*/
+#if S2N_OPENSSL_VERSION_AT_LEAST(1, 1, 0) && !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER != 0x1010104fL
#define RSA_PSS_SUPPORTED 1
#define RSA_PSS_SIGN_VERIFY_RANDOM_BLOB_SIZE 32
#define RSA_PSS_SIGN_VERIFY_SIGNATURE_SIZE 256
|
Set project confiuration for development | #define ESP_CFG_DBG_MQTT ESP_DBG_OFF
#define ESP_CFG_DBG_MEM ESP_DBG_OFF
#define ESP_CFG_DBG_PBUF ESP_DBG_OFF
-#define ESP_CFG_DBG_CONN ESP_DBG_ON
+#define ESP_CFG_DBG_CONN ESP_DBG_OFF
#define ESP_CFG_DBG_VAR ESP_DBG_OFF
#define ESP_CFG_RCV_BUFF_SIZE 0x1000
#define ESP_CFG_RESET_ON_INIT 1
+#define ESP_CFG_CONN_MANUAL_TCP_RECEIVE 1
+
#if defined(WIN32)
#define ESP_CFG_SYS_PORT ESP_SYS_PORT_WIN32
#endif
|
Fix store scene with colors | @@ -2108,35 +2108,7 @@ int DeRestPluginPrivate::storeScene(const ApiRequest &req, ApiResponse &rsp)
needModify = true;
}
- if (item->toString() == QLatin1String("xy"))
- {
- item = lightNode->item(RStateX);
- DBG_Assert(item != 0);
- if (item && item->toNumber() != ls->x())
- {
- ls->setX(item->toNumber());
- needModify = true;
- }
-
- item = lightNode->item(RStateY);
- DBG_Assert(item != 0);
- if (item && item->toNumber() != ls->y())
- {
- ls->setX(item->toNumber());
- needModify = true;
- }
- }
- else if (item->toString() == QLatin1String("ct"))
- {
- item = lightNode->item(RStateCt);
- DBG_Assert(item != 0);
- if (item && item->toNumber() != ls->colorTemperature())
- {
- ls->setColorTemperature(item->toNumber());
- needModify = true;
- }
- }
- else if (item->toString() == QLatin1String("hs"))
+ if (item->toString() == QLatin1String("xy") || item->toString() == QLatin1String("hs"))
{
item = lightNode->item(RStateHue);
DBG_Assert(item != 0);
@@ -2166,7 +2138,18 @@ int DeRestPluginPrivate::storeScene(const ApiRequest &req, ApiResponse &rsp)
DBG_Assert(item != 0);
if (item && item->toNumber() != ls->y())
{
- ls->setX(item->toNumber());
+ ls->setY(item->toNumber());
+ needModify = true;
+ }
+ }
+
+ if (item->toString() == QLatin1String("ct"))
+ {
+ item = lightNode->item(RStateCt);
+ DBG_Assert(item != 0);
+ if (item && item->toNumber() != ls->colorTemperature())
+ {
+ ls->setColorTemperature(item->toNumber());
needModify = true;
}
}
@@ -2226,7 +2209,7 @@ int DeRestPluginPrivate::storeScene(const ApiRequest &req, ApiResponse &rsp)
item = lightNode->item(RStateColorMode);
if (item)
{
- if (item->toString() == QLatin1String("xy"))
+ if (item->toString() == QLatin1String("xy") || item->toString() == QLatin1String("hs"))
{
item = lightNode->item(RStateX);
DBG_Assert(item != 0);
@@ -2240,18 +2223,6 @@ int DeRestPluginPrivate::storeScene(const ApiRequest &req, ApiResponse &rsp)
{
state.setY(item->toNumber());
}
- }
- else if (item->toString() == QLatin1String("ct"))
- {
- item = lightNode->item(RStateCt);
- DBG_Assert(item != 0);
- if (item)
- {
- state.setColorTemperature(item->toNumber());
- }
- }
- else if (item->toString() == QLatin1String("hs"))
- {
item = lightNode->item(RStateHue);
DBG_Assert(item != 0);
if (item)
@@ -2265,6 +2236,15 @@ int DeRestPluginPrivate::storeScene(const ApiRequest &req, ApiResponse &rsp)
state.setSaturation(item->toNumber());
}
}
+ else if (item->toString() == QLatin1String("ct"))
+ {
+ item = lightNode->item(RStateCt);
+ DBG_Assert(item != 0);
+ if (item)
+ {
+ state.setColorTemperature(item->toNumber());
+ }
+ }
state.setColorloopActive(lightNode->isColorLoopActive());
state.setColorloopTime(lightNode->colorLoopSpeed());
|
Enable pushing of docker image to Github (Issue | @@ -10,6 +10,7 @@ on:
jobs:
setup:
runs-on: ubuntu-latest
+ environment: docker
outputs:
ARTIFACT_NAME: ${{ steps.setter.outputs.ARTIFACT_NAME }}
IMAGE_TAG: ${{ steps.setter.outputs.IMAGE_TAG }}
@@ -26,6 +27,7 @@ jobs:
build:
runs-on: ubuntu-latest
+ environment: docker
needs: setup
steps:
-
@@ -51,6 +53,7 @@ jobs:
test:
runs-on: ubuntu-latest
+ environment: docker
needs: [ build, setup ]
steps:
-
@@ -80,6 +83,7 @@ jobs:
secrets:
runs-on: ubuntu-latest
+ environment: docker
needs: test
if: github.event.workflow_run.conclusion == 'success'
outputs:
@@ -93,6 +97,7 @@ jobs:
hub:
runs-on: ubuntu-latest
+ environment: docker
needs: [ secrets, setup ]
if: needs.secrets.outputs.PUSH_TO_HUB == 'true'
steps:
@@ -126,6 +131,7 @@ jobs:
ghcr:
runs-on: ubuntu-latest
+ environment: docker
needs: [ secrets, setup ]
if: needs.secrets.outputs.PUSH_TO_GHCR == 'true'
steps:
|
linux-raspberrypi-dev: Skip if not preferred provider
This should avoid network traffic to resolve ${AUTOREV} unless this
recipe is explicitly selected as the preferred provider of
virtual/kernel. | +python __anonymous() {
+ if "linux-raspberrypi-dev" not in d.getVar("PREFERRED_PROVIDER_virtual/kernel"):
+ msg = "Skipping linux-raspberrypi-dev as it is not the preferred " + \
+ "provider of virtual/kernel."
+ raise bb.parse.SkipRecipe(msg)
+}
+
FILESEXTRAPATHS_prepend := "${THISDIR}/linux-raspberrypi:"
LINUX_VERSION ?= "4.11"
|
Only show fw version from file if the file is valid | @@ -229,7 +229,7 @@ Load(
{
CandidateListCount = FunctionalDimmCount + NonFunctionalDimmCount;
pAllDimms = AllocateZeroPool(sizeof(*pAllDimms) * CandidateListCount);
- if (pNonFunctionalDimms == NULL) {
+ if (pAllDimms == NULL) {
ReturnCode = EFI_OUT_OF_RESOURCES;
Print(FORMAT_STR_NL, CLI_ERR_OUT_OF_MEMORY);
goto Finish;
@@ -398,20 +398,6 @@ Load(
(CHAR16 *)pWorkingDirectory, Examine, Force, Recovery, FlashSPI, pFwImageInfo, pCommandStatus);
if (Examine) {
- if (Index == 0) {
- if (pFwImageInfo != NULL) {
-
- Print(L"(" FORMAT_STR L"): %02d.%02d.%02d.%04d\n",
- pFileName,
- pFwImageInfo->ImageVersion.ProductNumber.Version,
- pFwImageInfo->ImageVersion.RevisionNumber.Version,
- pFwImageInfo->ImageVersion.SecurityVersionNumber.Version,
- pFwImageInfo->ImageVersion.BuildNumber.Build);
- } else {
- Print(L"(" FORMAT_STR L")" FORMAT_STR_NL, pFileName, CLI_ERR_VERSION_RETRIEVE);
- }
- }
-
continue;
}
@@ -463,6 +449,28 @@ Load(
}
} //for loop
+
+ if (Examine) {
+ if (pFwImageInfo != NULL) {
+
+ //only print non 0.0.0.0 versions...
+ if (pFwImageInfo->ImageVersion.ProductNumber.Version != 0 ||
+ pFwImageInfo->ImageVersion.RevisionNumber.Version != 0 ||
+ pFwImageInfo->ImageVersion.SecurityVersionNumber.Version != 0 ||
+ pFwImageInfo->ImageVersion.BuildNumber.Build != 0) {
+ Print(L"(" FORMAT_STR L"): %02d.%02d.%02d.%04d\n",
+ pFileName,
+ pFwImageInfo->ImageVersion.ProductNumber.Version,
+ pFwImageInfo->ImageVersion.RevisionNumber.Version,
+ pFwImageInfo->ImageVersion.SecurityVersionNumber.Version,
+ pFwImageInfo->ImageVersion.BuildNumber.Build);
+ }
+ }
+ else {
+ Print(L"(" FORMAT_STR L")" FORMAT_STR_NL, pFileName, CLI_ERR_VERSION_RETRIEVE);
+ }
+ }
+
Finish:
DisplayCommandStatus(CLI_INFO_LOAD_FW, CLI_INFO_ON, pCommandStatus);
@@ -482,10 +490,10 @@ Finish:
FREE_POOL_SAFE(pDimmIds);
FREE_POOL_SAFE(pAllDimms);
FREE_POOL_SAFE(pOptionsValue);
+ FREE_POOL_SAFE(pDimmTargetIds);
if (TargetsIsNewList) {
FREE_POOL_SAFE(pDimmTargets);
- FREE_POOL_SAFE(pDimmTargetIds);
}
NVDIMM_EXIT_I64(ReturnCode);
|
Zephyr: npcx: Disable SHI on AP power suspend
Disable SHI on AP power suspend complete instead of
AP power shutdown complete.
BRANCH=none
TEST=Verified that shi_disable was called on AP
suspend complete.
zmake testall | @@ -83,7 +83,7 @@ static void shi_init(void)
ap_power_ev_init_callback(&cb, shi_power_change,
#if CONFIG_PLATFORM_EC_CHIPSET_RESUME_INIT_HOOK
AP_POWER_RESUME_INIT |
- AP_POWER_SHUTDOWN_COMPLETE
+ AP_POWER_SUSPEND_COMPLETE
#else
AP_POWER_RESUME |
AP_POWER_SUSPEND
|
Fix code on enumerating removable and internal storage folders | @@ -75,13 +75,11 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFolder::GetRemovableSt
CLR_RT_HeapBlock* hbObj;
CLR_RT_HeapBlock& top = stack.PushValue();
- // default to NULL (which is the expected outcome when no devices are connected)
- hbObj = top.Dereference();
- hbObj->SetObjectReference( NULL );
-
#if HAL_USE_SDC
bool sdCardEnumerated = false;
+ #endif
+ #if HAL_USE_SDC
// is the SD card file system ready?
if(sdCardFileSystemReady)
{
@@ -212,10 +210,6 @@ HRESULT Library_win_storage_native_Windows_Storage_StorageFolder::GetInternalSto
CLR_RT_HeapBlock* hbObj;
CLR_RT_HeapBlock& top = stack.PushValue();
- // default to NULL (which is the expected outcome when no devices are connected)
- hbObj = top.Dereference();
- hbObj->SetObjectReference( NULL );
-
#if (USE_SPIFFS_FOR_STORAGE == TRUE)
// is the SPIFFS file system available and mounted?
if(spiffsFileSystemReady)
|
Remove redo printfs. | ?=(?($noun $void {?($atom $core) *}) ref)
==
done
- ~_ (dunk 'redo: dext: sut')
- ~_ (dunk(sut ref) 'redo: dext: ref')
+ :: ~_ (dunk 'redo: dext: sut')
+ :: ~_ (dunk(sut ref) 'redo: dext: ref')
?- sut
?($noun $void {?($atom $core) *})
:: reduce reference and reassemble leaf
=/ lov
=/ lov dear
?~ lov
- ~_ (dunk 'redo: dear: sut')
- ~_ (dunk(sut ref) 'redo: dear: ref')
+ :: ~_ (dunk 'redo: dear: sut')
+ :: ~_ (dunk(sut ref) 'redo: dear: ref')
~& [%wec wec]
!!
(need lov)
|
test: change pkey kdf dup fail test to a pkey kdf dup success test | @@ -1693,11 +1693,10 @@ static OSSL_PARAM *do_construct_hkdf_params(char *digest, char *key,
return params;
}
-/* Test that EVP_PKEY_CTX_dup() fails gracefully for a KDF */
-static int test_evp_pkey_ctx_dup_kdf_fail(void)
+static int test_evp_pkey_ctx_dup_kdf(void)
{
int ret = 0;
- size_t len = 0;
+ size_t len = 0, dlen = 0;
EVP_PKEY_CTX *pctx = NULL, *dctx = NULL;
OSSL_PARAM *params = NULL;
@@ -1708,10 +1707,12 @@ static int test_evp_pkey_ctx_dup_kdf_fail(void)
goto err;
if (!TEST_int_eq(EVP_PKEY_derive_init_ex(pctx, params), 1))
goto err;
- if (!TEST_int_eq(EVP_PKEY_derive(pctx, NULL, &len), 1)
- || !TEST_size_t_eq(len, SHA256_DIGEST_LENGTH))
+ if (!TEST_ptr(dctx = EVP_PKEY_CTX_dup(pctx)))
goto err;
- if (!TEST_ptr_null(dctx = EVP_PKEY_CTX_dup(pctx)))
+ if (!TEST_int_eq(EVP_PKEY_derive(pctx, NULL, &len), 1)
+ || !TEST_size_t_eq(len, SHA256_DIGEST_LENGTH)
+ || !TEST_int_eq(EVP_PKEY_derive(dctx, NULL, &dlen), 1)
+ || !TEST_size_t_eq(dlen, SHA256_DIGEST_LENGTH))
goto err;
ret = 1;
err:
@@ -1731,7 +1732,7 @@ int setup_tests(void)
if (!TEST_ptr(datadir = test_get_argument(0)))
return 0;
- ADD_TEST(test_evp_pkey_ctx_dup_kdf_fail);
+ ADD_TEST(test_evp_pkey_ctx_dup_kdf);
ADD_TEST(test_evp_pkey_get_bn_param_large);
ADD_TEST(test_fromdata_rsa);
#ifndef OPENSSL_NO_DH
|
dm: virtio: implement vhost_set_mem_table
vhost kernel driver needs the information of memory mapping between
GPA and the virtual addresses in device model process. This is
required for virtqueue related operations. This patch gets memory
mapping information from vmctx then conveys to vhost.
Acked-by: Yu Wang | @@ -44,6 +44,14 @@ vhost_kernel_deinit(struct vhost_dev *vdev)
/* to be implemented */
}
+static int
+vhost_kernel_set_mem_table(struct vhost_dev *vdev,
+ struct vhost_memory *mem)
+{
+ /* to be implemented */
+ return -1;
+}
+
static int
vhost_kernel_set_vring_addr(struct vhost_dev *vdev,
struct vhost_vring_addr *addr)
@@ -370,10 +378,63 @@ vhost_vq_stop(struct vhost_dev *vdev, int idx)
static int
vhost_set_mem_table(struct vhost_dev *vdev)
{
- /* to be implemented */
+ struct vmctx *ctx;
+ struct vhost_memory *mem;
+ uint32_t nregions = 0;
+ int rc;
+
+ ctx = vdev->base->dev->vmctx;
+ if (ctx->lowmem > 0)
+ nregions++;
+ if (ctx->highmem > 0)
+ nregions++;
+
+ mem = calloc(1, sizeof(struct vhost_memory) +
+ sizeof(struct vhost_memory_region) * nregions);
+ if (!mem) {
+ WPRINTF("out of memory\n");
return -1;
}
+ nregions = 0;
+ if (ctx->lowmem > 0) {
+ mem->regions[nregions].guest_phys_addr = (uintptr_t)0;
+ mem->regions[nregions].memory_size = ctx->lowmem;
+ mem->regions[nregions].userspace_addr =
+ (uintptr_t)ctx->baseaddr;
+ DPRINTF("[%d][0x%llx -> 0x%llx, 0x%llx]\n",
+ nregions,
+ mem->regions[nregions].guest_phys_addr,
+ mem->regions[nregions].userspace_addr,
+ mem->regions[nregions].memory_size);
+ nregions++;
+ }
+
+ if (ctx->highmem > 0) {
+ mem->regions[nregions].guest_phys_addr = 4*GB;
+ mem->regions[nregions].memory_size = ctx->highmem;
+ mem->regions[nregions].userspace_addr =
+ (uintptr_t)(ctx->baseaddr + 4*GB);
+ DPRINTF("[%d][0x%llx -> 0x%llx, 0x%llx]\n",
+ nregions,
+ mem->regions[nregions].guest_phys_addr,
+ mem->regions[nregions].userspace_addr,
+ mem->regions[nregions].memory_size);
+ nregions++;
+ }
+
+ mem->nregions = nregions;
+ mem->padding = 0;
+ rc = vhost_kernel_set_mem_table(vdev, mem);
+ free(mem);
+ if (rc < 0) {
+ WPRINTF("set_mem_table failed\n");
+ return -1;
+ }
+
+ return 0;
+}
+
int
vhost_dev_init(struct vhost_dev *vdev,
struct virtio_base *base,
|
decisions: update link in README | ## Introduction
-Before you write your first decision, read about the [decision process](4_partially_implemented/decision_process.md) and [steps](STEPS.md).
+Before you write your first decision, read about the [decision process](5_partially_implemented/decision_process.md) and [steps](STEPS.md).
## Meta-Information
|
[chainmaker][#537]add parameters check | @@ -428,10 +428,18 @@ BSINT32 BoatWalletCreate(BoatProtocolType protocol_type, const BCHAR *wallet_nam
#if PROTOCOL_USE_CHAINMAKER == 1
case BOAT_PROTOCOL_CHAINMAKER:
+ if (wallet_config_size < sizeof(BoatHlchainmakerWalletConfig))
+ {
+ g_boat_iot_sdk_context.wallet_list[i].is_used = BOAT_FALSE;
+ BoatLog(BOAT_LOG_NORMAL, "wallet_config_size out of memory");
+ BoatFree(boatwalletStore_ptr);
+ return BOAT_ERROR_COMMON_OUT_OF_MEMORY;
+ }
+
if (wallet_config_ptr != NULL)
{
memcpy(boatwalletStore_ptr, wallet_config_ptr, wallet_config_size);
- wallet_ptr = BoatHlchainmakerWalletInit((BoatHlchainmakerWalletConfig*)wallet_config_ptr, wallet_config_size);
+ wallet_ptr = BoatHlchainmakerWalletInit((BoatHlchainmakerWalletConfig*)wallet_config_ptr);
if (wallet_ptr != NULL)
{
@@ -465,7 +473,7 @@ BSINT32 BoatWalletCreate(BoatProtocolType protocol_type, const BCHAR *wallet_nam
BoatHlchainmakerWalletConfig *load_wallet_config_ptr = (BoatHlchainmakerWalletConfig*)boatwalletStore_ptr;
load_wallet_config_ptr->user_prikey_cfg.prikey_content.field_ptr = NULL;
load_wallet_config_ptr->user_prikey_cfg.prikey_content.field_len = 0;
- wallet_ptr = BoatHlchainmakerWalletInit(load_wallet_config_ptr, wallet_config_size);
+ wallet_ptr = BoatHlchainmakerWalletInit(load_wallet_config_ptr);
if (wallet_ptr != NULL)
{
// re-assign private key context
|
libcupsfilters: Moved signal handling back into main function of get_printer_attributes() variants | @@ -163,37 +163,6 @@ ipp_t *get_printer_attributes4(const char* raw_uri,
int debug,
int is_fax)
{
- #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
- struct sigaction action; /* Actions for POSIX signals */
-#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
-
- /*
- * Make sure status messages are not buffered...
- */
-
- setbuf(stderr, NULL);
-
- /*
- * Ignore broken pipe signals...
- */
-
- signal(SIGPIPE, SIG_IGN);
-
- /*
- * Register a signal handler to cleanly cancel a job.
- */
-
-#ifdef HAVE_SIGSET /* Use System V signals over POSIX to avoid bugs */
- sigset(SIGTERM, cancel_job);
-#elif defined(HAVE_SIGACTION)
- memset(&action, 0, sizeof(action));
-
- sigemptyset(&action.sa_mask);
- action.sa_handler = cancel_job;
- sigaction(SIGTERM, &action, NULL);
-#else
- signal(SIGTERM, cancel_job);
-#endif /* HAVE_SIGSET */
if(is_fax)
return get_printer_attributes5(NULL, raw_uri, pattrs, pattrs_size,
req_attrs, req_attrs_size, debug,NULL,IPPFIND_BASED_CONVERTER_FOR_FAX_URI);
@@ -202,6 +171,7 @@ ipp_t *get_printer_attributes4(const char* raw_uri,
req_attrs, req_attrs_size, debug,NULL,IPPFIND_BASED_CONVERTER_FOR_PRINT_URI);
}
+
/* Get attributes of a printer specified by URI and under a given HTTP
connection, for example via a domain socket, and give info about used
fallbacks */
@@ -259,6 +229,37 @@ get_printer_attributes5(http_t *http_printer,
"uri-security-supported"
};
+#if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
+ struct sigaction action; /* Actions for POSIX signals */
+#endif /* HAVE_SIGACTION && !HAVE_SIGSET */
+
+ /*
+ * Make sure status messages are not buffered...
+ */
+
+ setbuf(stderr, NULL);
+
+ /*
+ * Ignore broken pipe signals...
+ */
+
+ signal(SIGPIPE, SIG_IGN);
+
+ /*
+ * Register a signal handler to cleanly cancel a job.
+ */
+
+#ifdef HAVE_SIGSET /* Use System V signals over POSIX to avoid bugs */
+ sigset(SIGTERM, cancel_job);
+#elif defined(HAVE_SIGACTION)
+ memset(&action, 0, sizeof(action));
+ sigemptyset(&action.sa_mask);
+ action.sa_handler = cancel_job;
+ sigaction(SIGTERM, &action, NULL);
+#else
+ signal(SIGTERM, cancel_job);
+#endif /* HAVE_SIGSET */
+
/* Expect a device capable of standard IPP Everywhere*/
if (driverless_info != NULL)
*driverless_info = FULL_DRVLESS;
|
VERSION bump to version 1.4.70 | @@ -37,7 +37,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 4)
-set(SYSREPO_MICRO_VERSION 69)
+set(SYSREPO_MICRO_VERSION 70)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
Add test case for bug fixed in | @@ -432,6 +432,14 @@ static void test_strings()
"rule test { strings: $a = \"abc\" fullword condition: $a }",
"abcx");
+ assert_false_rule_blob(
+ "rule test { strings: $a = \"abc\" wide condition: $a }",
+ "a\1b\0c\0d\0e\0f\0");
+
+ assert_false_rule_blob(
+ "rule test { strings: $a = \"abcdef\" wide condition: $a }",
+ "a\0b\0c\0d\0e\0f\1");
+
assert_false_rule(
"rule test { strings: $a = \"abc\" ascii wide fullword condition: $a }",
"abcx");
|
README: Add the contents about reference container image
For demonstration purpose, the reference container images are
availbale. Currently, web application demos based on OpenJDK 11
and Golang are provided. | @@ -63,3 +63,8 @@ For more information about Enclave Runtime PAL API, please refer to [Enclave Run
### Run OCI bundle
Please refer to [this guide](https://github.com/alibaba/inclavare-containers/blob/master/docs/running_rune_with_occlum_bundle.md) to run `occlum bundle` with `rune`.
+
+---
+
+## Reference container image
+[The reference container images](https://hub.docker.com/u/inclavarecontainers) are available for the demonstration purpose to show how a Confidential Computing Kubernetes Cluster with Inclavare Containers works. Currently, web application demos based on OpenJDK 11 and Golang are provided.
|
timeofday: add global to status
see | - infos/provides = tracing
- infos/needs =
- infos/placements = pregetstorage postgetstorage presetstorage precommit postcommit prerollback postrollback
-- infos/status = maintained tested nodep configurable
+- infos/status = maintained tested nodep configurable global
- infos/description = Prints timestamps during execution of backend
## Introduction
|
Don't truncate test output on failures. | All notable changes to this project will be documented in this file.
## ??? - Unreleased
+- Ctrl-C will now raise SIGINT.
- Allow quoted literals in the `match` macro to behave as expected in patterns.
- Fix windows net related bug for TCP servers.
- Allow evaluating ev streams with dofile.
|
Added Octave to Summary. | @@ -787,6 +787,11 @@ Available Interfaces:
Include: ${LUA_INCLUDE_DIR}
Library: ${LUA_LIBRARIES}
+ Octave: ${OCTAVE_FOUND}
+ Version: ${OCTAVE_VERSION_STRING}
+ Include: ${OCTAVE_INCLUDE_DIRS}
+ Library: ${OCTAVE_LIBRARIES}
+
PHP: ${PHP_FOUND}
Version: ${PHP_VERSION_STRING}
Include: ${PHP_INCLUDE_DIRS}
|
Add support for all SP profiles | @@ -503,7 +503,9 @@ factory_presets_cb(size_t device, void *data)
return;
}
- oc_pki_set_security_profile(0, OC_SP_BLACK, OC_SP_BLACK, ee_credid);
+ oc_pki_set_security_profile(
+ 0, OC_SP_BASELINE | OC_SP_BLACK | OC_SP_BLUE | OC_SP_PURPLE, OC_SP_BASELINE,
+ ee_credid);
#endif /* OC_SECURITY && OC_PKI */
}
|
dbug fe: include "active" in active ames flow keys
Also adds more clear visual "snd" and "rcv" distinction. | @@ -11,9 +11,6 @@ export class Ames extends Component {
constructor(props) {
super(props);
- this.state = {
- opened: new Set()
- };
this.loadPeers = this.loadPeers.bind(this);
this.loadPeerDetails = this.loadPeerDetails.bind(this);
@@ -110,6 +107,7 @@ export class Ames extends Component {
);
const summary = (<>
+ <b>snd</b><br/>
{renderDuct(snd.duct)}
<table><tbody>
<tr class="inter">
@@ -137,7 +135,11 @@ export class Ames extends Component {
{queuedAcks}
{live}
</>);
- return {key: 'snd ' + snd.bone + ', ' + renderDuct(snd.duct), jsx: (
+ const active = ( snd['unsent-messages'].length > 0 ||
+ snd['packet-pump-state'].live.length > 0 )
+ ? 'active, '
+ : '';
+ return {key: 'snd ' + active + snd.bone + ', ' + renderDuct(snd.duct), jsx: (
<Summary summary={summary} details={details} />
)};
}
@@ -163,6 +165,7 @@ export class Ames extends Component {
</>);
const summary = (<>
+ <b>rcv</b><br/>
{renderDuct(rcv.duct)}
<table><tbody>
<tr>
|
Disabled zero copy test for zmq. | @@ -240,6 +240,8 @@ if (BUILD_PUBSUB_PSA_ZMQ)
)
target_link_libraries(pubsub_zmq_zerocopy_tests PRIVATE Celix::pubsub_api ${CPPUTEST_LIBRARIES} Jansson Celix::dfi)
target_include_directories(pubsub_zmq_zerocopy_tests SYSTEM PRIVATE ${CPPUTEST_INCLUDE_DIR} test)
- add_test(NAME pubsub_zmq_zerocopy_tests COMMAND pubsub_zmq_zerocopy_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_zmq_zerocopy_tests,CONTAINER_LOC>)
- SETUP_TARGET_FOR_COVERAGE(pubsub_zmq_zerocopy_tests_cov pubsub_zmq_zerocopy_tests ${CMAKE_BINARY_DIR}/coverage/pubsub_zmq_tests/pubsub_zmq_zerocopy_tests ..)
+
+ #TODO fix issues with ZeroCopy and reanble test again
+# add_test(NAME pubsub_zmq_zerocopy_tests COMMAND pubsub_zmq_zerocopy_tests WORKING_DIRECTORY $<TARGET_PROPERTY:pubsub_zmq_zerocopy_tests,CONTAINER_LOC>)
+# SETUP_TARGET_FOR_COVERAGE(pubsub_zmq_zerocopy_tests_cov pubsub_zmq_zerocopy_tests ${CMAKE_BINARY_DIR}/coverage/pubsub_zmq_tests/pubsub_zmq_zerocopy_tests ..)
endif ()
|
Remove debug pokes | [~ ..prep(+<+ u.old)]
::
++ poke-noun
- |= [what=?(%debug %debug-init %save %load) =name]
+ |= [what=?(%save %load) =name]
^- (quip move _+>)
=+ eye=(fall (~(get by eyes) name) *eye)
?- what
- %debug
- ~& [%log-lent (lent logs.eye)]
- ~& [%last-heard last-heard-block.eye]
- [~ +>.$]
- ::
- %debug-init
- =- done:(init:watcher name -)
- ^- config
- :* (need (de-purl:html 'http://104.198.35.227:8545')) :: parity
- ::(need (de-purl:html 'http://35.226.110.143:8545')) :: geth
- 7.100.000
- ~
- ~[azimuth:contracts:azimuth]
- ~
- ==
- ::
%save
=/ pax=path
/(scot %p our)/home/(scot %da now)/watcher/[name]/jam
|
Fix regression changing affinity for multi-group processes | @@ -319,25 +319,10 @@ INT_PTR CALLBACK PhpProcessAffinityDlgProc(
PROCESS_QUERY_LIMITED_INFORMATION,
context->ProcessItem->ProcessId
)))
- {
- USHORT groupBuffer[20] = { 0 };
- USHORT groupCount = RTL_NUMBER_OF(groupBuffer);
-
- if (NT_SUCCESS(PhGetProcessGroupInformation(
- processHandle,
- &groupCount,
- groupBuffer
- )) && groupCount > 1)
- {
- // We can't change affinity of multi-group processes. We can only change
- // affinity for individual threads in this case. (dmex).
- status = STATUS_RETRY;
- }
-
- if (NT_SUCCESS(status))
{
status = PhGetProcessGroupAffinity(processHandle, &processGroupAffinity);
+ // Add workaround for current process (dmex)
if (status == STATUS_INVALID_PARAMETER && context->ProcessItem->ProcessId == NtCurrentProcessId())
{
PROCESS_BASIC_INFORMATION basicInfo;
@@ -360,7 +345,6 @@ INT_PTR CALLBACK PhpProcessAffinityDlgProc(
ComboBox_SetCurSel(context->GroupComboHandle, processGroupAffinity.Group);
}
}
- }
NtClose(processHandle);
}
|
Fix chip/cxd56_farapi.c:285:14: error: format specifies type 'int' but the argument has type 'unsigned long' [-Werror,-Wformat] | @@ -281,7 +281,7 @@ void cxd56_farapiinitialize(void)
#ifdef CONFIG_CXD56_FARAPI_VERSION_CHECK
if (GET_SYSFW_VERSION_BUILD() < FARAPISTUB_VERSION)
{
- _alert("Mismatched version: loader(%d) != Self(%d)\n",
+ _alert("Mismatched version: loader(%" PRId32 ") != Self(%d)\n",
GET_SYSFW_VERSION_BUILD(), FARAPISTUB_VERSION);
_alert("Please update loader and gnssfw firmwares!!\n");
# ifdef CONFIG_CXD56_FARAPI_VERSION_FAILED_PANIC
|
DA: ZCL read use auto endpoint resolve function | @@ -506,16 +506,11 @@ static bool readZclAttribute(const Resource *r, const ResourceItem *item, deCONZ
if (param.endpoint == AutoEndpoint)
{
- // hack to get endpoint. todo find better solution
- auto ls = r->item(RAttrUniqueId)->toString().split('-', SKIP_EMPTY_PARTS);
- if (ls.size() >= 2)
- {
- bool ok = false;
- uint ep = ls[1].toUInt(&ok, 10);
- if (ok && ep < BroadcastEndpoint)
+ param.endpoint = resolveAutoEndpoint(r);
+
+ if (param.endpoint == AutoEndpoint)
{
- param.endpoint = ep;
- }
+ return false;
}
}
|
Fix cgozstd_test.go comment typo | @@ -23,13 +23,13 @@ import (
const (
// compressedMore is 15 bytes of zstd frame:
- // \x28\xb5\x2f\xfd \x00 \x58 \x31\x00\x00 \x4d\x6f\x72\x65\x21\x0a"
- // Magic----------- FHD- WD-- BH---------- BlockData----------------
+ // \x28\xb5\x2f\xfd \x00 \x58 \x31\x00\x00 \x4d\x6f\x72\x65\x21\x0a
+ // Magic----------- FHD- WD-- BH---------- BlockData---------------
//
- // Frame Header Descriptor 0x00 means no flags set.
+ // Frame Header Descriptor: no flags set.
// Window Descriptor: Exponent=11, Mantissa=0, Window_Size=2MiB.
// Block Header: Last_Block=1, Block_Type=0 (Raw_Block), Block_Size=6.
- // BlockData is the literal bytes "More!\n".
+ // Block Data: the literal bytes "More!\n".
compressedMore = "\x28\xb5\x2f\xfd\x00\x58\x31\x00\x00\x4d\x6f\x72\x65\x21\x0a"
uncompressedMore = "More!\n"
|
flags: fix formatting | @@ -67,12 +67,15 @@ void test_writefstab (const char * file)
keyNew ("user:/tests/filesystems/\\//mpoint", KEY_VALUE, "/", KEY_META, "comment/#0", "Moint point", KEY_END),
keyNew ("user:/tests/filesystems/\\//options", KEY_VALUE, "defaults,errors=remount-ro", KEY_META, "comment/#0",
"Fileuser/tests specific options. See mount(8)", KEY_END),
- keyNew ("user:/tests/filesystems/\\//passno", KEY_VALUE, "1", KEY_META, "comment/#0", "Pass number on parallel fsck", KEY_END),
+ keyNew ("user:/tests/filesystems/\\//passno", KEY_VALUE, "1", KEY_META, "comment/#0", "Pass number on parallel fsck",
+ KEY_END),
keyNew ("user:/tests/filesystems/\\//type", KEY_VALUE, "jfs", KEY_META, "comment/#0", "Fileuser/tests type. See fs(5)",
KEY_END),
keyNew ("user:/tests/filesystems/swap00", KEY_VALUE, "non-swapfs", KEY_META, "comment/#0", "pseudo name", KEY_END),
- keyNew ("user:/tests/filesystems/swap00/device", KEY_VALUE, "/dev/sda10", KEY_META, "comment/#0", "Device or Label", KEY_END),
- keyNew ("user:/tests/filesystems/swap00/dumpfreq", KEY_VALUE, "0", KEY_META, "comment/#0", "Dump frequency in days", KEY_END),
+ keyNew ("user:/tests/filesystems/swap00/device", KEY_VALUE, "/dev/sda10", KEY_META, "comment/#0", "Device or Label",
+ KEY_END),
+ keyNew ("user:/tests/filesystems/swap00/dumpfreq", KEY_VALUE, "0", KEY_META, "comment/#0", "Dump frequency in days",
+ KEY_END),
keyNew ("user:/tests/filesystems/swap00/mpoint", KEY_VALUE, "none", KEY_META, "comment/#0", "Moint point", KEY_END),
keyNew ("user:/tests/filesystems/swap00/options", KEY_VALUE, "sw", KEY_META, "comment/#0",
"Fileuser/tests specific options. See mount(8)", KEY_END),
|
test/usb_pe_drp_noextended.c: Format with clang-format
BRANCH=none
TEST=none | @@ -24,11 +24,9 @@ const struct tcpc_config_t tcpc_config[CONFIG_USB_PD_PORT_MAX_COUNT] = {
},
};
-const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = {
- {
+const struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_MAX_COUNT] = { {
.driver = &mock_usb_mux_driver,
- }
-};
+} };
void before_test(void)
{
|
delete xl define | #include "dynamixel_driver.h"
-#define XL320_POSITION_CONTROL_MODE 0
-#define XL320_VELOCITY_CONTROL_MODE 1
-
#define X_SERIES_CURRENT_CONTROL_MODE 0
#define X_SERIES_VELOCITY_CONTROL_MODE 1
#define X_SERIES_POSITION_CONTROL_MODE 3
|
hv: move DM_OWNED_GUEST_FLAG_MASK to vm_config.h
Currently the MACRO(DM_OWNED_GUEST_FLAG_MASK) is generated
by config-tool. It's unnecessary to generate by tool since
it is fixed, the config-tool will remove this MACRO and
move it to vm_config.h | #define CONFIG_POST_RT_VM .load_order = POST_LAUNCHED_VM, \
.severity = SEVERITY_RTVM
+/* Bitmask of guest flags that can be programmed by device model. Other bits are set by hypervisor only. */
+#if (SERVICE_VM_NUM == 0)
+#define DM_OWNED_GUEST_FLAG_MASK 0UL
+#else
+#define DM_OWNED_GUEST_FLAG_MASK (GUEST_FLAG_SECURE_WORLD_ENABLED | GUEST_FLAG_LAPIC_PASSTHROUGH \
+ | GUEST_FLAG_RT | GUEST_FLAG_IO_COMPLETION_POLLING)
+#endif
+
/* ACRN guest severity */
enum acrn_vm_severity {
SEVERITY_SAFETY_VM = 0x40U,
|
Added arduino pin for DXL_DIR_PIN(84). | @@ -128,7 +128,7 @@ extern const Pin2PortMapArray g_Pin2PortMapArray[]=
{GPIOE, GPIO_PIN_0, NULL, NO_ADC , NULL , NO_PWM , NO_EXTI }, // 82 BDPIN_UART2_RX
{GPIOE, GPIO_PIN_1, NULL, NO_ADC , NULL , NO_PWM , NO_EXTI }, // 83 BDPIN_UART2_TX
-
+ {GPIOC, GPIO_PIN_9, NULL, NO_ADC , NULL , NO_PWM , NO_EXTI }, // 84 DXL_DIR_PIN
{NULL , 0 , NULL, NO_ADC , NULL , NO_PWM , NO_EXTI }
};
|
king: fix warning | @@ -10,7 +10,7 @@ module Urbit.Vere.Behn (behn, DriverApi(..), behn') where
import Data.Time.Clock.System (SystemTime)
-import Urbit.Arvo hiding (Behn)
+import Urbit.Arvo
import Urbit.Prelude
import Urbit.Vere.Pier.Types
|
Fix GCC redef for fortify disable | @@ -176,23 +176,20 @@ build_target() {
build_subdir=debug
add cc_flags -DDEBUG -ggdb -fsanitize=address -fsanitize=undefined
if [[ $os = mac ]]; then
- # mac clang does not have -Og
+ # Our mac clang does not have -Og
add cc_flags -O1
- # tui in the future
- # add libraries -lncurses
else
add cc_flags -Og
# needed if address is already specified? doesn't work on mac clang, at
# least
# add cc_flags -fsanitize=leak
- # add libraries -lncursesw
fi
;;
release)
build_subdir=release
add cc_flags -DNDEBUG -O2 -g0
if [[ $protections_enabled != 1 ]]; then
- add cc_flags -D_FORTIFY_SOURCE=0 -fno-stack-protector
+ add cc_flags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fno-stack-protector
fi
if [[ $os = mac ]]; then
# todo some stripping option
|
opcodesswitch: check target validity before send
This was causing a segfault when sending messages to a dead process | @@ -1238,8 +1238,10 @@ static const char *const out_of_memory_atom = "\xD" "out_of_memory";
TRACE("send/0 target_pid=%i\n", local_process_id);
TRACE_SEND(ctx, ctx->x[0], ctx->x[1]);
Context *target = globalcontext_get_process(ctx->global, local_process_id);
-
+ if (!IS_NULL_PTR(target)) {
mailbox_send(target, ctx->x[1]);
+ }
+
#endif
NEXT_INSTRUCTION(1);
|
data tree BUGFIX use options when duplicating parents | @@ -3358,8 +3358,8 @@ error:
}
static LY_ERR
-lyd_dup_get_local_parent(const struct lyd_node *node, const struct lyd_node_inner *parent, struct lyd_node **dup_parent,
- struct lyd_node_inner **local_parent)
+lyd_dup_get_local_parent(const struct lyd_node *node, const struct lyd_node_inner *parent, uint32_t options,
+ struct lyd_node **dup_parent, struct lyd_node_inner **local_parent)
{
const struct lyd_node_inner *orig_parent, *iter;
ly_bool repeat = 1;
@@ -3374,7 +3374,7 @@ lyd_dup_get_local_parent(const struct lyd_node *node, const struct lyd_node_inne
repeat = 0;
} else {
iter = NULL;
- LY_CHECK_RET(lyd_dup_r((struct lyd_node *)orig_parent, NULL, (struct lyd_node **)&iter, 0,
+ LY_CHECK_RET(lyd_dup_r((struct lyd_node *)orig_parent, NULL, (struct lyd_node **)&iter, options,
(struct lyd_node **)&iter));
}
if (!*local_parent) {
@@ -3419,7 +3419,8 @@ lyd_dup(const struct lyd_node *node, struct lyd_node_inner *parent, uint32_t opt
LY_CHECK_ARG_RET(NULL, node, LY_EINVAL);
if (options & LYD_DUP_WITH_PARENTS) {
- LY_CHECK_GOTO(rc = lyd_dup_get_local_parent(node, parent, &top, &local_parent), error);
+ LY_CHECK_GOTO(rc = lyd_dup_get_local_parent(node, parent, options & (LYD_DUP_WITH_FLAGS | LYD_DUP_NO_META),
+ &top, &local_parent), error);
} else {
local_parent = parent;
}
|
VDP_drawImageEx(..): replaced TransferMethod parameter by simple DMA | @@ -477,7 +477,7 @@ u16 VDP_drawBitmapEx(VDPPlane plane, const Bitmap *bitmap, u16 basetile, u16 x,
/**
* \brief
- * Draw Image in specified background plane and at given position.
+ * Draw Image (using DMA) in specified background plane and at given position.
*
* \param plane
* Plane where we want to draw the tilemap.<br>
@@ -521,13 +521,8 @@ u16 VDP_drawImage(VDPPlane plane, const Image *image, u16 x, u16 y);
* Plane Y position (in tile).
* \param loadpal
* Load the bitmap palette information when non zero (can be TRUE or FALSE)
- * \param tm
- * Transfer method.<br>
- * Accepted values are:<br>
- * - CPU<br>
- * - DMA<br>
- * - DMA_QUEUE<br>
- * - DMA_QUEUE_COPY
+ * \param dma
+ * use DMA
* \return
* FALSE if there is not enough memory to unpack the specified Image (only if image was packed).
*
@@ -535,7 +530,7 @@ u16 VDP_drawImage(VDPPlane plane, const Image *image, u16 x, u16 y);
*
* \see VDP_drawImage()
*/
-u16 VDP_drawImageEx(VDPPlane plane, const Image *image, u16 basetile, u16 x, u16 y, u16 loadpal, TransferMethod tm);
+u16 VDP_drawImageEx(VDPPlane plane, const Image *image, u16 basetile, u16 x, u16 y, u16 loadpal, bool dma);
#endif // _VDP_BG_H_
|
Fix netstack.h comment | @@ -105,7 +105,7 @@ struct network_driver {
/** Callback for getting notified of incoming packet in packetbuf. */
void (* input)(void);
- /** Callback for getting notified of outgoing packet in uipbuf. */
+ /** Output funtion, sends from uipbuf. */
uint8_t (* output)(const linkaddr_t *localdest);
};
|
docs: return accidentally deleted comment | @@ -65,6 +65,7 @@ kdb set user:/tests/sequence/#0 'First Element'
#> Create a new key user:/tests/sequence/#0 with string "First Element"
kdb set user:/tests/sequence/#1 'Second Element'
#> Create a new key user:/tests/sequence/#1 with string "Second Element"
+# Arrays do not need to be contiguous
kdb set user:/tests/sequence/#3 'Fourth Element'
#> Create a new key user:/tests/sequence/#3 with string "Fourth Element"
```
|
test for trajectory rotation | @@ -24,6 +24,20 @@ tests/test-traj-custom: traj poly nrmse
TESTS += tests/test-traj-custom
+
+tests/test-traj-rot: traj phantom estshift
+ set -e ; mkdir $(TESTS_TMP) ; cd $(TESTS_TMP) ;\
+ $(TOOLDIR)/traj -R0. -r -y360 -D t0.ra ;\
+ $(TOOLDIR)/phantom -k -t t0.ra k0.ra ;\
+ $(TOOLDIR)/traj -R30. -r -y360 -D t30.ra ;\
+ $(TOOLDIR)/phantom -k -t t30.ra k30.ra ;\
+ $(TOOLDIR)/estshift 4 k0.ra k30.ra | grep "30.00000" ;\
+ rm *.ra ; cd .. ; rmdir $(TESTS_TMP)
+ touch $@
+
+TESTS += tests/test-traj-rot
+
+
tests/test-traj-3D: traj ones scale slice rss nrmse
set -e; mkdir $(TESTS_TMP) ; cd $(TESTS_TMP) ;\
$(TOOLDIR)/traj -3 -x128 -y128 -r traj.ra ;\
|
do delayed decommit if not reclaiming abandoned blocks | @@ -1208,6 +1208,7 @@ static mi_segment_t* mi_segment_try_reclaim(mi_heap_t* heap, size_t needed_slice
}
else {
// otherwise, push on the visited list so it gets not looked at too quickly again
+ mi_segment_delayed_decommit(segment, false, tld->stats); // decommit if needed
mi_abandoned_visited_push(segment);
}
}
|
ble_mesh: correct function declaration | @@ -77,7 +77,7 @@ static inline int bt_mesh_beacon_key(const uint8_t net_key[16],
}
int bt_mesh_beacon_auth(const uint8_t beacon_key[16], uint8_t flags,
- const uint8_t net_id[16], uint32_t iv_index,
+ const uint8_t net_id[8], uint32_t iv_index,
uint8_t auth[8]);
static inline int bt_mesh_app_id(const uint8_t app_key[16], uint8_t app_id[1])
|
Export PhThemeWindowTextColor and PhWindowThemeControlColor | @@ -1101,6 +1101,7 @@ PHLIBAPI extern HFONT PhTreeWindowFont; // phapppub
PHLIBAPI extern HBRUSH PhMenuBackgroundBrush;
extern COLORREF PhThemeWindowForegroundColor;
extern COLORREF PhThemeWindowBackgroundColor;
+extern COLORREF PhThemeWindowTextColor;
PHLIBAPI
VOID
@@ -1131,6 +1132,16 @@ PhInitializeThemeWindowFrame(
_In_ HWND WindowHandle
);
+PHLIBAPI
+HBRUSH
+NTAPI
+PhWindowThemeControlColor(
+ _In_ HWND WindowHandle,
+ _In_ HDC Hdc,
+ _In_ HWND ChildWindowHandle,
+ _In_ INT Type
+ );
+
PHLIBAPI
VOID
NTAPI
|
6TOP should filter the to be added cells with slotOffset larger than slotframe length. | @@ -455,6 +455,11 @@ bool schedule_isSlotOffsetAvailable(uint16_t slotOffset){
INTERRUPT_DECLARATION();
DISABLE_INTERRUPTS();
+ if (slotOffset>=schedule_vars.frameLength){
+ ENABLE_INTERRUPTS();
+ return FALSE;
+ }
+
scheduleWalker = schedule_vars.currentScheduleEntry;
do {
if(slotOffset == scheduleWalker->slotOffset){
|
Fix SEGV on button press without deCONZ::Node available
Access to deCONZ::Node wasn't checked for nullptr and could crash when a button was pressed for a sensor which doesn't have the node set.
SEGV since v2.11.0 PR:
Related issue: | @@ -4853,8 +4853,9 @@ void DeRestPluginPrivate::checkSensorButtonEvent(Sensor *sensor, const deCONZ::A
ResourceItem *item = sensor->item(RStateButtonEvent);
if (item)
{
- if (sensor->node()->nodeDescriptor().manufacturerCode() == VENDOR_PHILIPS ||
- sensor->node()->nodeDescriptor().manufacturerCode() == VENDOR_IKEA)
+ if (sensor->node() &&
+ (sensor->node()->nodeDescriptor().manufacturerCode() == VENDOR_PHILIPS ||
+ sensor->node()->nodeDescriptor().manufacturerCode() == VENDOR_IKEA))
{
}
else if (item->toNumber() == buttonMap.button && ind.dstAddressMode() == deCONZ::ApsGroupAddress)
|
RTOS2/RTX5: Enhanced RTX5 Blinky example Abstract text about
switching to other Cortex-M class devices. | @@ -3,8 +3,8 @@ for a simulated Cortex-M3 device
Example functionality:
- Clock Settings:
- - XTAL = 12 MHz
- - Core = 12 MHz
+ - XTAL = 50 MHz
+ - Core = 25 MHz
The simple RTX Kernel based example simulates the step-motor
driver. Four LEDs are blinking simulating the activation of
@@ -24,3 +24,7 @@ CW rotation direction.
The BLINKY example program is available for one target:
Simulation: configured for a simulated on-chip Flash
+
+The example is compatible with other Cortex-M class devices.
+Simply open the project settings, navigate to Device tab and
+select another Cortex-M class device.
|
Add requires for xmake.lua in gnu-rm test project. | -set_toolchains("gnu-rm")
-
add_rules("mode.debug", "mode.release")
+add_requires("gnu-rm")
+set_toolchains("@gnu-rm")
+
target("foo")
add_rules("gnu-rm.static")
add_files("src/foo/*.c")
@@ -9,7 +10,6 @@ target("foo")
target("hello")
add_deps("foo")
add_rules("gnu-rm.binary")
- set_kind("binary")
add_files("src/*.c", "src/*.s")
add_files("src/*.ld")
add_includedirs("src/lib/cmsis")
|
use CLOCK_MONOTONIC_COARSE | #include "log.h"
+
// Program start time
static struct timespec log_start = { 0, 0 };
char *log_time() {
struct timespec now = { 0, 0 };
- clock_gettime( CLOCK_MONOTONIC, &now );
+ clock_gettime( CLOCK_MONOTONIC_COARSE, &now );
static char buf[16];
sprintf( buf, "%.5f",
@@ -79,7 +80,7 @@ void _log_print( int priority, const char format[], ... ) {
}
void log_setup( void ) {
- clock_gettime(CLOCK_MONOTONIC, &log_start);
+ clock_gettime( CLOCK_MONOTONIC_COARSE, &log_start );
}
void log_free( void ) {
|
BugID:17291083:reset auth state when linkkit start | @@ -597,6 +597,7 @@ int being_deprecated linkkit_start(int max_buffered_msg, int get_tsl_from_cloud,
LITE_set_loglevel(log_level);
/* Set Region */
+ iotx_guider_auth_set(0);
iotx_guider_set_region(domain_type);
/* Initialize Device Manager */
|
improved dauthentication warning | @@ -756,8 +756,8 @@ if(eapolmsgtimestamperrorcount > 0)
if((deauthenticationcount +disassociationcount) > 100)
{
printf("\nWarning: too many deauthentication/disassociation frames detected!\n"
- "That can cause that an ACCESS POINT reset the EAPOL TIMER,\n"
- "renew the ANONCE and set the PMKID to zero.\n"
+ "That can cause that an ACCESS POINT change channel, reset EAPOL TIMER,\n"
+ "renew ANONCE and set PMKID to zero.\n"
"This could prevent to calculate a valid EAPOL MESSAGE PAIR\n"
"or to get a valid PMKID.\n");
}
|
core: fix strncat warning
introduced during removal of strcat calls. seems to only affect older
gcc's, so maybe a misfire warning that got removed. | @@ -2056,7 +2056,7 @@ static inline void get_conn_text(const conn *c, const int af,
&((struct sockaddr_in6 *)sock_addr)->sin6_addr,
addr_text + 1,
sizeof(addr_text) - 2)) {
- strncat(addr_text, "]", 1);
+ strncat(addr_text, "]", 2);
}
port = ntohs(((struct sockaddr_in6 *)sock_addr)->sin6_port);
protoname = IS_UDP(c->transport) ? "udp6" : "tcp6";
|
New initial salt | @@ -184,8 +184,8 @@ typedef struct {
/* NGTCP2_INITIAL_SALT is a salt value which is used to derive initial
secret. */
#define NGTCP2_INITIAL_SALT \
- "\x7f\xbc\xdb\x0e\x7c\x66\xbb\xe9\x19\x3a\x96\xcd\x21\x51\x9e\xbd\x7a\x02" \
- "\x64\x4a"
+ "\xc3\xee\xf7\x12\xc7\x2e\xbb\x5a\x11\xa7\xd2\x43\x2b\xb4\x63\x65\xbe\xf9" \
+ "\xf5\x02"
/* NGTCP2_HP_MASKLEN is the length of header protection mask. */
#define NGTCP2_HP_MASKLEN 5
|
peview: Add version.rc to vcxproj.filters | <ResourceCompile Include="peview.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
+ <ResourceCompile Include="version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
</ItemGroup>
<ItemGroup>
<Manifest Include="peview.manifest">
|
GBP: update semantics for subnets | @@ -199,12 +199,29 @@ gbp_subnet_l3_out_add (gbp_subnet_t * gs, u32 sw_if_index, sclass_t sclass)
return (0);
}
+static void
+gbp_subnet_del_i (index_t gsi)
+{
+ gbp_subnet_t *gs;
+
+ gs = pool_elt_at_index (gbp_subnet_pool, gsi);
+
+ if (GBP_SUBNET_L3_OUT == gs->gs_type)
+ fib_table_entry_delete_index (gs->gs_fei, FIB_SOURCE_SPECIAL);
+ else
+ fib_table_entry_delete_index (gs->gs_fei, FIB_SOURCE_PLUGIN_HI);
+
+ gbp_subnet_db_del (gs);
+ gbp_route_domain_unlock (gs->gs_rd);
+
+ pool_put (gbp_subnet_pool, gs);
+}
+
int
gbp_subnet_del (u32 rd_id, const fib_prefix_t * pfx)
{
gbp_route_domain_t *grd;
index_t gsi, grdi;
- gbp_subnet_t *gs;
u32 fib_index;
grdi = gbp_route_domain_find (rd_id);
@@ -220,17 +237,7 @@ gbp_subnet_del (u32 rd_id, const fib_prefix_t * pfx)
if (INDEX_INVALID == gsi)
return (VNET_API_ERROR_NO_SUCH_ENTRY);
- gs = pool_elt_at_index (gbp_subnet_pool, gsi);
-
- if (GBP_SUBNET_L3_OUT == gs->gs_type)
- fib_table_entry_delete (fib_index, pfx, FIB_SOURCE_SPECIAL);
- else
- fib_table_entry_delete (fib_index, pfx, FIB_SOURCE_PLUGIN_HI);
-
- gbp_subnet_db_del (gs);
- gbp_route_domain_unlock (gs->gs_rd);
-
- pool_put (gbp_subnet_pool, gs);
+ gbp_subnet_del_i (gsi);
return (0);
}
@@ -256,8 +263,11 @@ gbp_subnet_add (u32 rd_id,
gsi = gbp_subnet_db_find (fib_index, pfx);
+ /*
+ * this is an update if the subnet already exists, so remove the old
+ */
if (INDEX_INVALID != gsi)
- return (VNET_API_ERROR_ENTRY_ALREADY_EXISTS);
+ gbp_subnet_del_i (gsi);
rv = -2;
|
Use Tab for navigating suggestions | @@ -538,8 +538,8 @@ fileprivate func parseArgs(_ args: inout [String]) {
UIKeyCommand(input: "c", modifierFlags: [.command, .shift], action: #selector(toggleComment), discoverabilityTitle: Localizable.MenuItems.toggleComment),
UIKeyCommand(input: "b", modifierFlags: [.command, .shift], action: #selector(setBreakpoint(_:)), discoverabilityTitle: Localizable.MenuItems.breakpoint)
]
- if suggestions.count > 0 {
- commands.append(UIKeyCommand(input: "\t", modifierFlags: [.shift], action: #selector(nextSuggestion), discoverabilityTitle: Localizable.nextSuggestion))
+ if numberOfSuggestionsInInputAssistantView() != 0 {
+ commands.append(UIKeyCommand(input: "\t", modifierFlags: [], action: #selector(nextSuggestion), discoverabilityTitle: Localizable.nextSuggestion))
}
var indented = false
@@ -1582,6 +1582,11 @@ fileprivate func parseArgs(_ args: inout [String]) {
/// Selects a suggestion from hardware tab key.
@objc func nextSuggestion() {
+
+ guard numberOfSuggestionsInInputAssistantView() != 0 else {
+ return
+ }
+
let new = currentSuggestionIndex+1
if suggestions.indices.contains(new) {
@@ -1851,6 +1856,10 @@ fileprivate func parseArgs(_ args: inout [String]) {
range.length += 1
+ if textView.contentTextView.currentWord?.replacingOccurrences(of: " ", with: "").replacingOccurrences(of: "\t", with: "").isEmpty != false {
+ return 0
+ }
+
if let textRange = range.toTextRange(textInput: textView.contentTextView), textView.contentTextView.text(in: textRange) == "_" {
return 0
}
|
Correctly determine AVX support.
Based on
return value of xgetbv must be first anded with the mask and then checked for equality
with the mask.
fixes | @@ -71,7 +71,9 @@ bool oe_is_avx_enabled = false;
static void _initialize_enclave_host_impl(void)
{
- oe_is_avx_enabled = oe_get_xfrm() & (SGX_XFRM_AVX | SGX_XFRM_AVX512);
+ uint64_t xfrm = oe_get_xfrm();
+ oe_is_avx_enabled = ((xfrm & SGX_XFRM_AVX) == SGX_XFRM_AVX) ||
+ ((xfrm & SGX_XFRM_AVX512) == SGX_XFRM_AVX512);
oe_initialize_host_exception();
}
|
10 times faster int to string implementation | @@ -54,53 +54,33 @@ static int16_t sin0_90_table[] = {
*/
char * lv_math_num_to_str(int32_t num, char * buf)
{
- char * buf_ori = buf;
if (num == 0) {
buf[0] = '0';
buf[1] = '\0';
return buf;
- } else if(num < 0) {
- (*buf) = '-';
- buf++;
- num = LV_MATH_ABS(num);
}
- uint32_t output = 0;
- int8_t i;
-
- for(i = 31; i >= 0; i--) {
- if((output & 0xF) >= 5)
- output += 3;
- if(((output & 0xF0) >> 4) >= 5)
- output += (3 << 4);
- if(((output & 0xF00) >> 8) >= 5)
- output += (3 << 8);
- if(((output & 0xF000) >> 12) >= 5)
- output += (3 << 12);
- if(((output & 0xF0000) >> 16) >= 5)
- output += (3 << 16);
- if(((output & 0xF00000) >> 20) >= 5)
- output += (3 << 20);
- if(((output & 0xF000000) >> 24) >= 5)
- output += (3 << 24);
- if(((output & 0xF0000000) >> 28) >= 5)
- output += (3 << 28);
- output = (output << 1) | ((num >> i) & 1);
+ int8_t digitCount = 0;
+ int8_t i = 0;
+ if (num < 0) {
+ buf[digitCount++] = '-';
+ num = abs(num);
+ ++i;
}
-
- uint8_t digit;
- bool leading_zero_ready = false;
- for(i = 28; i >= 0; i -= 4) {
- digit = ((output >> i) & 0xF) + '0';
- if(digit == '0' && leading_zero_ready == false) continue;
-
- leading_zero_ready = true;
- (*buf) = digit;
- buf++;
+ while (num) {
+ char digit = num % 10;
+ buf[digitCount++] = digit + 48;
+ num /= 10;
}
-
- (*buf) = '\0';
-
- return buf_ori;
+ buf[digitCount] = '\0';
+ digitCount--;
+ while (digitCount > i) {
+ char temp = buf[i];
+ buf[i] = buf[digitCount];
+ buf[digitCount] = temp;
+ digitCount--;
+ i++;
+ }
+ return buf;
}
/**
|
docs: fix straggling instance of N6010 | @@ -395,7 +395,7 @@ Done
## Setup IOFS Release1 Bitstream on FPGA PCIe card ##
-Program IOFS Release1 bitstream on FPGA D5005 or N6010 cards and reboot system.
+Program IOFS Release1 bitstream on FPGA D5005 or N6000 cards and reboot system.
Run command: lspci | grep acc
|
netkvm: include UDP to log of redirected packets | @@ -306,6 +306,7 @@ static void LogRedirectedPacket(pRxNetDescriptor pBufferDescriptor)
LPCSTR packetType = "Unknown";
IPv4Header *pIp4Header = NULL;
TCPHeader *pTcpHeader = NULL;
+ UDPHeader *pUdpHeader = NULL;
//IPv6Header *pIp6Header = NULL;
switch (pi->RSSHash.Type)
{
@@ -330,6 +331,19 @@ static void LogRedirectedPacket(pRxNetDescriptor pBufferDescriptor)
case NDIS_HASH_IPV6:
packetType = "TCP_IPV6";
break;
+#if (NDIS_SUPPORT_NDIS680)
+ case NDIS_HASH_UDP_IPV4:
+ packetType = "UDP_IPV4";
+ pIp4Header = (IPv4Header *)RtlOffsetToPointer(pi->headersBuffer, pi->L2HdrLen);
+ pUdpHeader = (UDPHeader *)RtlOffsetToPointer(pIp4Header, pi->L3HdrLen);
+ break;
+ case NDIS_HASH_UDP_IPV6:
+ packetType = "UDP_IPV6";
+ break;
+ case NDIS_HASH_UDP_IPV6_EX:
+ packetType = "UDP_IPV6EX";
+ break;
+#endif
default:
break;
}
@@ -341,6 +355,14 @@ static void LogRedirectedPacket(pRxNetDescriptor pBufferDescriptor)
pIp4Header->ip_desta[0], pIp4Header->ip_desta[1], pIp4Header->ip_desta[2], pIp4Header->ip_desta[3],
RtlUshortByteSwap(pTcpHeader->tcp_dest));
}
+ else if (pUdpHeader)
+ {
+ TraceNoPrefix(0, "%s: %s %d.%d.%d.%d:%d->%d.%d.%d.%d:%d\n", __FUNCTION__, packetType,
+ pIp4Header->ip_srca[0], pIp4Header->ip_srca[1], pIp4Header->ip_srca[2], pIp4Header->ip_srca[3],
+ RtlUshortByteSwap(pUdpHeader->udp_src),
+ pIp4Header->ip_desta[0], pIp4Header->ip_desta[1], pIp4Header->ip_desta[2], pIp4Header->ip_desta[3],
+ RtlUshortByteSwap(pUdpHeader->udp_dest));
+ }
else if (pIp4Header)
{
TraceNoPrefix(0, "%s: %s %d.%d.%d.%d(%d)->%d.%d.%d.%d\n", __FUNCTION__, packetType,
|
lily.c: Always free the state before exit. | @@ -103,11 +103,13 @@ int main(int argc, char **argv)
result = lily_parse_string(state, "[cli]", to_process);
}
- if (result == 0) {
+ if (result == 0)
fputs(lily_get_error(state), stderr);
- exit(EXIT_FAILURE);
- }
lily_free_state(state);
+
+ if (result == 0)
+ exit(EXIT_FAILURE);
+ else
exit(EXIT_SUCCESS);
}
|
Check return value of EVP_PKEY_new | @@ -269,6 +269,9 @@ int rsa_main(int argc, char **argv)
} else if (outformat == FORMAT_MSBLOB || outformat == FORMAT_PVK) {
EVP_PKEY *pk;
pk = EVP_PKEY_new();
+ if (pk == NULL)
+ goto end;
+
EVP_PKEY_set1_RSA(pk, rsa);
if (outformat == FORMAT_PVK) {
if (pubin) {
|
hal/imxrt: align initial stack address to 8
JIRA: | @@ -83,12 +83,12 @@ _start:
orr r0, r0, #(1 << 2)
msr control, r0
-_start_1:
/* Init vector table and stack pointer */
ldr r0, =0xe000ed08
ldr r1, =_init_vectors
str r1, [r0]
ldr r0, [r1]
+ bic r0, 7
msr msp, r0
bl _imxrt_init
|
Minor improvements to storage/s3 unit test. | @@ -28,7 +28,7 @@ typedef struct TestRequestParam
#define testRequestP(s3, verb, uri, ...) \
testRequest(s3, verb, uri, (TestRequestParam){VAR_PARAM_INIT, __VA_ARGS__})
-void
+static void
testRequest(Storage *s3, const char *verb, const char *uri, TestRequestParam param)
{
// Add authorization string
@@ -91,7 +91,7 @@ typedef struct TestResponseParam
#define testResponseP(...) \
testResponse((TestResponseParam){VAR_PARAM_INIT, __VA_ARGS__})
-void
+static void
testResponse(TestResponseParam param)
{
// Set code to 200 if not specified
@@ -378,14 +378,14 @@ testRun(void)
HARNESS_FORK_CHILD_BEGIN(0, true)
{
TEST_RESULT_VOID(
- hrnTlsServerRun(ioHandleReadNew(strNew("test server read"), HARNESS_FORK_CHILD_READ(), 5000)),
+ hrnTlsServerRun(ioHandleReadNew(strNew("s3 server read"), HARNESS_FORK_CHILD_READ(), 5000)),
"s3 server begin");
}
HARNESS_FORK_CHILD_END();
HARNESS_FORK_PARENT_BEGIN()
{
- hrnTlsClientBegin(ioHandleWriteNew(strNew("test client write"), HARNESS_FORK_PARENT_WRITE_PROCESS(0)));
+ hrnTlsClientBegin(ioHandleWriteNew(strNew("s3 client write"), HARNESS_FORK_PARENT_WRITE_PROCESS(0)));
Storage *s3 = storageS3New(
path, true, NULL, bucket, endPoint, storageS3UriStyleHost, region, accessKey, secretAccessKey, NULL, 16, 2,
|
decommit segment cache on force collect | @@ -126,14 +126,14 @@ static mi_decl_noinline void mi_segment_cache_purge(bool force, mi_os_tld_t* tld
if (idx >= MI_CACHE_MAX) idx = 0; // wrap
mi_cache_slot_t* slot = &cache[idx];
mi_msecs_t expire = mi_atomic_loadi64_relaxed(&slot->expire);
- if (expire != 0 && now >= expire) { // racy read
+ if (expire != 0 && (force || now >= expire)) { // racy read
// seems expired, first claim it from available
purged++;
mi_bitmap_index_t bitidx = mi_bitmap_index_create_from_bit(idx);
if (_mi_bitmap_claim(cache_available, MI_CACHE_FIELDS, 1, bitidx, NULL)) {
// was available, we claimed it
expire = mi_atomic_loadi64_acquire(&slot->expire);
- if (expire != 0 && now >= expire) { // safe read
+ if (expire != 0 && (force || now >= expire)) { // safe read
// still expired, decommit it
mi_atomic_storei64_relaxed(&slot->expire,(mi_msecs_t)0);
mi_assert_internal(!mi_commit_mask_is_empty(&slot->commit_mask) && _mi_bitmap_is_claimed(cache_available_large, MI_CACHE_FIELDS, 1, bitidx));
|
Adjust column header totals font size | @@ -6103,7 +6103,7 @@ VOID PhTnpInitializeTooltips(
if (Context->HeaderCustomDraw)
{
- Context->HeaderHotColumn = ULONG_MAX;
+ Context->HeaderHotColumn = -1;
Context->HeaderThemeHandle = OpenThemeData(Context->HeaderHandle, VSCLASS_HEADER);
}
@@ -6558,7 +6558,7 @@ LRESULT CALLBACK PhTnpHeaderHookWndProc(
if (GetObject(fontHandle, sizeof(LOGFONT), &logFont))
{
- logFont.lfHeight -= PhMultiplyDivideSigned(3, PhGlobalDpi, 96);
+ logFont.lfHeight -= PhMultiplyDivideSigned(2, PhGlobalDpi, 96);
context->HeaderBoldFontHandle = CreateFontIndirect(&logFont);
//context->HeaderBoldFontHandle = PhDuplicateFontWithNewHeight(fontHandle, -14);
}
@@ -6699,7 +6699,7 @@ LRESULT CALLBACK PhTnpHeaderHookWndProc(
result = CallWindowProc(oldWndProc, hwnd, uMsg, wParam, lParam);
context->HeaderMouseActive = FALSE;
- context->HeaderHotColumn = ULONG_MAX;
+ context->HeaderHotColumn = -1;
if (GetCapture() != hwnd)
{
@@ -6782,7 +6782,7 @@ LRESULT CALLBACK PhTnpHeaderHookWndProc(
if (!(column = (PPH_TREENEW_COLUMN)headerItem.lParam))
continue;
- if (context->HeaderHotColumn != ULONG_MAX && context->HeaderHotColumn == column->Id)
+ if (context->HeaderHotColumn != -1 && context->HeaderHotColumn == column->Id)
{
if (context->ThemeSupport)
{
|
in_exec: use new input chunk registration calls | @@ -41,6 +41,8 @@ static int in_exec_collect(struct flb_input_instance *i_ins,
FILE *cmdp = NULL;
char buf[DEFAULT_BUF_SIZE] = {0};
struct flb_in_exec_config *exec_config = in_context;
+ msgpack_packer mp_pck;
+ msgpack_sbuffer mp_sbuf;
/* variables for parser */
int parser_ret = -1;
@@ -67,13 +69,17 @@ static int in_exec_collect(struct flb_input_instance *i_ins,
flb_time_get(&out_time);
}
- flb_input_buf_write_start(i_ins);
+ /* Initialize local msgpack buffer */
+ msgpack_sbuffer_init(&mp_sbuf);
+ msgpack_packer_init(&mp_pck, &mp_sbuf, msgpack_sbuffer_write);
- msgpack_pack_array(&i_ins->mp_pck, 2);
- flb_time_append_to_msgpack(&out_time, &i_ins->mp_pck, 0);
- msgpack_sbuffer_write(&i_ins->mp_sbuf, out_buf, out_size);
+ msgpack_pack_array(&mp_pck, 2);
+ flb_time_append_to_msgpack(&out_time, &mp_pck, 0);
+ msgpack_sbuffer_write(&mp_sbuf, out_buf, out_size);
- flb_input_buf_write_end(i_ins);
+ flb_input_chunk_append_raw(i_ins, NULL, 0,
+ mp_sbuf.data, mp_sbuf.size);
+ msgpack_sbuffer_destroy(&mp_sbuf);
flb_free(out_buf);
}
}
@@ -83,19 +89,23 @@ static int in_exec_collect(struct flb_input_instance *i_ins,
str_len = strlen(buf);
buf[str_len-1] = '\0'; /* chomp */
- flb_input_buf_write_start(i_ins);
+ /* Initialize local msgpack buffer */
+ msgpack_sbuffer_init(&mp_sbuf);
+ msgpack_packer_init(&mp_pck, &mp_sbuf, msgpack_sbuffer_write);
- msgpack_pack_array(&i_ins->mp_pck, 2);
- flb_pack_time_now(&i_ins->mp_pck);
- msgpack_pack_map(&i_ins->mp_pck, 1);
+ msgpack_pack_array(&mp_pck, 2);
+ flb_pack_time_now(&mp_pck);
+ msgpack_pack_map(&mp_pck, 1);
- msgpack_pack_str(&i_ins->mp_pck, 4);
- msgpack_pack_str_body(&i_ins->mp_pck, "exec", 4);
- msgpack_pack_str(&i_ins->mp_pck, str_len-1);
- msgpack_pack_str_body(&i_ins->mp_pck,
+ msgpack_pack_str(&mp_pck, 4);
+ msgpack_pack_str_body(&mp_pck, "exec", 4);
+ msgpack_pack_str(&mp_pck, str_len-1);
+ msgpack_pack_str_body(&mp_pck,
buf, str_len-1);
- flb_input_buf_write_end(i_ins);
+ flb_input_chunk_append_raw(i_ins, NULL, 0,
+ mp_sbuf.data, mp_sbuf.size);
+ msgpack_sbuffer_destroy(&mp_sbuf);
}
}
|
User: Use debug logging for sydr | @@ -286,10 +286,10 @@ sydr-fuzz: $(PROJECT).sydr$(SUFFIX) $(PROJECT)$(SUFFIX) FORCE
args = "-jobs=$(FUZZ_JOBS) -workers=$(FUZZ_JOBS) -rss_limit_mb=$(FUZZ_MEM) $(FUZZ_DIR)"
merge = false
EOF
- UBSAN_OPTIONS='halt_on_error=1' sydr-fuzz run -f
+ UBSAN_OPTIONS='halt_on_error=1' sydr-fuzz -l debug run -f
sydr-fuzz-security: $(PROJECT).sydr$(SUFFIX) $(PROJECT)$(SUFFIX) FORCE
- sydr-fuzz security --jobs $(FUZZ_SECURITY_JOBS)
+ sydr-fuzz -l debug security --jobs $(FUZZ_SECURITY_JOBS)
sydr-fuzz-import: $(PROJECT).sydr$(SUFFIX) $(PROJECT)$(SUFFIX) FORCE
@$(MKDIR) sydr-fuzz-out/corpus
|
ta_tc/media: Close file after test
At each test, close should be called after open | @@ -160,6 +160,7 @@ static void utc_media_FileInputDataSource_read_p(void)
TC_ASSERT_EQ("utc_media_FileInputDataSource_read", source.read(buf, 100), strlen(testData));
+ source.close();
TC_SUCCESS_RESULT();
}
@@ -181,6 +182,7 @@ static void utc_media_FileInputDataSource_readAt_p(void)
TC_ASSERT_EQ("utc_media_FileInputDataSource_readAt", source.readAt(1, 0, buf, 100), (int)strlen(testData + 1));
+ source.close();
TC_SUCCESS_RESULT();
}
|
Slightly better OpenVR head pose; | @@ -314,7 +314,7 @@ static bool getTransform(Device device, mat4 transform) {
if (device == DEVICE_HEAD) {
mat4_fromMat34(transform, state.headPose.mDeviceToAbsoluteTracking.m);
transform[13] += state.offset;
- return true;
+ return state.headPose.bPoseIsValid;
}
if (!state.poseActions[device]) {
|
Fix README typo, add Arch Linux instructions with AUR package | @@ -197,6 +197,13 @@ $ make install
### X with GTK2 and SDL
+
+#### Arch Linux
+
+For the [latest release](https://github.com/AZO234/NP2kai/releases), a package can be found in the [AUR](https://aur.archlinux.org/packages/xnp2kai-azo234/)
+
+Fonts are **NOT** included in the AUR package.
+
*temporary*<br>
It seems slow xnp2kai's dialog now, on Ubuntu GNOME.<br>
(Maybe GTK issue. No problem on Ubuntu MATE.)<br>
@@ -451,7 +458,7 @@ sudo apt install 'fonts-takao-*'
```
and
```
-ls -n /usr/share/fonts/truetype/takao-gothic/TakaoGothic.ttf BIOSdirectory/default.ttf'
+ln -s /usr/share/fonts/truetype/takao-gothic/TakaoGothic.ttf BIOSdirectory/default.ttf'
```
Already exist 'font.tmp', delete this.<br>
And start NP2kai.<br>
|
build: Honor --disable-foo configure flags when installing headers. | -include_HEADERS = include/libunwind-dynamic.h \
- include/libunwind-ptrace.h \
- include/libunwind-coredump.h
+include_HEADERS = include/libunwind-dynamic.h
+
+if BUILD_PTRACE
+include_HEADERS += include/libunwind-ptrace.h
+endif BUILD_PTRACE
+
+if BUILD_COREDUMP
+include_HEADERS += include/libunwind-coredump.h
+endif BUILD_COREDUMP
if ARCH_AARCH64
include_HEADERS += include/libunwind-aarch64.h
|
sensor: Do not allow to register same notification multiple times | @@ -1017,12 +1017,21 @@ sensor_register_notifier(struct sensor *sensor,
struct sensor_notifier *notifier)
{
int rc;
+ struct sensor_notifier *tmp;
rc = sensor_lock(sensor);
if (rc != 0) {
goto err;
}
+ /* Check if notifier is not already on the list */
+ SLIST_FOREACH(tmp, &sensor->s_notifier_list, sn_next) {
+ if (notifier == tmp) {
+ rc = SYS_EINVAL;
+ goto err;
+ }
+ }
+
SLIST_INSERT_HEAD(&sensor->s_notifier_list, notifier, sn_next);
rc = sensor_set_notification(sensor);
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.