message
stringlengths
6
474
diff
stringlengths
8
5.22k
Add check on argument parser
@@ -48,11 +48,11 @@ def parse_bip32_path(path): parser = argparse.ArgumentParser() -parser.add_argument('--nonce', help="Nonce associated to the account") -parser.add_argument('--gasprice', help="Network gas price") -parser.add_argument('--startgas', help="startgas", default='21000') -parser.add_argument('--amount', help="Amount to send in ether") -parser.add_argument('--to', help="Destination address") +parser.add_argument('--nonce', help="Nonce associated to the account", type=int, required=True) +parser.add_argument('--gasprice', help="Network gas price", type=int, required=True) +parser.add_argument('--startgas', help="startgas", default='21000', type=int) +parser.add_argument('--amount', help="Amount to send in ether", type=int, required=True) +parser.add_argument('--to', help="Destination address", type=str, required=True) parser.add_argument('--path', help="BIP 32 path to sign with") parser.add_argument('--data', help="Data to add, hex encoded") args = parser.parse_args()
[scons] remove check whether exist group library.
@@ -585,14 +585,6 @@ def DefineGroup(name, src, depend, **parameters): if os.path.exists(fn): os.unlink(fn) - # check whether exist group library - if not GetOption('buildlib') and os.path.exists(os.path.join(group['path'], GroupLibFullName(name, Env))): - group['src'] = [] - if group.has_key('LIBS'): group['LIBS'] = group['LIBS'] + [GroupLibName(name, Env)] - else : group['LIBS'] = [GroupLibName(name, Env)] - if group.has_key('LIBPATH'): group['LIBPATH'] = group['LIBPATH'] + [GetCurrentDir()] - else : group['LIBPATH'] = [GetCurrentDir()] - if group.has_key('LIBS'): Env.AppendUnique(LIBS = group['LIBS']) if group.has_key('LIBPATH'):
[modify] internal function 'isdigit' name to '_ISDIGIT'
@@ -543,7 +543,7 @@ void rt_show_version(void) RTM_EXPORT(rt_show_version); /* private function */ -#define isdigit(c) ((unsigned)((c) - '0') < 10) +#define _ISDIGIT(c) ((unsigned)((c) - '0') < 10) #ifdef RT_PRINTF_LONGLONG rt_inline int divide(long long *n, int base) @@ -588,7 +588,7 @@ rt_inline int divide(long *n, int base) rt_inline int skip_atoi(const char **s) { register int i = 0; - while (isdigit(**s)) + while (_ISDIGIT(**s)) i = i * 10 + *((*s)++) - '0'; return i; @@ -834,7 +834,7 @@ rt_int32_t rt_vsnprintf(char *buf, /* get field width */ field_width = -1; - if (isdigit(*fmt)) field_width = skip_atoi(&fmt); + if (_ISDIGIT(*fmt)) field_width = skip_atoi(&fmt); else if (*fmt == '*') { ++ fmt; @@ -853,7 +853,7 @@ rt_int32_t rt_vsnprintf(char *buf, if (*fmt == '.') { ++ fmt; - if (isdigit(*fmt)) precision = skip_atoi(&fmt); + if (_ISDIGIT(*fmt)) precision = skip_atoi(&fmt); else if (*fmt == '*') { ++ fmt;
Fix out-of-date assert
@@ -807,7 +807,9 @@ void compute_ideal_weights_for_decimation_table( // TODO: Use SIMD copies? for (int i = 0; i < texel_count_simd; i++) { - assert(i == dt.weight_texel[0][i]); + // Assert it's an identity map for valid texels, and last valid value for any overspill + assert((i < texel_count) && (i == dt.weight_texel[0][i]) || + (i >= texel_count) && (texel_count - 1 == dt.weight_texel[0][i])); weight_set[i] = eai_in.weights[i]; weights[i] = eai_in.weight_error_scale[i];
Fixed deprecated mark_to_drop usage in l3-routing-full
@@ -64,7 +64,7 @@ control ingress(inout headers hdr, inout metadata meta, inout standard_metadata_ hdr.ipv4.ttl = hdr.ipv4.ttl + 8w0xff; } @name("._drop") action _drop() { - mark_to_drop(); + mark_to_drop(standard_metadata); } @name(".forward") action forward(bit<48> dmac_val, bit<48> smac_val, bit<9> port) { hdr.ethernet.dstAddr = dmac_val;
Add benchmarks for async calls in nodejs.
@@ -145,6 +145,81 @@ BENCHMARK_REGISTER_F(metacall_node_call_bench, call_array_args) ->Iterations(1) ->Repetitions(3); +BENCHMARK_DEFINE_F(metacall_node_call_bench, call_async)(benchmark::State & state) +{ + const int64_t call_count = 100000; + const int64_t call_size = sizeof(double) * 3; // (double, double) -> double + + for (auto _ : state) + { + /* NodeJS */ + #if defined(OPTION_BUILD_LOADERS_NODE) + { + void * ret; + + state.PauseTiming(); + + void * args[2] = + { + metacall_value_create_double(0.0), + metacall_value_create_double(0.0) + }; + + state.ResumeTiming(); + + for (int64_t it = 0; it < call_count; ++it) + { + benchmark::DoNotOptimize(ret = metacall_await("int_mem_async_type", args, [](void * result, void * data) -> void * { + benchmark::State * state = static_cast<benchmark::State *>(data); + + if (metacall_value_to_double(result) != 0.0) + { + state->SkipWithError("Invalid return value from int_mem_async_type"); + } + + state->PauseTiming(); + + return NULL; + }, NULL, static_cast<void *>(&state))); + + if (ret == NULL) + { + state.SkipWithError("Null return value from int_mem_async_type"); + } + + if (metacall_value_id(ret) != METACALL_FUTURE) + { + state.SkipWithError("Invalid return type from int_mem_async_type"); + } + + metacall_value_destroy(ret); + + state.ResumeTiming(); + } + + state.PauseTiming(); + + for (auto arg : args) + { + metacall_value_destroy(arg); + } + + state.ResumeTiming(); + } + #endif /* OPTION_BUILD_LOADERS_NODE */ + } + + state.SetLabel("MetaCall NodeJS Call Benchmark - Async Call"); + state.SetBytesProcessed(call_size * call_count); + state.SetItemsProcessed(call_count); +} + +BENCHMARK_REGISTER_F(metacall_node_call_bench, call_async) + ->Threads(1) + ->Unit(benchmark::kMillisecond) + ->Iterations(1) + ->Repetitions(3); + /* TODO: NodeJS re-initialization */ /* BENCHMARK_MAIN(); */ @@ -177,7 +252,10 @@ int main(int argc, char ** argv) static const char int_mem_type[] = "#!/usr/bin/env node\n" - "module.exports = { int_mem_type: (left, right) => 0 };\n"; + "module.exports = {\n" + " int_mem_type: (left, right) => 0,\n" + " int_mem_async_type: async (left, right) => new Promise(resolve => 0),\n" + "};\n"; if (metacall_load_from_memory(tag, int_mem_type, sizeof(int_mem_type), NULL) != 0) {
On OSX don't use atexit() to destroy context. Unlike on Linux, on OSX destructor registered by pthread_key_create seems to be run for the main thread.
@@ -137,8 +137,10 @@ struct dill_ctx *dill_ctx_init(void) { dill_assert(rc == 0); if(dill_ismain()) { dill_main = &dill_ctx_; +#if !defined __APPLE__ rc = atexit(dill_ctx_atexit); dill_assert(rc == 0); +#endif } rc = pthread_setspecific(dill_key, &dill_ctx_); dill_assert(rc == 0); @@ -184,8 +186,10 @@ struct dill_ctx *dill_getctx_(void) { dill_ctx_init_(ctx); if(dill_ismain()) { dill_main = ctx; +#if !defined __APPLE__ rc = atexit(dill_ctx_atexit); dill_assert(rc == 0); +#endif } rc = pthread_setspecific(dill_key, ctx); dill_assert(rc == 0);
Use aggregate context
@@ -209,7 +209,7 @@ hashed_topk_agg_weighted_trans(PG_FUNCTION_ARGS) if (!AggCheckCallContext(fcinfo, &context)) elog(ERROR, "hashed_topk_agg_weighted_trans called in non-aggregate context"); - old = MemoryContextSwitchTo(CacheMemoryContext); + old = MemoryContextSwitchTo(context); if (PG_ARGISNULL(0)) {
Define state-set with enums. Report pin number when pin already opened
#endif -#define IOT_GPIO_CLOSED ( ( uint8_t ) 0 ) -#define IOT_GPIO_OPENED ( ( uint8_t ) 1 ) +typedef enum +{ + IOT_GPIO_CLOSED = 0u, + IOT_GPIO_OPENED = 1u +} IotGpioState_t; typedef struct { @@ -486,7 +489,7 @@ IotGpioHandle_t iot_gpio_open( int32_t lGpioNumber ) } else { - IOT_GPIO_LOG( " Cannot open. GPIO[%d] is already opened\r\n" ); + IOT_GPIO_LOGF( " Cannot open. GPIO[%d] is already opened\r\n", lGpioNumber ); } } else
Renamed configure option --no-unix-domain to --no-unix-sockets.
@@ -57,7 +57,7 @@ do --debug) NXT_DEBUG=YES ;; --no-ipv6) NXT_INET6=NO ;; - --no-unix-domain) NXT_UNIX_DOMAIN=NO ;; + --no-unix-sockets) NXT_UNIX_DOMAIN=NO ;; --pcre) NXT_PCRE=YES ;;
lib/options.h: always show FTPS if FTPS support is not available gftp will just fail to connect to server with a error msg
@@ -251,19 +251,14 @@ gftp_config_vars gftp_global_config_vars[] = supported_gftp_protocols gftp_protocols[] = { { "FTP", rfc959_init, rfc959_register_module, "ftp", 21, 1, 1}, - -#ifdef USE_SSL { "FTPS", ftps_init, ftps_register_module, "ftps", 21, 1, 1}, -#else - { "FTPS", ftps_init, ftps_register_module, "ftps", 21, 0, 1}, -#endif { "Local", local_init, local_register_module, "file", 0, 0, 0}, /* hidden */ { "SSH2", sshv2_init, sshv2_register_module, "ssh2", 22, 1, 1}, - {N_("Bookmark"), bookmark_init, bookmark_register_module, "bookmark", 0, 0, 0}, /* hidden */ - {N_("FSP"), fsp_init, fsp_register_module, "fsp", 21, 1, 1}, + { "Bookmark", bookmark_init, bookmark_register_module, "bookmark", 0, 0, 0}, /* hidden */ + { "FSP", fsp_init, fsp_register_module, "fsp", 21, 1, 1}, {NULL, NULL, NULL, NULL, 0, 0, 0} };
Utility: Use correct function name in test
@@ -76,7 +76,7 @@ static void test_elektraRstrip () static void test_ElektraStrip () { - printf ("Test strip\n"); + printf ("Test elektraStrip\n"); char text[MAX_LENGTH]; strncpy (text, "", MAX_LENGTH);
test with 2.3pre
Summary: Application and environment virtualization Name: %{pname}%{PROJ_DELIM} -Version: 2.2.1 +Version: 2.3pre Release: %{_rel}%{?dist} # https://spdx.org/licenses/BSD-3-Clause-LBNL.html License: BSD-3-Clause-LBNL Group: %{PROJ_NAME}/runtimes URL: http://singularity.lbl.gov/ -Source: https://github.com/singularityware/singularity/releases/download/%{version}/%{pname}-%{version}.tar.gz -Source1: build-zypper.sh -Source2: sles.def -Patch1: singularity-makefile.patch +#Source: https://github.com/singularityware/singularity/releases/download/%{version}/%{pname}-%{version}.tar.gz +Source: https://github.com/crbaird/singularity/archive/%{version}.tar.gz +#Source1: build-zypper.sh +#Source2: sles.def +#Patch1: singularity-makefile.patch ExclusiveOS: linux BuildRoot: %{?_tmppath}%{!?_tmppath:/var/tmp}/%{pname}-%{version}-%{release}-root +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: libtool +BuildRequires: python %description Singularity provides functionality to build the smallest most minimal @@ -44,12 +49,13 @@ Development files for Singularity %prep %setup -q -n %{pname}-%{version} -%patch1 -p1 +#%patch1 -p1 %build -cp %SOURCE1 libexec/bootstrap/modules-v2/. -cp %SOURCE2 examples/. +#cp %SOURCE1 libexec/bootstrap/modules-v2/. +#cp %SOURCE2 examples/. +./autogen.sh %configure --disable-static --with-pic %{__make} %{?mflags} @@ -73,6 +79,7 @@ rm -rf $RPM_BUILD_ROOT %attr(0755, root, root) %dir %{_sysconfdir}/singularity %attr(0644, root, root) %config(noreplace) %{_sysconfdir}/singularity/* %dir %{_libexecdir}/singularity +%dir %{_libexecdir}/singularity/defaults %attr(4755, root, root) %{_libexecdir}/singularity/sexec-suid %{_libexecdir}/singularity/bootstrap %{_libexecdir}/singularity/cli @@ -82,14 +89,12 @@ rm -rf $RPM_BUILD_ROOT %{_libexecdir}/singularity/image-handler.sh %{_libexecdir}/singularity/sexec %{_libexecdir}/singularity/functions -%{_libexecdir}/singularity/image-bind -%{_libexecdir}/singularity/image-create -%{_libexecdir}/singularity/image-expand -%{_libexecdir}/singularity/image-mount +%{_libexecdir}/singularity/simage +%{_libexecdir}/singularity/defaults/* %{_bindir}/singularity %{_bindir}/run-singularity %{_mandir}/man1/* -%{_libdir}/lib*.so.* +%{_libdir}/lib*.so %{_sysconfdir}/bash_completion.d/singularity @@ -97,7 +102,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-, root, root) %{_libdir}/lib*.so #%{_libdir}/lib*.a -%{_includedir}/*.h +%{_includedir}/*
doc: update the directory to "~/"
@@ -236,7 +236,7 @@ For the User OS, we are using the same `Clear Linux`_ release version as the Ser .. code-block:: none - cd /root/ + cd ~ wget https://download.clearlinux.org/releases/26440/clear/clear-26440-kvm.img.xz unxz clear-26440-kvm.img.xz @@ -280,11 +280,11 @@ For the User OS, we are using the same `Clear Linux`_ release version as the Ser .. code-block:: none - -s 3,virtio-blk,/root/clear-26440-kvm.img + -s 3,virtio-blk,~/clear-26440-kvm.img -k /lib/modules/kernel/default-iot-lts2018 .. note:: - The image of UOS can be stored in other directories instead of ``/root/``, + The image of UOS can be stored in other directories instead of ``~/``, and please remember to modify the directory of image in ``launch_uos.sh`` too. Start the User OS (UOS)
Solve funchook dependency error.
@@ -28,6 +28,8 @@ elseif(APPLE) set(FUNCHOOK_LIBRARY_INSTALL_SUFFIX "so") endif() +set(FUNCHOOK_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/funchook/src/funchook") + if(WIN32) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/download.bat.in ${CMAKE_CURRENT_BINARY_DIR}/download.bat @ONLY) set(FUNCHOOK_DOWNLOAD_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/download.bat) @@ -40,10 +42,9 @@ else() set(FUNCHOOK_INSTALL_DIR "${CMAKE_BINARY_DIR}") endif() -set(FUNCHOOK_SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/funchook/src/funchook") set(FUNCHOOK_INCLUDE_DIR "${FUNCHOOK_SOURCE_DIR}/include") -set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_INSTALL_DIR}/${FUNCHOOK_LIBRARY_PREFIX}funchook.${FUNCHOOK_LIBRARY_SUFFIX}") -set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_INSTALL_DIR}/${FUNCHOOK_LIBRARY_PREFIX}funchook.${FUNCHOOK_LIBRARY_INSTALL_SUFFIX}") +set(FUNCHOOK_LIBRARY_DIR "${FUNCHOOK_SOURCE_DIR}/${FUNCHOOK_LIBRARY_PREFIX}funchook.${FUNCHOOK_LIBRARY_SUFFIX}") +set(FUNCHOOK_LIBRARY_INSTALL_DIR "${FUNCHOOK_SOURCE_DIR}/${FUNCHOOK_LIBRARY_PREFIX}funchook.${FUNCHOOK_LIBRARY_INSTALL_SUFFIX}") ExternalProject_Add( ${target_depends} @@ -61,13 +62,6 @@ ExternalProject_Add( LOG_INSTALL ON ) -# Library -install(FILES - ${FUNCHOOK_LIBRARY_INSTALL_DIR} - DESTINATION ${INSTALL_LIB} - COMPONENT runtime -) - # # Library name and options # @@ -271,6 +265,13 @@ target_link_libraries(${target} # Deployment # +# Dependency +install(FILES + ${FUNCHOOK_LIBRARY_INSTALL_DIR} + DESTINATION ${INSTALL_LIB} + COMPONENT runtime +) + # Library install(TARGETS ${target} EXPORT "${target}-export" COMPONENT dev
zlclear done!
@@ -61,11 +61,6 @@ typedef struct _zl int x_mode; int x_modearg; t_outlet *x_out2; - - //storing init data to reinit on zlclear - t_symbol *x_initmode; - int x_initargc; - t_atom *x_initargv; } t_zl; typedef struct _zlproxy @@ -964,8 +959,8 @@ static void zl_free(t_zl *x) zldata_free(&x->x_inbuf1); zldata_free(&x->x_inbuf2); zldata_free(&x->x_outbuf); - freebytes(x->x_initargv, x->x_initargc * sizeof(t_atom)); - if (x->x_proxy) pd_free((t_pd *)x->x_proxy); + if(x->x_proxy) + pd_free((t_pd *)x->x_proxy); } static void zl_mode(t_zl *x, t_symbol *s, int ac, t_atom *av){ @@ -1039,15 +1034,6 @@ static void *zl_new(t_symbol *s, int argc, t_atom *argv){ zldata_init(&x->x_inbuf1); zldata_init(&x->x_inbuf2); zldata_init(&x->x_outbuf); - - x->x_initmode = s; - x->x_initargc = argc - size_arg - size_attr; - x->x_initargv = (t_atom *)getbytes(x->x_initargc * sizeof(t_atom)); - for(i=0;i < x->x_initargc; i++) - { - if(argv[size_arg+i].a_type == A_FLOAT) SETFLOAT(&x->x_initargv[i], argv[size_arg+i].a_w.w_float); - else if (argv[size_arg+i].a_type == A_SYMBOL) SETSYMBOL(&x->x_initargv[i], argv[size_arg+i].a_w.w_symbol); - }; zl_mode(x, s, argc - size_arg - size_attr, argv + size_arg); inlet_new((t_object *)x, (t_pd *)y, 0, 0); outlet_new((t_object *)x, &s_anything); @@ -1113,13 +1099,10 @@ static void zl_zlmaxsize(t_zl *x, t_floatarg f) }; } -static void zl_zlclear(t_zl *x) -{ +static void zl_zlclear(t_zl *x){ zldata_init(&x->x_inbuf1); zldata_init(&x->x_inbuf2); zldata_init(&x->x_outbuf); - zl_mode(x, x->x_initmode, x->x_initargc, x->x_initargv); - } void zl_setup(void){
dm: ioc: clean up assert This patch is to clean up assert from ioc
#include <stdio.h> #include <stdlib.h> #include <unistd.h> -#include <assert.h> #include <errno.h> #include <fcntl.h> #include <pty.h> @@ -1329,7 +1328,6 @@ ioc_rx_thread(void *arg) struct ioc_dev *ioc = (struct ioc_dev *) arg; struct cbc_request *req = NULL; struct cbc_pkt packet; - int err; memset(&packet, 0, sizeof(packet)); packet.cfg = &ioc->rx_config; @@ -1338,8 +1336,7 @@ ioc_rx_thread(void *arg) for (;;) { pthread_mutex_lock(&ioc->rx_mtx); while (SIMPLEQ_EMPTY(&ioc->rx_qhead)) { - err = pthread_cond_wait(&ioc->rx_cond, &ioc->rx_mtx); - assert(err == 0); + pthread_cond_wait(&ioc->rx_cond, &ioc->rx_mtx); if (ioc->closing) goto exit; } @@ -1382,7 +1379,6 @@ ioc_tx_thread(void *arg) struct ioc_dev *ioc = (struct ioc_dev *) arg; struct cbc_request *req = NULL; struct cbc_pkt packet; - int err; memset(&packet, 0, sizeof(packet)); packet.cfg = &ioc->tx_config; @@ -1391,8 +1387,7 @@ ioc_tx_thread(void *arg) for (;;) { pthread_mutex_lock(&ioc->tx_mtx); while (SIMPLEQ_EMPTY(&ioc->tx_qhead)) { - err = pthread_cond_wait(&ioc->tx_cond, &ioc->tx_mtx); - assert(err == 0); + pthread_cond_wait(&ioc->tx_cond, &ioc->tx_mtx); if (ioc->closing) goto exit; }
Downgrade debug printout in AuthTokensController from info to trace
@@ -17,7 +17,7 @@ namespace ARIASDK_NS_BEGIN { AuthTokensController::~AuthTokensController() { - LOG_INFO("destructor"); + LOG_TRACE("destructor"); } status_t AuthTokensController::SetTicketToken(TicketType type, char const* tokenValue)
esp8266/modnetwork: Raise ValueError when getting invalid WLAN id. Instead of crashing due to out-of-bounds array access. Fixes
@@ -65,6 +65,9 @@ STATIC mp_obj_t get_wlan(size_t n_args, const mp_obj_t *args) { int idx = 0; if (n_args > 0) { idx = mp_obj_get_int(args[0]); + if (idx < 0 || idx >= sizeof(wlan_objs)) { + mp_raise_ValueError(NULL); + } } return MP_OBJ_FROM_PTR(&wlan_objs[idx]); }
build: add python3-pip dependency python3 pip module is missing on a new Ubuntu installation Type: fix
@@ -70,7 +70,7 @@ DEB_DEPENDS += python3-all python3-setuptools check DEB_DEPENDS += libffi-dev python3-ply DEB_DEPENDS += cmake ninja-build uuid-dev python3-jsonschema python3-yaml DEB_DEPENDS += python3-venv # ensurepip -DEB_DEPENDS += python3-dev # needed for python3 -m pip install psutil +DEB_DEPENDS += python3-dev python3-pip DEB_DEPENDS += libnl-3-dev libnl-route-3-dev libmnl-dev # DEB_DEPENDS += enchant # for docs DEB_DEPENDS += python3-virtualenv
Fix target_nowait test to avoid testing for scalar var race
@@ -35,20 +35,16 @@ int main(){ long long n1 = n-10; double *z = new double[n]; // just to create some extra work double scalar = -1.0; - int scalar_err = 0; printf("Now going into parallel\n"); fflush(stdout); #pragma omp parallel num_threads(10) { - // #pragma omp masked // teams distribute if (omp_get_thread_num() == 0) { printf("Thread 0 is going to launch a kernel\n"); fflush(stdout); - // nowait means: create a target task - // Thread 0 will be stuck waiting for the target region to complete - // it does not mean it continues executing - #pragma omp target nowait map(tofrom:z[:n1], scalar) map(to: v1[0:n1]) map(to: v2[0:n1]) map(from: vxv[0:n1]) + + #pragma omp target teams distribute parallel for nowait map(tofrom:z[:n1], scalar) map(to: v1[0:n1]) map(to: v2[0:n1]) map(from: vxv[0:n1]) for(long long i = 0; i < n1; i++) { z[i] = v1[i]*v2[i]; z[i] *= -1.0; @@ -78,17 +74,9 @@ int main(){ vxv[i] = v1[i]*v2[i]; } - // ideally, scalar is not visible by thread 1 until the implicit barrier at the end of the parallel - // region, due to weak memory consistency. However, this depends on how asynchronous execution - // is actually implemented - if (omp_get_thread_num() == 1 && scalar != -1.0) { - scalar_err = 1; - printf("scalar was modified by target region: might indicate nowait isn't working properly\n"); - fflush(stdout); - } printf("Thread %d done with host for loop\n", omp_get_thread_num()); fflush(stdout); } // implicit barrier will wait for target region to complete - return scalar_err || check(n, vxv, v1, v2); + return check(n, vxv, v1, v2); }
Travis CI: install python3-wheel.
@@ -17,6 +17,7 @@ pushd "$DEPS_DIR" graphviz \ python-dev \ python3-setuptools \ + python3-wheel \ ruby-dev \ php-dev \ liblua5.3-dev \
Update COMPILE.md just wanted to clarify the info about which flags to use for aarch64 builds a little bit
@@ -25,7 +25,7 @@ sudo make install sudo systemctl restart systemd-binfmt ``` - _For Pi4. Change to RPI2 or RPI3 for other models. Change to RPI4ARM64 for compiling on arm64. (armhf multiarch or chroot required alongside armhf gcc. Install it with 'sudo apt install gcc-arm-linux-gnueabihf'.)_ + _For Pi4. Change to RPI2 or RPI3 for other models. Change `-DRPI4=1` to `-DRPI4ARM64=1` for compiling on arm64. (armhf multiarch or chroot required alongside armhf gcc. Install it with 'sudo apt install gcc-arm-linux-gnueabihf'.)_ #### for ODROID
[core] better trace if TLS received on clear port
@@ -751,7 +751,9 @@ static int connection_handle_read_state(connection * const con) { * or HTTP/2 pseudo-header beginning with ':' */ /*(TLS handshake begins with SYN 0x16 (decimal 22))*/ log_error(r->conf.errh, __FILE__, __LINE__, "%s", - "invalid request-line -> sending Status 400"); + c->mem->ptr[c->offset] == 0x16 + ? "unexpected TLS ClientHello on clear port" + : "invalid request-line -> sending Status 400"); r->http_status = 400; /* Bad Request */ r->keep_alive = 0; connection_set_state(r, CON_STATE_REQUEST_END);
Properly handle a partial block in OCB mode If we have previously been passed a partial block in an "Update" call then make sure we properly increment the output buffer when we use it. Fixes
@@ -2587,6 +2587,8 @@ static int aes_ocb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, } written_len = AES_BLOCK_SIZE; *buf_len = 0; + if (out != NULL) + out += AES_BLOCK_SIZE; } /* Do we have a partial block to handle at the end? */
apps: fix Camellia CBC performance loop
@@ -2114,7 +2114,7 @@ int speed_main(int argc, char **argv) if (doit[algindex]) { int st = 1; - keylen = 16 + i * 8; + keylen = 16 + k * 8; for (i = 0; st && i < loopargs_len; i++) { loopargs[i].ctx = init_evp_cipher_ctx(names[algindex], key32, keylen);
build UPDATE enable pedantic compilation
@@ -72,7 +72,7 @@ set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION} set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION}) # global C flags -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -std=c11") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wpedantic -std=c11") include_directories(${PROJECT_BINARY_DIR}/src ${PROJECT_SOURCE_DIR}/src)
qlog: require python3 for the adapter
-#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (c) 2020 Fastly, Toru Maesaka # @@ -29,7 +29,7 @@ def handle_packet_received(events, idx): frames = [] for i in range(idx+1, len(events)): ev = events[i] - if ev["type"] == "packet-prepare" or QLOG_EVENT_HANDLERS.has_key(ev["type"]): + if ev["type"] == "packet-prepare" or ev["type"] in QLOG_EVENT_HANDLERS: break handler = FRAME_EVENT_HANDLERS.get(ev["type"]) if handler:
util/dofile.pl: require Text::Template 1.46 or newer The reason is that we override Text::Template::append_text_to_output(), and it didn't exist before Text::Template 1.46. Fixes
@@ -40,7 +40,7 @@ package OpenSSL::Template; use File::Basename; use File::Spec::Functions; use lib "$FindBin::Bin/perl"; -use with_fallback qw(Text::Template); +use with_fallback "Text::Template 1.46"; #use parent qw/Text::Template/; use vars qw/@ISA/;
nimble/ll: Fix error code on connection update request If features has been exchanged and it is already known that peer does not support Connection Parameters Request procedure, controller shall return command status with code (0x1A) according to spec Bluetoot 5.0 Vol 6, 5.1.7 It fixes LL/CON/SLA/BV-86
@@ -853,7 +853,7 @@ ble_ll_conn_hci_update(uint8_t *cmdbuf) /* See if this feature is supported on both sides */ if ((connsm->conn_features & BLE_LL_FEAT_CONN_PARM_REQ) == 0) { if (connsm->conn_role == BLE_LL_CONN_ROLE_SLAVE) { - return BLE_ERR_CMD_DISALLOWED; + return BLE_ERR_UNSUPP_REM_FEATURE; } ctrl_proc = BLE_LL_CTRL_PROC_CONN_UPDATE; } else {
OcCompressionLib: Fix signedness issues closes acidanthera/bugtracker#833
@@ -78,7 +78,7 @@ DecompressMaskedRLE24 ( // // Early exit on not enough bytes to fill. // - if (DstEnd - DstCur < ControlValue * sizeof (UINT32)) { + if ((UINT32) (DstEnd - DstCur) < ControlValue * sizeof (UINT32)) { return 0; } @@ -93,7 +93,7 @@ DecompressMaskedRLE24 ( // // Early exit on not enough bytes to read or fill. // - if (SrcEnd - Src < ControlValue || DstEnd - DstCur < ControlValue * sizeof (UINT32)) { + if ((UINT32) (SrcEnd - Src) < ControlValue || DstEnd - DstCur < ControlValue * sizeof (UINT32)) { return 0; }
acl: fix unresolved symbol for format_fib_prefix in vat plugin Type: fix
@@ -129,18 +129,18 @@ static inline void * vl_api_acl_rule_t_print (vl_api_acl_rule_t * a, void *handle) { u8 *s; - fib_prefix_t src, dst; + ip_prefix_t src, dst; - ip_prefix_decode (&a->src_prefix, &src); - ip_prefix_decode (&a->dst_prefix, &dst); + ip_prefix_decode2 (&a->src_prefix, &src); + ip_prefix_decode2 (&a->dst_prefix, &dst); s = format (0, " %s ", a->src_prefix.address.af ? "ipv6" : "ipv4"); s = format_acl_action (s, a->is_permit); s = format (s, " \\\n"); s = format (s, " src %U dst %U \\\n", - format_fib_prefix, &src, - format_fib_prefix, &dst); + format_ip_prefix, &src, + format_ip_prefix, &dst); s = format (s, " proto %d \\\n", a->proto); s = format (s, " sport %d-%d dport %d-%d \\\n", clib_net_to_host_u16 (a->srcport_or_icmptype_first), @@ -158,9 +158,9 @@ static inline void * vl_api_macip_acl_rule_t_print (vl_api_macip_acl_rule_t * a, void *handle) { u8 *s; - fib_prefix_t src; + ip_prefix_t src; - ip_prefix_decode (&a->src_prefix, &src); + ip_prefix_decode2 (&a->src_prefix, &src); s = format (0, " %s %s \\\n", a->src_prefix.address.af ? "ipv6" : "ipv4", a->is_permit ? "permit" : "deny"); @@ -170,7 +170,7 @@ vl_api_macip_acl_rule_t_print (vl_api_macip_acl_rule_t * a, void *handle) format_ethernet_address, a->src_mac_mask); s = format (s, " src ip %U, \\", - format_fib_prefix, &src); + format_ip_prefix, &src); PRINT_S; return handle;
lindar: modify LED function to match LED SPEC modify LED function to match LED SPEC BRANCH=firmware-volteer-13521.B TEST=make -j BOARD=lindar
@@ -83,7 +83,7 @@ void led_get_brightness_range(enum ec_led_id led_id, uint8_t *brightness_range) if (led_id == EC_LED_ID_BATTERY_LED) { brightness_range[EC_LED_COLOR_RED] = 1; brightness_range[EC_LED_COLOR_AMBER] = 1; - brightness_range[EC_LED_COLOR_GREEN] = 1; + brightness_range[EC_LED_COLOR_WHITE] = 1; } else if (led_id == EC_LED_ID_POWER_LED) { brightness_range[EC_LED_COLOR_WHITE] = 1; } @@ -96,8 +96,8 @@ int led_set_brightness(enum ec_led_id led_id, const uint8_t *brightness) led_set_color_battery(EC_LED_COLOR_RED); else if (brightness[EC_LED_COLOR_AMBER] != 0) led_set_color_battery(EC_LED_COLOR_AMBER); - else if (brightness[EC_LED_COLOR_GREEN] != 0) - led_set_color_battery(EC_LED_COLOR_GREEN); + else if (brightness[EC_LED_COLOR_WHITE] != 0) + led_set_color_battery(EC_LED_COLOR_WHITE); else led_set_color_battery(LED_OFF); } else if (led_id == EC_LED_ID_POWER_LED) {
Use ultravideo/kvazaar_ci_base image to reduce installation needs
-# Specify the docker image to use (only used if using docker runners) -# See: http://doc.gitlab.com/ee/ci/docker/using_docker_images.html -image: ubuntu:18.04 +# Use Kvazaar CI base image which includes the build tools and ffmpeg + hmdec in ${HOME}/bin +image: ultravideo/kvazaar_ci_base:latest -# Install needed tools -before_script: - - apt-get update - - apt-get install -y autoconf build-essential libtool yasm wget git libtool-bin valgrind # Build kvazaar and run tests build-kvazaar: @@ -18,11 +13,11 @@ build-kvazaar: paths: - src/kvazaar - src/.libs + expire_in: 1 week run-tests: stage: test script: - - bash .travis-install.bash - ./autogen.sh - ./configure - PATH="${HOME}/bin:${PATH}" KVAZAAR_OVERRIDE_angular_pred=generic KVAZAAR_OVERRIDE_sao_band_ddistortion=generic KVAZAAR_OVERRIDE_sao_edge_ddistortion=generic KVAZAAR_OVERRIDE_calc_sao_edge_dir=generic make check
Fix memory leaks in test case.
@@ -340,6 +340,13 @@ void test_too_many_matches() } uint8_t* buffer = (uint8_t*) malloc(2 * YR_MAX_STRING_MATCHES); + + if (buffer == NULL) + { + perror("malloc"); + exit(EXIT_FAILURE); + } + memset(buffer, 'a', 2 * YR_MAX_STRING_MATCHES); int err = yr_rules_scan_mem( @@ -359,6 +366,7 @@ void test_too_many_matches() "%d\n", err); + free(buffer); exit(EXIT_FAILURE); } @@ -378,9 +386,11 @@ void test_too_many_matches() "test_too_many_matches failed, expecting ERROR_SUCCESS, got %d\n", err); + free(buffer); exit(EXIT_FAILURE); } + free(buffer); yr_rules_destroy(rules); yr_finalize(); }
fix default beegfs test condition
@@ -93,7 +93,7 @@ AM_CONDITIONAL(BOS_ENABLED,test "x$enable_bos" = "xyes" ) # BeeGFS AC_ARG_ENABLE([beegfs], [AS_HELP_STRING([--enable-beegfs],[Enable BeeGFS utility tests (default=no, root only)])], - [],[enable_beegfs=yes]) + [],[enable_beegfs=no]) AM_CONDITIONAL(BEEGFS_ENABLED,test "x$enable_beegfs" = "xyes" ) #------------------------------------------------------------------------------------------ # Out-of-band @@ -435,6 +435,12 @@ echo echo Submodule Configuration: echo if test "x$ROOT_ENABLED" = "x1" ; then + if test "x$enable_beegfs" = "xyes"; then + echo ' 'BeeGFS client............. : enabled + else + echo ' 'BeeGFS client............. : disabled + fi + if test "x$enable_bos" = "xyes"; then echo ' 'Base operating system..... : enabled else @@ -476,12 +482,6 @@ echo User Environment: echo ' 'Compilers................. : disabled fi - if test "x$enable_beegfs" = "xyes"; then - echo ' 'BeeGFS client............. : enabled - else - echo ' 'BeeGFS client............. : disabled - fi - if test "x$enable_lustre" = "xyes"; then echo ' 'Lustre client............. : enabled else
chat: formatting mistake
@@ -235,7 +235,7 @@ export const MessageWithSigil = (props) => { fontWeight={nameMono ? '400' : '500'} className={`mw5 db truncate pointer`} onClick={() => { - writeText(`~${msg.author}`), + writeText(`~${msg.author}`); showCopyNotice(); }} title={`~${msg.author}`}
Force utf8 for postgresql init
@@ -74,7 +74,7 @@ init_zookeeper_mcf_repertory() init_postgres() { - ${DATAFARI_HOME}/pgsql/bin/initdb -U postgres -A password --pwfile=${DATAFARI_HOME}/pgsql/pwd.conf -E utf8 -D ${DATAFARI_HOME}/pgsql/data + ${DATAFARI_HOME}/pgsql/bin/initdb -E 'UTF-8' -U postgres -A password --pwfile=${DATAFARI_HOME}/pgsql/pwd.conf -D ${DATAFARI_HOME}/pgsql/data cp ${DATAFARI_HOME}/pgsql/postgresql.conf.save ${DATAFARI_HOME}/pgsql/data/postgresql.conf }
fix commit code review comments
@@ -65,7 +65,7 @@ static void print_fme_verbose_info(fpga_token token) uint64_t bitstream_id; uint32_t major = 0; uint32_t val = 0; - printf("-----FME VERBOSE-----\n"); + res = fpgaTokenGetObject(token, DFL_BITSTREAM_ID, &fpga_object, FPGA_OBJECT_GLOB); if (res != FPGA_OK) { OPAE_MSG("Failed to get token Object"); @@ -210,7 +210,7 @@ fpga_result fme_command(fpga_token *tokens, int num_tokens, int argc, fme_help(); return FPGA_INVALID_PARAM; - case 'v': /* verbose - UNDOCUMENTED */ + case 'v': /* verbose */ verbose_opt = 1; break;
config/imxrt1020-evk/tc: Fix Partition info for tc preset Add fix to PR - Fix partition info
@@ -363,7 +363,7 @@ CONFIG_BOARDCTL_RESET=y CONFIG_IMXRT_NORFLASH=y CONFIG_IMXRT_AUTOMOUNT=y CONFIG_IMXRT_AUTOMOUNT_USERFS=y -CONFIG_IMXRT_AUTOMOUNT_USERFS_DEVNAME="/dev/smart0p6" +CONFIG_IMXRT_AUTOMOUNT_USERFS_DEVNAME="/dev/smart0p1" CONFIG_IMXRT_AUTOMOUNT_USERFS_MOUNTPOINT="/mnt" # CONFIG_IMXRT_AUTOMOUNT_SSSRW is not set CONFIG_IMXRT_AUTOMOUNT_ROMFS=y @@ -381,9 +381,9 @@ CONFIG_ARCH_USE_FLASH=y # CONFIG_FLASH_PARTITION=y CONFIG_FLASH_MINOR=0 -CONFIG_FLASH_PART_SIZE="2048,512,1024,1024,1024,1024,1024," -CONFIG_FLASH_PART_TYPE="kernel,none,bin,bin,bin,bin,smartfs," -CONFIG_FLASH_PART_NAME="kernel,app,micom,micom,wifi,wifi,userfs," +CONFIG_FLASH_PART_SIZE="2048,4096," +CONFIG_FLASH_PART_TYPE="none,smartfs," +CONFIG_FLASH_PART_NAME="kernel,userfs," # # SE Selection
add sceAppMgrLoadSaveDataSystemFile Package installer debug output.
@@ -323,6 +323,7 @@ modules: sceAppMgrLaunchAppByUri2: 0x0ED6AF54 sceAppMgrLaunchVideoStreamingApp: 0x4C02B889 sceAppMgrLoadExec: 0xE6774ABC + sceAppMgrLoadSaveDataSystemFile: 0x660B57BE sceAppMgrLoopBackFormat: 0xCE8CE150 sceAppMgrLoopBackMount: 0x33CD76DD sceAppMgrMmsMount: 0xF4730BA8
prevent to store out of sequence packets due to runtime of the singal within SoC and driver
@@ -1142,8 +1142,7 @@ static const uint8_t wpa2data[] = }; #define WPA2_SIZE sizeof(wpa2data) -gettimeofday(&tv, NULL); -timestamp = ((uint64_t)tv.tv_sec *1000000) +tv.tv_usec; +timestamp += 1; packetoutptr = epbown +EPB_SIZE; memset(packetoutptr, 0, HDRRT_SIZE +MAC_SIZE_NORM +LLC_SIZE +100); memcpy(packetoutptr, &hdradiotap, HDRRT_SIZE); @@ -1199,8 +1198,7 @@ static const uint8_t wpa1data[] = }; #define WPA1_SIZE sizeof(wpa1data) -gettimeofday(&tv, NULL); -timestamp = ((uint64_t)tv.tv_sec *1000000) +tv.tv_usec; +timestamp += 1; packetoutptr = epbown +EPB_SIZE; memset(packetoutptr, 0, HDRRT_SIZE +MAC_SIZE_NORM +LLC_SIZE +100); memcpy(packetoutptr, &hdradiotap, HDRRT_SIZE);
[io, vview] put back the video recording functionality
@@ -556,14 +556,13 @@ class InputObserver(): self._renderer.ResetCameraClippingRange() if key == 's': - if not self._recording: - self.vview.recorder.Start() - self._recording = True + self.toggle_recording(True) if key == 'e': - if self._recording: - self._recording = False - self.vview.recorder.End() + # Note 'e' has the effect to also "end" the program due to + # default behaviour of vtkInteractorStyle, see class + # documentation. + self.toggle_recording(False) if key == 'C': this_view.action(self) @@ -574,6 +573,19 @@ class InputObserver(): self._time = slider_repres.GetValue() self.update() + def toggle_recording(self, recording): + if recording and not self._recording: + fps = 25 + self._timer_id = (self.vview.interactor_renderer + .CreateRepeatingTimer(1000//fps)) + self._recording = True + self.vview.recorder.Start() + elif self._recording and not recording: + self.vview.interactor_renderer.DestroyTimer(self._timer_id) + self._timer_id = None + self._recording = False + self.vview.recorder.End() + # observer on 2D chart def iter_plot_observer(self, obj, event): @@ -600,7 +612,7 @@ class InputObserver(): self._time += self.vview.opts.advance_by_time self.vview.slwsc.SetEnabled(False) # Scale slider self.vview.xslwsc.SetEnabled(False) # Time scale slider - # slider_widget.SetEnabled(False) # Time slider + # slider_widget.SetEnabled(False) # Time slider (TODO video options) # widget.SetEnabled(False) # Axis widget self.update() self.vview.image_maker.Modified() @@ -611,10 +623,9 @@ class InputObserver(): # slider_widget.SetEnabled(True) # widget.SetEnabled(True) # Axis widget + # End video if done if self._time >= max(self._times): - self._recording = False - self.vview.recorder.End() - + self.toggle_recording(False) class DataConnector(): @@ -1752,6 +1763,9 @@ class VView(object): self.input_observer = InputObserver(self) self.interactor_renderer.AddObserver('KeyPressEvent', self.input_observer.key) + self.interactor_renderer.AddObserver( + 'TimerEvent', self.input_observer.recorder_observer) + if self.io.contact_forces_data().shape[0] > 0: self.slwsc, self.slrepsc = self.make_slider( 'Scale',
config_tools: rename UOS to user vm in UI since PRs and have landed, we also need to rename "UOS" to "user vm" in UI.
@@ -43,7 +43,7 @@ the launch scripts will be generated into misc/acrn-config/xmls/config-xmls/[boa <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> - <h4 class="modal-title" id="addlaunchModalLabel">Configure UOS for Post-launched VM</h4> + <h4 class="modal-title" id="addlaunchModalLabel">Configure User VM for Post-launched VM</h4> </div> <div class="modal-body"> <div class="form-group row"> @@ -136,7 +136,7 @@ the launch scripts will be generated into misc/acrn-config/xmls/config-xmls/[boa <tr> <td> <div class="form-group"> - <label class="col-sm-3 control-label">UOS: </label> + <label class="col-sm-3 control-label">User VM: </label> <label class="col-sm-1 control-label" id="vm">{{vm.attrib['id']}}</label> </div> <div class="form-group"> @@ -146,7 +146,7 @@ the launch scripts will be generated into misc/acrn-config/xmls/config-xmls/[boa </div> <div class="form-group"> <button type="button" class="col-sm-6 btn" id="add_launch_vm" data-id="{{vm.attrib['id']}}" data-toggle="modal" - data-target="#add_launch_modal">Configure an UOS below</button> + data-target="#add_launch_modal">Configure a User VM below</button> </div> <div class="form-group"> <button type="button" class="col-sm-6 btn" id="remove_launch_vm" data-id="{{vm.attrib['id']}}"> @@ -394,7 +394,7 @@ the launch scripts will be generated into misc/acrn-config/xmls/config-xmls/[boa {% endfor %} <tr><td> <button type="button" class="btn" id="add_launch_script" data-toggle="modal" data-id="-1" - data-target="#add_launch_modal">Configure an UOS</button> + data-target="#add_launch_modal">Configure a User VM</button> </td></tr> </table> {% else %}
travis: avoid coverity failing due to no token
@@ -31,7 +31,7 @@ script: - | if [[ -z ${COVERITY_SCAN_PROJECT_NAME} ]] ; then make CFLAGS="-O3 -Wall -Werror -Wshadow -pipe" check - else + elif [[ -n ${COVERITY_SCAN_TOKEN} ]] ; then curl -s 'https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh' | bash fi
Fix type of init_random() on Linux and Windows.
@@ -89,6 +89,7 @@ read_random(void *buf, size_t size) arc4random_buf(buf, size); } #elif defined(_WIN32) +void init_random(void) { return; @@ -110,6 +111,7 @@ read_random(void *buf, size_t size) } } #elif defined(__linux__) +void init_random(void) { return;
web-ui: preload first two layers
@@ -46,10 +46,12 @@ const parseDataSet = (getKey, sendNotification, instanceId, tree, path) => { path: newPath, root: !path, children: (Array.isArray(children) && children.length > 0) - ? () => { + ? (notify = true) => { return new Promise(resolve => { getKey(instanceId, newPath, true) + if (notify) { sendNotification('finished loading \'' + newPath + '\' keyset') + } resolve(children) }) } : false, @@ -104,12 +106,14 @@ export default class Configuration extends Component { } waitForData = () => { + const { sendNotification } = this.props const { data } = this.state const user = Array.isArray(data) && data.find(d => d.path === 'user') - if (!user) { + if (!user || !user.children) { this.timeout = setTimeout(this.waitForData, 100) } else { this.preload(data) + .then(() => sendNotification('configuration data loaded!')) } } @@ -134,21 +138,32 @@ export default class Configuration extends Component { .then(() => sendNotification('configuration data refreshed!')) } - preload = async (tree, paths = []) => { + preload = async (tree, paths = [], levels = 1) => { if (!tree) return await Promise.resolve(tree) return await Promise.all(tree.map(async (item, i) => { - // do not preload system/ namespace - if (item.name === 'system') return item - let { children } = item if (!children) return item - return this.updateData({ - ...item, - children: typeof children === 'function' - ? await children() // resolve children if necessary + + const childItems = typeof children === 'function' + ? await children(false) // resolve children if necessary : children - }, [ ...paths, item.name ]) + const newPaths = [ ...paths, item.name ] + + let promises = [ + this.updateData({ + ...item, + children: childItems + }, newPaths) + ] + + if (levels > 0) { + promises.push( + this.preload(childItems, newPaths, levels - 1) + ) + } + + return Promise.all(promises) })) }
publish: submit comment on ctrl+enter
@@ -116,7 +116,13 @@ export class Comments extends Component { "b--gray2-d mb2 focus-b--black focus-b--white-d white-d bg-gray0-d"} aria-describedby="comment-desc" style={{height: "4rem"}} - onChange={this.commentChange}> + onChange={this.commentChange} + onKeyPress={(e) => { + if ((e.getModifierState("Control") || event.getModifierState("Meta")) + && e.key === "Enter") { + this.commentSubmit(); + } + }}> </textarea> </div> <button disabled={disableComment}
[runtime] Add stack allocation favorable for the configuration
// Author: Samuel Riedel, ETH Zurich // Matheus Cavalcante, ETH Zurich +// #define TOP4_STACK + .globl _start .section .text; .section .text.init; @@ -64,10 +66,26 @@ reset_vector: li x31, 0 la sp, tcdm_start_address_reg // load stack top from peripheral register lw sp, 0(sp) - csrr t0, mhartid // get hart id - addi t0, t0, 1 + csrr a0, mhartid // get hart id +#ifdef TOP4_STACK + srli t0, a0, 4 // id / 16 + li t1, 12288 // 12 * 2^10 + mul t1, t0, t1 // * 12 * 2^10 + andi t0, a0, 3 // id % 4 + slli t0, t0, 12 // * 2^12 + add sp, sp, t0 // sp += (id % 4) * 2^12 + add sp, sp, t1 // sp += (id / 16) * 12 * 2^10 + srli t0, a0, 2 // id / 4 + slli t0, t0, 10 // * 2^10 + add sp, sp, t0 // sp += (id / 4 + 1) * 2^10 + addi sp, sp, 1020 // sp += 2^10-1 (start at stack of next core) +#else + addi t0, a0, 1 slli t0, t0, 10 // set some stack-space aside for each hart + addi t0, t0, -4 // Subtract one word to avoid overlapping add sp, sp, t0 +#endif + li a0, 0 // Set argc to zero call main eoc:
Dead code elimination. Remove the exit_main function which is never used. Remove the exit_options array which is also unreferenced.
@@ -267,10 +267,6 @@ int main(int argc, char *argv[]) EXIT(ret); } -const OPTIONS exit_options[] = { - {NULL} -}; - static void list_cipher_fn(const EVP_CIPHER *c, const char *from, const char *to, void *arg) { @@ -508,11 +504,6 @@ int help_main(int argc, char **argv) return 0; } -int exit_main(int argc, char **argv) -{ - return EXIT_THE_PROGRAM; -} - static void list_type(FUNC_TYPE ft, int one) { FUNCTION *fp;
Clean up docs example in CONTRIBUTING.md.
@@ -30,10 +30,7 @@ Newer C/C++ documentation on functions should generally try to follow this forma // Code example if necessary. @endcode \rst - [Sphinx directives] - .. versionadded:: 0.0 - .. deprecated:: 0.0 - Deprecation details. + .. versionadded:: Unreleased \endrst */ int example(int value);
webpdec: use ImgIoUtilCheckSizeArgumentsOverflow ...prior to allocating a Picture. this is consistent with the other readers and allows the allocation size to be limited at compile time
@@ -141,10 +141,21 @@ int ReadWebP(const uint8_t* const data, size_t data_size, do { const int has_alpha = keep_alpha && bitstream->has_alpha; + uint64_t stride; pic->width = bitstream->width; pic->height = bitstream->height; - if (!pic->use_argb) pic->colorspace = has_alpha ? WEBP_YUV420A - : WEBP_YUV420; + if (pic->use_argb) { + stride = (uint64_t)bitstream->width * (has_alpha ? 4 : 3); + } else { + stride = (uint64_t)bitstream->width * (has_alpha ? 5 : 3) / 2; + pic->colorspace = has_alpha ? WEBP_YUV420A : WEBP_YUV420; + } + + if (!ImgIoUtilCheckSizeArgumentsOverflow(stride, bitstream->height)) { + status = VP8_STATUS_OUT_OF_MEMORY; + break; + } + ok = WebPPictureAlloc(pic); if (!ok) { status = VP8_STATUS_OUT_OF_MEMORY;
Make sysconfdir in the buildroot
@@ -71,6 +71,7 @@ make %install make DESTDIR=%{buildroot} install %{__mkdir_p} %{buildroot}%{_localstatedir}/log/%{pname} +%{__mkdir_p} %{buildroot}%{_sysconfdir} cp %{SOURCE1} %{buildroot}%{_sysconfdir} %{__mkdir} -p %{buildroot}/%{OHPC_MODULES}/%{pname}
main: clean up and reap zombies in init's thread
@@ -37,7 +37,7 @@ struct { void main_initthr(void *unused) { int i; - syspage_program_t *prog, *last = NULL; + syspage_program_t *prog; int xcount = 0; char *cmdline = syspage->arg, *end; char *argv[32], *arg, *argend; @@ -96,9 +96,7 @@ void main_initthr(void *unused) /* Start program loaded into memory */ for (prog = syspage->progs, i = 0; i < syspage->progssz; i++, prog++) { if (!hal_strcmp(cmdline + 1, prog->cmdline)) { - if (!*end) - last = prog; - else if (!proc_vfork()) + if (!proc_vfork()) proc_execve(prog, prog->cmdline, argv, NULL); } } @@ -109,11 +107,10 @@ void main_initthr(void *unused) if (!xcount && syspage->progssz != 0) { /* Start all syspage programs */ - for (prog = syspage->progs, i = 0; i < syspage->progssz - 1; i++, prog++) { + for (prog = syspage->progs, i = 0; i < syspage->progssz; i++, prog++) { if (!proc_vfork()) proc_execle(prog, prog->cmdline, prog->cmdline, NULL, NULL); } - last = prog; } /* Reopen stdin, stdout, stderr */ @@ -123,13 +120,10 @@ void main_initthr(void *unused) // proc_fileSet(1, 3, &oid, 0, 0); // proc_fileSet(2, 3, &oid, 0, 0); - if (last != NULL) { - if (!proc_vfork()) - proc_execve(last, last->cmdline, argv, NULL); - } + while (proc_waitpid(-1, NULL, 0) != -ECHILD) ; - for (;;) - proc_threadSleep(2000000); + /* All init's children are dead at this point */ + for (;;) proc_threadSleep(100000000); }
Have wuffsfmt align the "T"s in "var x T" blocks
@@ -27,6 +27,13 @@ import ( var newLine = []byte{'\n'} +func max(a, b int) int { + if a > b { + return a + } + return b +} + func Render(w io.Writer, tm *t.Map, src []t.Token, comments []string) (err error) { if len(src) == 0 { return nil @@ -36,6 +43,7 @@ func Render(w io.Writer, tm *t.Map, src []t.Token, comments []string) (err error indent := 0 buf := make([]byte, 0, 1024) commentLine := uint32(0) + varNameLength := uint32(0) prevLine := src[0].Line - 1 prevLineHanging := false @@ -90,6 +98,7 @@ func Render(w io.Writer, tm *t.Map, src []t.Token, comments []string) (err error if _, err = w.Write(newLine); err != nil { return err } + varNameLength = 0 } // Render any leading indentation. If this line starts with a close @@ -104,6 +113,21 @@ func Render(w io.Writer, tm *t.Map, src []t.Token, comments []string) (err error } buf = appendTabs(buf, indent+indentAdjustment) + if (len(lineTokens) < 2) || (lineTokens[0].ID != t.IDVar) { + varNameLength = 0 + } else { + if varNameLength == 0 { + varNameLength = measureVarNameLength(tm, lineTokens, src) + } + name := tm.ByID(lineTokens[1].ID) + buf = append(buf, "var "...) + buf = append(buf, name...) + for i := uint32(len(name)); i <= varNameLength; i++ { + buf = append(buf, ' ') + } + lineTokens = lineTokens[2:] + } + // Render the lineTokens. prevID, prevIsTightRight := t.ID(0), false for _, tok := range lineTokens { @@ -212,3 +236,25 @@ func isCloseIdentLiteral(tm *t.Map, x t.ID) bool { func isCloseIdentStrLiteral(tm *t.Map, x t.ID) bool { return x.IsClose() || x.IsIdent(tm) || x.IsStrLiteral(tm) } + +func measureVarNameLength(tm *t.Map, lineTokens []t.Token, remaining []t.Token) uint32 { + if len(lineTokens) < 2 { + return 0 + } + line := lineTokens[0].Line + length := len(tm.ByID(lineTokens[1].ID)) + for len(remaining) >= 2 && (remaining[0].ID == t.IDVar) && (remaining[0].Line == line+1) { + line = remaining[0].Line + length = max(length, len(tm.ByID(remaining[1].ID))) + + remaining = remaining[2:] + for len(remaining) > 0 { + id := remaining[0].ID + remaining = remaining[1:] + if id == t.IDSemicolon { + break + } + } + } + return uint32(length) +}
Fix a conditional check in afr_set_metadata
@@ -54,7 +54,7 @@ function(afr_set_metadata arg_metadata_type arg_metadata_name arg_metadata_val) ) set(__allowed_values BOARD LIB DEMO) - if(NOT ${arg_metadata_type} IN_LIST __allowed_values) + if(NOT "${arg_metadata_type}" IN_LIST __allowed_values) message(FATAL_ERROR "Invalid metadata type: ${arg_metadata_type}.") endif()
fix typo: if -> %if
@@ -55,6 +55,7 @@ BuildRequires: ohpc-buildroot # Compiler dependencies %if 0%{?ohpc_compiler_dependent} == 1 + %if "%{compiler_family}" == "gnu" BuildRequires: gnu-compilers%{PROJ_DELIM} Requires: gnu-compilers%{PROJ_DELIM} @@ -66,7 +67,7 @@ Requires: gcc-c++ intel-compilers-devel%{PROJ_DELIM} BuildRequires: intel_licenses %endif %endif -if "%{compiler_family}" == "dts6" +%if "%{compiler_family}" == "dts6" BuildRequires: devtoolset-6 Requires: devtoolset-6 BuildRequires: gnu-dts6-compilers%{PROJ_DELIM} @@ -76,6 +77,7 @@ Requires: gnu-dts6-compilers%{PROJ_DELIM} BuildRequires: gnu-7-compilers%{PROJ_DELIM} Requires: gnu-7-compilers%{PROJ_DELIM} %endif + %endif # MPI dependencies
Fix Android ARM exception handling
@@ -1662,6 +1662,8 @@ class LD(Linker): if self.tc.is_clang and self.tc.compiler_version == '3.8': self.sys_lib.append('-L{}/clang/arm-linux-androideabi/lib/armv7-a'.format(self.tc.name_marker)) + if target.is_armv7a: + self.sys_lib.append('-lunwind') self.sys_lib.append('-lgcc') if self.tc.is_clang and not self.tc.version_at_least(4, 0) and target.is_linux_x86_64:
ip: fix length calculation in ip6-receive Replace unconditional usage of buffer->total_length_not_including_first_buffer with a logic checking whether that length is set to a valid value. Type: fix Fixes:
@@ -1276,7 +1276,7 @@ ip6_tcp_udp_icmp_bad_length (vlib_main_t * vm, vlib_buffer_t * p0) } n_bytes_left -= n_this_buffer; - n_bytes_left -= p0->total_length_not_including_first_buffer; + n_bytes_left -= vlib_buffer_length_in_chain (vm, p0) - p0->current_length; if (n_bytes_left == 0) return 0;
baseboard/dedede/variant_ec_it8320.c: Format with clang-format BRANCH=none TEST=none
@@ -75,47 +75,37 @@ BUILD_ASSERT(ARRAY_SIZE(vcmp_list) == VCMP_COUNT); /* I2C Ports */ const struct i2c_port_t i2c_ports[] = { - { - .name = "eeprom", + { .name = "eeprom", .port = I2C_PORT_EEPROM, .kbps = 400, .scl = GPIO_EC_I2C_EEPROM_SCL, - .sda = GPIO_EC_I2C_EEPROM_SDA - }, + .sda = GPIO_EC_I2C_EEPROM_SDA }, - { - .name = "battery", + { .name = "battery", .port = I2C_PORT_BATTERY, .kbps = 100, .scl = GPIO_EC_I2C_BATTERY_SCL, - .sda = GPIO_EC_I2C_BATTERY_SDA - }, + .sda = GPIO_EC_I2C_BATTERY_SDA }, #ifdef HAS_TASK_MOTIONSENSE - { - .name = "sensor", + { .name = "sensor", .port = I2C_PORT_SENSOR, .kbps = 400, .scl = GPIO_EC_I2C_SENSOR_SCL, - .sda = GPIO_EC_I2C_SENSOR_SDA - }, + .sda = GPIO_EC_I2C_SENSOR_SDA }, #endif #if CONFIG_USB_PD_PORT_MAX_COUNT > 1 - { - .name = "sub_usbc1", + { .name = "sub_usbc1", .port = I2C_PORT_SUB_USB_C1, .kbps = 1000, .scl = GPIO_EC_I2C_SUB_USB_C1_SCL, - .sda = GPIO_EC_I2C_SUB_USB_C1_SDA - }, + .sda = GPIO_EC_I2C_SUB_USB_C1_SDA }, #endif - { - .name = "usbc0", + { .name = "usbc0", .port = I2C_PORT_USB_C0, .kbps = 1000, .scl = GPIO_EC_I2C_USB_C0_SCL, - .sda = GPIO_EC_I2C_USB_C0_SDA - }, + .sda = GPIO_EC_I2C_USB_C0_SDA }, }; const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports);
Fix division by zero warning on FreeBSD libc. Closes
@@ -180,7 +180,12 @@ m3ApiRawFunction(m3_libc_clock_ms) { m3ApiReturnType (uint32_t) #ifdef CLOCKS_PER_SEC - m3ApiReturn(clock() / (CLOCKS_PER_SEC/1000)); + uint32_t clock_divider = CLOCKS_PER_SEC/1000; + if (clock_divider != 0) { + m3ApiReturn(clock() / clock_divider); + } else { + m3ApiReturn(clock()); + } #else m3ApiReturn(clock()); #endif
docs(README): early return in minimal example
@@ -48,13 +48,13 @@ void on_ready(struct discord *client) void on_message(struct discord *client, const struct discord_message *msg) { - if (0 == strcmp(msg->content, "ping")) { // if 'ping' received, reply with 'pong' - struct discord_create_message_params params = { .content = "pong" }; + if (strcmp(msg->content, "ping") != 0) + return; // ignore messages that aren't 'ping' discord_async_next(client, NULL); // make next request non-blocking (OPTIONAL) + struct discord_create_message_params params = { .content = "pong" }; discord_create_message(client, msg->channel_id, &params, NULL); } -} int main(void) {
bitsfe~ help update cause windows
-#N canvas 347 54 561 542 10; +#N canvas 631 49 562 533 10; #X obj 6 488 cnv 15 552 21 empty empty empty 20 12 0 14 -233017 -33289 0; #X obj 6 385 cnv 3 550 3 empty empty inlets 8 12 0 13 -228856 -1 0 -1 -1; #X obj 109 352 print~ zero; #X obj 305 283 cyclone/bitsafe~; -#X obj 305 183 expr~ atanh(1); #X text 181 393 - input signals to have nan/inf values replaced with 0; #X text 181 430 - the signal which has 0 values where nan/inf values existed; #X text 126 465 (none); -#X obj 109 183 expr~ acosh(0); #X text 70 97 [bitsafe~] replaces NaN (not a number) and +/- infinity values of an incoming signal with zero. This is useful in conjunction with the bitwise operators \, or any other situation where these values @@ -51,11 +49,13 @@ cloned from Max/MSP; #X obj 305 334 cyclone/number~; #X obj 329 234 cyclone/number~; #X obj 500 69 cyclone/setdsp~; +#X obj 109 183 expr~ log(-1); +#X obj 305 183 expr~ pow(1e+10 \, 1e+10); #X connect 12 0 13 0; #X connect 14 0 16 0; #X connect 15 0 16 0; -#X connect 17 0 28 0; -#X connect 18 0 17 0; -#X connect 18 0 29 0; -#X connect 22 0 13 0; -#X connect 22 0 14 0; +#X connect 17 0 26 0; +#X connect 29 0 13 0; +#X connect 29 0 14 0; +#X connect 30 0 17 0; +#X connect 30 0 27 0;
Make ImGui sandboxing a bit less strict
@@ -68,7 +68,11 @@ static constexpr const char* s_cGlobalImmutablesList[] = static constexpr const char* s_cGlobalImGuiList[] = { - "ImGui", + "ImGui" +}; + +static constexpr const char* s_cGlobalExtraLibsWhitelist[] = +{ "ImGuiCond", "ImGuiTreeNodeFlags", "ImGuiSelectableFlags", @@ -93,11 +97,7 @@ static constexpr const char* s_cGlobalImGuiList[] = "ImGuiCol", "ImGuiDir", "ImVec2", - "ImVec4" -}; - -static constexpr const char* s_cGlobalExtraLibsWhitelist[] = -{ + "ImVec4", "json" };
Send ZDP Mgmt_Leave_req also to sleeping devices when they are awake Otherwise they won't be removed from the network after deleting resources.
@@ -106,6 +106,7 @@ void DeRestPluginPrivate::checkResetState() lastNodeAddressExt = 0; } + const auto now = QDateTime::currentDateTime(); std::vector<Sensor>::iterator si = sensors.begin(); std::vector<Sensor>::iterator si_end = sensors.end(); @@ -113,9 +114,9 @@ void DeRestPluginPrivate::checkResetState() { if (si->isAvailable() && si->resetRetryCount() > 0 && si->node()) { - if (!si->node()->nodeDescriptor().receiverOnWhenIdle()) + if (!si->node()->nodeDescriptor().receiverOnWhenIdle() && si->lastRx().secsTo(now) > 6) { - // not supported yet + // wait until awake continue; }
common MAINTENANCE unify error cases Refs
@@ -1774,8 +1774,8 @@ sr_chmodown(const char *path, const char *owner, const char *group, mode_t perm) assert(path); if ((int)perm != -1) { - if (perm > 00666) { - sr_errinfo_new(&err_info, SR_ERR_INVAL_ARG, NULL, "Only read and write permissions can be set."); + if (perm > 00777) { + sr_errinfo_new(&err_info, SR_ERR_INVAL_ARG, NULL, "Invalid permissions 0%.3o.", perm); return err_info; } else if (perm & 00111) { sr_errinfo_new(&err_info, SR_ERR_INVAL_ARG, NULL, "Setting execute permissions has no effect.");
More compact implementation of BtStreamReceiver receiver logic including re-connect on receive-timeout.
@@ -52,32 +52,22 @@ namespace Miningcore.Mining var timeout = TimeSpan.FromMilliseconds(1000); var reconnectTimeout = TimeSpan.FromSeconds(300); + var relays = endpoints + .DistinctBy(x => $"{x.Url}:{x.SharedEncryptionKey}") + .ToArray(); + while (!cts.IsCancellationRequested) { - var lastMessageReceived = clock.Now; + // track last message received per endpoint + var lastMessageReceived = relays.Select(_ => clock.Now).ToArray(); try { // setup sockets - var sockets = endpoints - .Select(endpoint => - { - var subSocket = new ZSocket(ZSocketType.SUB); - subSocket.SetupCurveTlsClient(endpoint.SharedEncryptionKey, logger); - subSocket.Connect(endpoint.Url); - subSocket.SubscribeAll(); - - if (subSocket.CurveServerKey != null) - logger.Info($"Monitoring Bt-Stream source {endpoint.Url} using Curve public-key {subSocket.CurveServerKey.ToHexString()}"); - else - logger.Info($"Monitoring Bt-Stream source {endpoint.Url}"); - - return subSocket; - }).ToArray(); + var sockets = relays.Select(SetupSubSocket).ToArray(); using (new CompositeDisposable(sockets)) { - var urls = endpoints.Select(x => x.Url).ToArray(); var pollItems = sockets.Select(_ => ZPollItem.CreateReceiver()).ToArray(); while (!cts.IsCancellationRequested) @@ -90,27 +80,30 @@ namespace Miningcore.Mining if (msg != null) { - lastMessageReceived = clock.Now; + lastMessageReceived[i] = clock.Now; using (msg) { ProcessMessage(msg); } } + + else if (clock.Now - lastMessageReceived[i] > reconnectTimeout) + { + // re-create socket + sockets[i].Dispose(); + sockets[i] = SetupSubSocket(relays[i]); + + // reset clock + lastMessageReceived[i] = clock.Now; + + logger.Info(() => $"Receive timeout of {reconnectTimeout.TotalSeconds} seconds exceeded. Re-connecting to {relays[i].Url} ..."); + } } if (error != null) logger.Error(() => $"{nameof(ShareReceiver)}: {error.Name} [{error.Name}] during receive"); } - - else - { - if (clock.Now - lastMessageReceived > reconnectTimeout) - { - logger.Info(() => $"Receive timeout of {reconnectTimeout.TotalSeconds} seconds exceeded. Re-connecting ..."); - break; - } - } } } } @@ -126,6 +119,21 @@ namespace Miningcore.Mining }, cts.Token); } + private static ZSocket SetupSubSocket(ZmqPubSubEndpointConfig relay) + { + var subSocket = new ZSocket(ZSocketType.SUB); + subSocket.SetupCurveTlsClient(relay.SharedEncryptionKey, logger); + subSocket.Connect(relay.Url); + subSocket.SubscribeAll(); + + if (subSocket.CurveServerKey != null) + logger.Info($"Monitoring Bt-Stream source {relay.Url} using Curve public-key {subSocket.CurveServerKey.ToHexString()}"); + else + logger.Info($"Monitoring Bt-Stream source {relay.Url}"); + + return subSocket; + } + private void ProcessMessage(ZMessage msg) { // extract frames
rpl-dag-root: more readable logging of DAG root node IPv6 addresses
@@ -94,11 +94,12 @@ set_global_address(uip_ipaddr_t *prefix, uip_ipaddr_t *iid) uip_ds6_addr_add(&root_ipaddr, 0, ADDR_AUTOCONF); - LOG_INFO("IPv6 addresses: "); + LOG_INFO("IPv6 addresses:\n"); for(i = 0; i < UIP_DS6_ADDR_NB; i++) { state = uip_ds6_if.addr_list[i].state; if(uip_ds6_if.addr_list[i].isused && (state == ADDR_TENTATIVE || state == ADDR_PREFERRED)) { + LOG_INFO("-- "); LOG_INFO_6ADDR(&uip_ds6_if.addr_list[i].ipaddr); LOG_INFO_("\n"); }
session: add session enable option in config file Type: feature
@@ -1693,6 +1693,8 @@ session_config_fn (vlib_main_t * vm, unformat_input_t * input) else if (unformat (input, "evt_qs_seg_size %U", unformat_memory_size, &smm->evt_qs_segment_size)) ; + else if (unformat (input, "enable")) + vnet_session_enable_disable (vm, 1 /* is_en */ ); else return clib_error_return (0, "unknown input `%U'", format_unformat_error, input);
docs/esp8266: Mention Signal in GPIO section of quickref.
@@ -138,6 +138,10 @@ Also note that Pin(16) is a special pin (used for wakeup from deepsleep mode) and may be not available for use with higher-level classes like ``Neopixel``. +There's a higher-level abstraction :ref:`machine.Signal <machine.Signal>` +which can be used to invert a pin. Useful for illuminating active-low LEDs +using ``on()`` or ``value(1)``. + UART (serial bus) -----------------
fs/lustre-client: bump to v2.12.6
@@ -64,7 +64,7 @@ BuildRequires: kernel-abi-whitelists %undefine with_zfs %endif -%{!?version: %global version 2.12.5} +%{!?version: %global version 2.12.6} %if 0%{?suse_version} %{!?kver: %global kver %(readlink /usr/src/linux | sed 's/linux-//' | sed 's/$/-default/')} %else
FIX: ensure that non-CC frames regularly have an opportunity to be sent in fair_reserve
@@ -2661,7 +2661,7 @@ void picoquic_frame_fair_reserve(picoquic_cnx_t *cnx, picoquic_path_t *path_x, p } total_plugin_bytes_in_flight += p->bytes_in_flight; } while ((p = get_next_plugin(cnx, p)) != cnx->first_drr && total_plugin_bytes_in_flight < max_plugin_cwin); - cnx->first_drr = get_next_plugin(cnx, p); + p = cnx->first_drr; /* Second pass: consider all plugins with non CC */ do { while ((block = queue_peek(p->block_queue_non_cc)) != NULL && @@ -2683,6 +2683,7 @@ void picoquic_frame_fair_reserve(picoquic_cnx_t *cnx, picoquic_path_t *path_x, p total_plugin_bytes_in_flight += p->bytes_in_flight; } while ((p = get_next_plugin(cnx, p)) != cnx->first_drr); /* Now we put all we could */ + cnx->first_drr = get_next_plugin(cnx, p); cnx->wake_now = 0; /* Finally, put the first pointer to the next one */
Use size of server key when selecting signature algorithm.
@@ -787,6 +787,27 @@ int tls1_lookup_md(const SIGALG_LOOKUP *lu, const EVP_MD **pmd) return 1; } +/* + * Check if key is large enough to generate RSA-PSS signature. + * + * The key must greater than or equal to 2 * hash length + 2. + * SHA512 has a hash length of 64 bytes, which is incompatible + * with a 128 byte (1024 bit) key. + */ +#define RSA_PSS_MINIMUM_KEY_SIZE(md) (2 * EVP_MD_size(md) + 2) +static int rsa_pss_check_min_key_size(const RSA *rsa, const SIGALG_LOOKUP *lu) +{ + const EVP_MD *md; + + if (rsa == NULL) + return 0; + if (!tls1_lookup_md(lu, &md) || md == NULL) + return 0; + if (RSA_size(rsa) < RSA_PSS_MINIMUM_KEY_SIZE(md)) + return 0; + return 1; +} + /* * Return a signature algorithm for TLS < 1.2 where the signature type * is fixed by the certificate type. @@ -2303,6 +2324,12 @@ int tls_choose_sigalg(SSL *s, int fatalerrs) #else continue; #endif + } else if (lu->sig == EVP_PKEY_RSA_PSS) { + /* validate that key is large enough for the signature algorithm */ + const RSA *rsa = EVP_PKEY_get0_RSA(s->cert->pkeys[SSL_PKEY_RSA_PSS_SIGN].privatekey); + + if (!rsa_pss_check_min_key_size(rsa, lu)) + continue; } break; } @@ -2356,6 +2383,13 @@ int tls_choose_sigalg(SSL *s, int fatalerrs) sig_idx = SSL_PKEY_RSA; } } + if (lu->sig == EVP_PKEY_RSA_PSS) { + /* validate that key is large enough for the signature algorithm */ + const RSA *rsa = EVP_PKEY_get0_RSA(s->cert->pkeys[SSL_PKEY_RSA_PSS_SIGN].privatekey); + + if (!rsa_pss_check_min_key_size(rsa, lu)) + continue; + } #ifndef OPENSSL_NO_EC if (curve == -1 || lu->curve == curve) #endif
Improve some wording in reference counting documentation JerryScript-DCO-1.0-Signed-off-by: Geoff Gustafson
@@ -11,7 +11,7 @@ by `jerry_release_value`. /* The value stored in the 'global' variable contains a live * reference to the global object. The system also keeps its * own live reference to the global object. These two references - * are indepent, and both must be destroyed before the global + * are independent, and both must be destroyed before the global * object can be freed. */ jerry_release_value (global); @@ -48,16 +48,17 @@ following code is an **INCORRECT WAY** of releasing the 3.14 value. JerryScript API functions returning with a `jerry_value_t` always return with a new live reference. Passing a `jerry_value_t` to -an API function never releases its reference. The next example -shows this behaviour through property getting and setting. +an API function never releases its reference (unless explicitly +stated in the documentation). The next example shows this +behaviour through property getting and setting. ```c jerry_value_t prop_value = jerry_get_property (...); /* The prop_value must be released later because both the base * object and the prop_value have an independent reference to - * the same JavaScript value. When the operation is failed - * the prop_value contains a live reference to an error object. + * the same JavaScript value. When the operation fails, the + * prop_value contains a live reference to an error object. * This reference must be released as well. */ if (jerry_value_has_error_flag (prop_value)) @@ -76,20 +77,21 @@ shows this behaviour through property getting and setting. /* Property setting is the same. */ + jerry_value_t new_prop_value = jerry_create_number (2.718); jerry_value_t result = jerry_set_property (..., new_prop_value); - /* If the property set is successful a new reference is created + /* If the property set is successful, a new reference is created * for the value referenced by new_prop_value. The new_prop_value - * reference must be released regardless the operation is - * successful. */ + * reference must be released regardless of whether the operation + * is successful. */ /* The new_prop_value can be passed to other JerryScript API * functions before the jerry_release_value () call. */ jerry_release_value (new_prop_value); - /* The reference stored in 'result' variable contains whether - * the operation is successful and must also be freed. */ + /* The reference stored in the 'result' variable is live whether + * the operation is successful or not, and must also be freed. */ if (jerry_value_has_error_flag (result)) { @@ -170,5 +172,5 @@ References can be duplicated in C as long as only one of them is freed. jerry_release_value (c); /* Both 'b' and 'c' (boolean true) references become dead. */ - /* Since all references are released no memory leak is possible. */ + /* Since all references are released, no memory leak occurs. */ ```
options/posix: Define _POSIX_MONOTONIC_CLOCK
@@ -28,6 +28,7 @@ extern "C" { #define _POSIX_SPAWN _POSIX_VERSION #define _POSIX_THREADS _POSIX_VERSION #define _POSIX_THREAD_SAFE_FUNCTIONS _POSIX_VERSION +#define _POSIX_MONOTONIC_CLOCK 0 #ifdef __MLIBC_CRYPT_OPTION #define _XOPEN_CRYPT 1
odissey: set default log format as text
# syslog_ident "odissey" # pid_file "./odissey.pid" # log_file "./odissey.log" -log_format "tskv" +log_format "text" log_stdout yes log_debug yes log_config yes
Fix pressing CMD+D twice
@@ -1142,6 +1142,11 @@ fileprivate func parseArgs(_ args: inout [String]) { /// Shows documentation @objc func showDocs(_ sender: UIBarButtonItem) { + + guard presentedViewController == nil else { + return + } + if documentationNavigationController == nil { documentationNavigationController = ThemableNavigationController(rootViewController: DocumentationViewController()) }
xml BUGFIX memory leaks
@@ -327,7 +327,7 @@ lyxml_get_string(struct lyxml_context *context, const char **input, char **buffe } else if (rc) { /* some parsing error, so pass it */ (*input) = in; - return rc; + goto error; } else { /* whitespace-only content */ len = offset; @@ -461,10 +461,10 @@ getbuffer: LOGVAL(ctx, LY_VLOG_LINE, &context->line, LYVE_SYNTAX, "Mixed XML content is not allowed (%.*s).", offset + (in - (*input)), &(*input)[-offset]); free(e); - return LY_EVALID; + goto error; } else if (rc) { - /* some parsing error, so pass it */ - return rc; + /* some parsing error */ + goto error; } else { /* closing element, so we have regular content */ context->status++;
remove dot files from file listings
@@ -46,18 +46,18 @@ list_t* getFileListForDirIf(const char* dirname, list->free = (void (*)(void*)) & _secFree; list->match = (matchFunction)strequal; while ((ent = readdir(dir)) != NULL) { - if (!strequal(ent->d_name, ".") && !strequal(ent->d_name, "..")) { #ifdef _DIRENT_HAVE_DTYPE if (ent->d_type == DT_REG) { #endif + if (!strstarts(ent->d_name, ".")) { if (match(ent->d_name, arg)) { list_rpush(list, list_node_new(oidc_strcopy(ent->d_name))); } + } #ifdef _DIRENT_HAVE_DTYPE } #endif } - } closedir(dir); return list; } else {
avr_bl: use ms for stopbit, use low speed for less noise
#define CMD_BOOTSIGN 0x08 #define START_BIT_TIMEOUT_MS 10 -#define START_BIT_TIMEOUT (10000 * TICKS_PER_US) #define BIT_TIME (SYS_CLOCK_FREQ_HZ / 19200) #define BIT_TIME_HALF (BIT_TIME / 2) @@ -60,7 +59,7 @@ static void esc_set_input(gpio_pins_t pin) { gpio_init.Mode = LL_GPIO_MODE_INPUT; gpio_init.OutputType = LL_GPIO_OUTPUT_OPENDRAIN; gpio_init.Pull = LL_GPIO_PULL_UP; - gpio_init.Speed = LL_GPIO_SPEED_FREQ_HIGH; + gpio_init.Speed = LL_GPIO_SPEED_FREQ_LOW; gpio_pin_init(&gpio_init, pin); } @@ -69,16 +68,16 @@ static void esc_set_output(gpio_pins_t pin) { gpio_init.Mode = LL_GPIO_MODE_OUTPUT; gpio_init.OutputType = LL_GPIO_OUTPUT_PUSHPULL; gpio_init.Pull = LL_GPIO_PULL_NO; - gpio_init.Speed = LL_GPIO_SPEED_FREQ_HIGH; + gpio_init.Speed = LL_GPIO_SPEED_FREQ_LOW; gpio_pin_init(&gpio_init, pin); } static uint8_t serial_read(gpio_pins_t pin, uint8_t *bt) { - uint32_t start_time = time_cycles(); + uint32_t start_time = time_millis(); while (esc_is_high(pin)) { // check for startbit begin - if (time_cycles() - start_time >= START_BIT_TIMEOUT) { + if (time_millis() - start_time >= START_BIT_TIMEOUT_MS) { return 0; } }
tarball naming
@@ -84,7 +84,7 @@ rm -rf %{buildroot} %debug_package %{nil} %install -cd beegfs_client_module/build +cd v6*/beegfs_client_module/build echo "mkdir RPM_BUILD_ROOT (${RPM_BUILD_ROOT})" mkdir -p ${RPM_BUILD_ROOT} make RELEASE_PATH=${RPM_BUILD_ROOT}/opt/beegfs/src/client \
Solve minor bug in previous commit.
@@ -70,12 +70,12 @@ func MetaCall(function string, args ...interface{}) (interface{}, error) { // Create float32 if i, ok := arg.(float32); ok { - *cArg = C.metacall_value_create_float((C.float32)(i)) + *cArg = C.metacall_value_create_float((C.float)(i)) } // Create float64 if i, ok := arg.(float64); ok { - *cArg = C.metacall_value_create_double((C.float64)(i)) + *cArg = C.metacall_value_create_double((C.double)(i)) } // Create string
webui/base: update dockerfile
# base image for elektra web, all other images build upon this (builds elektra with `yajl` and `kdb`) -FROM ubuntu:16.04 +FROM ubuntu:20.04 # elektra deps RUN apt-get update RUN apt-get install -y software-properties-common -RUN add-apt-repository ppa:longsleep/golang-backports -RUN apt-get update -y && apt-get install -y cmake git build-essential libyajl-dev curl nodejs-legacy npm +RUN apt-get update -y && apt-get install -y cmake git build-essential libyajl-dev curl npm ENV GO111MODULE=on ENV LD_LIBRARY_PATH=/usr/local/lib # elektra web deps -RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - +RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - RUN apt-get install -y nodejs golang-go # Google Test
Validate parser parameter to XML_SetEndDoctypeDeclHandler
@@ -1492,6 +1492,7 @@ XML_SetStartDoctypeDeclHandler(XML_Parser parser, void XMLCALL XML_SetEndDoctypeDeclHandler(XML_Parser parser, XML_EndDoctypeDeclHandler end) { + if (parser != NULL) endDoctypeDeclHandler = end; }
[catboost] use structured bindings to increase readability
@@ -163,9 +163,9 @@ static TPoolMetainfo MakePoolMetainfo( metainfo.SetStringGroupIdFakeColumnIndex(GetFakeGroupIdColumnIndex(columnCount)); metainfo.SetStringSubgroupIdFakeColumnIndex(GetFakeSubgroupIdColumnIndex(columnCount)); - for (const auto& kv : columnIndexToLocalIndex) { + for (const auto [columnIndex, localIndex] : columnIndexToLocalIndex) { NCB::NIdl::EColumnType pbColumnType; - switch (columnTypes[kv.second]) { + switch (columnTypes[columnIndex]) { case EColumn::Num: pbColumnType = NCB::NIdl::CT_NUMERIC; break; @@ -202,7 +202,7 @@ static TPoolMetainfo MakePoolMetainfo( ythrow TCatboostException() << "unexpected column type in quantized pool"; } - metainfo.MutableColumnIndexToType()->insert({static_cast<ui32>(kv.first), pbColumnType}); + metainfo.MutableColumnIndexToType()->insert({static_cast<ui32>(columnIndex), pbColumnType}); } if (ignoredColumnIndices) { @@ -332,9 +332,9 @@ static void AddPoolMetainfo(const TPoolMetainfo& metainfo, NCB::TQuantizedPool* LabeledOutput(metainfo.GetColumnIndexToType().size(), pool->ColumnIndexToLocalIndex.size())); if (metainfo.GetColumnIndexToType().size() != pool->ColumnIndexToLocalIndex.size()) { - for (const auto& kv : metainfo.GetColumnIndexToType()) { + for (const auto [columnIndex, columnType] : metainfo.GetColumnIndexToType()) { const auto inserted = pool->ColumnIndexToLocalIndex.emplace( - kv.first, + columnIndex, pool->ColumnIndexToLocalIndex.size()).second; if (inserted) { @@ -349,8 +349,8 @@ static void AddPoolMetainfo(const TPoolMetainfo& metainfo, NCB::TQuantizedPool* CB_ENSURE(pool->ColumnTypes.size() == pool->Chunks.size(), "ColumnTypes array should have the same size as Chunks array"); - for (const auto kv : pool->ColumnIndexToLocalIndex) { - const auto pbType = metainfo.GetColumnIndexToType().at(kv.first); + for (const auto [columnIndex, localIndex] : pool->ColumnIndexToLocalIndex) { + const auto pbType = metainfo.GetColumnIndexToType().at(columnIndex); EColumn type; switch (pbType) { case NCB::NIdl::CT_UNKNOWN: @@ -396,7 +396,7 @@ static void AddPoolMetainfo(const TPoolMetainfo& metainfo, NCB::TQuantizedPool* break; } - pool->ColumnTypes[kv.second] = type; + pool->ColumnTypes[localIndex] = type; } }
Implement source rework to HTML client Implementing the source command rework - along with display - to the html client too. JerryScript-DCO-1.0-Signed-off-by: Daniel Balla
@@ -118,6 +118,7 @@ function DebuggerClient(address) var backtraceFrame = 0; var evalResult = null; var exceptionData = null; + var display = 0; function assert(expr) { @@ -691,7 +692,7 @@ function DebuggerClient(address) return; } - func.source = source; + func.source = source.split(/\r\n|[\r\n]/); func.sourceName = sourceName; break; } @@ -854,6 +855,11 @@ function DebuggerClient(address) + (breakpoint.at ? "at " : "around ") + breakpointInfo + breakpointToString(breakpoint)); + + if (debuggerObj.display) + { + debuggerObj.printSource(debuggerObj.display); + } return; } @@ -1163,11 +1169,57 @@ function DebuggerClient(address) } } - this.printSource = function() + this.printSource = function(line_num) { - if (lastBreakpointHit) + if (!lastBreakpointHit) + return; + + lines = lastBreakpointHit.func.source; + if (line_num === 0) { - appendLog(lastBreakpointHit.func.source); + var start = 0; + var end = lastBreakpointHit.func.source.length - 1; + } + else + { + var start = Math.max(lastBreakpointHit.line - line_num, 0) + var end = Math.min(lastBreakpointHit.line + line_num - 1, + lastBreakpointHit.func.source.length - 1) + } + + if (lastBreakpointHit.func.sourceName) + appendLog("Source: " + lastBreakpointHit.func.sourceName); + + for (i = start; i < end; i++) + { + var str = (i + 1).toString(); + while (str.length < 4) + { + str = " " + str; + } + + if (i == lastBreakpointHit.line - 1) + { + appendLog(str + " > " + lines[i]); + } + else + { + appendLog(str + " " + lines[i]); + } + } + } + + this.srcCheckArgs = function(line_num) + { + line_num = parseInt(line_num); + if (isNaN(line_num) || line_num < 0) + { + appendLog("Non-negative integer number expected"); + return -1; + } + else + { + return line_num; } } @@ -1367,8 +1419,34 @@ function debuggerCommand(event) debuggerObj.sendExceptionConfig(args[2]); break; + case "source": case "src": - debuggerObj.printSource(); + if (!args[2]) + { + debuggerObj.printSource(3); + break; + } + var line_num = debuggerObj.srcCheckArgs(args[2]); + if (line_num >= 0) + { + debuggerObj.printSource(line_num); + break; + } + break; + + case "display": + if (!args[2]) + { + appendLog("Non-negative integer number expected,\ + 0 turns off the automatic source code display"); + break; + } + var line_num = debuggerObj.srcCheckArgs(args[2]); + if (line_num >= 0) + { + debuggerObj.display = line_num; + break; + } break; case "list":
static link to sdl2 lib on rpi
@@ -882,7 +882,7 @@ if(BUILD_SDL) else() if(EMSCRIPTEN) elseif(RPI) - target_link_libraries(${TIC80_OUTPUT} SDL2 bcm_host) + target_link_libraries(${TIC80_OUTPUT} libSDL2.a bcm_host) else() target_link_libraries(${TIC80_OUTPUT} SDL2-static) endif() @@ -999,7 +999,6 @@ elseif (LINUX) if(RPI) set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE armhf) - set(CPACK_DEBIAN_PACKAGE_DEPENDS "libsdl2-2.0-0 (>= 2.0.9)") endif() install(CODE "set(CMAKE_INSTALL_LOCAL_ONLY true)")
in_opentelemetry: switched FLB_INPUT_NET with FLB_INPUT_NET_SERVER.
@@ -196,5 +196,5 @@ struct flb_input_plugin in_opentelemetry_plugin = { .cb_resume = NULL, .cb_exit = in_opentelemetry_exit, .config_map = config_map, - .flags = FLB_INPUT_NET | FLB_IO_OPT_TLS, + .flags = FLB_INPUT_NET_SERVER | FLB_IO_OPT_TLS };
Jenkinsfile: add build job with mmapstorage as default storage
@@ -79,6 +79,12 @@ CMAKE_FLAGS_INI = [ 'KDB_DEFAULT_STORAGE': 'ini' ] +CMAKE_FLAGS_MMAP = [ + 'KDB_DB_FILE': 'default.mmap', + 'KDB_DB_INIT': 'elektra.mmap', + 'KDB_DEFAULT_STORAGE': 'mmapstorage' +] + CMAKE_FLAGS_I386 = [ 'CMAKE_C_FLAGS': '-m32', 'CMAKE_CXX_FLAGS': '-m32' @@ -566,6 +572,19 @@ def generateFullBuildStages() { [TEST.ALL, TEST.MEM] ) + // Build Elektra with the mmap backend instead of the default + // TODO: currently not compatible with OPMPHM optimizations + tasks << buildAndTest( + "debian-stable-full-mmap", + DOCKER_IMAGES.stretch, + CMAKE_FLAGS_BUILD_ALL + + CMAKE_FLAGS_OPTIMIZATIONS_OFF + + CMAKE_FLAGS_MMAP + + CMAKE_FLAGS_COVERAGE + , + [TEST.ALL, TEST.MEM] + ) + // Build Elektra with xdg resolver to see if we are compliant def xdgResolver = 'resolver_mf_xp_x' tasks << buildAndTest(
adding libx11 XGetFontPath
@@ -386,7 +386,7 @@ GO(XGetDefault, pFppp) GO(XGetErrorDatabaseText, iFpppppi) GO(XGetErrorText, iFpipi) GO(XGetEventData, iFpp) -//GO(XGetFontPath +GO(XGetFontPath, pFpp) GO(XGetFontProperty, iFppp) GO(XGetGCValues, iFppup) GO(XGetGeometry, iFppppppppp)
tls initialization sanitized
@@ -95,11 +95,9 @@ int dill_tls_attach_client_mem(int s, struct dill_tls_storage *mem, BIO *bio = dill_tls_new_cbio(mem); if(dill_slow(!bio)) {err = errno; goto error3;} SSL_set_bio(ssl, bio, bio); - /* Make a private copy of the underlying socket. */ /* Take ownership of the underlying socket. */ - int u = dill_hown(s); - if(dill_slow(u < 0)) {err = errno; goto error1;} - s = u; + s = dill_hown(s); + if(dill_slow(s < 0)) {err = errno; goto error1;} /* Create the object. */ struct dill_tls_sock *self = (struct dill_tls_sock*)mem; self->hvfs.query = dill_tls_hquery; @@ -108,7 +106,7 @@ int dill_tls_attach_client_mem(int s, struct dill_tls_storage *mem, self->bvfs.brecvl = dill_tls_brecvl; self->ctx = ctx; self->ssl = ssl; - self->u = u; + self->u = s; self->deadline = -1; self->indone = 0; self->outdone = 0; @@ -133,8 +131,10 @@ error3: error2: SSL_CTX_free(ctx); error1:; + if(s >= 0) { int rc = dill_hclose(s); dill_assert(rc == 0); + } errno = err; return -1; } @@ -184,9 +184,8 @@ int dill_tls_attach_server_mem(int s, const char *cert, const char *pkey, if(dill_slow(!bio)) {err = errno; goto error3;} SSL_set_bio(ssl, bio, bio); /* Take ownership of the underlying socket. */ - int u = dill_hown(s); - if(dill_slow(u < 0)) {err = errno; goto error1;} - s = u; + s = dill_hown(s); + if(dill_slow(s < 0)) {err = errno; goto error1;} /* Create the object. */ struct dill_tls_sock *self = (struct dill_tls_sock*)mem; self->hvfs.query = dill_tls_hquery; @@ -195,7 +194,7 @@ int dill_tls_attach_server_mem(int s, const char *cert, const char *pkey, self->bvfs.brecvl = dill_tls_brecvl; self->ctx = ctx; self->ssl = ssl; - self->u = u; + self->u = s; self->deadline = -1; self->indone = 0; self->outdone = 0; @@ -220,8 +219,10 @@ error3: error2: SSL_CTX_free(ctx); error1: + if(s >= 0) { rc = dill_hclose(s); dill_assert(rc == 0); + } errno = err; return -1; }
Add sce_paf_private_vsnprintf function
#define _PSP2_PAF_H_ #include <psp2/types.h> +#include <stdarg.h> #ifdef __cplusplus extern "C" { @@ -36,6 +37,11 @@ void *sce_paf_private_memmove(void *destination, const void *source, SceSize num void *sce_paf_private_bcopy(void *destination, const void *source, SceSize num); void *sce_paf_private_memset(void *ptr, int value, SceSize num); int sce_paf_private_snprintf(char *s, SceSize n, const char *format, ...); + +int sce_paf_private_vsnprintf(char *dst, unsigned int max, const char *fmt, va_list arg); + +#define sce_paf_vsnprintf sce_paf_private_vsnprintf + int sce_paf_private_strcasecmp(const char *str1, const char *str2); char *sce_paf_private_strchr(const char *str, int character); int sce_paf_private_strcmp(const char *str1, const char *str2);
luci-app-ssr-libev-server: export page variable
@@ -5,7 +5,7 @@ local http = require "luci.http" function index() if not nixio.fs.access("/etc/config/ssr_libev_server") then return end entry({"admin", "vpn"}, firstchild(), "VPN", 45).dependent = false - entry({"admin", "vpn", "ssr_libev_server"}, cbi("ssr_libev_server/index"), + local page = entry({"admin", "vpn", "ssr_libev_server"}, cbi("ssr_libev_server/index"), _("SSR Libev Server")) page.order = 2 page.dependent = true
Don't roundup when evicting single part
@@ -21,7 +21,7 @@ struct eviction_policy_ops evict_policy_ops[ocf_eviction_max] = { }; static uint32_t ocf_evict_calculate(struct ocf_user_part *part, - uint32_t to_evict) + uint32_t to_evict, bool roundup) { if (part->runtime->curr_size <= part->config->min_size) { /* @@ -31,7 +31,7 @@ static uint32_t ocf_evict_calculate(struct ocf_user_part *part, return 0; } - if (to_evict < OCF_TO_EVICTION_MIN) + if (roundup && to_evict < OCF_TO_EVICTION_MIN) to_evict = OCF_TO_EVICTION_MIN; if (to_evict > (part->runtime->curr_size - part->config->min_size)) @@ -50,7 +50,7 @@ static inline uint32_t ocf_evict_part_do(ocf_cache_t cache, return 0; to_evict = ocf_evict_calculate(&cache->user_parts[target_part_id], - evict_cline_no); + evict_cline_no, false); return ocf_eviction_need_space(cache, io_queue, target_part, to_evict); @@ -92,7 +92,7 @@ static inline uint32_t ocf_evict_do(ocf_cache_t cache, goto out; } - to_evict = ocf_evict_calculate(part, evict_cline_no); + to_evict = ocf_evict_calculate(part, evict_cline_no, true); if (to_evict == 0) { /* No cache lines to evict for this partition */ continue;
tools: update hssi mailbox poll time 1 mirco second
@@ -50,11 +50,11 @@ BDF_PATTERN = re.compile(PATTERN, re.IGNORECASE) DEFAULT_BDF = 'ssss:bb:dd.f' -# mailbox register poll interval 1 milliseconds -HSSI_POLL_SLEEP_TIME = 0.001 +# mailbox register poll interval 1 microseconds +HSSI_POLL_SLEEP_TIME = 1/1000000 -# mailbox register poll timeout 10 milliseconds -HSSI_POLL_TIMEOUT = 0.01 +# mailbox register poll timeout 1 seconds +HSSI_POLL_TIMEOUT = 1 HSSI_FEATURE_ID = 0x15
documentation: Fix link for Kotlin binding Closes
@@ -18,7 +18,7 @@ List of currently supported bindings (use `cmake -DBINDINGS=ALL;-EXPERIMENTAL;-D - [python](swig/python/) Python 3 SWIG bindings - [ruby](swig/ruby/) Ruby bindings - [jna](jna/) Java binding using JNA - - [kotlin](jna/kotlin) Kotlin binding (based on JNA) + - [kotlin](jna/libelektra-kotlin) Kotlin binding (based on JNA) - [rust](rust/) Rust bindings Experimental bindings (included in `cmake -DBINDINGS=EXPERIMENTAL`):
node version, "before_deploy" duplication workaround
language: node_js # ish, mainly used as an entry point +node_js: + - 4 before_install: - cd .travis # keep main directory clear @@ -10,7 +12,8 @@ before_install: before_script: bash get-or-build-pill.sh -before_deploy: mkdir piers && tar cvzSf piers/zod-$TRAVIS_COMMIT.tgz zod/ +# https://github.com/travis-ci/travis-ci/issues/2570 +before_deploy: "[ -d piers ] || { mkdir piers && tar cvzSf piers/zod-$TRAVIS_COMMIT.tgz zod/; }" deploy: - skip_cleanup: true provider: gcs
enforce that macrocompiler passes are done serially
@@ -82,7 +82,7 @@ HARNESS_MACROCOMPILER_MODE = --mode synflops $(HARNESS_SMEMS_FILE) $(HARNESS_SMEMS_FIR): harness_macro_temp @echo "" > /dev/null -harness_macro_temp: $(HARNESS_SMEMS_CONF) +harness_macro_temp: $(HARNESS_SMEMS_CONF) | top_macro_temp cd $(base_dir) && $(SBT) "project barstoolsMacros" "runMain barstools.macros.MacroCompiler -n $(HARNESS_SMEMS_CONF) -v $(HARNESS_SMEMS_FILE) -f $(HARNESS_SMEMS_FIR) $(HARNESS_MACROCOMPILER_MODE)" ########################################################################################
Update creating_a_simple_bundle.md Small fixes to fix the guide
@@ -64,7 +64,7 @@ SET(CMAKE_CXX_FLAGS_DEBUG "-g -DDEBUG") #Part 3. Setup Celix cmake files, include paths, libraries and library paths #Note. If celix is not installed in /usr/local dir, change the location accordingly. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr/local/share/celix/cmake/modules") -find_package(CELIX REQUIRED) +find_package(Celix REQUIRED) #Part 4. Choose C, C++ or both add_subdirectory(bundles/HelloWorld_c) #C @@ -131,7 +131,7 @@ to generate the bundle activator functions (and as result the symbols needed for The C Bundle Activator: ```C -//${WS}/myproject/bundles/hello_world/src/HelloWorld_activator.c +//${WS}/myproject/bundles/HelloWorld_c/src/HelloWorld_activator.c #include <stdio.h> #include <celix_api.h> @@ -157,7 +157,7 @@ CELIX_GEN_BUNDLE_ACTIVATOR(activator_data_t, activator_start, activator_stop) The C++ Bundle Activator: ```C++ -//${WS}/myproject/bundles/HelloWorld/private/src/HelloWorldActivator.cc +//${WS}/myproject/bundles/HelloWorld_cxx/src/HelloWorldActivator.cc #include <memory> #include <iostream>
tests: fixed ring buffer event issue
@@ -82,7 +82,6 @@ static void test_smart_flush() struct mk_event *event; struct mk_event_loop *evl; struct flb_ring_buffer *rb; - struct flb_ring_buffer *erb; struct flb_bucket_queue *bktq; #ifdef _WIN32 @@ -141,9 +140,7 @@ static void test_smart_flush() flush_event_detected = FLB_FALSE; flb_event_priority_live_foreach(event, bktq, evl, 10) { if(event->type == FLB_ENGINE_EV_THREAD_INPUT) { - erb = (struct flb_ring_buffer *) event->data; - - flb_pipe_r(erb->signal_channels[0], signal_buffer, sizeof(signal_buffer)); + flb_pipe_r(event->fd, signal_buffer, sizeof(signal_buffer)); flush_event_detected = FLB_TRUE; }