message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
docker: alpine release image add ALLUSERSPROFILE to env | @@ -96,6 +96,7 @@ RUN echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN echo "alias sudo='sudo -i' # in this image we do not need to be root" >> /etc/profile
RUN echo "export PS1='\u $ '" >> /etc/profile
RUN echo "export LD_LIBRARY_PATH=/usr/local/lib/elektra/" >> /etc/profile
+RUN echo "export ALLUSERSPROFILE=/" >> /etc/profile
USER ${USERID}
WORKDIR /home/elektra
|
Fix - POLLHUP should cause us to continue reading. | @@ -1614,8 +1614,7 @@ JanetAsyncStatus ev_machine_read(JanetListenerState *s, JanetAsyncEvent event) {
}
break;
#else
- case JANET_ASYNC_EVENT_ERR:
- case JANET_ASYNC_EVENT_HUP: {
+ case JANET_ASYNC_EVENT_ERR: {
if (state->bytes_read) {
janet_schedule(s->fiber, janet_wrap_buffer(state->buf));
} else {
@@ -1623,6 +1622,7 @@ JanetAsyncStatus ev_machine_read(JanetListenerState *s, JanetAsyncEvent event) {
}
return JANET_ASYNC_STATUS_DONE;
}
+ case JANET_ASYNC_EVENT_HUP:
case JANET_ASYNC_EVENT_READ: {
JanetBuffer *buffer = state->buf;
int32_t bytes_left = state->bytes_left;
|
dm: fix compilation issue with gcc10
Fix compilation issue when using gcc 10.x due to the "__packed"
attribute in acpi.h. Explicitly changing that to __attribute__((packed))
fixes the compilation error. | @@ -58,7 +58,7 @@ struct acpi_table_hdr {
char asl_compiler_id[4];
/* ASL compiler version */
uint32_t asl_compiler_revision;
-} __packed;
+} __attribute__((packed));
/* All dynamic table entry no. */
#define NHLT_ENTRY_NO 8
|
Release notes for bk-7.3.2
bk: 59c635b6EIHnee_62UirHluTAhslXQ | +# BitKeeper version 7.3.2 released Sep 23 2017
+
+A small collection of bugfixes
+
+- Improve the error message when bk fails to allocate a temp file
+ https://users.bitkeeper.org/t/read-only-file-system-causes-suboptimal-error-message/478
+
+- Clear BK_CONFIG before running regressions
+ https://users.bitkeeper.org/t/bk-config-checkout-get-makes-bk-fail-tests/563
+
+- Relax the consistency tests for tags to allow strange constructs
+ created by 15 year old versions of bk. These will still be rejected
+ on a newer repository.
+
+- In `bk changes URL`, fix problem with extremely long output lines
+ not getting transmitted correctly.
+ https://users.bitkeeper.org/t/bk-changes-path-stops-when-it-hits-a-maximally-long-comment/542
+
+- Document 'bk export -a' that includes files from the `BitKeeper/`
+ subdirectory and fix a problem where it didn't work with the
+ `-tpatch` option.
+ https://users.bitkeeper.org/t/bk-export-omits-changes-to-bitkeeper-etc-ignore/344
+
+- Minor tweaks to fix testcases to continue working correctly
+
+- bkd commands are now able to rotate logfiles to prevent
+ BitKeeper/log from growing too large
+
+- Testcase tweak to avoid occasional regression failures
+ https://users.bitkeeper.org/t/occasional-regression-failure-upgrade-running-in-deleted-dir/577/2
+
+- More documentation for 'bk changes --oneline/--short'
+
+***
+
+
# BitKeeper version 7.3.1ce released Sep 29 2016
A smaller collection of bugfixes and new features. This is mainly
|
stm32g0431/441: update doc | @@ -550,6 +550,9 @@ static const struct stlink_chipid_params devices[] = {
.flash_type = STLINK_FLASH_TYPE_G4,
.flash_size_reg = 0x1FFF75E0, // Section 47.2
.flash_pagesize = 0x800, // 2K (sec 3.3.1)
+ // SRAM1 is 16k at 0x20000000
+ // SRAM2 is 6k at 0x20014000
+ // SRAM3/CCM is 10k at 0x10000000, aliased at 0x20018000
.sram_size = 0x8000, // 32K (sec 2.4)
.bootrom_base = 0x1fff0000,
.bootrom_size = 0x7000 // 28K (table 2)
|
Test the default key length of the Blowfish ciphers | @@ -3267,6 +3267,31 @@ err:
}
#endif
+#ifndef OPENSSL_NO_BF
+static int test_evp_bf_default_keylen(int idx)
+{
+ int ret = 0;
+ static const char *algos[4] = {
+ "bf-ecb", "bf-cbc", "bf-cfb", "bf-ofb"
+ };
+ int ivlen[4] = { 0, 8, 8, 8 };
+ EVP_CIPHER *cipher = NULL;
+
+ if (lgcyprov == NULL)
+ return TEST_skip("Test requires legacy provider to be loaded");
+
+ if (!TEST_ptr(cipher = EVP_CIPHER_fetch(testctx, algos[idx], testpropq))
+ || !TEST_int_eq(EVP_CIPHER_get_key_length(cipher), 16)
+ || !TEST_int_eq(EVP_CIPHER_get_iv_length(cipher), ivlen[idx]))
+ goto err;
+
+ ret = 1;
+err:
+ EVP_CIPHER_free(cipher);
+ return ret;
+}
+#endif
+
#ifndef OPENSSL_NO_EC
static int ecpub_nids[] = {
NID_brainpoolP256r1, NID_X9_62_prime256v1,
@@ -4557,6 +4582,9 @@ int setup_tests(void)
ADD_ALL_TESTS(test_evp_iv_aes, 12);
#ifndef OPENSSL_NO_DES
ADD_ALL_TESTS(test_evp_iv_des, 6);
+#endif
+#ifndef OPENSSL_NO_BF
+ ADD_ALL_TESTS(test_evp_bf_default_keylen, 4);
#endif
ADD_TEST(test_EVP_rsa_pss_with_keygen_bits);
ADD_TEST(test_EVP_rsa_pss_set_saltlen);
|
Remove unused argument of ATAddForeignConstraint
Commit made this unused but forgot to remove it. Do so now.
Author: Amit Langote
Discussion: | @@ -477,7 +477,7 @@ static ObjectAddress ATAddCheckConstraint(List **wqueue,
bool recurse, bool recursing, bool is_readd,
LOCKMODE lockmode);
static ObjectAddress ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab,
- Relation rel, Constraint *fkconstraint, Oid parentConstr,
+ Relation rel, Constraint *fkconstraint,
bool recurse, bool recursing,
LOCKMODE lockmode);
static ObjectAddress addFkRecurseReferenced(List **wqueue, Constraint *fkconstraint,
@@ -8620,7 +8620,7 @@ ATExecAddConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
NIL);
address = ATAddForeignKeyConstraint(wqueue, tab, rel,
- newConstraint, InvalidOid,
+ newConstraint,
recurse, false,
lockmode);
break;
@@ -8826,7 +8826,7 @@ ATAddCheckConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
*/
static ObjectAddress
ATAddForeignKeyConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
- Constraint *fkconstraint, Oid parentConstr,
+ Constraint *fkconstraint,
bool recurse, bool recursing, LOCKMODE lockmode)
{
Relation pkrel;
|
fix(specs-gen): circular conflict caused by linking to a already included .c file | @@ -55,7 +55,6 @@ SPECSGEN_SRC := $(CEE_UTILS_DIR)/cee-utils.c \
$(CEE_UTILS_DIR)/ntl.c \
$(CEE_UTILS_DIR)/json-string.c \
$(CEE_UTILS_DIR)/json-scanf.c \
- $(CEE_UTILS_DIR)/json-struct.c \
$(CEE_UTILS_DIR)/json-printf.c \
$(CEE_UTILS_DIR)/log.c \
specs/specs-gen.c
|
Modified INSTALL to include matplotlib dependence. | @@ -5,8 +5,9 @@ simulate the examples in this repository.
1. Ensure you have installed the following:
A. A C compiler, e.g. gcc, clang, etc.
- B. Python 3.x [Note that this should be the python in your PATH]
+ B. Python 3.x [Note that this version should be the python in your PATH]
N.B. We recommend installing python via anaconda
+ C. matplotlib v1.4.0 or higher
2. Clone the repository from GitHub.
Compile the code: > make opt
|
docs/library/machine: Remove conditional docs for wake_reason function.
And instead list its availability explicitly. | @@ -74,12 +74,12 @@ Power related functions
to know that we are coming from `machine.DEEPSLEEP`. For wake up to actually happen,
wake sources should be configured first, like `Pin` change or `RTC` timeout.
-.. only:: port_wipy
-
.. function:: wake_reason()
Get the wake reason. See :ref:`constants <machine_constants>` for the possible return values.
+ Availability: ESP32, WiPy.
+
Miscellaneous functions
-----------------------
|
pmconfig: add last state and modify current state to next state | @@ -180,7 +180,8 @@ int cmd_pmconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
if (argc <= 2)
{
- int current_state;
+ int next_state;
+ int last_state;
int normal_count;
int idle_count;
int standby_count;
@@ -193,7 +194,11 @@ int cmd_pmconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
ctrl.action = BOARDIOC_PM_QUERYSTATE;
boardctl(BOARDIOC_PM_CONTROL, (uintptr_t)&ctrl);
- current_state = ctrl.state;
+ last_state = ctrl.state;
+
+ ctrl.action = BOARDIOC_PM_CHECKSTATE;
+ boardctl(BOARDIOC_PM_CONTROL, (uintptr_t)&ctrl);
+ next_state = ctrl.state;
ctrl.action = BOARDIOC_PM_STAYCOUNT;
ctrl.state = PM_NORMAL;
@@ -212,8 +217,10 @@ int cmd_pmconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
boardctl(BOARDIOC_PM_CONTROL, (uintptr_t)&ctrl);
sleep_count = ctrl.count;
- nsh_output(vtbl, "Current state %d, PM stay [%d, %d, %d, %d]\n",
- current_state, normal_count, idle_count, standby_count, sleep_count);
+ nsh_output(vtbl, "Last state %d, Next state %d",
+ "PM stay [%d, %d, %d, %d]\n",
+ last_state, next_state, normal_count, idle_count,
+ standby_count, sleep_count);
}
else if (argc <= 4)
{
|
build: adding repology badge, callout to luzpaz | @@ -7,6 +7,7 @@ Software-Defined Radio Digital Signal Processing Library -
[](https://travis-ci.org/jgaeddert/liquid-dsp)
[](https://choosealicense.com/licenses/mit/)
+[](https://repology.org/project/liquid-dsp/versions)
liquid-dsp is a free and open-source digital signal processing (DSP)
library designed specifically for software-defined radios on embedded
|
fix sawscript for bitfields | @@ -59,8 +59,18 @@ let config_cca_type config = (crucible_field config "client_cert_auth_type");
let ocsp_status_size cert_and_key =
crucible_field (crucible_field (cert_and_key) "ocsp_status") "size";
-//conn->config->use_tickets
-let config_use_tickets config = (crucible_field config "use_tickets");
+//conn->config->use_tickets is the field we care about, but it is
+// in a bitfield. For now, we only care about that, so we point
+// at the entire bitfield and say it must all be initialized to
+// a value of 0 for the proof to go through. This is a stronger
+// statement than we stricly need to make, and will limit
+// compositional proofs in the future, but we can make more
+// precise statements at that time
+
+// It's also noteworthy that we use the crucible_elem here, which will
+// cause problems if the fields are reordered. This is reasonably unlikely
+// because it makes sense to have the bitfield at the start
+let config_bitfield config = (crucible_elem config 0);
//conn->session_ticket_status
let conn_session_ticket_status pconn = (crucible_field pconn "session_ticket_status");
@@ -142,9 +152,11 @@ let setup_connection = do {
crucible_points_to (ocsp_status_size cak) (crucible_term status_size);
crucible_equal (crucible_term status_size) (crucible_term {{zero : [32]}});
- use_tickets <- crucible_fresh_var "use_tickets" (llvm_int 8);
- crucible_points_to (config_use_tickets config) (crucible_term use_tickets);
- crucible_equal (crucible_term use_tickets) (crucible_term {{zero : [8]}});
+ config_bitfield_value <- crucible_fresh_var "config_bitfield" (llvm_int 8);
+ crucible_points_to (config_bitfield config) (crucible_term config_bitfield_value);
+ // The following line could be made more precise, we only care that the use_tickets
+ // bit is zero
+ crucible_equal (crucible_term config_bitfield_value) (crucible_term {{zero : [8]}});
session_ticket_status <- crucible_fresh_var "session_ticket_status" (llvm_int 32);
crucible_points_to (conn_session_ticket_status pconn) (crucible_term session_ticket_status);
|
examples/tls_server: fix svace warning
This commit fixes svace warning about UNREACHABLE_CODE. | @@ -1736,12 +1736,12 @@ usage:
#if defined(MBEDTLS_FS_IO)
if (opt.dhm_file != NULL) {
ret = mbedtls_ssl_conf_dh_param_ctx(&conf, &dhm);
- }
-#endif
if (ret != 0) {
mbedtls_printf(" failed\n mbedtls_ssl_conf_dh_param returned -0x%04X\n\n", -ret);
goto exit;
}
+ }
+#endif
#endif
if (opt.min_version != DFL_MIN_VERSION) {
|
Fix `make clean` issue with gp_replica_check
Author: Ashwin Agrawal
Author: Xin Zhang | @@ -3,9 +3,16 @@ DATA = gp_replica_check--0.0.1.sql
MODULES = gp_replica_check
SCRIPTS = gp_replica_check.py
+ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
+else
+subdir = contrib/gp_replica_check
+top_builddir = ../..
+include $(top_builddir)/src/Makefile.global
+include $(top_srcdir)/contrib/contrib-global.mk
+endif
# For now run only for HEAP as for other object types like Sequence, AO, btree
# there are still known differences to be fixed.
|
Documentation change only: document how to leave unwanted network types out (using the _stub.c files). | @@ -5,6 +5,9 @@ For any other operations the same handle as returned by the network API may be u
This is not a "manager", it is not smart, it solely exists to allow applications to obtain a connection without caring about the details of the connection other than making a choice between cellular, Wi-Fi etc. Note that the configuration structure provided to this API by the underlying APIs may be limited to keep things simple, e.g. it may not be possible to chose the interface speed or to provide static data buffers etc.
+# Leaving Things Out
+You will notice that there are `_stub.c` files in the [src](src) directory; if you are only interested in, say, cellular, and want to leave out Wi-Fi/BLE/GNSS functionality, you can simply replace, for instance, [u_network_private_wifi.c](src/u_network_private_wifi.c) with [u_network_private_wifi_stub.c](src/u_network_private_wifi_stub.c), etc. in your build metadata and your linker should then drop the unwanted things from your build.
+
# Usage
The directories include the API and the C source files necessary to call into the underlying [cell](/cell), [wifi](/wifi), [ble](/ble) and [gnss](/gnss) APIs. The [test](test) directory contains a small number of generic tests for the [common/network](/common/network) API; for comprehensive tests of networking please refer to the test directory of the underlying APIs.
|
Add flag for 519.clvleaf -Mx,201,2 | @@ -113,6 +113,9 @@ FPPPORTABILITY += -DSPEC_USE_MPIFH -I${MPI}/include/
513.soma_t,613.soma_s:
PORTABILITY += -DSPEC_NO_VAR_ARRAY_REDUCE
# OPTIMIZE += -fno-openmp-target-ignore-env-vars
+ 519.clvleaf_t:
+ FOPTIMIZE += -Mx,201,2 # workaround for map copy issue
+
%endif
%if %{model} eq 'omp_host_target'
|
[ivshmem] Fixed infinite loop when releasing the device | @@ -245,6 +245,8 @@ NTSTATUS IVSHMEMEvtDeviceReleaseHardware(_In_ WDFDEVICE Device, _In_ WDFCMRESLIS
event->owner = NULL;
event->event = NULL;
event->vector = 0;
+
+ entry = entry->Flink;
}
InitializeListHead(&deviceContext->eventList);
deviceContext->eventBufferUsed = 0;
|
reformat proposal | @@ -94,8 +94,7 @@ typedef struct
char * tmpFile;
} ElektraResolved;
-typedef enum
-{
+typedef enum {
ELEKTRA_RESOLVER_TEMPFILE_NONE,
ELEKTRA_RESOLVER_TEMPFILE_SAMEDIR,
ELEKTRA_RESOLVER_TEMPFILE_TMPDIR,
|
Named magic number. | %+ welp /circle/[inbox]/grams/config/group
?. =(0 last)
[(scot %ud last) ~]
- [(scot %da (sub now.bol ~d5)) ~]
+ =+ history-days=~d5
+ [(scot %da (sub now.bol history-days)) ~]
==
::
:> #
|
Date: update function name | @@ -399,7 +399,7 @@ static int rfc822StringValidation (const char * date)
return -1;
}
-static int validateDate (Key * key, Key * parentKey)
+static int validateKey (Key * key, Key * parentKey)
{
const Key * standard = keyGetMeta (key, "check/date");
const Key * formatStringMeta = keyGetMeta (key, "check/date/format");
@@ -480,7 +480,7 @@ int elektraDateGet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned ELEKTRA_UN
const Key * meta = keyGetMeta (cur, "check/date");
if (meta)
{
- int r = validateDate (cur, parentKey);
+ int r = validateKey (cur, parentKey);
if (r == 0)
{
rc = -1;
@@ -501,7 +501,7 @@ int elektraDateSet (Plugin * handle ELEKTRA_UNUSED, KeySet * returned ELEKTRA_UN
const Key * meta = keyGetMeta (cur, "check/date");
if (meta)
{
- int r = validateDate (cur, parentKey);
+ int r = validateKey (cur, parentKey);
if (r == 0)
{
rc = -1;
|
lv_label effect area clip line space | @@ -1383,13 +1383,22 @@ static void lv_label_refr_text(lv_obj_t * label)
}
else {
lv_point_t p;
+ lv_coord_t y_overed;
p.x = lv_area_get_width(&txt_coords) -
(lv_font_get_glyph_width(font, '.', '.') + letter_space) *
LV_LABEL_DOT_NUM; /*Shrink with dots*/
p.y = lv_area_get_height(&txt_coords);
- p.y -= p.y %
+ y_overed = p.y %
(lv_font_get_line_height(font) + line_space); /*Round down to the last line*/
- p.y -= line_space; /*Trim the last line space*/
+ if (y_overed >= lv_font_get_line_height(font)) {
+ p.y -= y_overed;
+ p.y += lv_font_get_line_height(font);
+ }
+ else {
+ p.y -= y_overed;
+ p.y -= line_space;
+ }
+
uint32_t letter_id = lv_label_get_letter_on(label, &p);
|
add missing ! for wl seat caps | @@ -193,7 +193,7 @@ static void seat_handle_capabilities(void *data, struct wl_seat *seat,
if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !reg->keyboard) {
reg->keyboard = wl_seat_get_keyboard(reg->seat);
wl_keyboard_add_listener(reg->keyboard, &keyboard_listener, reg);
- } else if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && reg->keyboard) {
+ } else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && reg->keyboard) {
wl_keyboard_destroy(reg->keyboard);
reg->keyboard = NULL;
}
|
Symtab: The 'next_class_id' field should be 16, not 32. | @@ -26,11 +26,11 @@ typedef struct lily_symtab_ {
/* Each class gets a unique id. This is mostly for the builtin classes
which have some special behavior sometimes. */
- uint32_t next_class_id;
+ uint16_t next_class_id;
uint16_t next_global_id;
- uint16_t pad;
+ uint32_t pad;
/* These classes are used frequently throughout the interpreter, so they're
kept here for easy, fast access. */
|
crypto_test: add a mutex to serialize prints
The concurrency test output is garbled and difficult
to read when the lines don't get printed completely.
Avoid this by using a mutex. | @@ -44,6 +44,8 @@ struct test_vectors {
struct vector_data vectors[];
};
+static struct os_mutex mtx;
+
/*
* Test vectors from "NIST Special Publication 800-38A"
*/
@@ -348,6 +350,24 @@ run_ctr_bench(struct crypto_dev *crypto, uint8_t iter)
}
#endif /* MYNEWT_VAL(CRYPTOTEST_BENCHMARK) */
+static void
+lock(void)
+{
+ int rc;
+
+ rc = os_mutex_pend(&mtx, OS_TIMEOUT_NEVER);
+ assert(rc == 0);
+}
+
+static void
+unlock(void)
+{
+ int rc;
+
+ rc = os_mutex_release(&mtx);
+ assert(rc == 0);
+}
+
#if MYNEWT_VAL(CRYPTOTEST_CONCURRENCY)
static void
concurrency_test_handler(void *arg)
@@ -372,7 +392,9 @@ concurrency_test_handler(void *arg)
os_time_delay(1);
}
+ lock();
printf("%s [%d fails / %d ok] done\n", t->t_name, fail, ok);
+ unlock();
while (1) {
os_time_delay(OS_TICKS_PER_SEC);
@@ -671,12 +693,16 @@ main(void)
int iterations;
#endif
int i;
+ int rc;
sysinit();
crypto = (struct crypto_dev *) os_dev_open("crypto", OS_TIMEOUT_NEVER, NULL);
assert(crypto);
+ rc = os_mutex_init(&mtx);
+ assert(rc == 0);
+
printf("=== Test vectors ===\n");
for (i = 0; all_tests[i] != NULL; i++) {
run_test_vectors(crypto, all_tests[i]);
|
testbench - create tasks after test reg
Creating the tasks early causes a crash. | @@ -358,8 +358,6 @@ main(int argc, char **argv)
conf_load();
- rc = init_tasks();
-
/*
* Register the tests that can be run by lookup
* - each test is added to the ts_suites slist
@@ -369,6 +367,8 @@ main(int argc, char **argv)
TEST_SUITE_REGISTER(testbench_sem);
TEST_SUITE_REGISTER(testbench_json);
+ rc = init_tasks();
+
/*
* This sets the callback function for the events that are
* generated from newtmanager.
|
Do not register nonexistent crypto providers during lookup
As per previous commit, but using a copy of the iterator
instead of a reference, in case of iterator lifetime issues.
Tested-by: Build Bot | @@ -88,8 +88,8 @@ static bool lcbcrypto_is_valid(lcbcrypto_PROVIDER *provider)
static lcbcrypto_PROVIDER *lcb_get_provider(const lcb_st *instance, const std::string &alg)
{
- const lcb_st::lcb_ProviderMap::iterator &iterator = (*instance->crypto).find(alg);
- return iterator != (*instance->crypto).end() ? iterator->second : NULL;
+ const lcb_st::lcb_ProviderMap::iterator provider_iterator = (*instance->crypto).find(alg);
+ return provider_iterator != (*instance->crypto).end() ? provider_iterator->second : NULL;
}
lcb_error_t lcbcrypto_encrypt_document(lcb_t instance, lcbcrypto_CMDENCRYPT *cmd)
|
breakwater: update README | @@ -5,7 +5,75 @@ microseconds-level RPCs. This repo includes
Shenango implementation of Breakwater as a library of
RPC layer.
-## How to enable Breakwater
+## Reproducing results in the paper
+The results in the paper were generated with 11 machines
+(10 clients and 1 server) of
+xl170 in [Cloudlab](https://cloudlab.us) with Ubuntu 18.04 LTS
+(64 bit) where all optional configurations below are applied.
-1) Build Shenango following [the instruction](https://github.com/shenango/shenango).
+1) Configure and build Shenango. (refer to Shenango documentation)
+- [xl170] Since xl170 has Mellanox ConnectX-4 NIC, install Mellanox
+OFED before building Shenango and set `CONFIG_MLX5=y` in shared.mk
+- (optional) Build Shenango with Directpath.
+Set `CONFIG_DIRECTPATH=y` in shared.mk
+- [xl170] Correct DPDK port for XL170 machine is 1. Change line 233
+of iokernel/dpdk.c to `dpdk.port = 1`
+2) (optional) Keep CPU in a C-State
+```
+$ pushd scripts
+scripts$ sudo killall cstate
+scripts$ gcc cstate.c -o cstate
+scripts$ ./cstate 0 &
+scripts$ popd
+```
+
+3) (optional) Disable frequency scaling
+```
+$ echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
+```
+
+4) (optional) Disable turbo boost
+```
+$ echo 1 | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo
+```
+
+5) Build C++ bindings for runtime library
+```
+$ make -C bindings/cc
+```
+
+6) Build breakwater library
+```
+$ cd breakwater
+breakwater$ make clean && make
+breakwater$ make -C bindings/cc
+```
+
+7) Build benchmark application
+```
+breakwater$ cd apps/netbench
+breakwater/apps/netbench$ make clean && make
+```
+
+8) Run Shenango IOKernel
+```
+$ sudo ./iokerneld
+```
+
+9) Launch benchmark application (Server)
+```
+breakwater/apps/netbench$ sudo ./netbench server.config server
+```
+
+10) Launch benchmark application (Master Client)
+When launching multiple client applications, one of them should be a master client,
+and others are agents.
+```
+breakwater/apps/netbench$ sudo ./netbench client.config client [# threads] [server_ip] [service_time_us] [# agents] [offered_load]
+```
+
+11) Launch benchmark application (Agent)
+```
+breakwater/apps/netbench$ sudo ./netbench client.config agent [master_client_ip] [offered_load]
+```
|
redis-cli: support for REDIS_REPLY_SET in CSV and RAW output.
Fixes Added support of REDIS_REPLY_SET in raw and csv output of `./redis-cli`
Test:
run commands to test:
./redis-cli -3 --csv COMMAND
./redis-cli -3 --raw COMMAND
Now they are returning resuts, were failing with: "Unknown reply type: 10" before the change. | @@ -1159,6 +1159,7 @@ static sds cliFormatReplyRaw(redisReply *r) {
case REDIS_REPLY_DOUBLE:
out = sdscatprintf(out,"%s",r->str);
break;
+ case REDIS_REPLY_SET:
case REDIS_REPLY_ARRAY:
case REDIS_REPLY_PUSH:
for (i = 0; i < r->elements; i++) {
@@ -1217,6 +1218,7 @@ static sds cliFormatReplyCSV(redisReply *r) {
out = sdscat(out,r->integer ? "true" : "false");
break;
case REDIS_REPLY_ARRAY:
+ case REDIS_REPLY_SET:
case REDIS_REPLY_PUSH:
case REDIS_REPLY_MAP: /* CSV has no map type, just output flat list. */
for (i = 0; i < r->elements; i++) {
|
Update hyperlink for *Blockchain IoT Module Whitepaper* and *Blockchain IoT Module Technology and Application* | @@ -119,10 +119,10 @@ See [Supported List](./SUPPORTED_LIST.md) for supported blockchains and IoT modu
## Documentation
### Blockchain IoT Module Whitepaper
-See [BoAT Blockchain IoT Module Product White Paper](./docs/en-us/BoAT_Blockchain_IoT_Module_Product_White_Paper_en.pdf).
+See [BoAT Blockchain IoT Module Product White Paper](https://aitos-io.github.io/BoAT-X-Framework/en-us/BoAT_Blockchain_IoT_Module_Product_White_Paper_en.pdf).
### Blockchain IoT Module Technology and Application
-See [BoAT Blockchain IoT Module Technology and Application](./docs/en-us/BoAT_Blockchain_IoT_Module_Technology_and_Application_en.pdf).
+See [BoAT Blockchain IoT Module Technology and Application](https://aitos-io.github.io/BoAT-X-Framework/en-us/BoAT_Blockchain_IoT_Module_Technology_and_Application_en.pdf).
### Full Documents
For full documents, please visit [BoAT documentation](https://aitos-io.github.io/BoAT-X-Framework)
|
chat-cli: maintain sane glyph binding state
This ensures that `binds` is updated to match overwrites in `bounds`. | $: grams=(list mail) :: all messages
known=(set [target serial]) :: known message lookup
count=@ud :: (lent grams)
- bound=(map target char) :: bound circle glyphs
- binds=(jug char target) :: circle glyph lookup
+ bound=(map target glyph) :: bound circle glyphs
+ binds=(jug glyph target) :: circle glyph lookup
audience=(set target) :: active targets
settings=(set term) :: frontend flags
width=@ud :: display width
|= [=glyph =target]
^- (quip move _this)
::TODO should send these to settings store eventually
+ :: if the target was already bound to another glyph, un-bind that
+ ::
+ =? binds (~(has by bound) target)
+ (~(del ju binds) (~(got by bound) target) target)
=. bound (~(put by bound) target glyph)
=. binds (~(put ju binds) glyph target)
[(show-glyph:sh-out glyph `target) this]
|
Update actuator.js
fix esp32 servo | @@ -17,7 +17,15 @@ Blockly.Arduino.servo_move = function() {
var code = 'servo_'+dropdown_pin+'.write('+value_degree+');\n'+'delay(' + delay_time + ');\n';
return code;
};
-
+Blockly.Arduino.servo_writeMicroseconds = function() {
+ var dropdown_pin = this.getFieldValue('PIN');
+ var value_degree = Blockly.Arduino.valueToCode(this, 'DEGREE', Blockly.Arduino.ORDER_ATOMIC);
+ Blockly.Arduino.definitions_['include_Servo'] = '#include <ESP32_Servo.h>';
+ Blockly.Arduino.definitions_['var_declare_servo'+dropdown_pin] = 'Servo servo_'+dropdown_pin+';';
+ Blockly.Arduino.setups_['setup_servo_'+dropdown_pin] = 'servo_'+dropdown_pin+'.attach('+dropdown_pin+');';
+ var code = 'servo_'+dropdown_pin+'.writeMicroseconds('+value_degree+');\n';
+ return code;
+};
Blockly.Arduino.servo_read_degrees = function() {
var dropdown_pin = Blockly.Arduino.valueToCode(this, 'PIN',Blockly.Arduino.ORDER_ATOMIC);
|
Update early data test cases | @@ -80,14 +80,14 @@ fi
if [ -n "${OPENSSL_NEXT:-}" ]; then
O_NEXT_SRV="$OPENSSL_NEXT s_server -www -cert data_files/server5.crt -key data_files/server5.key"
- O_NEXT_SRV_NO_WWW="$OPENSSL_NEXT s_server -cert data_files/server5.crt -key data_files/server5.key"
+ O_NEXT_SRV_EARLY_DATA="$OPENSSL_NEXT s_server -early_data -cert data_files/server5.crt -key data_files/server5.key"
O_NEXT_SRV_NO_CERT="$OPENSSL_NEXT s_server -www "
O_NEXT_CLI="echo 'GET / HTTP/1.0' | $OPENSSL_NEXT s_client -CAfile data_files/test-ca_cat12.crt"
O_NEXT_CLI_NO_CERT="echo 'GET / HTTP/1.0' | $OPENSSL_NEXT s_client"
else
O_NEXT_SRV=false
O_NEXT_SRV_NO_CERT=false
- O_NEXT_SRV_NO_WWW=false
+ O_NEXT_SRV_EARLY_DATA=false
O_NEXT_CLI_NO_CERT=false
O_NEXT_CLI=false
fi
@@ -1692,7 +1692,7 @@ fi
if [ -n "${OPENSSL_NEXT:-}" ]; then
O_NEXT_SRV="$O_NEXT_SRV -accept $SRV_PORT"
O_NEXT_SRV_NO_CERT="$O_NEXT_SRV_NO_CERT -accept $SRV_PORT"
- O_NEXT_SRV_NO_WWW="$O_NEXT_SRV_NO_WWW -accept $SRV_PORT"
+ O_NEXT_SRV_EARLY_DATA="$O_NEXT_SRV_EARLY_DATA -accept $SRV_PORT"
O_NEXT_CLI="$O_NEXT_CLI -connect 127.0.0.1:+SRV_PORT"
O_NEXT_CLI_NO_CERT="$O_NEXT_CLI_NO_CERT -connect 127.0.0.1:+SRV_PORT"
fi
@@ -13049,8 +13049,8 @@ requires_config_enabled MBEDTLS_SSL_SRV_C
requires_config_enabled MBEDTLS_SSL_CLI_C
requires_config_enabled MBEDTLS_SSL_EARLY_DATA
run_test "TLS 1.3, ext PSK, early data" \
- "$O_NEXT_SRV_NO_WWW -msg -debug -tls1_3 -early_data -psk_identity 0a0b0c -psk 010203 -allow_no_dhe_kex -nocert" \
- "$P_CLI nbio=2 debug_level=5 force_version=tls13 tls13_kex_modes=psk early_data=1 psk=010203 psk_identity=0a0b0c" \
+ "$O_NEXT_SRV_EARLY_DATA -msg -debug -tls1_3 -psk_identity 0a0b0c -psk 010203 -allow_no_dhe_kex -nocert" \
+ "$P_CLI debug_level=5 force_version=tls13 tls13_kex_modes=psk early_data=1 psk=010203 psk_identity=0a0b0c" \
1 \
-c "=> write client hello" \
-c "client hello, adding early_data extension" \
|
reverting "fix" to GenericExecute method | @@ -163,10 +163,6 @@ vtkDataSetRemoveGhostCells::RequestData(
// Eric Brugger, Wed Jan 9 14:56:57 PST 2013
// Modified to inherit from vtkDataSetAlgorithm.
//
-// Mark C. Miller, Sun Jan 13 23:43:14 CST 2019
-// Fix to filter on GhostZoneTypesToRemove. Also add optimizations for
-// when GhostZoneTypesToRemove is 0xFF (255), meaning all types.
-//
// ****************************************************************************
void
@@ -174,10 +170,9 @@ vtkDataSetRemoveGhostCells::GenericExecute()
{
int i;
-
vtkDataSet *ds = input;
vtkDataArray *arr = ds->GetCellData()->GetArray("avtGhostZones");
- if (GhostZoneTypesToRemove == 255 || arr == NULL)
+ if (arr == NULL)
{
output->ShallowCopy(ds);
return;
@@ -185,11 +180,8 @@ vtkDataSetRemoveGhostCells::GenericExecute()
int nOut = 0;
int nCells = ds->GetNumberOfCells();
for (i = 0 ; i < nCells ; i++)
- {
- unsigned char effectiveVal = (unsigned char) arr->GetTuple1(i) & GhostZoneTypesToRemove;
- if (!avtGhostData::IsGhostZone(effectiveVal))
+ if (arr->GetTuple1(i) == 0)
nOut++;
- }
// If *all* the cells are selected, exit early, returning the input
if (nOut == nCells)
@@ -212,8 +204,7 @@ vtkDataSetRemoveGhostCells::GenericExecute()
vtkIdList *ptList = vtkIdList::New();
for (i = 0 ; i < nCells ; i++)
{
- unsigned char effectiveVal = (unsigned char) arr->GetTuple1(i) & GhostZoneTypesToRemove;
- if (avtGhostData::IsGhostZone(effectiveVal))
+ if (arr->GetTuple1(i) != 0)
continue;
ds->GetCellPoints(i, ptList);
@@ -224,10 +215,6 @@ vtkDataSetRemoveGhostCells::GenericExecute()
ptList->Delete();
ugrid->Squeeze();
- if (GhostZoneTypesToRemove == 255)
- {
- ugrid->GetCellData()->RemoveArray("avtGhostZones");
- }
this->GetExecutive()->SetOutputData(0, ugrid);
ugrid->Delete();
}
|
hslua-module-text: update copyright notices, it's 2021 | -Copyright (c) 2017-2020 Albert Krewinkel
+Copyright (c) 2017-2021 Albert Krewinkel
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
|
STORE: Use the same error avoidance criteria as for the DER->key decoder | @@ -101,7 +101,9 @@ static int der2obj_decode(void *provctx, OSSL_CORE_BIO *cin, int selection,
err = ERR_peek_last_error();
if (ERR_GET_LIB(err) == ERR_LIB_ASN1
&& (ERR_GET_REASON(err) == ASN1_R_HEADER_TOO_LONG
- || ERR_GET_REASON(err) == ERR_R_NESTED_ASN1_ERROR))
+ || ERR_GET_REASON(err) == ASN1_R_UNSUPPORTED_TYPE
+ || ERR_GET_REASON(err) == ERR_R_NESTED_ASN1_ERROR
+ || ERR_GET_REASON(err) == ASN1_R_NOT_ENOUGH_DATA))
ERR_pop_to_mark();
else
ERR_clear_last_mark();
|
Improve comments explaining stubs in DHCPProcess harness. | @@ -34,10 +34,14 @@ void *FreeRTOS_GetUDPPayloadBuffer( size_t xRequestedSizeBytes, TickType_t xBloc
}
/*
- * In this stub we allocate a buffer within the specified range
- * Note that the values for BUFFER_SIZE and prvProcessDHCPReplies.0
- * are correlated, and their current values have been adjusted in order
- * to obtain maximum coverage in the shortest amount of time
+ * We stub out FreeRTOS_recvfrom to do nothing but return a buffer of
+ * arbitrary size (but size at most BUFFER_SIZE) containing arbitrary
+ * data. We need to bound the size of the buffer in order to bound
+ * the number of iterations of the loop prvProcessDHCPReplies.0 that
+ * iterates over the buffer contents. The bound BUFFER_SIZE is chosen
+ * to be large enough to ensure complete code coverage, and small
+ * enough to ensure CBMC terminates within a reasonable amount of
+ * time.
*/
int32_t FreeRTOS_recvfrom(
Socket_t xSocket, void *pvBuffer, size_t xBufferLength,
|
Fix typo in DEBUG REPLYBUFFER RESIZING comment
This command is related with reply buffer, not replay buffer | @@ -489,7 +489,7 @@ void debugCommand(client *c) {
" In case NEVER is provided the last observed peak will never be reset",
" In case RESET is provided the peak reset time will be restored to the default value",
"REPLYBUFFER RESIZING <0|1>",
-" Enable or disable the replay buffer resize cron job",
+" Enable or disable the reply buffer resize cron job",
NULL
};
addReplyHelp(c, help);
|
chain_build(): Call verify_cb_cert() if a preliminary error has become final | @@ -352,7 +352,7 @@ static int check_issued(ossl_unused X509_STORE_CTX *ctx, X509 *x, X509 *issuer)
*/
if (err != X509_V_ERR_SUBJECT_ISSUER_MISMATCH)
ctx->error = err;
- return 0; /* Better call verify_cb_cert(ctx, x, ctx->error_depth, err) ? */
+ return 0;
}
/*
@@ -3282,10 +3282,17 @@ static int build_chain(X509_STORE_CTX *ctx)
return 0;
case X509_TRUST_UNTRUSTED:
default:
- if (ctx->error != X509_V_OK)
- /* Callback already issued in most such cases */
- return 0;
- num = sk_X509_num(ctx->chain);
+ switch(ctx->error) {
+ case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD:
+ case X509_V_ERR_CERT_NOT_YET_VALID:
+ case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD:
+ case X509_V_ERR_CERT_HAS_EXPIRED:
+ return 0; /* Callback already issued by x509_check_cert_time() */
+ default: /* A preliminary error has become final */
+ return verify_cb_cert(ctx, NULL, num - 1, ctx->error);
+ case X509_V_OK:
+ break;
+ }
CB_FAIL_IF(num > depth,
ctx, NULL, num - 1, X509_V_ERR_CERT_CHAIN_TOO_LONG);
CB_FAIL_IF(DANETLS_ENABLED(dane)
|
/oic/res needs to be discoverable.
Tested-by: Kishen Maloor | @@ -463,8 +463,8 @@ void
oc_create_discovery_resource(int resource_idx, int device)
{
oc_core_populate_resource(
- resource_idx, device, "oic/res", OC_IF_LL | OC_IF_BASELINE, OC_IF_LL, 0,
- oc_core_discovery_handler, 0, 0, 0, 1, "oic.wk.res");
+ resource_idx, device, "oic/res", OC_IF_LL | OC_IF_BASELINE, OC_IF_LL,
+ OC_DISCOVERABLE, oc_core_discovery_handler, 0, 0, 0, 1, "oic.wk.res");
}
#ifdef OC_CLIENT
|
Finally get it hopefully right. | KASSERT(pthread_rwlock_unlock(&SCTP_BASE_INFO(ipi_ep_mtx)) == 0, ("%s: ipi_ep_mtx not locked", __func__))
#define SCTP_INP_INFO_WUNLOCK() \
KASSERT(pthread_rwlock_unlock(&SCTP_BASE_INFO(ipi_ep_mtx)) == 0, ("%s: ipi_ep_mtx not locked", __func__))
-#define SCTP_INP_INFO_WLOCK_ASSERT() do { \
- int _retval = pthread_rwlock_trywrlock(&SCTP_BASE_INFO(ipi_ep_mtx)); \
- KASSERT(_retval == EDEADLK || _retval == EBUSY, ("%s: ipi_ep_mtx not locked", __func__)); \
-} while (0)
+#define SCTP_INP_INFO_WLOCK_ASSERT() \
+ KASSERT(pthread_rwlock_trywrlock(&SCTP_BASE_INFO(ipi_ep_mtx)) == EDEADLK, ("%s: ipi_ep_mtx not locked", __func__))
#else
#define SCTP_INP_INFO_RLOCK() \
(void)pthread_rwlock_rdlock(&SCTP_BASE_INFO(ipi_ep_mtx))
#define SCTP_IPI_ADDR_WUNLOCK() \
KASSERT(pthread_rwlock_unlock(&SCTP_BASE_INFO(ipi_addr_mtx)) == 0, ("%s: ipi_addr_mtx not locked", __func__))
#define SCTP_IPI_ADDR_LOCK_ASSERT()
-#define SCTP_IPI_ADDR_WLOCK_ASSERT() do { \
- int _retval = pthread_rwlock_trywrlock(&SCTP_BASE_INFO(ipi_addr_mtx)); \
- KASSERT(_retval == EDEADLK || _retval == EBUSY, ("%s: ipi_ep_mtx not locked", __func__)); \
-} while (0)
+#define SCTP_IPI_ADDR_WLOCK_ASSERT() \
+ KASSERT(pthread_rwlock_trywrlock(&SCTP_BASE_INFO(ipi_addr_mtx)) == EDEADLK, ("%s: ipi_ep_mtx not locked", __func__))
#else
#define SCTP_IPI_ADDR_RLOCK() \
(void)pthread_rwlock_rdlock(&SCTP_BASE_INFO(ipi_addr_mtx))
|
X509_dup: Avoid duplicating the embedded EVP_PKEY
The EVP_PKEY will be recreated from scratch which is OK.
Fixes | @@ -104,23 +104,6 @@ static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
if (!ossl_x509_set0_libctx(ret, old->libctx, old->propq))
return 0;
- if (old->cert_info.key != NULL) {
- EVP_PKEY *pkey = X509_PUBKEY_get0(old->cert_info.key);
-
- if (pkey != NULL) {
- pkey = EVP_PKEY_dup(pkey);
- if (pkey == NULL) {
- ERR_raise(ERR_LIB_X509, ERR_R_MALLOC_FAILURE);
- return 0;
- }
- if (!X509_PUBKEY_set(&ret->cert_info.key, pkey)) {
- EVP_PKEY_free(pkey);
- ERR_raise(ERR_LIB_X509, ERR_R_INTERNAL_ERROR);
- return 0;
- }
- EVP_PKEY_free(pkey);
- }
- }
}
break;
case ASN1_OP_GET0_LIBCTX:
@@ -130,6 +113,7 @@ static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
*libctx = ret->libctx;
}
break;
+
case ASN1_OP_GET0_PROPQ:
{
const char **propq = exarg;
@@ -137,6 +121,7 @@ static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
*propq = ret->propq;
}
break;
+
default:
break;
}
|
Clean up parse function. | @@ -333,17 +333,13 @@ const uint8_t* picoquic_parse_new_connection_id_frame(const uint8_t* bytes, cons
uint64_t* sequence, uint64_t* retire_before, uint8_t* cid_length, const uint8_t** cnxid_bytes,
const uint8_t** secret_bytes)
{
- if ((bytes = picoquic_frames_varint_decode(bytes + 1, bytes_max, sequence)) != NULL) {
- bytes = picoquic_frames_varint_decode(bytes, bytes_max, retire_before);
- if (bytes != NULL) {
- bytes = picoquic_frames_uint8_decode(bytes, bytes_max, cid_length);
- }
- if (bytes != NULL) {
+ if ((bytes = picoquic_frames_varint_decode(bytes + 1, bytes_max, sequence)) != NULL &&
+ (bytes = picoquic_frames_varint_decode(bytes, bytes_max, retire_before)) != NULL &&
+ (bytes = picoquic_frames_uint8_decode(bytes, bytes_max, cid_length)) != NULL) {
*cnxid_bytes = bytes;
*secret_bytes = bytes + *cid_length;
bytes = picoquic_frames_fixed_skip(bytes, bytes_max, (uint64_t)*cid_length + PICOQUIC_RESET_SECRET_SIZE);
}
- }
return bytes;
}
|
http-socket.h: include cc.h instead of re-defining MAX | #define HTTP_SOCKET_H
#include "tcp-socket.h"
+#include "sys/cc.h"
struct http_socket;
@@ -62,8 +63,6 @@ typedef void (* http_socket_callback_t)(struct http_socket *s,
const uint8_t *data,
uint16_t datalen);
-#define MAX(n, m) (((n) < (m)) ? (m) : (n))
-
#define HTTP_SOCKET_INPUTBUFSIZE UIP_TCP_MSS
#define HTTP_SOCKET_OUTPUTBUFSIZE MAX(UIP_TCP_MSS, 128)
|
Minor code formatting updates across several files. | @@ -990,8 +990,7 @@ print_horizontal_dash (WINDOW * win, int y, int x, int len) {
/* Render left-aligned column label. */
static void
-lprint_col (WINDOW * win, int y, int *x, int len, const char *str)
-{
+lprint_col (WINDOW * win, int y, int *x, int len, const char *str) {
GColors *color = get_color (COLOR_PANEL_COLS);
wattron (win, color->attr | COLOR_PAIR (color->pair->idx));
|
kernel/binary_manager: Add dependency of BCH driver
Binary manager uses block driver to access flash partitions.
So it needs BCH (Block-to-Character) driver support. | @@ -1094,7 +1094,7 @@ config BINARY_MANAGER
bool "Enable Binary Manager"
default n
depends on APP_BINARY_SEPARATION && BINFMT_LOADABLE && !DISABLE_MQUEUE
- depends on MTD_FTL && FLASH_PARTITION && MTD_PARTITION_NAMES
+ depends on BCH && MTD_FTL && FLASH_PARTITION && MTD_PARTITION_NAMES
---help---
This is kernel thread which manages binaries.
It loads/unloads binaries and recovers any fault occurs in a system.
|
Make test_alloc_realloc_group_choice() robust vs allocation changes | @@ -9488,7 +9488,9 @@ START_TEST(test_alloc_realloc_group_choice)
if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
XML_TRUE) != XML_STATUS_ERROR)
break;
- XML_ParserReset(parser, NULL);
+ /* See comment in test_alloc_parse_xdecl() */
+ alloc_teardown();
+ alloc_setup();
}
if (i == 0)
fail("Parse succeeded despite failing reallocator");
|
move the whole before install | @@ -58,9 +58,16 @@ matrix:
- UBUNTU_TRUSTY=1
php: '7.x'
before_install:
- <<: *bi
- sudo add-apt-repository --yes ppa:llvm-toolchain-trusty
- sudo apt-get install -y clang-5.0
+ - sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
+ - sudo apt-add-repository --yes ppa:smspillaz/cmake-2.8.12
+ - sudo apt-get --yes update
+ - sudo apt-get install --yes cmake cmake-data g++-4.8 libstdc++-4.8-dev wget php5-cgi
+ - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8"; fi
+ - $CXX --version
+ # for speed, pre-install deps installed in `before_script` section as ubuntu packages
+ - sudo apt-get install -qq cpanminus libipc-signal-perl liblist-moreutils-perl libwww-perl libio-socket-ssl-perl zlib1g-dev
before_script: *bs
script:
- CC=clang-5.0 CXX=clang++-5.0 cmake -DBUILD_FUZZER=ON -DWITH_MRUBY=ON .
|
In OOM case try to force collect memory and retry the allocation. | @@ -790,6 +790,24 @@ static mi_page_t* mi_huge_page_alloc(mi_heap_t* heap, size_t size) {
}
+static mi_page_t *_mi_find_page(mi_heap_t* heap, size_t size) mi_attr_noexcept {
+ // huge allocation?
+ const size_t req_size = size - MI_PADDING_SIZE; // correct for padding_size in case of an overflow on `size`
+ if (mi_unlikely(req_size > (MI_LARGE_OBJ_SIZE_MAX - MI_PADDING_SIZE) )) {
+ if (mi_unlikely(req_size > PTRDIFF_MAX)) { // we don't allocate more than PTRDIFF_MAX (see <https://sourceware.org/ml/libc-announce/2019/msg00001.html>)
+ _mi_error_message(EOVERFLOW, "allocation request is too large (%zu b requested)\n", req_size);
+ return NULL;
+ }
+ else {
+ return mi_huge_page_alloc(heap,size);
+ }
+ }
+
+ // otherwise find a page with free blocks in our size segregated queues
+ mi_assert_internal(size >= MI_PADDING_SIZE);
+ return mi_find_free_page(heap,size);
+}
+
// Generic allocation routine if the fast path (`alloc.c:mi_page_malloc`) does not succeed.
// Note: in debug mode the size includes MI_PADDING_SIZE and might have overflowed.
void* _mi_malloc_generic(mi_heap_t* heap, size_t size) mi_attr_noexcept
@@ -809,23 +827,12 @@ void* _mi_malloc_generic(mi_heap_t* heap, size_t size) mi_attr_noexcept
// free delayed frees from other threads
_mi_heap_delayed_free(heap);
- // huge allocation?
- mi_page_t* page;
- const size_t req_size = size - MI_PADDING_SIZE; // correct for padding_size in case of an overflow on `size`
- if (mi_unlikely(req_size > (MI_LARGE_OBJ_SIZE_MAX - MI_PADDING_SIZE) )) {
- if (mi_unlikely(req_size > PTRDIFF_MAX)) { // we don't allocate more than PTRDIFF_MAX (see <https://sourceware.org/ml/libc-announce/2019/msg00001.html>)
- _mi_error_message(EOVERFLOW, "allocation request is too large (%zu b requested)\n", req_size);
- return NULL;
- }
- else {
- page = mi_huge_page_alloc(heap,size);
- }
- }
- else {
- // otherwise find a page with free blocks in our size segregated queues
- mi_assert_internal(size >= MI_PADDING_SIZE);
- page = mi_find_free_page(heap,size);
+ mi_page_t* page = _mi_find_page(heap, size);
+ if (mi_unlikely(page == NULL)) { // out of memory, try to collect and retry allocation
+ mi_heap_collect(heap, true /* force */);
+ page = _mi_find_page(heap, size);
}
+
if (mi_unlikely(page == NULL)) { // out of memory
_mi_error_message(ENOMEM, "cannot allocate memory (%zu bytes requested)\n", size);
return NULL;
|
avx512f: use SIMDE_ASSUME_ALIGNED for _mm512_load_si512 | @@ -2037,12 +2037,10 @@ simde_mm512_load_si512 (void const * mem_addr) {
#if defined(SIMDE_X86_AVX512F_NATIVE)
return _mm512_load_si512(HEDLEY_REINTERPRET_CAST(void const*, mem_addr));
- #elif defined(SIMDE_ARCH_AARCH64) && (defined(HEDLEY_GCC_VERSION) && !HEDLEY_GCC_VERSION_CHECK(8,0,0))
+ #else
simde__m512i r;
- simde_memcpy(&r, mem_addr, sizeof(r));
+ simde_memcpy(&r, SIMDE_ASSUME_ALIGNED(64, mem_addr), sizeof(r));
return r;
- #else
- return *SIMDE_ALIGN_CAST(simde__m512i const*, mem_addr);
#endif
}
#define simde_mm512_load_epi8(mem_addr) simde_mm512_load_si512(mem_addr)
|
Document failure return for ECDSA_SIG_new
ECDSA_SIG_new() returns NULL on error. | @@ -121,6 +121,8 @@ returned as a newly allocated B<ECDSA_SIG> structure (or NULL on error).
=head1 RETURN VALUES
+ECDSA_SIG_new() returns NULL if the allocation fails.
+
ECDSA_SIG_set0() returns 1 on success or 0 on failure.
ECDSA_SIG_get0_r() and ECDSA_SIG_get0_s() return the corresponding value,
|
More external entity allocation failure coverage | @@ -3824,6 +3824,63 @@ START_TEST(test_alloc_external_entity)
}
END_TEST
+/* Test more allocation failure paths */
+static int XMLCALL
+external_entity_alloc_set_encoding(XML_Parser parser,
+ const XML_Char *context,
+ const XML_Char *UNUSED_P(base),
+ const XML_Char *UNUSED_P(systemId),
+ const XML_Char *UNUSED_P(publicId))
+{
+ /* As for external_entity_loader_set_encoding() */
+ const char *text =
+ "<?xml encoding='iso-8859-3'?>"
+ "\xC3\xA9";
+ XML_Parser ext_parser;
+ enum XML_Status status;
+
+ ext_parser = XML_ExternalEntityParserCreate(parser, context, NULL);
+ if (ext_parser == NULL)
+ return 0;
+ if (!XML_SetEncoding(ext_parser, "utf-8")) {
+ XML_ParserFree(ext_parser);
+ return 0;
+ }
+ status = _XML_Parse_SINGLE_BYTES(ext_parser, text, strlen(text),
+ XML_TRUE);
+ XML_ParserFree(ext_parser);
+ if (status == XML_STATUS_ERROR)
+ return 0;
+ return 1;
+}
+
+START_TEST(test_alloc_ext_entity_set_encoding)
+{
+ const char *text =
+ "<!DOCTYPE doc [\n"
+ " <!ENTITY en SYSTEM 'http://example.org/dummy.ent'>\n"
+ "]>\n"
+ "<doc>&en;</doc>";
+ int i;
+#define MAX_ALLOCATION_COUNT 20
+
+ for (i = 0; i < MAX_ALLOCATION_COUNT; i++) {
+ XML_SetExternalEntityRefHandler(parser,
+ external_entity_alloc_set_encoding);
+ allocation_count = i;
+ if (_XML_Parse_SINGLE_BYTES(parser, text, strlen(text),
+ XML_TRUE) == XML_STATUS_OK)
+ break;
+ allocation_count = -1;
+ XML_ParserReset(parser, NULL);
+ }
+ if (i == 0)
+ fail("Encoding check succeeded despite failing allocator");
+ if (i == MAX_ALLOCATION_COUNT)
+ fail("Encoding failed at max allocation count");
+#undef MAX_ALLOCATION_COUNT
+}
+END_TEST
static int XMLCALL
unknown_released_encoding_handler(void *UNUSED_P(data),
@@ -4102,6 +4159,7 @@ make_suite(void)
tcase_add_test(tc_alloc, test_alloc_run_external_parser);
tcase_add_test(tc_alloc, test_alloc_dtd_copy_default_atts);
tcase_add_test(tc_alloc, test_alloc_external_entity);
+ tcase_add_test(tc_alloc, test_alloc_ext_entity_set_encoding);
tcase_add_test(tc_alloc, test_alloc_internal_entity);
tcase_add_test(tc_alloc, test_alloc_dtd_default_handling);
tcase_add_test(tc_alloc, test_alloc_explicit_encoding);
|
storage: remove unused variables | static void print_storage_info(struct flb_config *ctx, struct cio_ctx *cio)
{
- size_t size;
char *sync;
char *checksum;
struct flb_input_instance *in;
@@ -187,7 +186,6 @@ int flb_storage_create(struct flb_config *ctx)
{
int ret;
int flags;
- size_t size;
struct flb_input_instance *in = NULL;
struct cio_ctx *cio;
|
Rework SWO output | #error "ITM port is not available on Cortex-M0(+) cores. Need to set CMake option SWO_OUTPUT to OFF."
#else
+// number of attempts to write to the ITM port before quit
+#define ITM_WRITE_ATTEMPTS 10
+
extern "C" void SwoInit()
{
// set SWO pin (PB3) to alternate mode (0 == the status after RESET)
@@ -57,7 +60,30 @@ extern "C" void SwoInit()
extern "C" void SwoPrintChar(char c)
{
- ITM_SendChar(c);
+ ASSERT((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL);
+ ASSERT((ITM->TER & 1UL ) != 0UL);
+
+ uint32_t retryCounter = ITM_WRITE_ATTEMPTS;
+ bool okToTx = ITM->PORT[0U].u32 == 0UL;
+
+ // wait (with timeout) until ITM port TX buffer is available
+ while( !okToTx &&
+ (retryCounter > 0) )
+ {
+ // do... nothing
+ __NOP();
+
+ // decrease retry counter
+ retryCounter--;
+
+ // check again
+ okToTx = (ITM->PORT[0U].u32 == 0UL);
+ }
+
+ if(okToTx)
+ {
+ ITM->PORT[0U].u8 = (uint8_t)c;
+ }
}
extern "C" void SwoPrintString(const char *s)
@@ -75,26 +101,40 @@ __STATIC_INLINE uint32_t GenericPort_Write_CMSIS(int portNum, const char* data,
{
(void)portNum;
+ ASSERT((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL);
+ ASSERT((ITM->TER & 1UL ) != 0UL);
+
char* p = (char*)data;
uint32_t counter = 0;
+ uint32_t retryCounter;
+ bool okToTx = ITM->PORT[0U].u32 == 0UL;
- // check if ITM port is enabled before start sending
- if (((ITM->TCR & ITM_TCR_ITMENA_Msk) != 0UL) && /* ITM enabled */
- ((ITM->TER & 1UL ) != 0UL) ) /* ITM Port #0 enabled */
- {
- while(*p != '\0' || counter < size)
+ while( *p != '\0' &&
+ counter < size )
{
- // wait until TX buffer is available
- while (ITM->PORT[0U].u32 == 0UL)
+ retryCounter = ITM_WRITE_ATTEMPTS;
+
+ // wait (with timeout) until ITM port TX buffer is available
+ while( !okToTx &&
+ (retryCounter > 0) )
{
+ // do... nothing
__NOP();
+
+ // decrease retry counter
+ retryCounter--;
+
+ // check again
+ okToTx = (ITM->PORT[0U].u32 == 0UL);
}
+ if(okToTx)
+ {
ITM->PORT[0U].u8 = (uint8_t)*p++;
+ }
counter++;
}
- }
return counter;
}
|
xpath BUGFIX unresolved value is valid | @@ -3333,6 +3333,9 @@ warn_equality_value(const struct lyxp_expr *exp, struct lyxp_set *set, uint16_t
if (type->basetype != LY_TYPE_IDENT) {
rc = type->plugin->store(set->ctx, type, value, strlen(value), 0, set->format, set->prefix_data,
LYD_HINT_DATA, scnode, &storage, &err);
+ if (rc == LY_EINCOMPLETE) {
+ rc = LY_SUCCESS;
+ }
if (err) {
LOGWRN(set->ctx, "Invalid value \"%s\" which does not fit the type (%s).", value, err->msg);
|
dpdk:remove duplicate code
unify code from both branches | @@ -522,34 +522,26 @@ dpdk_lib_init (dpdk_main_t * dm)
xd->per_interface_next_index = ~0;
/* assign interface to input thread */
- dpdk_device_and_queue_t *dq;
int q;
if (devconf->hqos_enabled)
{
xd->flags |= DPDK_DEVICE_FLAG_HQOS;
+ int cpu;
if (devconf->hqos.hqos_thread_valid)
{
- int cpu = dm->hqos_cpu_first_index + devconf->hqos.hqos_thread;
-
if (devconf->hqos.hqos_thread >= dm->hqos_cpu_count)
return clib_error_return (0, "invalid HQoS thread index");
- vec_add2 (dm->devices_by_hqos_cpu[cpu], dq, 1);
- dq->device = xd->device_index;
- dq->queue_id = 0;
+ cpu = dm->hqos_cpu_first_index + devconf->hqos.hqos_thread;
}
else
{
- int cpu = dm->hqos_cpu_first_index + next_hqos_cpu;
-
if (dm->hqos_cpu_count == 0)
return clib_error_return (0, "no HQoS threads available");
- vec_add2 (dm->devices_by_hqos_cpu[cpu], dq, 1);
- dq->device = xd->device_index;
- dq->queue_id = 0;
+ cpu = dm->hqos_cpu_first_index + next_hqos_cpu;
next_hqos_cpu++;
if (next_hqos_cpu == dm->hqos_cpu_count)
@@ -558,6 +550,11 @@ dpdk_lib_init (dpdk_main_t * dm)
devconf->hqos.hqos_thread_valid = 1;
devconf->hqos.hqos_thread = cpu;
}
+
+ dpdk_device_and_queue_t *dq;
+ vec_add2 (dm->devices_by_hqos_cpu[cpu], dq, 1);
+ dq->device = xd->device_index;
+ dq->queue_id = 0;
}
vec_validate_aligned (xd->tx_vectors, tm->n_vlib_mains,
|
add / edit card.js toggle | @@ -183,3 +183,4 @@ export class NewScreen extends Component {
}
export default NewScreen
+
\ No newline at end of file
|
Added information about docker image | @@ -66,6 +66,22 @@ You can put this in your ``.bashrc`` or equivalent environment setup file to get
These variables need to be set for the ``make`` system to work properly.
+Pre-built Docker Image
+-------------------------------------------
+
+An alternative to setting up the Chipyard repository locally is to pull the pre-built Docker image from Docker Hub. The image comes with all necessary dependencies and toolchains installed.
+First pull the Docker image. Run:
+
+.. code-block:: shell
+
+ sudo docker pull ucbbar/chipyard-image
+
+To run the Docker container in an interactive shell, run:
+
+.. code-block:: shell
+
+ sudo docker run -it ucbbar/chipyard-image bash
+
What's Next?
-------------------------------------------
|
almost there with counter's madness | * For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
-/* This is an entirely rewritten version of Joseph A. Sarlo's code.
- The most important changes are listed in "pd-lib-notes.txt" file. */
+/* rewritten version of Joseph A. Sarlo's code fom pb-lib
+ (important changes listed in "pd-lib-notes.txt" file. */
-/* Beware -- the max reference manual page for the counter object
+/* krzYszcz circa (2002?)
+ Beware -- the max reference manual page for the counter object
reflects mostly opcode max features. Apparently counter works
differently in cycling max (e.g. inlets 3 and 4). But I am sick
of checking -- I will not bother, until there is some feedback. */
-// Porres in 2016 checked the inconsistencies and fixed them
+// Porres in 2016/2017 checked the inconsistencies and fixed them
// Adding attributes, p_id, counter_proxy_state, editing existing counter_proxy methods - Derek Kwan 2016
@@ -122,7 +123,7 @@ static void counter_dobang(t_counter *x, int notjam)
{
if (x->x_inc == -1) //
{
- // <=== HERE!!! HERE!!! HERE!!!
+ // <=== ???
}
else if (x->x_dir == COUNTER_UPDOWN)
{
@@ -132,12 +133,12 @@ static void counter_dobang(t_counter *x, int notjam)
else x->x_count = x->x_min;
}
- if (x->x_count == x->x_min && x->x_inc == -1)
+ if (x->x_count <= x->x_min && x->x_inc == -1)
{
// RECHECK: jam inhibits mid outlets (unless carry-off) carry-on not sent if max < min, but sent if max == min (????)
- // CARRY MIN!!! count = min, downwards & min < max!
- if (notjam && x->x_min <= x->x_max) onmin = 1; // <= HACK!!! RETHINK (?)
+ // CARRY MIN!!! count <= min, downwards
+ if (notjam) onmin = 1; // <= HACK!!! RETHINK (?)
}
// OUTLETS!!!!
@@ -151,7 +152,7 @@ static void counter_dobang(t_counter *x, int notjam)
/* CHECKED: 'jam' inhibits middle outlets (unless carry-off)
carry-on is never sent if max < min, but sent if max == min (???) */
- // CARRY MAX!!! count = max, upwards & min < max!
+ // CARRY MAX!!! count >= max, upwards
if (notjam) onmax = 1; // <= HACK!!! RETHINK
}
|
fix(obj): fixed warning when using clang compiler on macOS | @@ -27,8 +27,11 @@ extern "C" {
**********************/
/*Can't include lv_obj.h because it includes this header file*/
struct _lv_obj_t;
+
+#ifndef LV_OBJ_H
typedef uint32_t lv_part_t;
typedef uint16_t lv_state_t;
+#endif
typedef enum {
_LV_STYLE_STATE_CMP_SAME, /*The style properties in the 2 states are identical*/
|
Only reset the ctx when a cipher is given
This restores the 1.0.2 behaviour
GH: | @@ -50,6 +50,7 @@ void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx)
int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
const unsigned char *key, const unsigned char *iv, int enc)
{
+ if (cipher != NULL)
EVP_CIPHER_CTX_reset(ctx);
return EVP_CipherInit_ex(ctx, cipher, NULL, key, iv, enc);
}
|
Fix fallthrough warning on GCC7 | @@ -575,6 +575,7 @@ int main(int argc, char *argv[])
#else
printf(" >>> Streaming method (%d) NOT IMPLEMENTED \n", method);
method = 1;
+ break;
#endif
default:
printf(" >>> Default: Naive method (%d) \n", method);
|
Add board ID of KW41Z to BOARD_ID_LOCKED_WHEN_ERASED | @@ -211,6 +211,7 @@ BOARD_ID_LOCKED_WHEN_ERASED = set([
0x0262, # FRDM-KL43Z
0x0291, # FRDM-KL82Z
0x1022, # RO359B (K24F)
+ 0x0201, # KW41Z
])
#Hack until these targets have an image with a valid vector table
|
[codecs] Move to library/cpp | This is a simple library for block data compression (this means data is compressed/uncompressed
-by whole blocks in memory). It's a lite-version of the `library/codecs`. Lite here means that it
+by whole blocks in memory). It's a lite-version of the `library/cpp/codecs`. Lite here means that it
provide only well-known compression algorithms, without the possibility of learning.
There are two possible ways to work with it.
|
af_xdp: change RLIMIT_MEMLOCK before load bpf program
default RLIMIT_MEMLOCK is 64. if we use multi af_xdp interfaces or
load complex bpf program, libbpf will return permission error.
root cause is default 64 is not large enough. So we change it before
load bpf program.
Type: fix | #include <linux/ethtool.h>
#include <linux/if_link.h>
#include <linux/sockios.h>
+#include <linux/limits.h>
#include <bpf/libbpf.h>
#include <vlib/vlib.h>
#include <vlib/unix/unix.h>
@@ -197,6 +198,12 @@ static int
af_xdp_load_program (af_xdp_create_if_args_t * args, af_xdp_device_t * ad)
{
int fd;
+ struct rlimit r = { RLIM_INFINITY, RLIM_INFINITY };
+
+ if (setrlimit (RLIMIT_MEMLOCK, &r))
+ af_xdp_log (VLIB_LOG_LEVEL_WARNING, ad,
+ "setrlimit(%s) failed: %s (errno %d)", ad->linux_ifname,
+ strerror (errno), errno);
ad->linux_ifindex = if_nametoindex (ad->linux_ifname);
if (!ad->linux_ifindex)
|
libhfuzz: disable fortify-source for linux | @@ -46,6 +46,7 @@ ifeq ($(OS),Linux)
ARCH_LDFLAGS := -L/usr/local/include \
-lpthread -lunwind-ptrace -lunwind-generic -lbfd -lopcodes -lrt -ldl
ARCH_SRCS := $(sort $(wildcard linux/*.c))
+ LIBS_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
ifeq ("$(wildcard /usr/include/bfd.h)","")
WARN_LIBRARY += binutils-devel
|
Python Tutorial: Instructions for installation | When programming in Python it is possible to access the kdb database, changing values of existing keys, adding and deleting keys and a few other things.
+## Installation
+
+Either [build](https://www.libelektra.org/bindings/swig_python) the package or install from a repository.
+
+### Alpine Linux
+The [python bindings package](https://pkgs.alpinelinux.org/packages?name=py3-elektra&branch=edge&repo=testing) is only available in the testing repository (as of 2019-04-29).
+
+You'll have to use `alpine:edge`
+```sh
+echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
+# Install elektra and the python bindings
+apk update && apk add elektra elektra-python py3-elektra
+```
+
## First Steps
In order to being able to use `kdb`, you at first need to `import kdb`. You need access to a Python object of `KDB`. This is accomplished by calling `kdb.KDB()` and saving this to a variable because later on this object will be needed for various operations.
|
build: fixing trivial typo in comment in global header | @@ -1768,7 +1768,7 @@ int SPWATERFALL(_set_dims)(SPWATERFALL() _q, \
\
/* Push a single sample into the object, executing internal transform */ \
/* as necessary. */ \
-/* _q : spgram object */ \
+/* _q : spwaterfall object */ \
/* _x : input sample */ \
void SPWATERFALL(_push)(SPWATERFALL() _q, \
TI _x); \
|
fix TB_SOCKET_TYPE_ICMP comment | @@ -59,10 +59,10 @@ typedef enum __tb_socket_type_e
, TB_SOCKET_TYPE_UDP = TB_SOCKET_TYPE_SOCK_DGRAM | TB_SOCKET_TYPE_IPPROTO_UDP
#if defined(TB_CONFIG_OS_MACOSX) || defined(TB_CONFIG_OS_IOS)
- // socket for icmp, only need user permission on macOS
+ // socket for icmp, only need user permission on macOS/iOS
, TB_SOCKET_TYPE_ICMP = TB_SOCKET_TYPE_SOCK_DGRAM | TB_SOCKET_TYPE_IPPROTO_ICMP
#else
- // socket for icmp, need root permission on linux/macOS
+ // socket for icmp, need root permission on linux/windows
, TB_SOCKET_TYPE_ICMP = TB_SOCKET_TYPE_SOCK_RAW | TB_SOCKET_TYPE_IPPROTO_ICMP
#endif
|
Fix assert position | @@ -728,8 +728,6 @@ void Luos_SendData(service_t *service, msg_t *msg, void *bin_data, uint16_t size
******************************************************************************/
int Luos_ReceiveData(service_t *service, msg_t *msg, void *bin_data)
{
- LUOS_ASSERT(msg != 0);
- LUOS_ASSERT(bin_data != 0);
// Manage buffer session (one per service)
static uint32_t data_size[MAX_SERVICE_NUMBER] = {0};
static uint32_t total_data_size[MAX_SERVICE_NUMBER] = {0};
@@ -744,6 +742,9 @@ int Luos_ReceiveData(service_t *service, msg_t *msg, void *bin_data)
return -1;
}
+ LUOS_ASSERT(msg != 0);
+ LUOS_ASSERT(bin_data != 0);
+
uint16_t id = Luos_GetServiceIndex(service);
// check good service index
if (id == 0xFFFF)
|
document how to save using debugger | @@ -26,7 +26,19 @@ make bart
gdb --args bart <command> [<options> ...] <arg1> ...
-4. Then type 'run' to start the process. After it fails,
-type 'bt' to get a backtrace.
+4. Then type 'run' to start the process.
+
+If it crashes, you are back in the debugger. You can also
+type CTRL-C to interrupt it at any time.
+
+In the debugger:
+
+You can type 'bt' to get a backtrace which is helpful to
+investigate a segmentation fault or similar.
+
+You can also call functions. For example, this can be used to save
+a multi-dimensional array from the debugger like this:
+
+(gdb) call dump_cfl("dbg_img", 16, dims, image)
|
SOVERSION bump to version 7.13.12 | @@ -73,7 +73,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_
# with backward compatible change and micro version is connected with any internal change of the library.
set(SYSREPO_MAJOR_SOVERSION 7)
set(SYSREPO_MINOR_SOVERSION 13)
-set(SYSREPO_MICRO_SOVERSION 11)
+set(SYSREPO_MICRO_SOVERSION 12)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
Add a test for cbor_serialize_tag edgecases | @@ -402,6 +402,22 @@ static void test_serialize_tags(void **_CBOR_UNUSED(_state)) {
cbor_decref(&one);
}
+static void test_serialize_tags_no_space(void **_CBOR_UNUSED(_state)) {
+ cbor_item_t *item = cbor_new_tag(21);
+ cbor_item_t *one = cbor_build_uint8(1);
+ cbor_tag_set_item(item, one);
+ assert_int_equal(cbor_serialized_size(item), 2);
+
+ // Not enough space for the leading byte
+ assert_int_equal(cbor_serialize(item, buffer, 0), 0);
+
+ // Not enough space for the item
+ assert_int_equal(cbor_serialize(item, buffer, 1), 0);
+
+ cbor_decref(&item);
+ cbor_decref(&one);
+}
+
static void test_serialize_half(void **_CBOR_UNUSED(_state)) {
cbor_item_t *item = cbor_new_float2();
cbor_set_float2(item, NAN);
@@ -544,6 +560,7 @@ int main(void) {
cmocka_unit_test(test_serialize_indefinite_map),
cmocka_unit_test(test_serialize_map_no_space),
cmocka_unit_test(test_serialize_tags),
+ cmocka_unit_test(test_serialize_tags_no_space),
cmocka_unit_test(test_serialize_half),
cmocka_unit_test(test_serialize_single),
cmocka_unit_test(test_serialize_double),
|
board/wormdingler/board.h: Format with clang-format
BRANCH=none
TEST=none | @@ -80,10 +80,7 @@ enum sensor_id {
SENSOR_COUNT,
};
-enum pwm_channel {
- PWM_CH_DISPLIGHT = 0,
- PWM_CH_COUNT
-};
+enum pwm_channel { PWM_CH_DISPLIGHT = 0, PWM_CH_COUNT };
/* List of possible batteries */
enum battery_type {
|
BugID:17158311:initialize spiffs if this component included; remove tftp ota funtion as it is abandoned | #include <pwrmgmt_api.h>
#endif
+#ifdef AOS_COMP_SPIFFS
+#include <aos_spiffs.h>
+#endif
+
+
#include <network/network.h>
#ifdef WITH_LWIP_TFTP
#include "lwip/ip_addr.h"
@@ -104,7 +109,6 @@ static void tftp_get_done(int error, int len)
}
extern tftp_context_t client_ctx;
-extern tftp_context_t ota_ctx;
void ota_get_done(int error, int len);
static void tftp_cmd(char *buf, int len, int argc, char **argv)
{
@@ -128,12 +132,6 @@ static void tftp_cmd(char *buf, int len, int argc, char **argv)
ipaddr_aton(argc == 4 ? argv[2] : "10.0.0.2", &dst_addr);
tftp_client_get(&dst_addr, argv[argc - 1], &client_ctx, tftp_get_done);
return;
- } else if (strncmp(argv[1], "ota", 3) == 0) {
- ip_addr_t dst_addr;
- uint8_t gw_ip[4] = {10, 0 , 0, 2};
- memcpy(&dst_addr, gw_ip, 4);
- tftp_client_get(&dst_addr, argv[2], &ota_ctx, ota_get_done);
- return;
}
tftp_print_usage:
@@ -263,6 +261,10 @@ int aos_components_init(kinit_t *kinit)
cli_service_init(kinit);
#endif
+#ifdef AOS_COMP_SPIFFS
+ vfs_spiffs_register();
+#endif
+
#ifdef AOS_COMP_ULOG
ulog_init("A");
#endif
@@ -292,7 +294,6 @@ int aos_components_init(kinit_t *kinit)
gps_init();
#endif
-
/* auto_component generated by the compiler system, now gcc support */
#if defined (__GNUC__) && !defined (__CC_ARM)
/* aos_components_init(); */
|
restore name and group settings | @@ -134,11 +134,11 @@ BuildRequires: kernel-devel = %{centos_kernel}
%endif
Summary: Lustre File System
-Name: %{lustre_name}
+Name: %{lustre_name}%{PROJ_DELIM}
Version: %{version}
Release: 1%{?dist}
License: GPL
-Group: Utilities/System
+Group: %{PROJ_NAME}/lustre
Source: lustre-%{version}.tar.gz
Source1: kmp-lustre.preamble
Source2: kmp-lustre.files
@@ -147,7 +147,9 @@ Source4: kmp-lustre-osd-ldiskfs.files
Source5: kmp-lustre-osd-zfs.preamble
Source6: kmp-lustre-osd-zfs.files
Source7: kmp-lustre-tests.files
+Source8: OHPC_macros
URL: https://wiki.hpdd.intel.com/
+DocDir: %{OHPC_PUB}/doc/contrib
BuildRoot: %{_tmppath}/lustre-%{version}-root
Obsoletes: lustre-lite, lustre-lite-utils, lustre-ldap nfs-utils-lustre
Provides: lustre-lite = %{version}, lustre-lite-utils = %{version}
|
Added test case for WM1 wands | @@ -19,6 +19,7 @@ add_test(NAME lh2_test_cal COMMAND $<TARGET_FILE:test_replays> ${CMAKE_CURRE
if(PCAP_LIBRARY)
add_test(NAME lh2_test_cal_usb COMMAND $<TARGET_FILE:test_replays> ${CMAKE_CURRENT_BINARY_DIR}/libsurvive-extras-data/tests/lh2_test_cal.pcap.gz)
+ add_test(NAME wm1_wand_test_cal_usb COMMAND $<TARGET_FILE:test_replays> ${CMAKE_CURRENT_BINARY_DIR}/libsurvive-extras-data/tests/WM1-wand.pcap.gz)
endif()
include(ExternalProject)
|
docs: Add documentation for local-gadget top file. | @@ -239,6 +239,20 @@ docker-init 167857 142428 0 /usr/bin/docker-init --version
...
```
+### Top/File
+
+```bash
+$ sudo local-gadget top file
+CONTAINER PID COMM READS WRITES RBYTES WBYTES T FILE
+test-top-file 139255 sh 0 1 0B 4B R bar
+```
+
+The above output is the result of observing the following test container:
+
+```bash
+$ docker run --rm --name test-top-file busybox /bin/sh -c 'while true; do echo foo > bar; sleep 1; done'
+```
+
### Trace/Bind
```bash
|
Fix name mangling for C
This patch force the header to be compiled as C.
This behavior allows to use this library in a C program. | #ifndef AMD_VULKAN_MEMORY_ALLOCATOR_H
#define AMD_VULKAN_MEMORY_ALLOCATOR_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** \mainpage Vulkan Memory Allocator
\tableofcontents
@@ -1235,6 +1239,10 @@ void vmaDestroyImage(
/** @} */
+#ifdef __cplusplus
+}
+#endif
+
#endif // AMD_VULKAN_MEMORY_ALLOCATOR_H
// For Visual Studio IntelliSense.
|
options/posix: fix double free in getservby{name,port}
If getservby{name,port} is called, it will deallocate the previous
stored strings, without setting the pointers to nullptr. If the lookup
then fails before a new pointer is allocated, a subsequent call to the
same function will cause a double free. | @@ -330,9 +330,15 @@ struct servent *getservbyname(const char *name, const char *proto) {
static struct servent ret;
if (ret.s_name) {
free(ret.s_name);
- for (char **alias = ret.s_aliases; *alias != NULL; alias++)
+ ret.s_name = nullptr;
+
+ for (char **alias = ret.s_aliases; *alias != NULL; alias++) {
free(*alias);
+ *alias = nullptr;
+ }
+
free(ret.s_proto);
+ ret.s_proto = nullptr;
}
mlibc::service_result serv_buf{getAllocator()};
@@ -385,9 +391,15 @@ struct servent *getservbyport(int port, const char *proto) {
static struct servent ret;
if (ret.s_name) {
free(ret.s_name);
- for (char **alias = ret.s_aliases; *alias != NULL; alias++)
+ ret.s_name = nullptr;
+
+ for (char **alias = ret.s_aliases; *alias != NULL; alias++) {
free(*alias);
+ *alias = nullptr;
+ }
+
free(ret.s_proto);
+ ret.s_proto = nullptr;
}
mlibc::service_result serv_buf{getAllocator()};
|
viofs-svc: use VirtFS device's tag as volume prefix. | @@ -587,25 +587,29 @@ static NTSTATUS GetFileInfoInternal(VIRTFS *VirtFs, uint64_t nodeid,
return Status;
}
-static NTSTATUS GetVolumeInfo(FSP_FILE_SYSTEM *FileSystem,
- FSP_FSCTL_VOLUME_INFO *VolumeInfo)
+static VOID GetVolumeName(HANDLE Device, PWSTR VolumeName,
+ DWORD VolumeNameSize)
{
- VIRTFS *VirtFs = FileSystem->UserContext;
DWORD BytesReturned;
- NTSTATUS Status;
BOOL Result;
- FUSE_STATFS_IN statfs_in;
- FUSE_STATFS_OUT statfs_out;
- Result = DeviceIoControl(VirtFs->Device, IOCTL_VIRTFS_GET_VOLUME_NAME,
- NULL, 0, VolumeInfo->VolumeLabel, sizeof(VolumeInfo->VolumeLabel),
- &BytesReturned, NULL);
+ Result = DeviceIoControl(Device, IOCTL_VIRTFS_GET_VOLUME_NAME, NULL, 0,
+ VolumeName, VolumeNameSize, &BytesReturned, NULL);
if (Result == FALSE)
{
- lstrcpy(VolumeInfo->VolumeLabel, L"VirtFS");
+ lstrcpy(VolumeName, L"Default");
+ }
}
+static NTSTATUS GetVolumeInfo(FSP_FILE_SYSTEM *FileSystem,
+ FSP_FSCTL_VOLUME_INFO *VolumeInfo)
+{
+ VIRTFS *VirtFs = FileSystem->UserContext;
+ NTSTATUS Status;
+ FUSE_STATFS_IN statfs_in;
+ FUSE_STATFS_OUT statfs_out;
+
FUSE_HEADER_INIT(&statfs_in.hdr, FUSE_STATFS, FUSE_ROOT_ID, 0);
Status = VirtFsFuseRequest(VirtFs->Device, &statfs_in, sizeof(statfs_in),
@@ -617,6 +621,10 @@ static NTSTATUS GetVolumeInfo(FSP_FILE_SYSTEM *FileSystem,
VolumeInfo->TotalSize = kstatfs->bsize * kstatfs->blocks;
VolumeInfo->FreeSize = kstatfs->bsize * kstatfs->bavail;
+
+ GetVolumeName(VirtFs->Device, VolumeInfo->VolumeLabel,
+ sizeof(VolumeInfo->VolumeLabel));
+
VolumeInfo->VolumeLabelLength =
(UINT16)(wcslen(VolumeInfo->VolumeLabel) * sizeof(WCHAR));
}
@@ -1624,6 +1632,7 @@ static FSP_FILE_SYSTEM_INTERFACE VirtFsInterface =
static NTSTATUS SvcStart(FSP_SERVICE *Service, ULONG argc, PWSTR *argv)
{
VIRTFS *VirtFs;
+ WCHAR VolumePrefix[MAX_PATH];
FSP_FSCTL_VOLUME_PARAMS VolumeParams;
DWORD SessionId;
// PWSTR MountPoint = L"C:\\Shared Folders\\mytag";
@@ -1664,6 +1673,10 @@ static NTSTATUS SvcStart(FSP_SERVICE *Service, ULONG argc, PWSTR *argv)
return Status;
}
+ lstrcpy(VolumePrefix, L"\\VirtFS\\");
+ GetVolumeName(VirtFs->Device, VolumePrefix + lstrlen(VolumePrefix),
+ sizeof(VolumePrefix) - (lstrlen(VolumePrefix) * sizeof(WCHAR)));
+
FUSE_HEADER_INIT(&init_in.hdr, FUSE_INIT, FUSE_ROOT_ID,
sizeof(init_in.init));
|
Replace EVP_DigestFinal_ex with EVP_DigestFinal function for OpenSSL backend
The naming is confusing: actually EVP_DigestFinal does more than
EVP_DigestFinal_ex: it calls EVP_DigestFinal_ex internally, but also does some
additional cleanups and zeroing memory for security. This also brings this in
line with the BoringSSL backend. | @@ -92,7 +92,7 @@ soter_status_t soter_hash_final(soter_hash_ctx_t *hash_ctx, uint8_t* hash_value,
return SOTER_BUFFER_TOO_SMALL;
}
- if (EVP_DigestFinal_ex(hash_ctx->evp_md_ctx, hash_value, (unsigned int *)&md_length))
+ if (EVP_DigestFinal(hash_ctx->evp_md_ctx, hash_value, (unsigned int *)&md_length))
{
*hash_length = md_length;
return SOTER_SUCCESS;
|
RFE API: prefer direct connection | @@ -151,14 +151,13 @@ void serialport_close(int fd) {
}
int write_buffer(lms_device_t *dev, int fd, unsigned char* data, int size) {
- int result = 0;
- if (dev != NULL) {
- result = i2c_write_buffer(dev, data, size);
+ if (fd >= 0) { //prioritize direct connection
+ return write_buffer_fd(fd, data, size);
}
- else {
- result = write_buffer_fd(fd, data, size);
+ else if (dev != NULL){
+ return i2c_write_buffer(dev, data, size);
}
- return result;
+ return -1; //error: both dev and fd are invalid
}
int write_buffer_fd(int fd, unsigned char* c, int size)
@@ -175,14 +174,13 @@ int write_buffer_fd(int fd, unsigned char* c, int size)
int read_buffer(lms_device_t * dev, int fd, unsigned char * data, int size)
{
- int len;
- if (dev != NULL) {
- len = i2c_read_buffer(dev, data, size);
+ if (fd >= 0) { //prioritize direct connection
+ return read_buffer_fd(fd, data, size);
}
- else {
- len = read_buffer_fd(fd, data, size);
+ else if(dev != NULL){
+ return i2c_read_buffer(dev, data, size);
}
- return len;
+ return -1; //error: both dev and fd are invalid
}
int read_buffer_fd(int fd, unsigned char * data, int size)
|
use go 18 instead of 18-rc following release | @@ -241,7 +241,7 @@ services:
context: .
dockerfile: ./go/Dockerfile
args:
- GO_IMAGE_VER: golang:1.18-rc
+ GO_IMAGE_VER: golang:1.18
<<: *scope-common
# no arm64 image
|
[awm2] Update and test bind_rect_to_screen_size | @@ -970,15 +970,24 @@ impl Desktop {
*/
let mut out = r;
let desktop_size = self.desktop_frame.size;
- out.origin.x = max(r.origin.x, 0);
- out.origin.y = max(r.origin.y, 0);
+ //println!("Max of {}, {}: {}", )
+ out.origin.x = max(r.origin.x, 0_isize);
+ out.origin.y = max(r.origin.y, 0_isize);
if out.max_x() > desktop_size.width {
let overhang = out.max_x() - desktop_size.width;
+ if out.origin.x >= overhang {
out.origin.x -= overhang;
+ } else {
+ out.size.width -= overhang;
+ }
}
if out.max_y() > desktop_size.height {
let overhang = out.max_y() - desktop_size.height;
+ if out.origin.y >= overhang {
out.origin.y -= overhang;
+ } else {
+ out.size.height -= overhang;
+ }
}
out
@@ -1314,4 +1323,14 @@ mod test {
],
);
}
+
+ #[test]
+ fn test_bind_rect_to_screen_size() {
+ // Input, expected
+ let test_cases = vec![
+ (Rect::new(-10, -10, 1000, 1000), Rect::new(0, 0, 990, 990)),
+ (Rect::new(0, 0, 1200, 1200), Rect::new(0, 0, 1000, 1000)),
+ (Rect::new(100, 100, 950, 950), Rect::new(50, 50, 950, 950)),
+ ];
+ }
}
|
dm: create mevent's pipe in non-blocking mode
It was designed to be used in non-blocking mode to prevent the mevent
thread from blocking itself indefinitely, but it was created in
blocking mode.
Acked-by: Anthony Xu | #include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
+#include <fcntl.h>
#include <unistd.h>
#include <sys/epoll.h>
#include <sys/queue.h>
@@ -96,7 +97,7 @@ static void
mevent_pipe_read(int fd, enum ev_type type, void *param)
{
char buf[MEVENT_MAX];
- int status;
+ ssize_t status;
/*
* Drain the pipe read side. The fd is non-blocking so this is
@@ -247,6 +248,7 @@ mevent_add(int tfd, enum ev_type type,
ee.events = mevent_kq_filter(mevp);
ee.data.ptr = mevp;
ret = epoll_ctl(epoll_fd, EPOLL_CTL_ADD, mevp->me_fd, &ee);
+
if (ret == 0) {
mevent_qlock();
LIST_INSERT_HEAD(&global_head, mevp, me_list);
@@ -408,7 +410,7 @@ mevent_dispatch(void)
* the blocking kqueue call to exit by writing to it. Set the
* descriptor to non-blocking.
*/
- ret = pipe(mevent_pipefd);
+ ret = pipe2(mevent_pipefd, O_NONBLOCK);
if (ret < 0) {
perror("pipe");
exit(0);
@@ -427,6 +429,7 @@ mevent_dispatch(void)
* Block awaiting events
*/
ret = epoll_wait(epoll_fd, eventlist, MEVENT_MAX, -1);
+
if (ret == -1 && errno != EINTR)
perror("Error return from epoll_wait");
|
do not use libeatmydata for iOS | @@ -911,7 +911,7 @@ module _LINK_UNIT: _BASE_UNIT {
NOPLATFORM=yes
}
- when (($USE_EAT_MY_DATA == "yes") && ($WIN32 != "yes") && ($DARWIN != "yes") && ($OS_ANDROID != "yes")) {
+ when (($USE_EAT_MY_DATA == "yes") && ($WIN32 != "yes") && ($DARWIN != "yes") && ($OS_ANDROID != "yes") && ($OS_IOS != "yes")) {
PEERDIR+=contrib/libs/libeatmydata
}
|
Fix Util::plugDestination bug | @@ -926,7 +926,7 @@ plugDestination(const MPlug &plug)
MStatus status;
MPlugArray connectedPlugs;
- plug.connectedTo(connectedPlugs, true, false, &status);
+ plug.connectedTo(connectedPlugs, false, true, &status);
CHECK_MSTATUS(status);
if(!connectedPlugs.length())
|
Tweak NGTCP2_CONN_FLAG_SERVER_ADDR_VERIFIED | @@ -4659,13 +4659,13 @@ static ngtcp2_ssize conn_recv_handshake_pkt(ngtcp2_conn *conn,
switch (fr->type) {
case NGTCP2_FRAME_ACK:
case NGTCP2_FRAME_ACK_ECN:
+ if (!conn->server && hd.type == NGTCP2_PKT_HANDSHAKE) {
+ conn->flags |= NGTCP2_CONN_FLAG_SERVER_ADDR_VERIFIED;
+ }
rv = conn_recv_ack(conn, pktns, &fr->ack, pkt_ts, ts);
if (rv != 0) {
return rv;
}
- if (!conn->server && hd.type == NGTCP2_PKT_HANDSHAKE) {
- conn->flags |= NGTCP2_CONN_FLAG_SERVER_ADDR_VERIFIED;
- }
break;
case NGTCP2_FRAME_PADDING:
break;
@@ -6078,7 +6078,8 @@ static int conn_recv_handshake_done(ngtcp2_conn *conn, ngtcp2_tstamp ts) {
return 0;
}
- conn->flags |= NGTCP2_CONN_FLAG_HANDSHAKE_CONFIRMED;
+ conn->flags |= NGTCP2_CONN_FLAG_HANDSHAKE_CONFIRMED |
+ NGTCP2_CONN_FLAG_SERVER_ADDR_VERIFIED;
conn_discard_handshake_state(conn, ts);
@@ -6389,13 +6390,13 @@ conn_recv_delayed_handshake_pkt(ngtcp2_conn *conn, const ngtcp2_pkt_hd *hd,
switch (fr->type) {
case NGTCP2_FRAME_ACK:
case NGTCP2_FRAME_ACK_ECN:
+ if (!conn->server) {
+ conn->flags |= NGTCP2_CONN_FLAG_SERVER_ADDR_VERIFIED;
+ }
rv = conn_recv_ack(conn, pktns, &fr->ack, pkt_ts, ts);
if (rv != 0) {
return rv;
}
- if (!conn->server) {
- conn->flags |= NGTCP2_CONN_FLAG_SERVER_ADDR_VERIFIED;
- }
break;
case NGTCP2_FRAME_PADDING:
break;
@@ -6803,13 +6804,13 @@ static ngtcp2_ssize conn_recv_pkt(ngtcp2_conn *conn, const ngtcp2_path *path,
switch (fr->type) {
case NGTCP2_FRAME_ACK:
case NGTCP2_FRAME_ACK_ECN:
+ if (!conn->server) {
+ conn->flags |= NGTCP2_CONN_FLAG_SERVER_ADDR_VERIFIED;
+ }
rv = conn_recv_ack(conn, pktns, &fr->ack, pkt_ts, ts);
if (rv != 0) {
return rv;
}
- if (!conn->server) {
- conn->flags |= NGTCP2_CONN_FLAG_SERVER_ADDR_VERIFIED;
- }
non_probing_pkt = 1;
break;
case NGTCP2_FRAME_STREAM:
|
Reduce M487 WiFi CIPSEND AT command waiting time as 10 ms | @@ -863,7 +863,7 @@ ESP_WIFI_Status_t ESP_WIFI_Send( ESP_WIFI_Object_t * pxObj, ESP_WIFI_Conn_t * px
sprintf((char *)pxObj->CmdData + strlen((char *)pxObj->CmdData), "\r\n");
/* Must wait a period of time after the CIPSEND AT command */
- xRet = ESP_AT_Command(pxObj, pxObj->CmdData, 100);
+ xRet = ESP_AT_Command(pxObj, pxObj->CmdData, 10);
if (xRet == ESP_WIFI_STATUS_OK) {
pxObj->ActiveCmd = CMD_SEND;
|
doc: Update the grub part and add code for NVMe | @@ -117,7 +117,12 @@ the source code, build it, and install it on your device.
sudo umount /boot/efi
sudo lsblk
+
+ # For SATA
sudo mount /dev/sda1 /mnt
+ # For NVMe
+ sudo mount /dev/nvme0n1p1 /mnt
+
ls /mnt/EFI/ubuntu
You should see the following output:
@@ -136,9 +141,12 @@ the source code, build it, and install it on your device.
#. Configure the EFI firmware to boot the ACRN hypervisor by default
.. code-block:: none
-
+ # For SATA
sudo efibootmgr -c -l "\EFI\acrn\acrn.efi" -d /dev/sda -p 1 \
-L "ACRN Hypervisor" -u "bootloader=\EFI\ubuntu\grubx64.efi"
+ # For NVMe
+ sudo efibootmgr -c -l "\EFI\acrn\acrn.efi" -d /dev/nvme0n1 -p 1 \
+ -L "ACRN Hypervisor" -u "bootloader=\EFI\ubuntu\grubx64.efi"
#. Verify that the "ACRN Hypervisor" is added and make sure it will be booted first
@@ -223,6 +231,7 @@ You can download latest Service OS kernel from
.. code-block:: none
+ #GRUB_TIMEOUT_STYLE=hidden
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=false
|
Shorten the running time of gprecoverseg related test cases
Commit unexpectly cause test_fts_transitions_02 running
for a longer time, so revert related modification from it. | @@ -43,8 +43,6 @@ class GpRecoverseg():
pool = WorkerPool()
pool.addCommand(cmd)
- pool.join()
- pool.haltWork()
def run(self,option=' ', validate=True, results=True):
'''
|
INCLUDE: clap/ext/draft/file-reference.h: clarify that path should be absolute | @@ -39,8 +39,8 @@ typedef struct clap_file_reference {
size_t path_capacity; // [in] the number of bytes reserved in path
size_t path_size; // [out] the actual length of the path, can be bigger than path_capacity
- char *path; // [in,out] path to the file on the disk, must be null terminated, and may be
- // truncated if the capacity is less than the size
+ char *path; // [in,out] absolute path to the file on the disk, must be null terminated, and
+ // may be truncated if the capacity is less than the size
} clap_file_reference_t;
typedef struct clap_plugin_file_reference {
|
add test for invalid key parameters | @@ -3012,6 +3012,17 @@ gCwL7Ksyj4posAc721Rv7qmAnShJkSs5DBUyvH4px2WPgXX65G80My/4e8qz5AZJ
uYV3hp2g6nGDU/ByJ1SIaRNkh2DRIr5nbg/Eg90g/8Mb2pajGWbJqi51rQPeR+HE
TwIDAQAB
-----END PUBLIC KEY-----
+# Key with invalid negative minimum salt length
+PublicKey = RSA-PSS-BAD
+-----BEGIN PUBLIC KEY-----
+MIIBJzASBgkqhkiG9w0BAQowBaIDAgH/A4IBDwAwggEKAoIBAQDNAIHqeyrh6gbV
+n3xz2f+5SglhXC5Lp8Y2zvCN01M+wxhVJbAVx2m5mnfWclv5w1Mqm25fZifV+4UW
+B2jT3anL01l0URcX3D0wnS/EfuQfl+Mq23+d2GShxHZ6Zm7NcbwarPXnUX9LOFlP
+6psF5C1a2pkSAIAT5FMWpNm7jtCGuI0odYusr5ItRqhotIXSOcm66w4rZFknEPQr
+LR6gpLSALAvsqzKPimiwBzvbVG/uqYCdKEmRKzkMFTK8finHZY+BdfrkbzQzL/h7
+yrPkBkm5hXeGnaDqcYNT8HInVIhpE2SHYNEivmduD8SD3SD/wxvalqMZZsmqLnWt
+A95H4cRPAgMBAAE=
+-----END PUBLIC KEY-----
# Verify using default parameters
Verify = RSA-PSS-DEFAULT
@@ -3048,12 +3059,17 @@ Ctrl = digest:sha256
Result = PKEY_CTRL_ERROR
# Illegal decrypt
-
Decrypt = RSA-PSS
Result = KEYOP_INIT_ERROR
Function = EVP_PKEY_decrypt_init
Reason = operation not supported for this keytype
+# Invalid key: rejected when we try to init
+Verify = RSA-PSS-BAD
+Result = KEYOP_INIT_ERROR
+Function = rsa_pss_get_param
+Reason = invalid salt length
+
# scrypt tests from draft-josefsson-scrypt-kdf-03
PBE = scrypt
Password = ""
|
hv:add suffix(UL)for MACRO(SECURE_WORLD_ENABLED)
Now the MACRO SECURE_WORLD_ENABLED (1<<0)
Change it to 64 bit data
SECURE_WORLD_ENABLED (1UL<<0)
Acked-by: Eddie Dong | #define REQUEST_WRITE 1
/* Generic VM flags from guest OS */
-#define SECURE_WORLD_ENABLED (1<<0) /* Whether secure world is enabled */
+#define SECURE_WORLD_ENABLED (1UL<<0) /* Whether secure world is enabled */
/**
* @brief Hypercall
@@ -152,7 +152,7 @@ struct acrn_create_vm {
uint8_t GUID[16];
/* VM flag bits from Guest OS, now used
- * SECURE_WORLD_ENABLED (1<<0)
+ * SECURE_WORLD_ENABLED (1UL<<0)
*/
uint64_t vm_flag;
|
py/gc: In gc_realloc, convert pointer sanity checks to assertions.
These checks are assumed to be true in all cases where gc_realloc is
called with a valid pointer, so no need to waste code space and time
checking them in a non-debug build. | @@ -628,27 +628,18 @@ void *gc_realloc(void *ptr_in, size_t n_bytes, bool allow_move) {
void *ptr = ptr_in;
- // sanity check the ptr
- if (!VERIFY_PTR(ptr)) {
- return NULL;
- }
-
- // get first block
- size_t block = BLOCK_FROM_PTR(ptr);
-
GC_ENTER();
- // sanity check the ptr is pointing to the head of a block
- if (ATB_GET_KIND(block) != AT_HEAD) {
- GC_EXIT();
- return NULL;
- }
-
if (MP_STATE_MEM(gc_lock_depth) > 0) {
GC_EXIT();
return NULL;
}
+ // get the GC block number corresponding to this pointer
+ assert(VERIFY_PTR(ptr));
+ size_t block = BLOCK_FROM_PTR(ptr);
+ assert(ATB_GET_KIND(block) == AT_HEAD);
+
// compute number of new blocks that are requested
size_t new_blocks = (n_bytes + BYTES_PER_BLOCK - 1) / BYTES_PER_BLOCK;
|
Event queue speedup event handling | @@ -15,8 +15,11 @@ void DeRestPluginPrivate::initEventQueue()
*/
void DeRestPluginPrivate::eventQueueTimerFired()
{
- DBG_Assert(!eventQueue.empty());
+ int maxEvents = 10;
+ while (maxEvents > 0 && !eventQueue.empty())
+ {
+ maxEvents--;
const Event &e = eventQueue.front();
if (e.resource() == RSensors)
@@ -40,7 +43,6 @@ void DeRestPluginPrivate::eventQueueTimerFired()
if (device)
{
device->handleEvent(e);
-
}
// hack to forward first sub device name to core to show it as node name
@@ -61,6 +63,7 @@ void DeRestPluginPrivate::eventQueueTimerFired()
handleRuleEvent(e);
eventQueue.pop_front();
+ }
if (!eventQueue.empty())
{
|
toml: Expected boolean values now stricter.
On writing, a `boolean` typed key must now be either 0 or 1, otherwise
an error will be emitted. | #include <string.h>
#include "error.h"
+#include "integer.h"
#include "node.h"
#include "prepare.h"
#include "type.h"
#include "utility.h"
#include "write.h"
-#include "integer.h"
typedef enum
{
@@ -75,7 +75,6 @@ static bool isListElement (Node * node);
static bool isLastChild (Node * node);
static bool hasInlineComment (Node * node);
static bool isMultilineString (const char * str);
-static bool isTrue (const char * boolStr);
int tomlWrite (KeySet * keys, Key * parent)
{
@@ -423,7 +422,19 @@ static int writeScalar (Key * key, Writer * writer)
if (type != NULL && elektraStrCmp (keyString (type), "boolean") == 0)
{
- result |= fputs (isTrue (valueStr) ? "true" : "false", writer->f) == EOF;
+ if (elektraStrCmp (valueStr, "0") == 0)
+ {
+ result |= fputs ("false", writer->f) == EOF;
+ }
+ else if (elektraStrCmp (valueStr, "1") == 0)
+ {
+ result |= fputs ("true", writer->f) == EOF;
+ }
+ else
+ {
+ writerError(writer, ERROR_SYNTACTIC, "Expected a boolean value of either 0 or 1, but got %s", valueStr);
+ result = 1;
+ }
}
else if (type != NULL && elektraStrCmp (keyString (type), "string") == 0)
{
@@ -455,18 +466,6 @@ static int writeQuoted (const char * value, char quoteChar, int quouteCount, Wri
return result;
}
-static bool isTrue (const char * boolStr)
-{
- if (elektraStrCmp (boolStr, "true") == 0 || elektraStrCmp (boolStr, "1") == 0)
- {
- return true;
- }
- else
- {
- return false;
- }
-}
-
static bool isMultilineString (const char * str)
{
while (*str != 0)
|
in_event_type: set correct span_id length and event type | #include <cmetrics/cmt_histogram.h>
#define CALLBACK_TIME 2
+#define OTEL_SPAN_ID_LEN 8
struct event_type {
int coll_fd;
int type;
};
+static struct ctrace_id *create_random_span_id()
+{
+ char *buf;
+ ssize_t ret;
+ struct ctrace_id *cid;
+
+ buf = calloc(1, OTEL_SPAN_ID_LEN);
+ if (!buf) {
+ ctr_errno();
+ return NULL;
+ }
+
+ ret = ctr_random_get(buf, OTEL_SPAN_ID_LEN);
+ if (ret < 0) {
+ free(buf);
+ return NULL;
+ }
+
+ cid = ctr_id_create(buf, OTEL_SPAN_ID_LEN);
+ free(buf);
+
+ return cid;
+
+}
+
static int send_logs(struct flb_input_instance *ins)
{
int ret;
@@ -211,7 +237,7 @@ static int send_traces(struct flb_input_instance *ins)
trace_id = ctr_id_create_random();
/* generate a random ID for the new span */
- span_id = ctr_id_create_random();
+ span_id = create_random_span_id();
/* Create a root span */
span_root = ctr_span_create(ctx, scope_span, "main", NULL);
@@ -277,7 +303,7 @@ static int send_traces(struct flb_input_instance *ins)
/* delete old span id and generate a new one */
ctr_id_destroy(span_id);
- span_id = ctr_id_create_random();
+ span_id = create_random_span_id();
ctr_span_set_span_id_with_cid(span_child, span_id);
/* destroy the IDs since is not longer needed */
@@ -289,7 +315,7 @@ static int send_traces(struct flb_input_instance *ins)
/* create a Link (no valid IDs of course) */
trace_id = ctr_id_create_random();
- span_id = ctr_id_create_random();
+ span_id = create_random_span_id();
link = ctr_link_create_with_cid(span_child, trace_id, span_id);
ctr_link_set_trace_state(link, "aaabbbccc");
@@ -358,12 +384,15 @@ static int cb_event_type_init(struct flb_input_instance *ins,
if (tmp) {
if (strcasecmp(tmp, "logs") == 0) {
ctx->type = FLB_EVENT_TYPE_LOGS;
+ ins->event_type = FLB_INPUT_LOGS;
}
else if (strcasecmp(tmp, "metrics") == 0) {
ctx->type = FLB_EVENT_TYPE_METRICS;
+ ins->event_type = FLB_INPUT_METRICS;
}
else if (strcasecmp(tmp, "traces") == 0) {
ctx->type = FLB_EVENT_TYPE_TRACES;
+ ins->event_type = FLB_INPUT_TRACES;
}
}
|
Have "wuffs gen" call "git rev-parse HEAD" | @@ -17,7 +17,6 @@ package main
import (
"bytes"
"fmt"
- "io/ioutil"
"os"
"os/exec"
"path/filepath"
@@ -26,8 +25,8 @@ import (
)
func genrelease(wuffsRoot string, langs []string, v cf.Version) error {
- revision := findRevision(wuffsRoot)
- gitRevListCount := findGitRevListCount(wuffsRoot)
+ revision := runGitCommand(wuffsRoot, "rev-parse", "HEAD")
+ gitRevListCount := runGitCommand(wuffsRoot, "rev-list", "--count", "HEAD")
for _, lang := range langs {
filename, contents, err := genreleaseLang(wuffsRoot, revision, gitRevListCount, v, lang)
if err != nil {
@@ -73,48 +72,10 @@ func genreleaseLang(wuffsRoot string, revision string, gitRevListCount string, v
return filepath.Join(wuffsRoot, "release", lang, base+"."+lang), stdout.Bytes(), nil
}
-func findRevision(wuffsRoot string) string {
- // Assume that we're using git.
-
- head, err := ioutil.ReadFile(filepath.Join(wuffsRoot, ".git", "HEAD"))
- if err != nil {
- return ""
- }
- refPrefix := []byte("ref: ")
- if !bytes.HasPrefix(head, refPrefix) {
- return ""
- }
- head = head[len(refPrefix):]
- if len(head) == 0 || head[len(head)-1] != '\n' {
- return ""
- }
- head = head[:len(head)-1]
-
- ref, err := ioutil.ReadFile(filepath.Join(wuffsRoot, ".git", string(head)))
- if err != nil {
- return ""
- }
- if len(ref) == 0 || ref[len(ref)-1] != '\n' {
- return ""
- }
- ref = ref[:len(ref)-1]
-
- return string(ref)
-}
-
-func findGitRevListCount(wuffsRoot string) string {
- // Assume that we're using git.
-
- wd, err := os.Getwd()
- if err != nil {
- return ""
- }
- if err := os.Chdir(wuffsRoot); err != nil {
- return ""
- }
- defer os.Chdir(wd)
-
- out, err := exec.Command("git", "rev-list", "--count", "HEAD").Output()
+func runGitCommand(wuffsRoot string, cmdArgs ...string) string {
+ cmd := exec.Command("git", cmdArgs...)
+ cmd.Dir = wuffsRoot
+ out, err := cmd.Output()
if err != nil {
return ""
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.