message
stringlengths
6
474
diff
stringlengths
8
5.22k
Fix nordic cmake file
@@ -491,14 +491,6 @@ if(AFR_ENABLE_DEMOS OR AFR_ENABLE_TESTS) ${exe_target} ${application_src} ) -endif() - -if(NOT AFR_METADATA_MODE) - message(FATAL_ERROR "CMake support for Nordic is not complete yet.") -endif() -# ------------------------------------------------------------------------------------------------- -# Additional build configurations -# ------------------------------------------------------------------------------------------------- set( mkld_flags @@ -509,7 +501,6 @@ set( -section-placement-macros "FLASH_PH_START=0x0$<SEMICOLON>FLASH_PH_SIZE=0x100000$<SEMICOLON>RAM_PH_START=0x20000000$<SEMICOLON>RAM_PH_SIZE=0x40000$<SEMICOLON>FLASH_START=0x27000$<SEMICOLON>FLASH_SIZE=0xda000$<SEMICOLON>RAM_START=0x200046F8$<SEMICOLON>RAM_SIZE=0x3B908" ) - add_custom_command( TARGET ${exe_target} PRE_LINK COMMAND VERBATIM "${AFR_COMPILER_DIR}/../../../bin/mkld" ${mkld_flags} "${CMAKE_BINARY_DIR}/${exe_target}.ld" @@ -534,3 +525,4 @@ add_custom_command( TARGET ${exe_target} POST_BUILD COMMAND "${CMAKE_COMMAND}" -E copy "${output_file}" "${CMAKE_BINARY_DIR}" ) +endif()
examples/userfs: Implement the dummy callback of fchstat and chstat
@@ -117,6 +117,10 @@ static int ufstest_rename(FAR void *volinfo, FAR const char *oldrelpath, static int ufstest_stat(FAR void *volinfo, FAR const char *relpath, FAR struct stat *buf); static int ufstest_destroy(FAR void *volinfo); +static int ufstest_fchstat(FAR void *volinfo, FAR void *openinfo, + FAR const struct stat *buf, int flags); +static int ufstest_chstat(FAR void *volinfo, FAR const char *relpath, + FAR const struct stat *buf, int flags); /**************************************************************************** * Private Data @@ -175,7 +179,9 @@ static const struct userfs_operations_s g_ufstest_ops = ufstest_rmdir, ufstest_rename, ufstest_stat, - ufstest_destroy + ufstest_destroy, + ufstest_fchstat, + ufstest_chstat }; /**************************************************************************** @@ -556,6 +562,18 @@ static int ufstest_destroy(FAR void *volinfo) return OK; } +static int ufstest_fchstat(FAR void *volinfo, FAR void *openinfo, + FAR const struct stat *buf, int flags) +{ + return OK; +} + +static int ufstest_chstat(FAR void *volinfo, FAR const char *relpath, + FAR const struct stat *buf, int flags) +{ + return OK; +} + /**************************************************************************** * ufstest_daemon ****************************************************************************/
build: Bump cmake version and use new version syntax
set(CMAKE_LEGACY_CYGWIN_WIN32 0) -cmake_minimum_required(VERSION 2.8.5) +cmake_minimum_required(VERSION 3.0) + +project(cJSON + VERSION 1.7.15 + LANGUAGES C) -project(cJSON C) cmake_policy(SET CMP0054 NEW) # set CMP0054 policy include(GNUInstallDirs) -set(PROJECT_VERSION_MAJOR 1) -set(PROJECT_VERSION_MINOR 7) -set(PROJECT_VERSION_PATCH 15) set(CJSON_VERSION_SO 1) set(CJSON_UTILS_VERSION_SO 1) -set(PROJECT_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") - set(custom_compiler_flags)
test: detect valgrind in testkdb_allplugins
@@ -231,7 +231,9 @@ PluginDatabase::Status ModulesPluginDatabase::status (PluginSpec const & spec) c std::string ModulesPluginDatabase::lookupInfo (PluginSpec const & spec, std::string const & which) const { - PluginPtr plugin = impl->modules.load (spec.getName (), spec.getConfig ()); + KeySet conf = spec.getConfig (); + conf.append (Key ("system:/module", KEY_VALUE, "this plugin was loaded for the status", KEY_END)); + PluginPtr plugin = impl->modules.load (spec.getName (), conf); return plugin->lookupInfo (which); }
travis (macOS): Add cunit to homebrew for fix make check
@@ -39,7 +39,7 @@ before_install: before_script: # First build external lib - ./ci/build_openssl.sh - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install libev; fi + - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install libev cunit; fi # configure ngtcp2 - if [ "$CI_BUILD" == "autotools" ]; then autoreconf -i; fi - export PKG_CONFIG_PATH=$PWD/../openssl/build/lib/pkgconfig LDFLAGS="$EXTRA_LDFLAGS -Wl,-rpath,$PWD/../openssl/build/lib"
add signature algorithms extension
@@ -107,11 +107,60 @@ int mbedtls_ssl_tls13_write_sig_alg_ext( mbedtls_ssl_context *ssl, unsigned char *end, size_t *olen ) { - ((void) ssl); - ((void) buf); - ((void) end); + unsigned char *p = buf; + unsigned char *sig_alg_ptr; /* Start of supported_signature_algorithms */ + size_t sig_alg_len = 0; /* Length of supported_signature_algorithms */ + *olen = 0; - MBEDTLS_SSL_DEBUG_MSG( 3, ( "signature_algorithm extension is not available" ) ); + + /* Skip the extension on the client if all allowed key exchanges + * are PSK-based. */ +#if defined(MBEDTLS_SSL_CLI_C) + if( ssl->conf->endpoint == MBEDTLS_SSL_IS_CLIENT && + !mbedtls_ssl_conf_tls13_some_ephemeral_enabled( ssl ) ) + { + return( 0 ); + } +#endif /* MBEDTLS_SSL_CLI_C */ + + MBEDTLS_SSL_DEBUG_MSG( 3, ( "adding signature_algorithms extension" ) ); + + /* Check there is space for extension header */ + MBEDTLS_SSL_CHK_BUF_PTR( p, end, 6 ); + p += 6; + + /* + * Write supported_signature_algorithms + */ + sig_alg_ptr = p; + for( const uint16_t *sig_alg = ssl->conf->tls13_sig_algs; + *sig_alg != MBEDTLS_TLS13_SIG_NONE; sig_alg++ ) + { + MBEDTLS_SSL_CHK_BUF_PTR( p, end, 2 ); + MBEDTLS_PUT_UINT16_BE( *sig_alg, p, 0 ); + p += 2; + MBEDTLS_SSL_DEBUG_MSG( 3, ( "signature scheme [%x]", *sig_alg ) ); + } + + /* Length of supported_signature_algorithms*/ + sig_alg_len = p - sig_alg_ptr; + if( sig_alg_len == 0 ) + { + MBEDTLS_SSL_DEBUG_MSG( 1, ( "No signature algorithms defined." ) ); + return( MBEDTLS_ERR_SSL_INTERNAL_ERROR ); + } + + /* Write extension_type */ + MBEDTLS_PUT_UINT16_BE( MBEDTLS_TLS_EXT_SIG_ALG, buf, 0 ); + /* Write extension_data_length */ + MBEDTLS_PUT_UINT16_BE( sig_alg_len + 2, buf, 2 ); + /* Write length of supported_signature_algorithms */ + MBEDTLS_PUT_UINT16_BE( sig_alg_len, buf, 4 ); + + /* Output the total length of signature algorithms extension. */ + *olen = p - buf; + + ssl->handshake->extensions_present |= MBEDTLS_SSL_EXT_SIG_ALG; return( 0 ); }
components/bt: Add a detailed description for the user to distinguish the function of the query buffer api.
@@ -53,7 +53,7 @@ extern UINT16 L2CA_GetFreePktBufferNum_LE(void); /** * @brief This function is called to get currently sendable packets number on controller, - * the function is called only in BLE running core now. + * the function is called only in BLE running core and single connection now. * * @return * sendable packets number on controller @@ -65,6 +65,15 @@ uint16_t esp_ble_get_sendable_packets_num (void) return L2CA_GetFreePktBufferNum_LE(); } +/** + * @brief This function is used to query the number of available buffers for the current connection. + * When you need to query the current available buffer number, it is recommended to use this API. + * @param[in] conn_id: current connection id. + * + * @return + * Number of available buffers for the current connection + * + */ extern UINT16 L2CA_GetCurFreePktBufferNum_LE(UINT16 conn_id); uint16_t esp_ble_get_cur_sendable_packets_num (uint16_t connid)
Add a unit test exercising the case registering API
@@ -320,6 +320,53 @@ static void test_at_position(void) ok(ret != 0); } +static void test_str_case(void) +{ + int i, j; +#define MAX_SIZE 256 + char tests[][MAX_SIZE] = { + "", + "User-Agent", + "Date", + "date", + }; + char tmp1[MAX_SIZE], tmp2[MAX_SIZE]; + + h2o_mem_pool_t pool; + h2o_mem_init_pool(&pool); + + for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) { + for (j = 0; j < 2; j++) { + h2o_str_case_t *rc1, *rc2; + size_t l; + + l = strlen(tests[i]); + strcpy(tmp1, tests[i]); + strcpy(tmp2, tests[i]); + + rc1 = h2o_str_case_record(j ? &pool : NULL, tmp1, l); + rc2 = h2o_str_case_dup(j ? &pool : NULL, rc1, l); + + h2o_strtolower(tmp1, l); + h2o_strtolower(tmp2, l); + + + h2o_str_case_restore(rc1, tmp1, l); + h2o_str_case_restore(rc2, tmp2, l); + + ok(!strcmp(tmp1, tmp2)); + ok(!strcmp(tests[i], tmp2)); + + if (!j) { + free(rc1); + free(rc2); + } + } + } + + h2o_mem_clear_pool(&pool); +} + void test_lib__common__string_c(void) { subtest("strstr", test_strstr); @@ -332,4 +379,5 @@ void test_lib__common__string_c(void) subtest("htmlescape", test_htmlescape); subtest("uri_escape", test_uri_escape); subtest("at_position", test_at_position); + subtest("str_case", test_str_case); }
mangle: append NUL-byte to the buffer
@@ -947,4 +947,9 @@ void mangle_mangleContent(run_t* run) { mangleFuncs[choice](run); } } + + /* Add NUL-byte to the buffer if smaller than the max size */ + if (run->dynamicFileSz < run->global->mutate.maxFileSz) { + run->dynamicFile[run->dynamicFileSz] = '\0'; + } }
Missing static specifier added
@@ -71,7 +71,7 @@ int64_t mnow(void) { /* Like now(), this function can be called only after context is initialized but unlike now() it doesn't do time caching. */ -int64_t now_(void) { +static int64_t now_(void) { #if defined __APPLE__ struct dill_ctx_now *ctx = &dill_getctx->now; uint64_t ticks = mach_absolute_time();
the higher bits don't make it anyway as Robert pointed out
@@ -12,9 +12,8 @@ void Concept_RESET(Concept *concept, SDR name) int pieces = SDR_BLOCK_SIZE / (sizeof(CONCEPT_HASH_TYPE)); for(int j=0; j<pieces; j++) { - CONCEPT_HASH_TYPE AllOnesPart = -1; int shift_right = j*8*sizeof(CONCEPT_HASH_TYPE); //each j shifts 8*NUM_BYTES_OF_CONCEPT_HASH_TYPE - hash |= (name.blocks[i] >> shift_right) & AllOnesPart; + hash |= name.blocks[i] >> shift_right; } ) concept->name_hash = hash;
borderhover panel fix
@@ -2266,7 +2266,8 @@ resizeborder(const Arg *arg) { getrootptr(&x, &y); c = selmon->sel; - if ((y > c->y && y < c->y + c->h && x > c->x && x < c->x + c->w) || + if ((selmon->showbar && y < selmon->my + bh) || + (y > c->y && y < c->y + c->h && x > c->x && x < c->x + c->w) || y < c->y - 30 || x < c->x - 30 || y > c->y + c->h + 30 || x > c->x + c->w + 30){ return 1; } @@ -2293,7 +2294,7 @@ resizeborder(const Arg *arg) { if ((ev.xmotion.time - lasttime) <= (1000 / 60)) continue; lasttime = ev.xmotion.time; - if ((y > c->y && y < c->y + c->h && x > c->x && x < c->x + c->w)) { + if ((y > c->y && y < c->y + c->h && x > c->x && x < c->x + c->w) || (selmon->showbar && y < selmon->my + bh)) { XUngrabPointer(dpy, CurrentTime); return 1; } @@ -2306,11 +2307,10 @@ resizeborder(const Arg *arg) { if (y < c->y && x > c->x + (c->w * 0.5) - c->w / 4 && x < c->x + (c->w * 0.5) + c->w / 4) { XWarpPointer(dpy, None, root, 0, 0, 0, 0, x, c->y + 10); movemouse(NULL); - return 0; } else { resizemouse(NULL); - return 1; } + return 0; } else { return 1; }
OcMachoLib: Assume relocation target is aligned.
@@ -345,6 +345,7 @@ MachoGetSymbolByRelocationOffset64 ( ) { CONST MACH_RELOCATION_INFO *Relocation; + CONST UINT64 *Data; ASSERT (Context != NULL); @@ -353,14 +354,13 @@ MachoGetSymbolByRelocationOffset64 ( if (Relocation->Extern != 0) { *Symbol = MachoGetSymbolByIndex64 (Context, Relocation->SymbolNumber); } else { - if ((Address + sizeof (UINT64)) > Context->FileSize) { + Data = ((UINT64 *)((UINTN)Context->MachHeader + Address)); + if (((Address + sizeof (UINT64)) > Context->FileSize) + || !OC_ALIGNED (Data)) { *Symbol = NULL; } else { // FIXME: Only C++ symbols. - *Symbol = InternalGetSymbolByValue ( - Context, - ReadUnaligned64 ((UINT64 *)((UINTN)Context->MachHeader + Address)) - ); + *Symbol = InternalGetSymbolByValue (Context, *Data); } }
Fix typo in trace trajectory init plugin won't compile if VLIB_BUFFER_TRACE_TRAJECTORY is set. The quad loop was OK, bug in single loop only.
@@ -304,7 +304,7 @@ avf_process_rx_burst (vlib_main_t * vm, vlib_node_runtime_t * node, clib_memcpy (vnet_buffer (b[0])->sw_if_index, vnet_buffer (bt)->sw_if_index, 2 * sizeof (u32)); - VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0); + VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b[0]); /* next */ rxve += 1;
Increase RE_MAX_AST_LEVELS from 1000 to 2000.
@@ -83,6 +83,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #define RE_MAX_FIBERS 1024 // Maximum number of levels in regexp's AST -#define RE_MAX_AST_LEVELS 1000 +#define RE_MAX_AST_LEVELS 2000 #endif
Fix build on macOS.
#include <stdbool.h> #include <stddef.h> +#ifdef __APPLE__ +#include <sys/types.h> /* This in turn sources machine/endian.h */ +#else #include <endian.h> +#endif #ifdef __APPLE__ #define __BYTE_ORDER BYTE_ORDER @@ -859,4 +863,3 @@ int mystrlen(uint8_t *in_buf); int countdelimiter(uint8_t *in_buf, char delimiter); int getdelimiterpos(uint8_t *in_buf, char delimiter); -
status: expose mmap_errors via the events reporter
@@ -97,13 +97,14 @@ static h2o_iovec_t events_status_final(void *priv, h2o_globalconf_t *gconf, h2o_ " \"http2-errors.inadequate-security\": %" PRIu64 ", \n" " \"http2.read-closed\": %" PRIu64 ", \n" " \"http2.write-closed\": %" PRIu64 ", \n" - " \"ssl.errors\": %" PRIu64 "\n", + " \"ssl.errors\": %" PRIu64 ", \n" + " \"memory.mmap_errors\": %" PRIu64 "\n", H1_AGG_ERR(400), H1_AGG_ERR(403), H1_AGG_ERR(404), H1_AGG_ERR(405), H1_AGG_ERR(416), H1_AGG_ERR(417), H1_AGG_ERR(500), H1_AGG_ERR(502), H1_AGG_ERR(503), H2_AGG_ERR(PROTOCOL), H2_AGG_ERR(INTERNAL), H2_AGG_ERR(FLOW_CONTROL), H2_AGG_ERR(SETTINGS_TIMEOUT), H2_AGG_ERR(STREAM_CLOSED), H2_AGG_ERR(FRAME_SIZE), H2_AGG_ERR(REFUSED_STREAM), H2_AGG_ERR(CANCEL), H2_AGG_ERR(COMPRESSION), H2_AGG_ERR(CONNECT), H2_AGG_ERR(ENHANCE_YOUR_CALM), H2_AGG_ERR(INADEQUATE_SECURITY), esc->h2_read_closed, esc->h2_write_closed, - esc->ssl_errors); + esc->ssl_errors, (uint64_t)mmap_errors); pthread_mutex_destroy(&esc->mutex); free(esc); return ret;
[brick] Remove typo
@@ -114,7 +114,6 @@ func main() { } if *watch { exec.EnableWatch() - fmt.Println("Invalid Parameter. Usage: brick filename [-v|-w]\n\t-v\tverbose mode\n\t-w\twatch mode") } exec.Execute(cmd, flag.Arg(0))
Update the s_client -sess_out feature to work for TLSv1.3 Previously "-sess_out" wrote out the session as soon as the handshake finished. In TLSv1.3 this won't work because the NewSessionTicket message arrives post-handshake. Instead we use the session callback mechanism to do this.
@@ -90,6 +90,7 @@ static char *keymatexportlabel = NULL; static int keymatexportlen = 20; static BIO *bio_c_out = NULL; static int c_quiet = 0; +static char *sess_out = NULL; static void print_stuff(BIO *berr, SSL *con, int full); #ifndef OPENSSL_NO_OCSP @@ -779,6 +780,24 @@ static void freeandcopy(char **dest, const char *source) *dest = OPENSSL_strdup(source); } +static int new_session_cb(SSL *S, SSL_SESSION *sess) +{ + BIO *stmp = BIO_new_file(sess_out, "w"); + + if (stmp != NULL) { + PEM_write_bio_SSL_SESSION(stmp, sess); + BIO_free(stmp); + } else { + BIO_printf(bio_err, "Error writing session file %s\n", sess_out); + } + + /* + * We always return a "fail" response so that the session gets freed again + * because we haven't used the reference. + */ + return 0; +} + int s_client_main(int argc, char **argv) { BIO *sbio; @@ -804,7 +823,7 @@ int s_client_main(int argc, char **argv) char *port = OPENSSL_strdup(PORT); char *inrand = NULL; char *passarg = NULL, *pass = NULL, *vfyCApath = NULL, *vfyCAfile = NULL; - char *sess_in = NULL, *sess_out = NULL, *crl_file = NULL, *p; + char *sess_in = NULL, *crl_file = NULL, *p; char *xmpphost = NULL; const char *ehlo = "mail.example.com"; struct timeval timeout, *timeoutp; @@ -1674,6 +1693,17 @@ int s_client_main(int argc, char **argv) } } + /* + * In TLSv1.3 NewSessionTicket messages arrive after the handshake and can + * come at any time. Therefore we use a callback to write out the session + * when we know about it. This approach works for < TLSv1.3 as well. + */ + if (sess_out) { + SSL_CTX_set_session_cache_mode(ctx, SSL_SESS_CACHE_CLIENT + | SSL_SESS_CACHE_NO_INTERNAL_STORE); + SSL_CTX_sess_set_new_cb(ctx, new_session_cb); + } + con = SSL_new(ctx); if (sess_in) { SSL_SESSION *sess; @@ -2168,15 +2198,6 @@ int s_client_main(int argc, char **argv) tlsextcbp.ack ? "" : "not "); } - if (sess_out) { - BIO *stmp = BIO_new_file(sess_out, "w"); - if (stmp) { - PEM_write_bio_SSL_SESSION(stmp, SSL_get_session(con)); - BIO_free(stmp); - } else - BIO_printf(bio_err, "Error writing session file %s\n", - sess_out); - } if (c_brief) { BIO_puts(bio_err, "CONNECTION ESTABLISHED\n"); print_ssl_summary(con);
Fix uninitialized variable m_QuickstartGen I noticed this on an x64 build on VS 2017 15.9.8 I also re-ordered the variables so that it's easier to spot an uninitialized one.
@@ -65,11 +65,12 @@ void DriverOptionsInit(DriverOptions* self) self->m_DisplayStats = false; self->m_GenDagOnly = false; self->m_Quiet = false; + self->m_IdeGen = false; self->m_Clean = false; self->m_Rebuild = false; - self->m_IdeGen = false; self->m_DebugSigning = false; self->m_ContinueOnError = false; + self->m_QuickstartGen = false; self->m_ThreadCount = GetCpuCount(); self->m_WorkingDir = nullptr; self->m_DAGFileName = ".tundra2.dag";
Added XRC to coins list
"explorerBlockLink": "https://explorer.ergoplatform.com/en/blocks/$hash$", "explorerTxLink": "https://explorer.ergoplatform.com/en/transactions/{0}", "explorerAccountLink": "https://explorer.ergoplatform.com/en/addresses/{0}" + }, + "xRhodium": { + "name": "xRhodium", + "symbol": "XRC", + "family": "bitcoin", + "coinbaseHasher": { + "hash": "sha256d" + }, + "headerHasher": { + "hash": "x11" + }, + "blockHasher": { + "hash": "reverse", + "args": [{ "hash": "sha256d" }] + }, + "explorerBlockLink": "https://explorer.xrhodium.org/xrc/blockbyheight/$height$", + "explorerTxLink": "https://explorer.xrhodium.org/xrc/tx/{0}", + "explorerAccountLink": "https://explorer.xrhodium.org/xrc/address/{0}" } }
Update CHANGELOG on requiring explicit link against oecryptombedtls
@@ -10,6 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [Unreleased][Unreleased_log] -------------- +## Breaking Changes +- liboecryptombed is now called liboecryptombedtls and will no longer be automatically included as a link dependency when linking liboeenclave in CMake. + - The `openenclave-config.cmake` and `openenclave-lvi-mitigation-config.cmake` will not specify the renamed liboecryptombedtls as a `PUBLIC` link requirement for liboeenclave. + - Enclave apps that build with CMake and use the Open Enclave cmake configurations must now explicitly include `openenclave::oecryptombedtls` when linking `openenclave::oeenclave`. + - See the [CMakeLists.txt in the helloworld sample](samples/helloworld/enclave/CMakeLists.txt#L32) for an example. + - This change does not currently affect enclave apps relying on pkgconfig. + [v0.12.0][v0.12.0_log] --------------
NetworkTools: Set whois control readonly
@@ -899,6 +899,7 @@ INT_PTR CALLBACK WhoisDlgProc( SendMessage(context->RichEditHandle, EM_SETWORDWRAPMODE, WBF_WORDWRAP, 0); //context->FontHandle = PhCreateCommonFont(-11, FW_MEDIUM, context->RichEditHandle); SendMessage(context->RichEditHandle, EM_SETMARGINS, EC_LEFTMARGIN, MAKELONG(4, 0)); + SendMessage(context->RichEditHandle, EM_SETREADONLY, TRUE, 0); PhInitializeLayoutManager(&context->LayoutManager, hwndDlg); PhAddLayoutItem(&context->LayoutManager, context->RichEditHandle, NULL, PH_ANCHOR_ALL);
Update db test module error for newer libpq versions. PostgreSQL 14 libpq throws a more detailed error, so adjust the regular expression to handle the old and the new errors.
@@ -701,11 +701,11 @@ testRun(void) TEST_ASSIGN(result, dbGet(false, true, false), "get primary and standy"); - hrnLogReplaceAdd("No such file or directory.*$", NULL, "NO SUCH FILE OR DIRECTORY", false); + hrnLogReplaceAdd("(could not connect to server|connection to server on socket).*$", NULL, "PG ERROR", false); TEST_RESULT_LOG( "P00 WARN: unable to check pg-4: [DbConnectError] unable to connect to 'dbname='postgres' port=5433': error\n" "P00 WARN: unable to check pg-5: [DbConnectError] raised from remote-0 protocol on 'localhost':" - " unable to connect to 'dbname='postgres' port=5432': could not connect to server: [NO SUCH FILE OR DIRECTORY]"); + " unable to connect to 'dbname='postgres' port=5432': [PG ERROR]"); TEST_RESULT_INT(result.primaryIdx, 3, " check primary idx"); TEST_RESULT_BOOL(result.primary != NULL, true, " check primary");
Update: example consistent with what the vision channel currently outputs
@@ -17,4 +17,4 @@ the bowl is near the bottle! <bottle --> [equalX]>. :|: 10 the bowl is near the bottle? -//expected: Answer: <(bowl * bottle) --> near>. :|: occurrenceTime=12 Truth: frequency=1.000000, confidence=0.729000 +//expected: Answer: <(bowl * bottle) --> near>. :|: occurrenceTime=13 Truth: frequency=1.000000, confidence=0.583200
xive: Don't assume opal_xive_eoi() is called with the right queue prio Just use the one we know is valid rather than what's passed as an argument. Linux might call us with 0.
@@ -2954,9 +2954,6 @@ static int64_t opal_xive_eoi(uint32_t xirr) lock(&xs->lock); - /* Snapshor current CPPR, it's assumed to be our IRQ priority */ - irqprio = xs->cppr; - /* If this was our magic IPI, convert to IRQ number */ if (isn == 2) { isn = xs->ipi_irq; @@ -2973,7 +2970,7 @@ static int64_t opal_xive_eoi(uint32_t xirr) */ if (xive_read_eq(xs, true)) { xive_cpu_vdbg(c, " isn %08x, skip, queue non empty\n", xirr); - xs->pending |= 1 << irqprio; + xs->pending |= 1 << XIVE_EMULATION_PRIO; } #ifndef EQ_ALWAYS_NOTIFY else { @@ -2993,7 +2990,7 @@ static int64_t opal_xive_eoi(uint32_t xirr) if (eoi_val & 1) { sync(); if (xive_read_eq(xs, true)) - xs->pending |= 1 << irqprio; + xs->pending |= 1 << XIVE_EMULATION_PRIO; } } #endif @@ -3036,7 +3033,7 @@ static int64_t opal_xive_eoi(uint32_t xirr) * delivery considering the new CPPR value. This can be done * without lock as these fields are per-cpu. */ - return opal_xive_check_pending(xs, cppr); + return opal_xive_check_pending(xs, cppr) ? 1 : 0; } static int64_t opal_xive_get_xirr(uint32_t *out_xirr, bool just_poll)
options/posix: Fix several sign compare warnings in musl imported code
@@ -32,7 +32,7 @@ static int str_next(const char *str, size_t n, size_t *step) *step = 0; return 0; } - if (str[0] >= 128U) { + if ((unsigned char)str[0] >= 128U) { wchar_t wc; int k = mbtowc(&wc, str, n); if (k<0) { @@ -85,7 +85,7 @@ static int pat_next(const char *pat, size_t m, size_t *step, int flags) if (pat[0] == '?') return QUESTION; escaped: - if (pat[0] >= 128U) { + if ((unsigned char)pat[0] >= 128U) { wchar_t wc; int k = mbtowc(&wc, pat, m); if (k<0) { @@ -127,8 +127,8 @@ static int match_bracket(const char *p, int k, int kfold) int l = mbtowc(&wc2, p+1, 4); if (l < 0) return 0; if (wc <= wc2) - if ((unsigned)k-wc <= wc2-wc || - (unsigned)kfold-wc <= wc2-wc) + if ((unsigned)k-wc <= (unsigned)wc2-wc || + (unsigned)kfold-wc <= (unsigned)wc2-wc) return !inv; p += l-1; continue; @@ -148,7 +148,7 @@ static int match_bracket(const char *p, int k, int kfold) } continue; } - if (*p < 128U) { + if ((unsigned char)*p < 128U) { wc = (unsigned char)*p; } else { int l = mbtowc(&wc, p, 4); @@ -230,7 +230,7 @@ static int fnmatch_internal(const char *pat, size_t m, const char *str, size_t n * On illegal sequences we may get it wrong, but in that case * we necessarily have a matching failure anyway. */ for (s=endstr; s>str && tailcnt; tailcnt--) { - if (s[-1] < 128U || MB_CUR_MAX==1) s--; + if ((unsigned char)s[-1] < 128U || MB_CUR_MAX==1) s--; else while ((unsigned char)*--s-0x80U<0x40 && s>str); } if (tailcnt) return FNM_NOMATCH;
Tools: print full usage info. Also put feature AEC at the top
@@ -20,6 +20,9 @@ extern int optind; static void usage_and_exit(const char* progname) { printf("\nUsage: %s [-v] [-d] [-s]\n", progname); + printf("\t-v\tPrint only the version of ecCodes\n"); + printf("\t-d\tPrint only the definitions path\n"); + printf("\t-s\tPrint only the samples path\n"); exit(1); } @@ -37,14 +40,14 @@ static void print_debug_info(grib_context* context) #ifdef HAVE_AEC aec = 1; #endif - grib_context_log(context, GRIB_LOG_DEBUG, "Git SHA1=%s", grib_get_git_sha1()); - grib_context_log(context, GRIB_LOG_DEBUG, "Build date=%s", codes_get_build_date()); + grib_context_log(context, GRIB_LOG_DEBUG, "Git SHA1: %s", grib_get_git_sha1()); + grib_context_log(context, GRIB_LOG_DEBUG, "Build date: %s", codes_get_build_date()); grib_context_log(context, GRIB_LOG_DEBUG, "Features:"); + grib_context_log(context, GRIB_LOG_DEBUG, " HAVE_AEC=%d", aec); grib_context_log(context, GRIB_LOG_DEBUG, " HAVE_JPEG=%d", HAVE_JPEG); grib_context_log(context, GRIB_LOG_DEBUG, " HAVE_LIBJASPER=%d", HAVE_LIBJASPER); grib_context_log(context, GRIB_LOG_DEBUG, " HAVE_LIBOPENJPEG=%d", HAVE_JPEG); grib_context_log(context, GRIB_LOG_DEBUG, " HAVE_LIBPNG=%d", HAVE_LIBPNG); - grib_context_log(context, GRIB_LOG_DEBUG, " HAVE_AEC=%d", aec); grib_context_log(context, GRIB_LOG_DEBUG, " HAVE_ECCODES_THREADS=%d", GRIB_PTHREADS); #ifdef GRIB_OMP_THREADS grib_context_log(context, GRIB_LOG_DEBUG, " HAVE_ECCODES_OMP_THREADS=%d", GRIB_OMP_THREADS); @@ -90,8 +93,7 @@ int main(int argc, char* argv[]) if (print_flags == INFO_PRINT_ALL) { print_debug_info(context); printf("\n"); - printf("%s Version %d.%d.%d", - grib_get_package_name(), major, minor, revision); + printf("%s Version %d.%d.%d", grib_get_package_name(), major, minor, revision); if (ECCODES_MAJOR_VERSION < 1) printf(" PRE-RELEASE");
Directory Value: Use `using` statement
@@ -49,7 +49,7 @@ kdb::KeySet getContract () extern "C" { -typedef Delegator<DirectoryValueDelegate> delegator; +using delegator = Delegator<DirectoryValueDelegate>; /** @see elektraDocOpen */ int elektraDirectoryValueOpen (Plugin * handle, Key * key)
update manifest page breaks for 1.3.8
@@ -68,7 +68,8 @@ my %page_breaks = (); if ( $ENV{'PWD'} =~ /\S+\/x86_64\// ) { $page_breaks{"python-mpi4py-gnu7-impi-ohpc"} = 2; $page_breaks{"mpiP-gnu-impi-ohpc"} = 2; - $page_breaks{"scorep-gnu-impi-ohpc"} = 3; + $page_breaks{"scalasca-gnu-impi-ohpc"} = 3; + $page_breaks{"tau-gnu-impi-ohpc"} = 4; $page_breaks{"mfem-gnu7-impi-ohpc"} = 2; $page_breaks{"ptscotch-gnu7-impi-ohpc"} = 3; $page_breaks{"superlu_dist-gnu-impi-ohpc"} = 4;
Use model variable placeholders for player selection. Going to need them in future updates.
@@ -36523,6 +36523,8 @@ static void load_select_screen_info(s_savelevel *save) int selectplayer(int *players, char *filename, int useSavedGame) { s_model *tempmodel; + s_model *model_old; + s_model *model_new; int i; int exit = 0; int escape = 0; @@ -36885,16 +36887,21 @@ int selectplayer(int *players, char *filename, int useSavedGame) sound_play_sample(SAMPLE_BEEP, 0, savedata.effectvol, savedata.effectvol, 100); } + // Get model in use right now. + model_old = example[i]->model; + // Left key = previous model in cycle, right key = next. if ((player[i].newkeys & FLAG_MOVELEFT)) { - ent_set_model(example[i], prevplayermodeln(example[i]->model, i)->name, 0); + model_new = prevplayermodeln(model_old, i); } else { - ent_set_model(example[i], nextplayermodeln(example[i]->model, i)->name, 0); + model_new = nextplayermodeln(model_old, i); } + ent_set_model(example[i], model_new->name, 0); + // Copy example model name to player name variable. strcpy(player[i].name, example[i]->model->name);
SPIR wrapper: revert using spir CC for CUDA builtin library added by mistake, it does not actually use SPIR CC
@@ -775,16 +775,11 @@ def generate_function(name, ret_type, ret_type_ext, multiAS, *args): ####### generate function body - if SPIR_CALLING_ABI: - func_attr = "spir_func" - else: - func_attr = "" - if retval_alloca_inst: decl_ret_type = 'void' else: decl_ret_type = coerced_ret_type - print("declare %s %s %s(%s) local_unnamed_addr #0" % (func_attr, decl_ret_type, ocl_mangled_name, decl_args)) + print("declare %s %s(%s) local_unnamed_addr #0" % (decl_ret_type, ocl_mangled_name, decl_args)) print("") print("define spir_func %s %s(%s) local_unnamed_addr #0 {" % (ret_type_ext + ret_type, spir_mangled_name, caller_args)) @@ -793,11 +788,11 @@ def generate_function(name, ret_type, ret_type_ext, multiAS, *args): print(cast) if ret_type == 'void': - print(" tail call %s void %s(%s)" % (func_attr, ocl_mangled_name, callee_args)) + print(" tail call void %s(%s)" % (ocl_mangled_name, callee_args)) print(" ret void" ) else: if ret_type != coerced_ret_type: - print(" %%coerced_ret = call %s %s %s(%s)" % (func_attr, coerced_ret_type, ocl_mangled_name, callee_args)) + print(" %%coerced_ret = call %s %s(%s)" % (coerced_ret_type, ocl_mangled_name, callee_args)) if ret_type.startswith("<3"): four_vec = "<4" + ret_type[2:] print(" %%bc_ret = bitcast %s %%coerced_ret to %s" % (coerced_ret_type, four_vec)) @@ -807,13 +802,13 @@ def generate_function(name, ret_type, ret_type_ext, multiAS, *args): print(" ret %s %%final_ret" % ret_type) elif ARM_CALLING_ABI and (ret_type != sret_ret_type): - print(" call %s void %s(%s)" % (func_attr, ocl_mangled_name, callee_args)) + print(" call void %s(%s)" % (ocl_mangled_name, callee_args)) # add load from alloca print(" %%%u = load %s, %s* %s, %s" % (llvm_i, ret_type, ret_type, retval_alloca_inst, retval_align)) print(" ret %s %%%u" % (ret_type, llvm_i)) else: - print(" %%call = tail call %s %s %s(%s)" % (func_attr, ret_type, ocl_mangled_name, callee_args)) + print(" %%call = tail call %s %s(%s)" % (ret_type, ocl_mangled_name, callee_args)) print(" ret %s %%call" % ret_type) print("}\n\n")
Add _name attribute to classes
@@ -70,6 +70,14 @@ ObjClass *newClass(DictuVM *vm, ObjString *name, ObjClass *superclass, ClassType initTable(&klass->publicProperties); initTable(&klass->publicConstantProperties); klass->annotations = NULL; + + push(vm, OBJ_VAL(klass)); + ObjString *nameString = copyString(vm, "_name", 5); + push(vm, OBJ_VAL(name)); + tableSet(vm, &klass->publicProperties, nameString, OBJ_VAL(name)); + pop(vm); + pop(vm); + return klass; }
Bug fix: Fix constraint solving during fcg construction with gurobi
@@ -402,6 +402,8 @@ double *pluto_fcg_constraints_lexmin_gurobi(const PlutoConstraints* cst, PlutoMa /* Create gurobi model. Add objective and variable types during creation of the object itself */ GRBnewmodel(env, &lp, NULL, num_vars, grb_obj, NULL, NULL, vtype, NULL); + set_gurobi_constraints_from_pluto_constraints(lp, cst); + if (options->debug) { GRBwrite(lp, "pluto-pairwise-constraints-gurobi.lp"); }
TSCH: disable the burst bit by default
#ifdef TSCH_CONF_BURST_MAX_LEN #define TSCH_BURST_MAX_LEN TSCH_CONF_BURST_MAX_LEN #else -#define TSCH_BURST_MAX_LEN 32 +#define TSCH_BURST_MAX_LEN 0 #endif /* 6TiSCH Minimal schedule slotframe length */
Queue Send fix Fixes rare deadlock on heavy loaded multicore-systems.
@@ -1693,15 +1693,6 @@ BaseType_t xQueueSemaphoreTake( QueueHandle_t xQueue, { if( xTicksToWait == ( TickType_t ) 0 ) { - /* For inheritance to have occurred there must have been an - * initial timeout, and an adjusted timeout cannot become 0, as - * if it were 0 the function would have exited. */ - #if ( configUSE_MUTEXES == 1 ) - { - configASSERT( xInheritanceOccurred == pdFALSE ); - } - #endif /* configUSE_MUTEXES */ - /* The semaphore count was 0 and no block time is specified * (or the block time has expired) so exit now. */ taskEXIT_CRITICAL( &( pxQueue->xQueueLock ) );
Allow to specify kernel include dirs It's sometimes convenient to use other kernel headers, now it's possible possible with new KERNEL_INCLUDE_DIRS build variable, like: $ cd <kernel-dir> $ make INSTALL_HDR_PATH=/tmp/headers headers_install $ cd <bcc-dir> $ cmake -DKERNEL_INCLUDE_DIRS=/tmp/headers/include/ ...
@@ -19,6 +19,14 @@ if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/cc/libbpf/src) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) endif() +# It's possible to use other kernel headers with +# KERNEL_INCLUDE_DIRS build variable, like: +# $ cd <kernel-dir> +# $ make INSTALL_HDR_PATH=/tmp/headers headers_install +# $ cd <bcc-dir> +# $ cmake -DKERNEL_INCLUDE_DIRS=/tmp/headers/include/ ... +include_directories(${KERNEL_INCLUDE_DIRS}) + include(cmake/GetGitRevisionDescription.cmake) include(cmake/version.cmake) include(CMakeDependentOption)
cmake MAINTENANCE strip output of uncrutify version
@@ -8,7 +8,7 @@ include(FindPackageHandleStandardArgs) find_program(UNCRUSTIFY uncrustify) if(UNCRUSTIFY) - execute_process(COMMAND ${UNCRUSTIFY} --version OUTPUT_VARIABLE VERSION) + execute_process(COMMAND ${UNCRUSTIFY} --version OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE VERSION) string(FIND ${VERSION} "-" START_IDX) math(EXPR START_IDX "${START_IDX} + 1") string(SUBSTRING "${VERSION}" ${START_IDX} -1 VERSION)
Add initializer braces required by older versions of gcc.
@@ -51,7 +51,7 @@ yamlNew(const Buffer *const buffer) { // Create object this = OBJ_NEW_ALLOC(); - *this = (Yaml){0}; + *this = (Yaml){{0}}; // Extra braces are required for older gcc versions // Initialize parser context CHECK(yaml_parser_initialize(&this->parser));
Fix stm32cubeai Makefile.
@@ -11,13 +11,13 @@ CFLAGS_STNN += -I/ CFLAGS_STNN := $(CFLAGS) $(CFLAGS_STNN) #Sources -SRCS += $(addprefix ../cmsis/src/dsp/BasicMathFunctions/,\ +SRCS += $(addprefix ../hal/cmsis/src/dsp/BasicMathFunctions/,\ arm_shift_q7.c \ arm_shift_q15.c \ arm_dot_prod_f32.c \ ) -SRCS += $(addprefix ../cmsis/src/dsp/SupportFunctions/,\ +SRCS += $(addprefix ../hal/cmsis/src/dsp/SupportFunctions/,\ arm_float_to_q7.c \ arm_float_to_q15.c \ arm_q7_to_float.c \
Add missing static keyword.
@@ -29,7 +29,7 @@ typedef struct ArchiveGetCheckResult String *cipherPass; } ArchiveGetCheckResult; -ArchiveGetCheckResult +static ArchiveGetCheckResult archiveGetCheck(const String *archiveFile, CipherType cipherType, const String *cipherPass) { FUNCTION_LOG_BEGIN(logLevelDebug);
DebugHelp: Case insensitive key press comparison
@@ -129,7 +129,9 @@ WaitForKeyIndex ( // Using loop to allow OC_INPUT_STR changes. // for (Index = 0; Index < OC_INPUT_MAX; ++Index) { - if (OC_INPUT_STR[Index] == Key.UnicodeChar) { + if (OC_INPUT_STR[Index] == Key.UnicodeChar + || (OC_INPUT_STR[Index] >= 'A' && OC_INPUT_STR[Index] <= 'Z' + && (OC_INPUT_STR[Index] | 0x20U) == Key.UnicodeChar)) { return Index; } }
vrapi: Fix lovr.headset.animate flipping left hand;
@@ -602,8 +602,8 @@ static bool vrapi_animate(Device device, struct Model* model) { float compensate[4]; if (device == DEVICE_HAND_LEFT) { float q[4]; - quat_fromAngleAxis(compensate, (float) -M_PI, 0.f, 0.f, 1.f); - quat_mul(compensate, compensate, quat_fromAngleAxis(q, (float) -M_PI / 2.f, 0.f, 1.f, 0.f)); + quat_fromAngleAxis(compensate, (float) M_PI, 0.f, 0.f, 1.f); + quat_mul(compensate, compensate, quat_fromAngleAxis(q, (float) M_PI / 2.f, 0.f, 1.f, 0.f)); } else { quat_fromAngleAxis(compensate, (float) -M_PI / 2.f, 0.f, 1.f, 0.f); }
Add riscv64 asm_arch to BSD-riscv64 target Following Add riscv64 asm_arch to linux64-riscv64 target Current ASM does not have Linux specific thing thus this is suitable for BSD
@@ -1108,6 +1108,7 @@ my %targets = ( "BSD-riscv64" => { inherit_from => [ "BSD-generic64"], perlasm_scheme => "linux64", + asm_arch => 'riscv64', }, "bsdi-elf-gcc" => {
[viogpudo] fix a problem reported by Coverity Scan (which for some reason expects int main function to be returning a value explicitly)
@@ -37,10 +37,12 @@ wmain( m_pMgr->Close(); delete m_pMgr; + m_pMgr = NULL; if (pClient) { pClient->Close(); delete pClient; pClient = NULL; } + return 0; }
fix unix bug in decommit size
@@ -632,7 +632,7 @@ static bool mi_os_commitx(void* addr, size_t size, bool commit, bool conservativ #elif defined(MAP_FIXED) if (!commit) { // use mmap with MAP_FIXED to discard the existing memory (and reduce commit charge) - void* p = mmap(start, size, PROT_NONE, (MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE), -1, 0); + void* p = mmap(start, csize, PROT_NONE, (MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS | MAP_NORESERVE), -1, 0); if (p != start) { err = errno; } } else {
zephyr: fix _scs_relocate_vector_table build break Zephyr now supports moving the vector table for Corext M* targets. Let's remove this code from mcuboot as this has been changed upstream and breaks mcuboot build.
@@ -70,11 +70,6 @@ void main(void) irq_lock(); _MspSet(vt->msp); - SYS_LOG_INF("Setting vector table to %p", vt); - - /* Not all targets set the VTOR, so just set it. */ - _scs_relocate_vector_table((void *) vt); - SYS_LOG_INF("Jumping to the first image slot"); ((void (*)(void))vt->reset)();
Break process memory iterator in Windows if GetLastError != 0.
@@ -147,6 +147,9 @@ YR_API YR_MEMORY_BLOCK* yr_process_get_next_memory_block( while (address < context->si.lpMaximumApplicationAddress && VirtualQueryEx(context->hProcess, address, &mbi, sizeof(mbi)) != 0) { + if (GetLastError() != ERROR_SUCCESS) + break; + if (mbi.State == MEM_COMMIT && ((mbi.Protect & PAGE_NOACCESS) == 0)) { context->current_block.base = (size_t) mbi.BaseAddress;
virtio: zero data structs in virtio_vring_init
@@ -62,9 +62,9 @@ virtio_vring_init (vlib_main_t * vm, virtio_if_t * vif, u16 idx, u16 sz) { clib_error_t *err = 0; virtio_vring_t *vring; - struct vhost_vring_state state; - struct vhost_vring_addr addr; - struct vhost_vring_file file; + struct vhost_vring_state state = { 0 }; + struct vhost_vring_addr addr = { 0 }; + struct vhost_vring_file file = { 0 }; clib_file_t t = { 0 }; int i;
sane: fix contact desyncs
:: their hooks :: - Each group has its associated metadata and contacts :: - Each graph is being synced -:: - Each chat is being synced :: /- *metadata-store, contacts=contact-store, *group /+ default-agent, verb, dbug, resource, graph, mdl=metadata, group -~% %sane-app ..card ~ +~% %sane-app ..part ~ |% +$ card card:agent:gall :: +$ issue $% [%lib-pull-hook-desync app=term =resource] [%lib-push-hook-desync app=term =resource] - [%contact-hook-desync =path] [%dangling-md =resource] == :: ++ on-peek |= =path ^- (unit (unit cage)) - ?. ?=([%x %bad-path ~] path) + ?: ?=([%x %bad-path ~] path) ~ (on-peek:def path) - ~ :: ++ on-arvo on-arvo:def ++ on-fail on-fail:def -- :: |_ =bowl:gall -:: ++ gra ~(. graph bowl) -:: ++ md ~(. mdl bowl) -:: ++ grp ~(. group bowl) :: ++ foreign-keys => (lib-hooks-desync %group scry-groups) => (lib-hooks-desync %graph get-keys:gra) => (lib-hooks-desync %metadata scry-groups) - => groups + => contacts metadata :: - ++ groups + ++ contacts ^+ fk-core =/ groups=(list resource) ~(tap in scry-groups) ?~ groups fk-core =* group i.groups - =? fk-core &((is-managed:grp group) !(~(has in scry-contact-syncs) group)) - (report %contact-hook-desync (en-path:resource group)) + =? fk-core + ?& (is-managed:grp group) + !=(our.bowl entity.group) + !(~(has in (tracking-pull-hook %contact-pull-hook)) group) + == + (report %lib-pull-hook-desync %contact-pull-hook group) $(groups t.groups) :: ++ metadata :: %lib-push-hook-desync (poke-our app.issue push-hook-action+!>([%add resource.issue]))^~ - :: - %contact-hook-desync - =/ rid=resource - (de-path:resource path.issue) - =/ act - ?: =(entity.rid our.bowl) - [%add-owned path.issue] - [%add-synced entity.rid path.issue] - (poke-our %contact-hook contact-hook-action+!>(act))^~ :: %dangling-md =/ app-indices ,(set resource) /x/[hook]/sharing/noun :: -++ scry-contact-syncs - ^- (set resource) - =- (~(run in -) de-path:resource) - %+ scry - ,(set path) - /x/contact-hook/synced/noun -:: -++ scry-chat-syncs - ^- (set path) - %+ scry - ,(set path) - /x/chat-hook/synced/noun -:: -++ scry-chats - ^- (set path) - %+ scry - ,(set path) - /x/chat-store/keys/noun -:: -:: ++ md-group-indices (scry (jug resource md-resource) /y/metadata-store/group-indices) ::
VERSION bump to version 0.12.60
@@ -34,7 +34,7 @@ set(CMAKE_C_FLAGS_DEBUG "-g -O0") # set version set(LIBNETCONF2_MAJOR_VERSION 0) set(LIBNETCONF2_MINOR_VERSION 12) -set(LIBNETCONF2_MICRO_VERSION 59) +set(LIBNETCONF2_MICRO_VERSION 60) set(LIBNETCONF2_VERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION}.${LIBNETCONF2_MICRO_VERSION}) set(LIBNETCONF2_SOVERSION ${LIBNETCONF2_MAJOR_VERSION}.${LIBNETCONF2_MINOR_VERSION})
cmake: use CMAKE_INSTALL_PREFIX
@@ -50,17 +50,17 @@ set(SOURCES ${PROJECT_SOURCE_DIR}/src/arithmetic.c add_library(symspg SHARED ${SOURCES}) set_property(TARGET symspg PROPERTY VERSION ${serial}) set_property(TARGET symspg PROPERTY SOVERSION ${soserial}) -install(TARGETS symspg LIBRARY DESTINATION ${PROJECT_SOURCE_DIR}/lib) +install(TARGETS symspg LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) # Static link library add_library(symspg_static STATIC ${SOURCES}) set_property(TARGET symspg_static PROPERTY VERSION ${serial}) set_property(TARGET symspg_static PROPERTY SOVERSION ${soserial}) set_property(TARGET symspg_static PROPERTY OUTPUT_NAME symspg) -install(TARGETS symspg_static ARCHIVE DESTINATION ${PROJECT_SOURCE_DIR}/lib) +install(TARGETS symspg_static ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) # Header file -install(FILES ${PROJECT_SOURCE_DIR}/src/spglib.h DESTINATION ${PROJECT_SOURCE_DIR}/include) +install(FILES ${PROJECT_SOURCE_DIR}/src/spglib.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include) # make check enable_testing()
Add portenta clock config.
// FB Heap Block Size #define OMV_UMM_BLOCK_SIZE 16 +//PLL1 480MHz/48MHz for USB, SDMMC and FDCAN +#define OMV_OSC_PLL1M (9) +#define OMV_OSC_PLL1N (320) +#define OMV_OSC_PLL1P (2) +#define OMV_OSC_PLL1Q (20) +#define OMV_OSC_PLL1R (2) +#define OMV_OSC_PLL1VCI (RCC_PLL1VCIRANGE_2) +#define OMV_OSC_PLL1VCO (RCC_PLL1VCOWIDE) +#define OMV_OSC_PLL1FRAC (0) + +// PLL2 180MHz for FMC and QSPI. +#define OMV_OSC_PLL2M (3) +#define OMV_OSC_PLL2N (40) +#define OMV_OSC_PLL2P (2) +#define OMV_OSC_PLL2Q (2) +#define OMV_OSC_PLL2R (2) +#define OMV_OSC_PLL2VCI (RCC_PLL2VCIRANGE_2) +#define OMV_OSC_PLL2VCO (RCC_PLL2VCOWIDE) +#define OMV_OSC_PLL2FRAC (0) + +// PLL3 160MHz for ADC and SPI123 +#define OMV_OSC_PLL3M (9) +#define OMV_OSC_PLL3N (320) +#define OMV_OSC_PLL3P (2) +#define OMV_OSC_PLL3Q (6) +#define OMV_OSC_PLL3R (2) +#define OMV_OSC_PLL3VCI (RCC_PLL3VCIRANGE_2) +#define OMV_OSC_PLL3VCO (RCC_PLL3VCOWIDE) +#define OMV_OSC_PLL3FRAC (0) + +#define OMV_FLASH_LATENCY (FLASH_LATENCY_2) + // Linker script constants (see the linker script template stm32fxxx.ld.S). // Note: fb_alloc is a stack-based, dynamically allocated memory on FB. // The maximum available fb_alloc memory = FB_ALLOC_SIZE + FB_SIZE - (w*h*bpp).
extmod/modtools: allow negative wait time and just don't wait
@@ -12,10 +12,9 @@ STATIC mp_obj_t tools_wait(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw PB_ARG_REQUIRED(time) ); mp_int_t duration = pb_obj_get_int(time); - if (duration < 0) { - pb_assert(PBIO_ERROR_INVALID_ARG); - } + if (duration > 0) { mp_hal_delay_ms(duration); + } return mp_const_none; } STATIC MP_DEFINE_CONST_FUN_OBJ_KW(tools_wait_obj, 0, tools_wait);
mm/kmm_heap/kmm_sem : Add null check of kheap for avoiding dereferencing In kmm sem APIs, heap pointer can be NULL sometimes. To avoid dereferencing, add null checking.
************************************************************************/ #include <tinyara/config.h> +#include <debug.h> +#include <errno.h> #include <tinyara/mm/mm.h> int kmm_trysemaphore(void *dummy_addr) { struct mm_heap_s *kheap = mm_get_heap(dummy_addr); + if (kheap) { return mm_trysemaphore(kheap); } + mdbg("Invalid Heap address given, Fail to try to take sem.\n"); + return -EFAULT; +} /************************************************************************ * Name: kmm_givesemaphore @@ -115,7 +121,11 @@ int kmm_trysemaphore(void *dummy_addr) void kmm_givesemaphore(void *dummy_addr) { struct mm_heap_s *kheap = mm_get_heap(dummy_addr); - return mm_givesemaphore(kheap); + if (kheap) { + mm_givesemaphore(kheap); + } else { + mdbg("Invalid Heap address given, Fail to give sem.\n"); + } } #endif /* CONFIG_MM_KERNEL_HEAP */
add arg -DHSA_RUNTIME_LIB_PATH because updated cmake for roctracer needs it
@@ -95,8 +95,8 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then mkdir -p $BUILD_AOMP/build/roctracer cd $BUILD_AOMP/build/roctracer echo " -----Running roctracer cmake ---- " - echo "${AOMP_CMAKE} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$INSTALL_ROCTRACE -DCMAKE_PREFIX_PATH="""$CMAKE_PREFIX_PATH""" -DHIP_VDI=1 -DHIP_PATH=$ROCM_DIR $CMAKE_WITH_EXPERIMENTAL $AOMP_ORIGIN_RPATH -DGPU_TARGETS="""$GFXSEMICOLONS""" $AOMP_REPOS/$AOMP_TRACE_REPO_NAME" - ${AOMP_CMAKE} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$INSTALL_ROCTRACE -DCMAKE_PREFIX_PATH="""$CMAKE_PREFIX_PATH""" -DHIP_VDI=1 -DHIP_PATH=$ROCM_DIR $CMAKE_WITH_EXPERIMENTAL $AOMP_ORIGIN_RPATH -DGPU_TARGETS="""$GFXSEMICOLONS""" $AOMP_REPOS/$AOMP_TRACE_REPO_NAME + echo ${AOMP_CMAKE} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$INSTALL_ROCTRACE -DHSA_RUNTIME_LIB_PATH=$ROCM_DIR/lib -DCMAKE_PREFIX_PATH="""$CMAKE_PREFIX_PATH""" -DHIP_VDI=1 -DHIP_PATH=$ROCM_DIR $CMAKE_WITH_EXPERIMENTAL $AOMP_ORIGIN_RPATH -DGPU_TARGETS="""$GFXSEMICOLONS""" $AOMP_REPOS/$AOMP_TRACE_REPO_NAME + ${AOMP_CMAKE} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$INSTALL_ROCTRACE -DHSA_RUNTIME_LIB_PATH=$ROCM_DIR/lib -DCMAKE_PREFIX_PATH="""$CMAKE_PREFIX_PATH""" -DHIP_VDI=1 -DHIP_PATH=$ROCM_DIR $CMAKE_WITH_EXPERIMENTAL $AOMP_ORIGIN_RPATH -DGPU_TARGETS="""$GFXSEMICOLONS""" $AOMP_REPOS/$AOMP_TRACE_REPO_NAME if [ $? != 0 ] ; then echo "ERROR roctracer cmake failed. cmake flags" echo " $MYCMAKEOPTS"
enable mouse events for cursors in vna.py
@@ -118,8 +118,10 @@ class VNA(QMainWindow, Ui_VNA): self.cursorLabels = {} self.cursorValues = {} self.cursorMarkers = {} + self.cursorPressed = {} for i in range(len(VNA.cursors)): self.cursorMarkers[i] = None + self.cursorPressed[i] = False self.cursorLabels[i] = QLabel('Cursor %d, kHz' % (i + 1), self) self.cursorLabels[i].setStyleSheet('color: %s' % VNA.colors[i]) self.cursorValues[i] = QSpinBox(self) @@ -131,6 +133,9 @@ class VNA(QMainWindow, Ui_VNA): self.toolbar.addWidget(self.cursorLabels[i]) self.toolbar.addWidget(self.cursorValues[i]) self.cursorValues[i].valueChanged.connect(partial(self.set_cursor, i)) + self.canvas.mpl_connect('button_press_event', partial(self.press_marker, i)) + self.canvas.mpl_connect('motion_notify_event', partial(self.move_marker, i)) + self.canvas.mpl_connect('button_release_event', partial(self.release_marker, i)) self.toolbar.addSeparator() self.plotValue = QComboBox(self) self.toolbar.addWidget(self.plotValue) @@ -400,6 +405,24 @@ class VNA(QMainWindow, Ui_VNA): row[8].set_text('%.2f' % rl) self.canvas.draw() + def press_marker(self, index, event): + if not event.inaxes: return + if self.plot_mode == 'smith': return + marker = self.cursorMarkers[index] + if marker is None: return + contains, misc = marker.contains(event) + if not contains: return + self.cursorPressed[index] = True + + def move_marker(self, index, event): + if not event.inaxes: return + if self.plot_mode == 'smith': return + if not self.cursorPressed[index]: return + self.cursorValues[index].setValue(event.xdata // 1000) + + def release_marker(self, index, event): + self.cursorPressed[index] = False + def plot(self): getattr(window, 'plot_%s' % self.plot_mode)()
Update app to send rand num and button press count
#include <stdbool.h> +#include <stdint.h> #include <stdio.h> #include <ambient_light.h> #include <humidity.h> #include <temperature.h> #include <timer.h> +#include <button.h> +#include <rng.h> #include <ieee802154.h> #include <udp.h> static unsigned char BUF_BIND_CFG[2 * sizeof(sock_addr_t)]; +// counts button presses (any button on board) +static unsigned int btn_cnt; +uint8_t randbuf[4]; + void print_ipv6(ipv6_addr_t *); void print_ipv6(ipv6_addr_t *ipv6_addr) { @@ -20,14 +27,36 @@ void print_ipv6(ipv6_addr_t *ipv6_addr) { printf("%02x%02x", ipv6_addr->addr[14], ipv6_addr->addr[15]); } +// Callback for button presses. +// btn_num: The index of the button associated with the callback +// val: 1 if pressed, 0 if depressed +static void button_callback(__attribute__ ((unused)) int btn_num, + int val, + __attribute__ ((unused)) int arg2, + __attribute__ ((unused)) void *ud) { + if (val == 1) { + btn_cnt += 1; + } +} + int main(void) { - printf("[Sensors] Starting Sensors App.\n"); - printf("[Sensors] All available sensors on the platform will be sampled.\n"); + + printf("[Buttons] Enabling button callbacks.\n"); + button_subscribe(button_callback, NULL); + + // Enable interrupts on each button. + int count = button_count(); + for (int i = 0; i < count; i++) { + button_enable_interrupt(i); + } + + printf("[UDP] Starting UDP App.\n"); unsigned int humi = 1; int temp = 2; int lux = 3; - char packet[64]; + char packet[70]; + btn_cnt = 0; ieee802154_set_pan(0xABCD); ieee802154_config_commit(); @@ -60,6 +89,9 @@ int main(void) { 16123 }; + printf("[Sensors] All available sensors on the platform will be sampled.\n"); + printf("[RNG] Test App\n"); + while (1) { // Some imixes are unable to read sensors due to hardware issues, // If this app hangs, comment out the next 3 lines of code @@ -68,8 +100,20 @@ int main(void) { //humidity_read_sync(&humi); //ambient_light_read_intensity_sync(&lux); - int len = snprintf(packet, sizeof(packet), "%d deg C; %d%%; %d lux;\n", - temp, humi, lux); + //get randomness + int rand_bytes = rng_sync(randbuf, 4, 4); + if (rand_bytes < 0) { + printf("Error obtaining random number: %d\n", rand_bytes); + } + else if (rand_bytes != 4) { + printf("Only obtained %d bytes of randomness\n", rand_bytes); + } + + uint32_t rand = 0; + memcpy(&rand, randbuf, 4); + + int len = snprintf(packet, sizeof(packet), "rand: %lu; %d deg C; %d%% RH; %d lux; %d btn presses;\n", + rand, temp, humi, lux, btn_cnt); int max_tx_len = udp_get_max_tx_len(); if (len > max_tx_len) { printf("Cannot send packets longer than %d bytes without changing"
Fix sRGB profile filename in test.
ATTR uri system-uri $uri ATTR integer resource-id $ICC_RESOURCE_ID ATTR mimeMediaType resource-format application/vnd.iccprofile - FILE sRGB.icc + FILE srgb.icc STATUS successful-ok }
VERSION bump to version 2.2.21
@@ -65,7 +65,7 @@ endif() # micro version is changed with a set of small changes or bugfixes anywhere in the project. set(SYSREPO_MAJOR_VERSION 2) set(SYSREPO_MINOR_VERSION 2) -set(SYSREPO_MICRO_VERSION 20) +set(SYSREPO_MICRO_VERSION 21) set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION}) # Version of the library
rt9490: fix IBUS ADC REG_IBUS_ADC reports 16-bit signed integer with 1mA LSB. TEST=input current report correct value BRANCH=none Tested-by: Eric Yilun Lin
@@ -463,10 +463,11 @@ static enum ec_error_list rt9490_get_input_current_limit(int chgnum, static enum ec_error_list rt9490_get_input_current(int chgnum, int *input_current) { - uint16_t reg_val; + int16_t reg_val; - RETURN_ERROR(rt9490_read16(chgnum, RT9490_REG_IBUS_ADC, &reg_val)); - *input_current = (int)reg_val * 1000; + RETURN_ERROR(rt9490_read16(chgnum, RT9490_REG_IBUS_ADC, + (uint16_t *)&reg_val)); + *input_current = reg_val; return EC_SUCCESS; }
Add debug output for hyperbolic secant pulse
@@ -67,6 +67,13 @@ void debug_sim(struct sim_data* data) debug_printf(DP_INFO, "\tt0:%f\n", data->pulse.t0); debug_printf(DP_INFO, "\tAlpha:%f\n", data->pulse.alpha); debug_printf(DP_INFO, "\tA:%f\n\n", data->pulse.A); + + debug_printf(DP_WARN, "Inversion Pulse-Parameter:\n"); + debug_printf(DP_INFO, "\tA0:%f\n", data->pulse.hs.a0); + debug_printf(DP_INFO, "\tBeta:%f\n", data->pulse.hs.beta); + debug_printf(DP_INFO, "\tMu:%f\n", data->pulse.hs.mu); + debug_printf(DP_INFO, "\tDuration:%f\n", data->pulse.hs.duration); + debug_printf(DP_INFO, "\tON?:%d\n", data->pulse.hs.on); }
Fix sock test
@@ -1210,6 +1210,9 @@ void sock_libtest(void) { fprintf(stderr, "done.\n"); sock_close(uuid); } + sock_max_capacity(); + packet_s *packet = sock_packet_new(); + sock_packet_free(packet); packet_s *head, *pos; pos = head = packet_pool.next; size_t count = 0; @@ -1220,8 +1223,7 @@ void sock_libtest(void) { fprintf(stderr, "Packet pool test %s (%lu =? %lu)\n", count == BUFFER_PACKET_POOL ? "PASS" : "FAIL", BUFFER_PACKET_POOL, count); - count = sock_max_capacity(); - printf("Allocated sock capacity %lu X %lu\n", count, + printf("Allocated sock capacity %lu X %lu\n", sock_max_capacity(), sizeof(struct fd_data_s)); } #endif
handles http cancellation in :dns-bind
$% [%dns-authority =authority] [%dns-bind =ship =target] [%handle-http-request =inbound-request:eyre] + [%handle-http-cancel =inbound-request:eyre] [%noun noun=*] == +$ out-poke-data ;< ~ bind:m (poke-app:stdio [our dap]:bowl [%dns-bind ship target]:i.dep) loop(dep t.dep) :: - :: XX need to %handle-http-cancel as well + %handle-http-cancel + ~& %tapp-http-cant-cancel + (pure:m state) :: %handle-http-request :: always stash request bone for giving response
Lucene Match Version updated to 8.5.2
that you fully re-index after changing this setting as it can affect both how text is indexed and queried. --> - <luceneMatchVersion>7.4.0</luceneMatchVersion> + <luceneMatchVersion>8.5.2</luceneMatchVersion> <!-- TODO : change the hardcoded path add property.name=value in API Collections create -->
mv ispc obj to targe objectdir
@@ -41,8 +41,8 @@ rule("utils.ispc") end local headersdir = path.join(target:autogendir(), "rules", "utils", "ispc", "headers") - local objectdir = path.join(target:autogendir(), "rules", "utils", "ispc", "objs") - local objectfile = path.join(objectdir, path.filename(target:objectfile(sourcefile_ispc))) + local objectfile = target:objectfile(sourcefile_ispc) + local objectdir = path.directory(objectfile) local headersfile local header_extension = target:extraconf("rules", "utils.ispc", "header_extension")
net/lwip: check hop limit Silently discard the NS message with invalid hop limit value.
@@ -383,6 +383,14 @@ void nd6_input(struct pbuf *p, struct netif *inp) return; } + if (IP6H_HOPLIM(ip6_current_header()) != 255) { + /* @todo debug message */ + pbuf_free(p); + ND6_STATS_INC(nd6.lenerr); + ND6_STATS_INC(nd6.drop); + return; + } + /* Check for ANY address in src (DAD algorithm). */ if (ip6_addr_isany(ip6_current_src_addr())) { if (ip6_addr_ismulticast(ip6_current_dest_addr())) {
Fix a non main thread warning
@@ -349,6 +349,15 @@ fileprivate extension ConsoleViewController { NSLog("%@", value) DispatchQueue.main.async { + + #if MAIN + let font = EditorViewController.font.withSize(CGFloat(ThemeFontSize)) + let color = ConsoleViewController.choosenTheme.sourceCodeTheme.color(for: .identifier) + #else + let font = UIFont(name: "Menlo", size: 12) ?? UIFont.systemFont(ofSize: 12) + let color = #colorLiteral(red: 0.1960784346, green: 0.3411764801, blue: 0.1019607857, alpha: 1) + #endif + if let attrStr = console.textView.attributedText { let mutable = NSMutableAttributedString(attributedString: attrStr) mutable.append(NSAttributedString(string: text_, attributes: [.font : font, .foregroundColor : color, .link : url, .underlineStyle: NSUnderlineStyle.single.rawValue]))
Add language specifiers to the fences
@@ -20,7 +20,7 @@ Limitations: ## Assumptions - Thread-safety: a handle is the accepted better solution than having to - care about whether it is reentrant, thread-safe,.. + care about whether it is reentrant, thread-safe, ... - assumes that spec is available and installed correctly (fail in kdbhlOpen otherwise) - lookups for non-specified keys yield errors (in particular if they are not present) - many projects do not care about some limitations (no binary, no meta-data) @@ -42,7 +42,7 @@ First draft of API: #### Basic -``` +```c // might fail, you need to check for error afterwards! KDBHL * kdbhlOpen (const char * application); @@ -66,7 +66,7 @@ void kdbhlClose (KDBHL * handle); #### Needed -``` +```c // might fail, you need to check for error afterwards! void kdbhlReload (KDBHL * handle); @@ -84,7 +84,7 @@ void kdbhlClear (KDBHL * handle); #### To think about -``` +```c // maybe not needed: could be integrated in kdbhlOpen? void kdbhlParse (KDBHL * handle, int argc, char ** argv, char ** environ); @@ -105,7 +105,7 @@ void kdbhlSetInt (KDBHL * handle, const char * name, int value); #### Lower-level type API -``` +```c // will be used internally in kdbhlGetInt, are for other APIs useful, too int keyGetInt (Key * key); @@ -116,7 +116,7 @@ int keyGetInt (Key * key); can be transformed from/to keysets -``` +```c keyhAdd (KeyHierarchy * kh, Key * key); // TODO, add rest of API @@ -135,7 +135,7 @@ What is not so nice: 1. Very easy to get started with, to get a key needs 3 lines of codes: - ``` +```c KDBHL *handle = kdbhlOpen ("/sw/elektra/kdb/#0/current"); printf ("number /mykey is %d\n", kdbhlGetInt (handle, "/mykey")); kdbhlClose (handle);
py/compile: Adjust c_assign_atom_expr() to use return instead of goto. Makes the flow of the function a little more obvious, and allows to reach 100% coverage of compile.c when using gcov.
@@ -376,6 +376,7 @@ STATIC void c_assign_atom_expr(compiler_t *comp, mp_parse_node_struct_t *pns, as EMIT(store_subscr); } } + return; } else if (MP_PARSE_NODE_STRUCT_KIND(pns1) == PN_trailer_period) { assert(MP_PARSE_NODE_IS_ID(pns1->nodes[0])); if (assign_kind == ASSIGN_AUG_LOAD) { @@ -387,16 +388,10 @@ STATIC void c_assign_atom_expr(compiler_t *comp, mp_parse_node_struct_t *pns, as } EMIT_ARG(store_attr, MP_PARSE_NODE_LEAF_ARG(pns1->nodes[0])); } - } else { - goto cannot_assign; + return; } - } else { - goto cannot_assign; } - return; - -cannot_assign: compile_syntax_error(comp, (mp_parse_node_t)pns, "can't assign to expression"); }
out_es: remove temporal JSON buffer
@@ -216,6 +216,7 @@ static char *es_format(void *data, size_t bytes, int *out_size, ret = es_bulk_append(bulk, j_index, index_len, json_buf, json_size); + flb_free(json_buf); if (ret == -1) { /* We likely ran out of memory, abort here */ msgpack_unpacked_destroy(&result);
X509V3_EXT_add_nconf_sk(): Improve description and use of 'sk' arg, which may be NULL
@@ -305,7 +305,7 @@ static void delete_ext(STACK_OF(X509_EXTENSION) *sk, X509_EXTENSION *dext) /* * This is the main function: add a bunch of extensions based on a config - * file section to an extension STACK. + * file section to an extension STACK. Just check in case sk == NULL. */ int X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, const char *section, @@ -323,9 +323,9 @@ int X509V3_EXT_add_nconf_sk(CONF *conf, X509V3_CTX *ctx, const char *section, if ((ext = X509V3_EXT_nconf_int(conf, ctx, val->section, val->name, val->value)) == NULL) return 0; + if (sk != NULL) { if (ctx->flags == X509V3_CTX_REPLACE) delete_ext(*sk, ext); - if (sk != NULL) { if (X509v3_add_ext(sk, ext, -1) == NULL) { X509_EXTENSION_free(ext); return 0;
bump singularity to 2.4
Summary: Application and environment virtualization Name: %{pname}%{PROJ_DELIM} -Version: 2.3.1 +Version: 2.4 Release: 1%{?dist} # https://spdx.org/licenses/BSD-3-Clause-LBNL.html License: BSD-3-Clause-LBNL @@ -58,6 +58,7 @@ BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: python +Requires: squashfs-tools # Default library install path %define install_path %{OHPC_LIBS}/%{pname}/%version @@ -147,16 +148,13 @@ EOF %files %defattr(-, root, root) -%doc examples AUTHORS.md CONTRIBUTING.md COPYRIGHT.md INSTALL.md LICENSE-LBNL.md LICENSE.md README.md +%doc examples CONTRIBUTORS.md CONTRIBUTING.md COPYRIGHT.md INSTALL.md LICENSE-LBNL.md LICENSE.md README.md %attr(0644, root, root) %config(noreplace) %{install_path}/etc/singularity/* %{OHPC_PUB} #SUID programs %attr(4755, root, root) %{install_path}/libexec/singularity/bin/action-suid -%attr(4755, root, root) %{install_path}/libexec/singularity/bin/create-suid -%attr(4755, root, root) %{install_path}/libexec/singularity/bin/expand-suid -%attr(4755, root, root) %{install_path}/libexec/singularity/bin/export-suid -%attr(4755, root, root) %{install_path}/libexec/singularity/bin/import-suid %attr(4755, root, root) %{install_path}/libexec/singularity/bin/mount-suid +%attr(4755, root, root) %{install_path}/libexec/singularity/bin/start-suid %if %slurm %files -n singularity-slurm%{PROJ_DELIM}
Create directory in `extract`
@@ -304,10 +304,18 @@ func extract() error { return err } scopeDir := filepath.Join("/tmp/appscope/", internal.GetNormalizedVersion()) + err = os.MkdirAll(scopeDir, perms) + if err != nil { + log.Error(). + Err(err). + Msgf("Error creating %s directory.", scopeDir) + return err + } + if err = ioutil.WriteFile(filepath.Join(scopeDir, "ldscope"), b, perms); err != nil { log.Error(). Err(err). - Msg("Error writing ldscope to /tmp.") + Msgf("Error writing ldscope to %s.", scopeDir) return err } @@ -316,7 +324,7 @@ func extract() error { if err != os.ErrExist { log.Error(). Err(err). - Msg("Error writing scope to /tmp.") + Msgf("Error writing scope to %s.") return err } } @@ -341,7 +349,7 @@ func getStartData() []byte { return startData } -// extractFilterFile creates a filter file in /tmp +// extractFilterFile creates a filter file in /tmp/scope_filter func extractFilterFile(cfgData []byte) error { f, err := os.OpenFile("/tmp/scope_filter", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755) if err != nil {
display: Dry Run -> Dynamic Dry Run
@@ -164,7 +164,7 @@ static void display_displayLocked(honggfuzz_t * hfuzz) display_put("\n Phase : " ESC_BOLD "Main" ESC_RESET); break; case _HF_STATE_DYNAMIC_PRE: - display_put("\n Phase : " ESC_BOLD "Dry Run (1/2)" ESC_RESET); + display_put("\n Phase : " ESC_BOLD "Dynamic Dry Run (1/2)" ESC_RESET); break; case _HF_STATE_DYNAMIC_MAIN: display_put("\n Phase : " ESC_BOLD "Dynamic Main (2/2)" ESC_RESET);
include/power/cannonlake.h: Format with clang-format BRANCH=none TEST=none
#define IN_PCH_SLP_S4_DEASSERTED POWER_SIGNAL_MASK(X86_SLP_S4_DEASSERTED) #define IN_PCH_SLP_SUS_DEASSERTED POWER_SIGNAL_MASK(X86_SLP_SUS_DEASSERTED) -#define IN_ALL_PM_SLP_DEASSERTED (IN_PCH_SLP_S3_DEASSERTED | \ - IN_PCH_SLP_S4_DEASSERTED | \ +#define IN_ALL_PM_SLP_DEASSERTED \ + (IN_PCH_SLP_S3_DEASSERTED | IN_PCH_SLP_S4_DEASSERTED | \ IN_PCH_SLP_SUS_DEASSERTED) #define IN_PGOOD_ALL_CORE POWER_SIGNAL_MASK(X86_PMIC_DPWROK) -#define IN_ALL_S0 (IN_PGOOD_ALL_CORE | IN_ALL_PM_SLP_DEASSERTED | \ +#define IN_ALL_S0 \ + (IN_PGOOD_ALL_CORE | IN_ALL_PM_SLP_DEASSERTED | \ PP5000_PGOOD_POWER_SIGNAL_MASK) #define CHIPSET_G3S5_POWERUP_SIGNAL IN_PCH_SLP_SUS_DEASSERTED
Directory.mk: The subdirectories' clean and distclean targets need to be unique to avoid the "overriding recipe for target" warning.
@@ -42,6 +42,7 @@ CONFIGSUBDIRS := $(filter-out $(dir $(wildcard *$(DELIM)Kconfig)),$(SUBDIRS)) CLEANSUBDIRS := $(dir $(wildcard *$(DELIM).built)) CLEANSUBDIRS += $(dir $(wildcard *$(DELIM).depend)) CLEANSUBDIRS += $(dir $(wildcard *$(DELIM).kconfig)) +CLEANSUBDIRS := $(sort $(CLEANSUBDIRS)) all: nothing
tests: fix skip logic on test_tap log.txt message: 17:52:59,969 API call failed, expected 0 return value instead of -13 in tap_create_v2_reply(_0=58, context=77019, retval=-13, sw_if_index=4294967295) Test was failing with log message: tap: tap0: tap_create_if: ioctl(TUNSETIFF): Operation not permitted Type: test
@@ -6,10 +6,10 @@ from vpp_devices import VppTAPInterface def check_tuntap_driver_access(): - return os.access("/dev/net/tun", os.R_OK or os.W_OK) + return os.access("/dev/net/tun", os.R_OK and os.W_OK) [email protected](check_tuntap_driver_access(), "Permission denied") [email protected](check_tuntap_driver_access(), "Permission denied") class TestTAP(VppTestCase): """ TAP Test Case """
update cram test suite for master
(rolt (zing (turn tan |=(a/tank (wash 0^wid a))))) :: ++ mads - |= a/wain ^- marl - =/ try (mule |.(~(shut ap (rash (nule ';>' a) apex:(sail &):vast)))) + =, userlib + |= a/wain ^- manx + =/ try/(each manx tang) + %- mule |. + elm:(static:cram (rash (nule:unix ';>' a) apex:(sail &):vast)) ?- -.try $& p.try - $| ;= ;div + $| ;div ;h3: ERROR ;pre: {(wush 120 p.try)} - == == == + == == :: ++ split-on =| hed/wain ;* ^- marl %+ turn cor |= {num/@u txt/wain} - ;li: ;{p -[<num>]} *{(mads txt)} ;{hr} + ;li: ;{p -[<num>]} +{(mads txt)} ;{hr} == == ==
Run clang-format in CI, fail the build if everything's not formatted
@@ -4,6 +4,8 @@ env: - JANSSON_BUILD_METHOD=autotools - JANSSON_BUILD_METHOD=coverage JANSSON_CMAKE_OPTIONS="-DJANSSON_COVERAGE=ON -DJANSSON_COVERALLS=ON -DCMAKE_BUILD_TYPE=Debug" JANSSON_EXTRA_INSTALL="lcov curl" - JANSSON_BUILD_METHOD=fuzzer + - JANSSON_BUILD_METHOD=lint +dist: bionic language: c compiler: - gcc @@ -14,13 +16,17 @@ matrix: env: JANSSON_BUILD_METHOD=coverage JANSSON_CMAKE_OPTIONS="-DJANSSON_COVERAGE=ON -DJANSSON_COVERALLS=ON -DCMAKE_BUILD_TYPE=Debug" JANSSON_EXTRA_INSTALL="lcov curl" - compiler: clang env: JANSSON_BUILD_METHOD=fuzzer + - compiler: gcc + env: JANSSON_BUILD_METHOD=lint allow_failures: - env: JANSSON_BUILD_METHOD=coverage JANSSON_CMAKE_OPTIONS="-DJANSSON_COVERAGE=ON -DJANSSON_COVERALLS=ON -DCMAKE_BUILD_TYPE=Debug" JANSSON_EXTRA_INSTALL="lcov curl" install: - sudo apt-get update -qq - sudo apt-get install -y -qq cmake $JANSSON_EXTRA_INSTALL + - if [ "$TRAVIS_COMPILER" = "clang" ]; then sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - && sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main" -y && sudo apt-get install -y -qq clang-9 clang-format-9; fi script: - if [ "$JANSSON_BUILD_METHOD" = "autotools" ]; then autoreconf -f -i && CFLAGS=-Werror ./configure && make check; fi - if [ "$JANSSON_BUILD_METHOD" = "cmake" ]; then mkdir build && cd build && cmake $JANSSON_CMAKE_OPTIONS .. && cmake --build . && ctest --output-on-failure; fi - if [ "$JANSSON_BUILD_METHOD" = "coverage" ]; then mkdir build && cd build && cmake $JANSSON_CMAKE_OPTIONS .. && cmake --build . && cmake --build . --target coveralls; fi - if [ "$JANSSON_BUILD_METHOD" = "fuzzer" ]; then ./test/ossfuzz/travisoss.sh; fi + - if [ "$JANSSON_BUILD_METHOD" = "lint" ]; then ./scripts/clang-format-ci; fi
vlib: fix issues in the new pci code reported by coverity
@@ -259,6 +259,8 @@ vlib_pci_get_device_info (vlib_pci_addr_t * addr, clib_error_t ** error) } } + close (fd); + vec_reset_length (f); f = format (f, "%v/vpd%c", dev_dir_name, 0); fd = open ((char *) f, O_RDONLY); @@ -268,7 +270,7 @@ vlib_pci_get_device_info (vlib_pci_addr_t * addr, clib_error_t ** error) { u8 tag[3]; u8 *data = 0; - int len; + uword len; if (read (fd, &tag, 3) != 3) break; @@ -583,7 +585,9 @@ error: free (s); if (err) { + if (p->config_fd != -1) close (p->config_fd); + if (p->uio_fd != -1) close (p->uio_fd); } return err; @@ -619,7 +623,7 @@ open_vfio_iommu_group (int group) s = format (s, "/dev/vfio/%u%c", group, 0); fd = open ((char *) s, O_RDWR); if (fd < 0) - clib_error_return_unix (0, "open '%s'", s); + return clib_error_return_unix (0, "open '%s'", s); group_status.argsz = sizeof (group_status); if (ioctl (fd, VFIO_GROUP_GET_STATUS, &group_status) < 0) @@ -779,7 +783,9 @@ error: vec_free (s); if (err) { + if (dfd != -1) close (dfd); + if (p->config_fd != -1) close (p->config_fd); } return err;
Adds use of std::make_shared
@@ -449,7 +449,7 @@ namespace celix { long svcRanking = celix_properties_getAsLong(cProps, OSGI_FRAMEWORK_SERVICE_RANKING, 0); auto svc = std::shared_ptr<I>{static_cast<I*>(voidSvc), [](I*){/*nop*/}}; auto props = celix::Properties::wrap(cProps); - auto owner = std::shared_ptr<celix::Bundle>{new celix::Bundle{const_cast<celix_bundle_t*>(cBnd)}}; + auto owner = std::make_shared<celix::Bundle>(const_cast<celix_bundle_t*>(cBnd)); return std::make_shared<SvcEntry>(svcId, svcRanking, svc, props, owner); }
dsync: add the missing *contents* to long options array
@@ -2421,6 +2421,7 @@ int main(int argc, char **argv) int option_index = 0; static struct option long_options[] = { + {"contents", 0, 0, 'c'}, {"dryrun", 0, 0, 'n'}, {"no-delete", 0, 0, 'N'}, {"output", 1, 0, 'o'},
py/gc: Factor out a macro to trace GC mark operations. To allow easier override it for custom tracing.
@@ -195,6 +195,14 @@ bool gc_is_locked(void) { && ptr < (void*)MP_STATE_MEM(gc_pool_end) /* must be below end of pool */ \ ) +#ifndef TRACE_MARK +#if DEBUG_PRINT +#define TRACE_MARK(block, ptr) DEBUG_printf("gc_mark(%p)\n", ptr) +#else +#define TRACE_MARK(block, ptr) +#endif +#endif + // ptr should be of type void* #define VERIFY_MARK_AND_PUSH(ptr) \ do { \ @@ -202,7 +210,7 @@ bool gc_is_locked(void) { size_t _block = BLOCK_FROM_PTR(ptr); \ if (ATB_GET_KIND(_block) == AT_HEAD) { \ /* an unmarked head, mark it, and push it on gc stack */ \ - DEBUG_printf("gc_mark(%p)\n", ptr); \ + TRACE_MARK(_block, ptr); \ ATB_HEAD_TO_MARK(_block); \ if (MP_STATE_MEM(gc_sp) < &MP_STATE_MEM(gc_stack)[MICROPY_ALLOC_GC_STACK_SIZE]) { \ *MP_STATE_MEM(gc_sp)++ = _block; \
pybind11: update to v2.9.2
@@ -31,7 +31,7 @@ if(OPAE_WITH_PYBIND11) set(PYBIND11_TAG "v2.4.3") else() # Otherwise, pull recent pybind11 tag to enable Python 3.9 support. - set(PYBIND11_TAG "v2.8.1") + set(PYBIND11_TAG "v2.9.2") endif() message(STATUS "Using pybind11 ${PYBIND11_TAG}") opae_external_project_add(PROJECT_NAME pybind11
Add USE_HUMAN_FRIENDLY_ARGS
@@ -415,17 +415,24 @@ M3Result m3_CallWithArgs (IM3Function i_function, i32 i_argc, ccstr_t * i_argv _throw("arguments count missmatch"); } - // The format is currently not user-friendly, - // but it's used in spec tests + // The format is currently not user-friendly by default, + // as this is used in spec tests for (int i = 0; i < ftype->numArgs; ++i) { m3stack_t s = &stack[i]; ccstr_t str = i_argv[i]; switch (ftype->argTypes[i]) { +#ifdef USE_HUMAN_FRIENDLY_ARGS + case c_m3Type_i32: *(i32*)(s) = atol(str); break; + case c_m3Type_i64: *(i64*)(s) = atoll(str); break; + case c_m3Type_f32: *(f32*)(s) = atof(str); break; + case c_m3Type_f64: *(f64*)(s) = atof(str); break; +#else case c_m3Type_i32: *(u32*)(s) = strtoul(str, NULL, 10); break; case c_m3Type_i64: *(u64*)(s) = strtoull(str, NULL, 10); break; case c_m3Type_f32: *(u32*)(s) = strtoul(str, NULL, 10); break; case c_m3Type_f64: *(u64*)(s) = strtoull(str, NULL, 10); break; +#endif default: _throw("unknown argument type"); } } @@ -434,10 +441,17 @@ _ (Call (i_function->compiled, stack, linearMemory, d_m3OpDefaultArgs)); switch (ftype->returnType) { case c_m3Type_none: break; +#ifdef USE_HUMAN_FRIENDLY_ARGS + case c_m3Type_i32: printf("Result: %ld\n", *(i32*)(stack)); break; + case c_m3Type_i64: printf("Result: %lld\n", *(i64*)(stack)); break; + case c_m3Type_f32: printf("Result: %f\n", *(f32*)(stack)); break; + case c_m3Type_f64: printf("Result: %lf\n", *(f64*)(stack)); break; +#else case c_m3Type_i32: printf("Result: %u\n", *(u32*)(stack)); break; case c_m3Type_i64: printf("Result: %lu\n", *(u64*)(stack)); break; case c_m3Type_f32: printf("Result: %u\n", *(u32*)(stack)); break; case c_m3Type_f64: printf("Result: %lu\n", *(u64*)(stack)); break; +#endif default: _throw("unknown return type"); }
BugID:22762050: fixed armcc compilation error related to kspinlock_t
#define K_SPIN_LOCK_H typedef struct { -#if (RHINO_CONFIG_CPU_NUM > 1) volatile uint32_t owner; /* cpu index of owner */ -#endif } kspinlock_t; /* Be careful nested spin lock is not supported */
Nested spinlock bugfix
@@ -1016,16 +1016,17 @@ int proc_threadSleep(unsigned long long us) static int proc_threadWaitEx(thread_t **queue, spinlock_t *spinlock, time_t timeout, int interruptible, spinlock_ctx_t *scp) { int err; + spinlock_ctx_t tsc; - hal_spinlockSet(&threads_common.spinlock, scp); + hal_spinlockSet(&threads_common.spinlock, &tsc); _proc_threadEnqueue(queue, timeout, interruptible); if (*queue == NULL) { - hal_spinlockClear(&threads_common.spinlock, scp); + hal_spinlockClear(&threads_common.spinlock, &tsc); return EOK; } - hal_spinlockClear(&threads_common.spinlock, scp); + hal_spinlockClear(&threads_common.spinlock, &tsc); err = hal_cpuReschedule(spinlock, scp); hal_spinlockSet(spinlock, scp);
Fix `createFilterFile` filter file name handle correctly file name in case of tmp directory
@@ -362,7 +362,7 @@ func createFilterFile() (*os.File, error) { if _, err := os.Stat("/tmp/appscope"); os.IsNotExist(err) { os.MkdirAll("/tmp/appscope", 0777) } - f, err = os.OpenFile("/tmp/appscope", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755) + f, err = os.OpenFile("/tmp/appscope/scope_filter", os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755) } return f, err }
If LED strip can't be found, behaviors return err
@@ -203,6 +203,8 @@ static int zmk_rgb_underglow_init(struct device *_arg) int zmk_rgb_underglow_cycle_effect(int direction) { + if (!led_strip) return -ENODEV; + if (state.current_effect == 0 && direction < 0) { state.current_effect = UNDERGLOW_EFFECT_NUMBER - 1; return 0; @@ -221,6 +223,8 @@ int zmk_rgb_underglow_cycle_effect(int direction) int zmk_rgb_underglow_toggle() { + if (!led_strip) return -ENODEV; + state.on = !state.on; if (state.on) { @@ -243,6 +247,8 @@ int zmk_rgb_underglow_toggle() int zmk_rgb_underglow_change_hue(int direction) { + if (!led_strip) return -ENODEV; + if (state.hue == 0 && direction < 0) { state.hue = 350; return 0; @@ -259,6 +265,8 @@ int zmk_rgb_underglow_change_hue(int direction) int zmk_rgb_underglow_change_sat(int direction) { + if (!led_strip) return -ENODEV; + if (state.saturation == 0 && direction < 0) { return 0; } @@ -274,6 +282,8 @@ int zmk_rgb_underglow_change_sat(int direction) int zmk_rgb_underglow_change_brt(int direction) { + if (!led_strip) return -ENODEV; + if (state.brightness == 0 && direction < 0) { return 0; } @@ -289,6 +299,8 @@ int zmk_rgb_underglow_change_brt(int direction) int zmk_rgb_underglow_change_spd(int direction) { + if (!led_strip) return -ENODEV; + if (state.animation_speed == 1 && direction < 0) { return 0; }
wip(Makefile): remove -pedantic flag for now
@@ -54,7 +54,7 @@ CFLAGS += -O0 -g -pthread \ -I. -I$(CEEUTILS_DIR) -I$(COMMON_DIR) -I$(THIRDP_DIR) \ -DLOG_USE_COLOR -WFLAGS += -Wall -Wextra -pedantic +WFLAGS += -Wall -Wextra ifeq ($(static_debug),1) CFLAGS += -D_STATIC_DEBUG
Tests: fixed "negative workers" test.
@@ -132,7 +132,7 @@ class TestUnitConfiguration(unit.TestUnitControl): { "app": { "type": "python", - "workers": 1, + "workers": -1, "path": "/app", "module": "wsgi" }
[CI] Dummy build to populate CI cache
@@ -48,35 +48,3 @@ jobs: python3 scripts/build_os_toolchain.py echo "Toolchain built successfully" - - name: Build Rust toolchain - shell: bash - run: | - # Build kernel headers as libutils depends on these - # python3 scripts/build_kernel_headers.py - # We need to build libutils, since the rust libc links against it - # python3 scripts/build_meson_projects.py --only_build libutils - python3 scripts/build_rust_toolchain.py --rebuild_libc - - - name: Build OS image - shell: bash - run: | - git submodule update --init --recursive - # PT: For nasm in CI - python3 scripts/install_dependencies.py - # Build userspace headers as the kernel depends on file_manager definitions - python3 scripts/build_userspace_headers.py - # Finally, compile the kernel and build the OS image - python3 scripts/build_os_image.py --no_run - # Run Rust tests - python3 scripts/build_rust_toolchain.py --test - - - name: Update nightly release - uses: swift-project/[email protected] - with: - token: ${{ secrets.GITHUB_TOKEN }} - tag: nightly-${{ github.sha }} - files: axle.iso - allow_override: true - prerelease: false - commitish: ${{ github.sha }} - gzip: false
I made some minor fixes to the script that runs the regression suite on pascal.
# I modified the script to handle the new structure of the src, data and # test directories. # +# Eric Brugger, Fri Jan 4 09:34:59 PST 2019 +# I modified the script to work with the GitHub repository. +# # @@ -383,7 +386,7 @@ echo "Starting tests:\`date\`" # Run the tests, consolidating the results in one directory cd ../src/test -rm -rf \$dateTag output +rm -rf 2019-??-??-??:?? py_src output *.pyc mkdir \$dateTag output for m in \$modes; do theMode=\`echo \$m | tr ',' '_'\` @@ -496,14 +499,14 @@ if test "$post" = "true" ; then ssh $userNersc@$nerscHost "./purge_old_test_results.sh" fi - # Set the permissions so that others may access the test directory. - cd .. - chgrp -R visit $workingDir - chmod -R g+rwX,o+rX $workingDir - # Copy the update script to nersc and execute it. scp src/tools/dev/scripts/visit-update-test-website $userNersc@$nerscHost: ssh $userNersc@$nerscHost "./visit-update-test-website" + + # Set the permissions so that others may access the test directory. + cd ../.. + chgrp -R visit $workingDir + chmod -R g+rwX,o+rX $workingDir fi EOF
Prepare for Apache NimBLE 1.1.0 release
@@ -26,11 +26,15 @@ repo.versions: "1-latest": "1.0.0" "1.0.0": "nimble_1_0_0_tag" + "1.1.0": "nimble_1_1_0_tag" "1.0-latest": "1.0.0" + "1.1-latest": "1.1.0" repo.newt_compatibility: 0.0.0: 1.1.0: good 1.0.0: 1.1.0: good + 1.1.0: + 1.6.0: good
add comment for validate if file is symlink / junction
@@ -122,6 +122,8 @@ namespace ARIASDK_NS_BEGIN contents += '\n'; contents += sessionSDKUid; contents += '\n'; + + //TBD (labhas) - validate if file is NOT a symlink/junction before trying to write. if (!MAT::FileWrite(path.c_str(), contents.c_str())) { LOG_WARN("Unable to save session analytics to %s", path.c_str());
more neutrinos
@@ -718,6 +718,10 @@ def check_cls_nu(cosmo): # ClTracer test objects lens1 = ccl.WeakLensingTracer(cosmo, dndz=(z,n)) + if cosmo.cosmo.params.N_nu_mass>0: + # We need to avoid IAs if we have neutrinos + lens2 = lens1 + else: lens2 = ccl.WeakLensingTracer(cosmo, dndz=(z,n), ia_bias=(z,n)) nc1 = ccl.NumberCountsTracer(cosmo, False, dndz=(z,n), bias=(z,b))
lib: Call flb_tls_init() to initialize OpenSSL This actually starts using the new API function, and hence makes flb_tls.c compatible with OpenSSL v1.0.2.
#include <fluent-bit/flb_time.h> #include <fluent-bit/flb_coro.h> #include <fluent-bit/flb_callback.h> +#include <fluent-bit/flb_tls.h> #include <signal.h> #include <stdarg.h> @@ -106,6 +107,7 @@ static inline struct flb_filter_instance *filter_instance_get(flb_ctx_t *ctx, void flb_init_env() { + flb_tls_init(); flb_coro_init(); flb_output_prepare(); }
Remove custom_header background and add newline after
@@ -500,11 +500,10 @@ void HudElements::show_fps_limit(){ void HudElements::custom_header(){ ImGui::TableNextRow(); ImGui::PushFont(HUDElements.sw_stats->font1); - ImGui::TableAutoHeaders(); std::string text = HUDElements.params->custom_header; center_text(text); ImGui::TextColored(HUDElements.colors.text, "%s",text.c_str()); - //ImGui::Text("\n"); + ImGui::NewLine(); ImGui::PopFont(); }
[apps] Add a macro to define separate dump functions
@@ -63,3 +63,20 @@ static inline void mempool_wfi() { asm volatile("wfi"); } // If core_id equals -1, wake up all cores. static inline void wake_up(uint32_t core_id) { wake_up_reg = core_id; } static inline void wake_up_all() { wake_up((uint32_t)-1); } + +// Dump a value via CSR +// This is only supported in simulation and an experimental feature. All writes +// to unimplemented CSR registers will be dumped by Snitch. This can be +// exploited to quickly print measurement values from all cores simultaneously +// without the hassle of printf. To specify multiple metrics, different CSRs can +// be used. +// The macro will define a function that will then always print via the same +// CSR. E.g., `dump(errors, 8)` will define a function with the following +// signature: `dump_errors(uint32_t val)`, which will print the given value via +// the 8th register. +// Alternatively, the `write_csr(reg, val)` macro can be used directly. +#define dump(name, reg) \ + static \ + __attribute__((always_inline)) inline void dump_##name(uint32_t val) { \ + asm volatile("csrw " #reg ", %0" ::"rK"(val)); \ + }