message
stringlengths
6
474
diff
stringlengths
8
5.22k
docs - update from upstream sgml
@@ -997,7 +997,7 @@ lo_import 152801</codeblock> <codeph>unaligned</codeph>, <codeph>aligned</codeph>, <codeph>html</codeph>, <codeph>latex</codeph> (uses <codeph>tabular</codeph>), <codeph>latex-longtable</codeph>, <codeph>troff-ms</codeph>, or - <codeph>wrapped</codeph>. Unique abbreviations, including one letter, are allowed. + <codeph>wrapped</codeph>. Unique abbreviations are allowed. <p><b><codeph>unaligned</codeph></b> format writes all columns of a row on one line, separated by the currently active field separator. This is useful for creating output that might be intended to be read in by other programs (for
string_test: coverity woe Remove the needless tests and checks which coverity complains about in string_test.c
@@ -349,10 +349,6 @@ test_clib_strcmp (vlib_main_t * vm, unformat_input_t * input) /* Null pointers comparison */ s = 0; indicator = clib_strcmp (s, s); - if (indicator != 0) - return -1; - /* verify it against strcmp */ - indicator = strcmp (s, s); if (indicator != 0) return -1; @@ -518,8 +514,6 @@ test_clib_strncmp (vlib_main_t * vm, unformat_input_t * input) sizeof ("Every moment is a fresh beginning") - 1); if (v_indicator != 0) return -1; - if (v_indicator != indicator) - return -1; /* OK, seems to work */ return 0;
gtkui_transfer.c: merge `gftpui_gtk_ok()` into `on_gtk_dialog_response_transferdlg()`
@@ -177,13 +177,18 @@ on_gtk_button_clicked_skip (GtkButton *button, gpointer data) static void -gftpui_gtk_ok (gpointer data) +on_gtk_dialog_response_transferdlg (GtkDialog *dialog, + gint response, + gpointer user_data) +{ + gftp_transfer * tdata = (gftp_transfer *) user_data; + + /* click on OK */ + if (response == GTK_RESPONSE_OK) { - gftp_transfer * tdata; gftp_file * tempfle; GList * templist; - tdata = data; g_mutex_lock (&tdata->structmutex); for (templist = tdata->files; templist != NULL; templist = templist->next) { @@ -193,31 +198,18 @@ gftpui_gtk_ok (gpointer data) } tdata->ready = 1; - if (templist == NULL) - { + if (templist == NULL) { tdata->show = 0; tdata->done = 1; - } - else + } else { tdata->show = 1; - - g_mutex_unlock (&tdata->structmutex); } + g_mutex_unlock (&tdata->structmutex); -static void -on_gtk_dialog_response_transferdlg (GtkDialog *dialog, - gint response, - gpointer user_data) -{ - if (response == GTK_RESPONSE_OK) - { - gftpui_gtk_ok (user_data); gtk_widget_destroy (GTK_WIDGET (dialog)); return; } - gftp_transfer * tdata = (gftp_transfer *) user_data; - /* cancel transfers */ g_mutex_lock (&tdata->structmutex); tdata->show = 0;
NRF52 Hal: Enabling 16 and 32MHz spi frequencies
@@ -367,6 +367,16 @@ hal_spi_config_master(struct nrf52_hal_spi *spi, case 8000: frequency = SPIM_FREQUENCY_FREQUENCY_M8; break; +#if defined(SPIM_FREQUENCY_FREQUENCY_M16) + case 16000: + frequency = SPIM_FREQUENCY_FREQUENCY_M16; + break; +#endif +#if defined(SPIM_FREQUENCY_FREQUENCY_M32) + case 32000: + frequency = SPIM_FREQUENCY_FREQUENCY_M32; + break; +#endif default: frequency = 0; rc = EINVAL;
Improve debug documentation
@@ -52,7 +52,9 @@ extern "C" { #define ESP_DBG_OFF 0 /*!< Indicates debug is disabled */ /** - * \name Debug levels + * \name ESP_DBG_LEVEL Debug levels + * \anchor ESP_DBG_LEVEL + * \brief List of debug levels * \{ */ @@ -67,7 +69,8 @@ extern "C" { */ /** - * \name Debug types + * \name ESP_DBG_TYPE Debug types + * \anchor ESP_DBG_TYPE * \brief List of possible debugging types * \{ */
Fix mmap/fs_mmap.c:259:13: warning: 'mapped' may be used uninitialized in this function [-Wmaybe-uninitialized]
@@ -256,7 +256,7 @@ FAR void *mmap(FAR void *start, size_t length, int prot, int flags, int fd, off_t offset) { FAR struct file *filep = NULL; - FAR void *mapped; + FAR void *mapped = NULL; int ret; if (fd != -1 && fs_getfilep(fd, &filep) < 0)
[chainmaker]add chainmaker macro switch
#include <string.h> #include <sys/time.h> -#define PROTOCOL_USE_HLFABRIC 1 -#if (PROTOCOL_USE_HLFABRIC == 1) +#if ((PROTOCOL_USE_HLFABRIC == 1) || (PROTOCOL_USE_CHAINMAKER == 1)) // for TTLSContext structure #include "http2intf.h" #endif @@ -549,7 +548,7 @@ BOAT_RESULT BoatRemoveFile(const BCHAR *fileName, void *rsvd) } } -#if (PROTOCOL_USE_HLFABRIC == 1) +#if ((PROTOCOL_USE_HLFABRIC == 1) || (PROTOCOL_USE_CHAINMAKER == 1)) BSINT32 BoatConnect(const BCHAR *address, void *rsvd) {
Update MLN to 1.0.0.2
Pod::Spec.new do |s| s.name = 'MLN' - s.version = '1.0.0' + s.version = '1.0.0.2' s.summary = 'A lib of Momo Lua Native.' # This description is used to generate tags and improve search results.
parser: regex: release buffer if regex parser fails
@@ -214,6 +214,10 @@ int flb_parser_regex_do(struct flb_parser *parser, /* Iterate results and compose new buffer */ ret = flb_regex_parse(parser->regex, &result, cb_results, &pcb); + if (ret == -1) { + msgpack_sbuffer_destroy(&tmp_sbuf); + return -1; + } /* Export results */ *out_buf = tmp_sbuf.data;
Added test for the ScanForModuleDependencies flag.
<OpenMPSupport>false</OpenMPSupport> ]] end + +-- +-- Check ClCompile for ScanForModuleDependencies +-- + + function suite.SupportScanForModuleDependenciesOn() + flags { "ScanForModuleDependencies" } + prepare() + test.capture [[ +<ClCompile> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + <ScanSourceForModuleDependencies>true</ScanSourceForModuleDependencies> + ]] + end + + function suite.SupportScanForModuleDependenciesOff() + flags { "ScanForModuleDependencies" } + prepare() + test.capture [[ +<ClCompile> + <PrecompiledHeader>NotUsing</PrecompiledHeader> + <WarningLevel>Level3</WarningLevel> + <Optimization>Disabled</Optimization> + ]] + end
apps/wm_test: remove pthread_mutex_initializer remove pthread_mutex_initializer
@@ -70,8 +70,8 @@ static wifi_manager_cb_s g_wifi_callbacks = { wm_scan_ap_done }; -static pthread_mutex_t g_wm_mutex = PTHREAD_MUTEX_INITIALIZER; -static pthread_cond_t g_wm_cond = PTHREAD_COND_INITIALIZER; +static pthread_mutex_t g_wm_mutex; +static pthread_cond_t g_wm_cond; void wm_sta_connected(wifi_manager_cb_msg_s msg, void *arg) { @@ -247,6 +247,24 @@ TEST_F(scan) ST_END_TEST; } +static int _wm_initialize_signal(void) +{ + int status = pthread_cond_init(&g_wm_cond, NULL); + if (status != 0) { + printf("start_thread: ERROR pthread_cond_init failed, status=%d\n", status); + } + status = pthread_mutex_init(&g_wm_mutex, NULL); + if (status != 0) { + printf("start_thread: ERROR pthread_mutex_init failed, status=%d\n", status); + } +} + +static int _wm_deinitialize_signal(void) +{ + pthread_cond_destroy(&g_wm_cond); + pthread_mutex_destroy(&g_wm_mutex); +} + void wm_run_stress_test1(struct wt_options *opt) { WM_AP_SSID = opt->ssid; @@ -254,6 +272,7 @@ void wm_run_stress_test1(struct wt_options *opt) WM_AP_AUTH = opt->auth_type; WM_AP_CRYPTO = opt->crypto_type; + _wm_initialize_signal(); ST_SET_PACK(wifi); ST_SET_SMOKE(wifi, WM_TEST_TRIAL, 10000000, "init", init); @@ -264,4 +283,5 @@ void wm_run_stress_test1(struct wt_options *opt) ST_RUN_TEST(wifi); ST_RESULT_TEST(wifi); + _wm_deinitialize_signal(); }
doc: Remove duplicate entry from release notes
@@ -261,7 +261,6 @@ This section keeps you up-to-date with the multi-language support provided by El - <<TODO>> - <<TODO>> - Fix grammar for `elektra-granularity.md` _(@dtdirect)_ -- Rephrase sections in doc/dev/error-* _(@dtdirect)_ - Rephrase sections in doc/dev/error-\* _(@dtdirect)_ - <<TODO>> - <<TODO>>
Add ravencoin.com to seed nodes
@@ -173,8 +173,9 @@ public: assert(consensus.hashGenesisBlock == uint256S("0000006b444bc2f2ffe627be9d9e7e7a0730000870ef6eb6da46c8eae389df90")); assert(genesis.hashMerkleRoot == uint256S("28ff00a867739a352523808d301f504bc4547699398d70faf2266a8bae5f3516")); - vSeeds.emplace_back("seed-raven.ravencoin.org", false); vSeeds.emplace_back("seed-raven.bitactivate.com", false); + vSeeds.emplace_back("seed-raven.ravencoin.com", false); + vSeeds.emplace_back("seed-raven.ravencoin.org", false); base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,60); base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,122); @@ -340,8 +341,9 @@ public: vFixedSeeds.clear(); vSeeds.clear(); - vSeeds.emplace_back("seed-testnet-raven.ravencoin.org", false); vSeeds.emplace_back("seed-testnet-raven.bitactivate.com", false); + vSeeds.emplace_back("seed-testnet-raven.ravencoin.com", false); + vSeeds.emplace_back("seed-testnet-raven.ravencoin.org", false); base58Prefixes[PUBKEY_ADDRESS] = std::vector<unsigned char>(1,111); base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,196);
Modify error messages for registerBinding
@@ -76,12 +76,14 @@ ScriptContext::ScriptContext(LuaSandbox& aLuaSandbox, const std::filesystem::pat }; auto registerBinding = [this, &wrapHandler](const std::string& acID, const std::string& acDisplayName, const std::string& acDescription, sol::function aCallback, const bool acIsHotkey){ + const auto inputTypeStr = acIsHotkey ? "hotkey" : "input"; + if (acID.empty() || std::ranges::find_if(acID, [](char c){ return !(isalnum(c) || c == '_' || c == '.'); }) != acID.cend()) { m_logger->error("Tried to register a {} with an incorrect ID format '{}'! ID needs to be alphanumeric without any " "whitespace or special characters (exceptions being '_' and '.' which are allowed in ID)!", - acIsHotkey ? "hotkey" : "input", + inputTypeStr, acID); return; } @@ -89,7 +91,7 @@ ScriptContext::ScriptContext(LuaSandbox& aLuaSandbox, const std::filesystem::pat if (acDisplayName.empty()) { m_logger->error("Tried to register a {} with an empty display name! [ID of handler: {}]", - acIsHotkey ? "hotkey" : "input", + inputTypeStr, acID); return; } @@ -98,8 +100,8 @@ ScriptContext::ScriptContext(LuaSandbox& aLuaSandbox, const std::filesystem::pat { if (bind.ID == acID) { - m_logger->error("Tried to register a {} with same ID as some other! [ID of handler: {}][Display name of handler: {}]", - acIsHotkey ? "hotkey" : "input", + m_logger->error("Tried to register a {} with same ID as some other! [ID of handler: {}, Display name of handler: '{}']", + inputTypeStr, acID, acDisplayName); return; @@ -107,8 +109,8 @@ ScriptContext::ScriptContext(LuaSandbox& aLuaSandbox, const std::filesystem::pat if (bind.DisplayName == acDisplayName) { - m_logger->error("Tried to register a {} with same display name as some other! [ID of handler: {}][Display name of handler: {}]", - acIsHotkey ? "hotkey" : "input", + m_logger->error("Tried to register a {} with same display name as some other! [ID of handler: {}, Display name of handler: '{}']", + inputTypeStr, acID, acDisplayName); return;
Always enable uart, use blocking mode
#include <assert.h> #include <stddef.h> #include <inttypes.h> +#include <stdio.h> #include "syscfg/syscfg.h" #include <flash_map/flash_map.h> #include <os/os.h> #include <hal/hal_bsp.h> #include <hal/hal_system.h> #include <hal/hal_flash.h> +#include <sysinit/sysinit.h> #ifdef MCUBOOT_SERIAL #include <hal/hal_gpio.h> #include <boot_serial/boot_serial.h> -#include <sysinit/sysinit.h> #endif #include <console/console.h> #include "bootutil/image.h" @@ -67,13 +68,11 @@ main(void) int rc; hal_bsp_init(); -#ifdef MCUBOOT_SERIAL + /* initialize uart without os */ os_dev_initialize_all(OS_DEV_INIT_PRIMARY); sysinit(); -#else - flash_map_init(); -#endif + console_blocking_mode(); #ifdef MCUBOOT_SERIAL /* @@ -88,6 +87,7 @@ main(void) assert(0); } #endif + rc = boot_go(&rsp); assert(rc == 0);
log: rename worker thread to 'flb-logger'
@@ -114,6 +114,8 @@ static void log_worker_collector(void *data) FLB_TLS_INIT(flb_log_ctx); FLB_TLS_SET(flb_log_ctx, log); + mk_utils_worker_rename("flb-logger"); + /* Signal the caller */ pthread_mutex_lock(&log->pth_mutex); log->pth_init = FLB_TRUE;
fix(benchmark): add missing LV_USE_DEMO_BENCHMARK
#include "../../../lvgl.h" +#if LV_USE_DEMO_BENCHMARK + #ifndef LV_ATTRIBUTE_MEM_ALIGN #define LV_ATTRIBUTE_MEM_ALIGN #endif @@ -222,3 +224,5 @@ const lv_img_dsc_t img_benchmark_cogwheel_rgb565a8 = { .data_size = 30000, .data = img_benchmark_cogwheel_rgb565a8_map, }; + +#endif
Fix a memleak on an error path in the pkcs12 test helpers
@@ -278,11 +278,9 @@ void start_contentinfo(PKCS12_BUILDER *pb) void end_contentinfo(PKCS12_BUILDER *pb) { - if (pb->success) { - if (pb->bags && !TEST_true(PKCS12_add_safe(&pb->safes, pb->bags, -1, 0, NULL))) { + if (pb->success && pb->bags != NULL) { + if (!TEST_true(PKCS12_add_safe(&pb->safes, pb->bags, -1, 0, NULL))) pb->success = 0; - return; - } } sk_PKCS12_SAFEBAG_pop_free(pb->bags, PKCS12_SAFEBAG_free); pb->bags = NULL; @@ -291,19 +289,16 @@ void end_contentinfo(PKCS12_BUILDER *pb) void end_contentinfo_encrypted(PKCS12_BUILDER *pb, const PKCS12_ENC *enc) { - if (pb->success) { - if (pb->bags) { + if (pb->success && pb->bags != NULL) { if (legacy) { - if (!TEST_true(PKCS12_add_safe(&pb->safes, pb->bags, enc->nid, enc->iter, enc->pass))) { + if (!TEST_true(PKCS12_add_safe(&pb->safes, pb->bags, enc->nid, + enc->iter, enc->pass))) pb->success = 0; - return; - } } else { - if (!TEST_true(PKCS12_add_safe_ex(&pb->safes, pb->bags, enc->nid, enc->iter, enc->pass, test_ctx, test_propq))) { + if (!TEST_true(PKCS12_add_safe_ex(&pb->safes, pb->bags, enc->nid, + enc->iter, enc->pass, test_ctx, + test_propq))) pb->success = 0; - return; - } - } } } sk_PKCS12_SAFEBAG_pop_free(pb->bags, PKCS12_SAFEBAG_free);
Add comment explaining PSA PAKE vs Mbedtls J-PAKE API matching strategy
@@ -403,6 +403,20 @@ psa_status_t psa_pake_output( psa_pake_operation_t *operation, return( PSA_ERROR_INVALID_ARGUMENT ); #if defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE) + /* + * The PSA CRYPTO PAKE and MbedTLS JPAKE API have a different + * handling of output sequencing. + * + * The MbedTLS JPAKE API outputs the whole X1+X2 anf X2S steps data + * at once, on the other side the PSA CRYPTO PAKE api requires + * the KEY_SHARE/ZP_PUBLIC/ZK_PROOF parts of X1, X2 & X2S to be + * retrieved in sequence. + * + * In order to achieve API compatibility, the whole X1+X2 or X2S steps + * data is stored in an intermediate buffer at first step output call, + * and data is sliced down by parsing the ECPoint records in order + * to return the right parts on each step. + */ if( operation->alg == PSA_ALG_JPAKE ) { if( step != PSA_PAKE_STEP_KEY_SHARE && @@ -602,6 +616,21 @@ psa_status_t psa_pake_input( psa_pake_operation_t *operation, return( PSA_ERROR_INVALID_ARGUMENT ); #if defined(MBEDTLS_PSA_BUILTIN_ALG_JPAKE) + /* + * The PSA CRYPTO PAKE and MbedTLS JPAKE API have a different + * handling of input sequencing. + * + * The MbedTLS JPAKE API takes the whole X1+X2 or X4S steps data + * at once as input, on the other side the PSA CRYPTO PAKE api requires + * the KEY_SHARE/ZP_PUBLIC/ZK_PROOF parts of X1, X2 & X4S to be + * given in sequence. + * + * In order to achieve API compatibility, each X1+X2 or X4S step data + * is stored sequentially in an intermediate buffer and given to the + * MbedTLS JPAKE API on the last step. + * + * This causes any input error to be only detected on the last step. + */ if( operation->alg == PSA_ALG_JPAKE ) { if( step != PSA_PAKE_STEP_KEY_SHARE &&
adding option for using blocking spi transfer
@@ -347,7 +347,11 @@ static rt_uint32_t spixfer(struct rt_spi_device *device, struct rt_spi_message * if(RT_FALSE == spi->dma_flag) { +#ifdef(BSP_USING_BLOCKING_SPI) + status = LPSPI_MasterTransferBlocking(spi->base, &transfer); +#else status = LPSPI_MasterTransferNonBlocking(spi->base, &spi->spi_normal, &transfer); +#endif } else {
docs/esp8266/general: Add section on TLS limitations.
@@ -145,3 +145,43 @@ or by an exeption, for example using try/finally:: # Use sock finally: sock.close() + + +SSL/TLS limitations +~~~~~~~~~~~~~~~~~~~ + +ESP8266 uses `axTLS <http://axtls.sourceforge.net/>`_ library, which is one +of the smallest TLS libraries with the compatible licensing. However, it +also has some known issues/limitations: + +1. No support for Diffie-Hellman (DH) key exchange and Elliptic-curve + cryptography (ECC). This means it can't work with sites which force + the use of these features (it works ok with classic RSA certifactes). +2. Half-duplex communication nature. axTLS uses a single buffer for both + sending and receiving, which leads to considerable memory saving and + works well with protocols like HTTP. But there may be problems with + protocols which don't follow classic request-response model. + +Besides axTLS own limitations, the configuration used for MicroPython is +highly optimized for code size, which leads to additional limitations +(these may be lifted in the future): + +3. Optimized RSA algorithms are not enabled, which may lead to slow + SSL handshakes. +4. Stored sessions are not supported (may allow faster repeated connections + to the same site in some circumstances). + +Besides axTLS specific limitations described above, there's another generic +limitation with usage of TLS on the low-memory devices: + +5. The TLS standard specifies the maximum length of the TLS record (unit + of TLS communication, the entire record must be buffered before it can + be processed) as 16KB. That's almost half of the available ESP8266 memory, + and inside a more or less advanced application would be hard to allocate + due to memory fragmentation issues. As a compromise, a smaller buffer is + used, with the idea that the most interesting usage for SSL would be + accessing various REST APIs, which usually require much smaller messages. + The buffers size is on the order of 5KB, and is adjusted from time to + time, taking as a reference being able to access https://google.com . + The smaller buffer hower means that some sites can't be accessed using + it, and it's not possible to stream large amounts of data.
taniks: fix key T12 T13 T14 no function issue Modify key mask for T12, T13, T14. Modify top row function define by KB layout. BRANCH=none TEST=make buildall -j
@@ -19,14 +19,14 @@ __override struct keyboard_scan_config keyscan_config = { .min_post_scan_delay_us = 1000, .poll_timeout_us = 100 * MSEC, .actual_key_mask = { - 0x1c, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff, - 0xa4, 0xff, 0xfe, 0x55, 0xfe, 0xff, 0xff, 0xff, /* full set */ + 0x1c, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xa4, 0xff, 0xff, 0x55, 0xff, 0xff, 0xff, 0xff, /* full set */ }, .ksi_threshold_mv = 1000, }; static const struct ec_response_keybd_config taniks_kb = { - .num_top_row_keys = 11, + .num_top_row_keys = 14, .action_keys = { TK_BACK, /* T1 */ TK_REFRESH, /* T2 */ @@ -35,10 +35,13 @@ static const struct ec_response_keybd_config taniks_kb = { TK_SNAPSHOT, /* T5 */ TK_BRIGHTNESS_DOWN, /* T6 */ TK_BRIGHTNESS_UP, /* T7 */ - TK_MICMUTE, /* T8 */ - TK_VOL_MUTE, /* T9 */ - TK_VOL_DOWN, /* T10 */ - TK_VOL_UP, /* T11 */ + TK_ABSENT, /* T8 */ + TK_ABSENT, /* T9 */ + TK_ABSENT, /* T10 */ + TK_MICMUTE, /* T11 */ + TK_VOL_MUTE, /* T12 */ + TK_VOL_DOWN, /* T13 */ + TK_VOL_UP, /* T14 */ }, .capabilities = KEYBD_CAP_SCRNLOCK_KEY | KEYBD_CAP_NUMERIC_KEYPAD, };
KDB MV: Use explicit break tag in documentation
@@ -51,10 +51,10 @@ This command will return the following values as an exit status: ## EXAMPLES -To move multiple keys: +To move multiple keys:<br> `kdb mv -r user/example1 user/example2` -To move a single key: +To move a single key:<br> `kdb mv user/example/key1 user/example/key2`
term: skip prompt refresh on ^c under -t
@@ -1002,8 +1002,10 @@ u3_term_ef_ctlc(void) _term_ovum_plan(uty_u->car_u, wir, cad); } + if ( c3n == u3_Host.ops_u.tem ) { _term_it_refresh_line(uty_u); } +} /* _term_it_put_value(): put numeric color value on lin_w. */
Fixed urb.util.isURL to allow multiple successive hyphens in URLs.
@@ -284,7 +284,7 @@ window.urb.unsubscribe = function(params,cb) { // legacy intreface window.urb.util = { isURL: function(s) { - r = new RegExp('^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$', 'i'); + r = new RegExp('^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$', 'i'); return s.length < 2083 && r.test(s); }, numDot: function(n) {
Fix last commit. memfs.py broken in Python 3
@@ -13,11 +13,12 @@ print(dirs) FILES = {} NAMES = [] +# Binary to ASCII function. Different in Python 2 and 3 try: - str("",'ascii') - ascii = lambda x: str(x, 'ascii') + str(b'\x23\x20','ascii') + ascii = lambda x: str(x, 'ascii') # Python 3 except: - ascii = lambda x: str(x) + ascii = lambda x: str(x) # Python 2 # The last argument is the generated C file @@ -37,7 +38,7 @@ for directory in dirs: continue fname = full[full.find("/%s/" % (dname,)):] - print("MEMFS add", fname) + #print("MEMFS add", fname) name = re.sub(r'\W', '_', fname) assert name not in FILES
BugID:17646749:[utils] fix aos build error by utils.mk
NAME := libiot_utils -$(NAME)_SOURCES := ./misc/linked_list.c \ -./misc/utils_epoch_time.c \ -./misc/utils_event.c \ -./misc/utils_httpc.c \ -./misc/mem_stats.c \ -./misc/utils_list.c \ -./misc/string_utils.c \ -./misc/json_parser.c \ -./misc/json_token.c \ -./misc/utils_timer.c \ -./misc/lite-cjson.c \ -./misc/utils_net.c \ -./digest/utils_sha1.c \ -./digest/utils_base64.c \ -./digest/utils_sha256.c \ -./digest/utils_md5.c \ -./digest/utils_hmac.c \ +# $(NAME)_SOURCES := ./misc/linked_list.c \ +# ./misc/utils_epoch_time.c \ +# ./misc/utils_event.c \ +# ./misc/utils_httpc.c \ +# ./misc/mem_stats.c \ +# ./misc/utils_list.c \ +# ./misc/string_utils.c \ +# ./misc/json_parser.c \ +# ./misc/json_token.c \ +# ./misc/utils_timer.c \ +# ./misc/lite-cjson.c \ +# ./misc/utils_net.c \ +# ./digest/utils_sha1.c \ +# ./digest/utils_base64.c \ +# ./digest/utils_sha256.c \ +# ./digest/utils_md5.c \ +# ./digest/utils_hmac.c \ + +LINKKIT_MODULE := middleware/linkkit/sdk-c/src/infra/utils + +$(NAME)_SOURCES := $(wildcard $(SOURCE_ROOT)/$(LINKKIT_MODULE)/*.c) +$(NAME)_SOURCES += $(wildcard $(SOURCE_ROOT)/$(LINKKIT_MODULE)/*/*.c) + +$(NAME)_SOURCES := $(foreach S,$($(NAME)_SOURCES),$(subst $(SOURCE_ROOT)/$(LINKKIT_MODULE),.,$(S))) $(NAME)_COMPONENTS :=
build: new MK_LIB_ONLY option (disable plugins)
@@ -63,6 +63,17 @@ option(MK_WITHOUT_BIN "Do not build binary" No) option(MK_WITHOUT_CONF "Skip configuration files" No) option(MK_STATIC_LIB_MODE "Static library mode" No) +# If building just for a "library" mode, disable plugins +if(MK_LIB_ONLY) + set(MK_PLUGIN_AUTH No) + set(MK_PLUGIN_CGI No) + set(MK_PLUGIN_CHEETAH No) + set(MK_PLUGIN_DIRLISTING No) + set(MK_PLUGIN_FASTCGI No) + set(MK_PLUGIN_LOGGER No) + set(MK_PLUGIN_MANDRIL No) +endif() + if(NOT CMAKE_SYSTEM_NAME STREQUAL "Linux") set(MK_ACCEPT 1) set(MK_ACCEPT4 0)
tools/tcpsubnet: fix indentation
@@ -82,6 +82,7 @@ pair of .c and .py files, and some are directories of files. #### Tools: <center><a href="images/bcc_tracing_tools_2017.png"><img src="images/bcc_tracing_tools_2017.png" border=0 width=700></a></center> + - tools/[argdist](tools/argdist.py): Display function parameter values as a histogram or frequency count. [Examples](tools/argdist_example.txt). - tools/[bashreadline](tools/bashreadline.py): Print entered bash commands system wide. [Examples](tools/bashreadline_example.txt). - tools/[biolatency](tools/biolatency.py): Summarize block device I/O latency as a histogram. [Examples](tools/biolatency_example.txt).
Set: prevent double hashing on full capacity
@@ -5354,16 +5354,17 @@ FIO_FUNC inline FIO_SET_TYPE FIO_NAME(_insert_or_overwrite_)( /* automatic fragmentation protection */ if (FIO_NAME(is_fragmented)(set)) FIO_NAME(rehash)(set); - - /* locate future position, rehashing until a position is available */ - FIO_NAME(_map_s_) *pos = FIO_NAME(_find_map_pos_)(set, hash_value, obj); - if (!pos) { - /* no pos - so we know that we are inserting an object. */ - /* Either we are over capacity, or we have too many holes in the map. */ - if (set->pos >= set->capa) { + /* automatic capacity validation (we can never be at 100% capacity) */ + else if (set->pos >= set->capa) { set->mask = (set->mask << 1) | 3; FIO_NAME(rehash)(set); } + + /* locate future position */ + FIO_NAME(_map_s_) *pos = FIO_NAME(_find_map_pos_)(set, hash_value, obj); + + if (!pos) { + /* inserting a new object, with too many holes in the map */ FIO_SET_COPY(set->ordered[set->pos].obj, obj); set->ordered[set->pos].hash = hash_value; ++set->pos; @@ -5493,6 +5494,7 @@ FIO_FUNC inline int FIO_NAME(remove)(FIO_NAME(s) * set, --set->count; pos->pos->hash = FIO_SET_HASH_INVALID; if (pos->pos == set->pos + set->ordered - 1) { + /* removing last item inserted */ pos->hash = FIO_SET_HASH_INVALID; /* no need for a "hole" */ do { --set->pos; @@ -5563,6 +5565,8 @@ FIO_FUNC int FIO_NAME(remove)(FIO_NAME(s) * set, --set->count; pos->pos->hash = FIO_SET_HASH_INVALID; if (pos->pos == set->pos + set->ordered - 1) { + /* removing last item inserted */ + pos->hash = FIO_SET_HASH_INVALID; /* no need for a "hole" */ do { --set->pos; } while (set->pos && FIO_SET_HASH_COMPARE(set->ordered[set->pos - 1].hash,
Replace UnifiedBoomConfig with SmallRv32BoomConfig
@@ -48,12 +48,12 @@ class DualSmallBoomConfig extends Config( new boom.common.WithNBoomCores(2) ++ // dual-core new freechips.rocketchip.system.BaseConfig) -class SmallRV32UnifiedBoomConfig extends Config( +class SmallRV32BoomConfig extends Config( new WithTop ++ new WithBootROM ++ new freechips.rocketchip.subsystem.WithInclusiveCache ++ - new boom.common.WithoutBoomFPU ++ // no floating point - new boom.common.WithUnifiedMemIntIQs ++ // use unified mem+int issue queues + new boom.common.WithoutBoomFPU ++ // no fp + new boom.common.WithBoomRV32 ++ // rv32 (32bit) new boom.common.WithSmallBooms ++ new boom.common.WithNBoomCores(1) ++ new freechips.rocketchip.system.BaseConfig)
Use BitCtz for FastSLog2Slow_C
@@ -329,6 +329,15 @@ const uint8_t kPrefixEncodeExtraBitsValue[PREFIX_LOOKUP_IDX_MAX] = { static float FastSLog2Slow_C(uint32_t v) { assert(v >= LOG_LOOKUP_IDX_MAX); if (v < APPROX_LOG_WITH_CORRECTION_MAX) { +#if !defined(WEBP_HAVE_SLOW_CLZ_CTZ) + // use clz if available + const int log_cnt = BitsLog2Floor(v) - 7; + const uint32_t y = 1 << log_cnt; + int correction = 0; + const float v_f = (float)v; + const uint32_t orig_v = v; + v >>= log_cnt; +#else int log_cnt = 0; uint32_t y = 1; int correction = 0; @@ -339,6 +348,7 @@ static float FastSLog2Slow_C(uint32_t v) { v = v >> 1; y = y << 1; } while (v >= LOG_LOOKUP_IDX_MAX); +#endif // vf = (2^log_cnt) * Xf; where y = 2^log_cnt and Xf < 256 // Xf = floor(Xf) * (1 + (v % y) / v) // log2(Xf) = log2(floor(Xf)) + log2(1 + (v % y) / v) @@ -355,6 +365,14 @@ static float FastSLog2Slow_C(uint32_t v) { static float FastLog2Slow_C(uint32_t v) { assert(v >= LOG_LOOKUP_IDX_MAX); if (v < APPROX_LOG_WITH_CORRECTION_MAX) { +#if !defined(WEBP_HAVE_SLOW_CLZ_CTZ) + // use clz if available + const int log_cnt = BitsLog2Floor(v) - 7; + const uint32_t y = 1 << log_cnt; + const uint32_t orig_v = v; + double log_2; + v >>= log_cnt; +#else int log_cnt = 0; uint32_t y = 1; const uint32_t orig_v = v; @@ -364,6 +382,7 @@ static float FastLog2Slow_C(uint32_t v) { v = v >> 1; y = y << 1; } while (v >= LOG_LOOKUP_IDX_MAX); +#endif log_2 = kLog2Table[v] + log_cnt; if (orig_v >= APPROX_LOG_MAX) { // Since the division is still expensive, add this correction factor only
system/utils/README: add missing closing code block syntax (```) for echo In markdown, code block syntax requires two of "```"s for opening and closing. But commit missed closing for description of echo part. This commit fixes wrong usages of ```.
@@ -334,7 +334,7 @@ Kernel Features -> Disable TinyAra interfaces -> [ ] Disable environment variabl - Set a value which is greater than zero on CONFIG_NFILE_DESCRIPTORS. ``` Kernel Features -> Files and I/O -> Maximum number of file descriptors per task - +``` ## free This command shows heap information.
doc: change gpg keyserver for receiving public gpg key for `apt`
@@ -25,7 +25,7 @@ We provide repositories for latest releases and latest builds from master (suite To use our stable repositories with our latest releases, following steps need to be made: -1. Run `sudo apt-key adv --keyserver keys.gnupg.net --recv-keys F26BBE02F3C315A19BF1F791A9A25CC1CC83E839` to obtain the key. +1. Run `sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F26BBE02F3C315A19BF1F791A9A25CC1CC83E839` to obtain the key. 2. Add `deb https://debs.libelektra.org/<DISTRIBUTION> <SUITE> main` into `/etc/apt/sources.list` where `<DISTRIBUTION>` and `<SUITE>` is the codename of your distributions e.g.`focal`,`bionic`,`buster`, etc.
Add .dist-info to make pytest plugin of aiohttp working
@@ -239,6 +239,7 @@ def check_imports(no_check=None, extra=[], skip_func=None): "distutils.command.bdist_msi", "yaml.cyaml", "vh.ext.nirvana.nirvana_api_bridge", + "aiohttp.pytest_plugin", ] patterns = [re.escape(s).replace(r'\*', r'.*') for s in exceptions]
Bump pack dev version due to major changes to compiler iar/iccarm header.
<url>http://www.keil.com/pack/</url> <releases> - <release version="5.1.1-dev1"> + <release version="5.1.1-dev2"> Active development... + CMSIS-Core(M): 5.0.3 (see revision history for details) + - Added compiler_iccarm.h to replace compiler_iar.h shipped with the compiler. + </release> + <release version="5.1.1-dev1"> Devices: - added GCC startup and linker script for Cortex-A9 CMSIS-Core(M): 5.0.3 (see revision history for details) - Added MPU Functions for ARMv8-M for Cortex-M23/M33. + - Added compiler_iccarm.h to replace compiler_iar.h shipped with the compiler. CMSIS-Core(A): 1.0.1 (see revision history for details) CMSIS-Driver: - CAN Driver API V1.2.0
NewChannel: redirect DM creation from DM routes We were redirecting based on our parent path, so if we were in a DM while making a DM, we used that DM as our parent path. Fixes urbit/landscape#421
@@ -100,7 +100,7 @@ export function NewChannel(props: NewChannelProps & RouteComponentProps) { await waiter(p => Boolean(p?.groups?.[`/ship/~${window.ship}/${resId}`])); } actions.setStatus({ success: null }); - const resourceUrl = parentPath(location.pathname); + const resourceUrl = (location.pathname.includes("/messages")) ? "/~landscape/messages" : parentPath(location.pathname); history.push( `${resourceUrl}/resource/${moduleType}/ship/~${window.ship}/${resId}` );
Update server preferred address test
@@ -5980,7 +5980,7 @@ int preferred_address_test() /* Create an alternate IP address, and use it as preferred address */ server_parameters.prefered_address.is_defined = 1; memcpy(server_parameters.prefered_address.ipv4Address, &server_preferred.sin_addr, 4); - server_parameters.prefered_address.ipv4Port = server_preferred.sin_port; + server_parameters.prefered_address.ipv4Port = ntohs(server_preferred.sin_port); ret = tls_api_one_scenario_init(&test_ctx, &simulated_time, PICOQUIC_INTERNAL_TEST_VERSION_1, NULL, &server_parameters); @@ -5990,7 +5990,7 @@ int preferred_address_test() /* Run a basic test scenario */ ret = tls_api_one_scenario_body(test_ctx, &simulated_time, - test_scenario_many_streams, sizeof(test_scenario_many_streams), 0, 0, 0, 0, 250000); + test_scenario_very_long, sizeof(test_scenario_very_long), 0, 0, 0, 0, 1500000); } /* Verify that the client and server have both migrated to using the preferred address */
in_mqtt: use new buf_write API and pack topic as string
@@ -141,21 +141,28 @@ static int mqtt_data_append(char *topic, size_t topic_len, } root = result.data; + /* Mark the start of a 'buffer write' operation */ + flb_input_buf_write_start(ctx->i_ins); + msgpack_pack_array(&ctx->i_ins->mp_pck, 2); msgpack_pack_int32(&ctx->i_ins->mp_pck, time(NULL)); n_size = root.via.map.size; msgpack_pack_map(&ctx->i_ins->mp_pck, n_size + 1); - msgpack_pack_bin(&ctx->i_ins->mp_pck, 5); - msgpack_pack_bin_body(&ctx->i_ins->mp_pck, "topic", 5); - msgpack_pack_bin(&ctx->i_ins->mp_pck, topic_len); - msgpack_pack_bin_body(&ctx->i_ins->mp_pck, topic, topic_len); + msgpack_pack_str(&ctx->i_ins->mp_pck, 5); + msgpack_pack_str_body(&ctx->i_ins->mp_pck, "topic", 5); + msgpack_pack_str(&ctx->i_ins->mp_pck, topic_len); + msgpack_pack_str_body(&ctx->i_ins->mp_pck, topic, topic_len); /* Re-pack original KVs */ for (i = 0; i < n_size; i++) { msgpack_pack_object(&ctx->i_ins->mp_pck, root.via.map.ptr[i].key); msgpack_pack_object(&ctx->i_ins->mp_pck, root.via.map.ptr[i].val); } + + /* End of buffer write */ + flb_input_buf_write_end(ctx->i_ins); + msgpack_unpacked_destroy(&result); flb_free(pack); return 0;
Fix isPost check
@@ -80,8 +80,8 @@ class HttpLoader http.setHeader("User-Agent", urlRequest.userAgent); var isPost = urlRequest.method==URLRequestMethod.POST; - #if haxe4 if (isPost) + #if haxe4 http.setPostBytes(urlRequest.nmeBytes); #else http.setPostData(urlRequest.nmeBytes.toString());
hotfix for multipath when there are no additional address available
@@ -19,7 +19,7 @@ protoop_arg_t select_sending_path(picoquic_cnx_t *cnx) pd->state = 2; addr_data_t *adl = NULL; addr_data_t *adr = NULL; - if (pd->path_id == 2) { + if (pd->path_id == 2 && bpfd->loc_addrs[0].sa != NULL && bpfd->rem_addrs[0].sa) { pd->loc_addr_id = 1; adl = &bpfd->loc_addrs[0]; pd->path->local_addr_len = (adl->is_v6) ? sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in); @@ -29,7 +29,7 @@ protoop_arg_t select_sending_path(picoquic_cnx_t *cnx) adr = &bpfd->rem_addrs[0]; pd->path->peer_addr_len = (adr->is_v6) ? sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in); my_memcpy(&pd->path->peer_addr, adr->sa, pd->path->peer_addr_len); - } else { + } else if (pd->path_id == 4 && bpfd->loc_addrs[1].sa != NULL && bpfd->rem_addrs[0].sa) { // Path id is 4 pd->loc_addr_id = 2; adl = &bpfd->loc_addrs[1];
README.md: Use version 2.04.90
@@ -20,11 +20,11 @@ Packages for Qt4 and Raspbian Wheezy are available but not described here. ##### Install deCONZ 1. Download deCONZ package - wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.04.86-qt5.deb + wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.04.90-qt5.deb 2. Install deCONZ package - sudo dpkg -i deconz-2.04.86-qt5.deb + sudo dpkg -i deconz-2.04.90-qt5.deb 3. Install missing dependencies @@ -36,11 +36,11 @@ The development package is only needed if you wan't to modify the plugin or try 1. Download deCONZ development package - wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.04.86.deb + wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.04.90.deb 2. Install deCONZ development package - sudo dpkg -i deconz-dev-2.04.86.deb + sudo dpkg -i deconz-dev-2.04.90.deb ##### Get and compile the plugin 1. Checkout the repository @@ -50,7 +50,7 @@ The development package is only needed if you wan't to modify the plugin or try 2. Checkout related version tag cd deconz-rest-plugin - git checkout -b mybranch V2_04_86 + git checkout -b mybranch V2_04_90 3. Compile the plugin
print warning on unsupported network type
@@ -5222,7 +5222,6 @@ else if(linktype == DLT_EN10MB) processethernetpacket(tv_sec, tv_usec, caplen, packet); return; } - else if(linktype == DLT_IEEE802_11_RADIO) { if(caplen < (uint32_t)RTH_SIZE) @@ -5250,12 +5249,10 @@ else if(linktype == DLT_IEEE802_11_RADIO) packet_ptr += rth->it_len; caplen -= rth->it_len; } - else if(linktype == DLT_IEEE802_11) { /* nothing to do */ } - else if(linktype == DLT_PRISM_HEADER) { if(caplen < (uint32_t)PRISM_SIZE) @@ -5276,7 +5273,6 @@ else if(linktype == DLT_PRISM_HEADER) prism->msglen = byte_swap_32(prism->msglen); prism->frmlen.data = byte_swap_32(prism->frmlen.data); } - if(prism->msglen > caplen) { if(prism->frmlen.data > caplen) @@ -5290,7 +5286,6 @@ else if(linktype == DLT_PRISM_HEADER) packet_ptr += prism->msglen; caplen -= prism->msglen; } - else if(linktype == DLT_IEEE802_11_RADIO_AVS) { if(caplen < (uint32_t)AVS_SIZE) @@ -5316,7 +5311,6 @@ else if(linktype == DLT_IEEE802_11_RADIO_AVS) packet_ptr += avs->len; caplen -= avs->len; } - else if(linktype == DLT_PPI) { if(caplen < (uint32_t)PPI_SIZE) @@ -5344,6 +5338,7 @@ else if(linktype == DLT_PPI) } else { + printf("unsupported network type %d\n", linktype); return; }
use type of radiotap value
@@ -8082,7 +8082,7 @@ while((auswahl = getopt_long(argc, argv, short_options, long_options, &index)) ! break; case HCX_SHORT_PREAMBLE: - hdradiotap[0x08] = 2; + hdradiotap[0x08] = IEEE80211_RADIOTAP_F_SHORTPRE; break; case HCX_FILTERLIST_AP:
Testscript improved
@@ -42,3 +42,8 @@ if [ "$unamestr" == "Linux" ] || [ "$unamestr" == "FreeBSD" ]; then runtest "../examples/tneat" "-v" "1" "-P" "../examples/prop_sctp_dtls.json" "interop.fh-muenster.de" runtest "../examples/tneat" "-v" "1" "-L" "-n" "1024" "-P" "../examples/prop_sctp.json" fi + +if [ "$unamestr" == "Darwin" ]; then + retcode=0 + #runtest "../examples/client_http_get" "-u" "/cgi-bin/he" "-v" "2" "bsd10.nplab.de" +fi
nrf/modules/uos/microbitfs: Remove unused uos_mbfs_mount. It throws an error in GCC 6.3.
@@ -554,15 +554,6 @@ STATIC mp_obj_t uos_mbfs_file_close(mp_obj_t self) { } STATIC MP_DEFINE_CONST_FUN_OBJ_1(uos_mbfs_file_close_obj, uos_mbfs_file_close); -STATIC mp_obj_t uos_mbfs_mount(mp_obj_t self_in, mp_obj_t readonly, mp_obj_t mkfs) { - // This function is called only once (indirectly from main()) and is - // not exposed to Python code. So we can ignore the readonly flag and - // not care about mounting a second time. - microbit_filesystem_init(); - return mp_const_none; -} -STATIC MP_DEFINE_CONST_FUN_OBJ_3(uos_mbfs_mount_obj, uos_mbfs_mount); - STATIC mp_obj_t uos_mbfs_remove(mp_obj_t name) { return microbit_remove(name); }
core/test/run-msg: don't depend on unittest mem layout In the world of unit tests all "RAM" is valid
@@ -24,7 +24,7 @@ static bool zalloc_should_fail = false; static int zalloc_should_fail_after = 0; /* Fake top_of_ram -- needed for API's */ -unsigned long top_of_ram = 16ULL * 1024 * 1024 * 1024; +unsigned long top_of_ram = 0xffffffffffffffffULL; static void *zalloc(size_t size) {
build: Add missing package to Makefile add dependency for pip install psutil. See: Type: fix
@@ -70,6 +70,9 @@ DEB_DEPENDS += python-virtualenv python-pip libffi6 check DEB_DEPENDS += libboost-all-dev libffi-dev python3-ply libmbedtls-dev DEB_DEPENDS += cmake ninja-build uuid-dev python3-jsonschema python3-yaml yamllint DEB_DEPENDS += python3-venv # ensurepip +DEB_DEPENDS += python3-dev # needed for python3 -m pip install psutil +# python3.6 on 16.04 requires python36-dev + ifeq ($(OS_VERSION_ID),14.04) DEB_DEPENDS += libssl-dev else ifeq ($(OS_ID)-$(OS_VERSION_ID),debian-8) @@ -91,12 +94,13 @@ RPM_DEPENDS += ninja-build RPM_DEPENDS += libuuid-devel RPM_DEPENDS += mbedtls-devel RPM_DEPENDS += yamllint +RPM_DEPENDS += python3-devel # needed for python3 -m pip install psutil ifeq ($(OS_ID),fedora) RPM_DEPENDS += dnf-utils RPM_DEPENDS += subunit subunit-devel RPM_DEPENDS += compat-openssl10-devel - RPM_DEPENDS += python3-devel python3-ply + RPM_DEPENDS += python3-ply # for vppapigen RPM_DEPENDS += python3-virtualenv python3-jsonschema RPM_DEPENDS += cmake RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries' @@ -110,7 +114,7 @@ else ifeq ($(OS_ID)-$(OS_VERSION_ID),centos-8) else RPM_DEPENDS += yum-utils RPM_DEPENDS += openssl-devel - RPM_DEPENDS += python-devel python36-ply + RPM_DEPENDS += python36-ply # for vppapigen RPM_DEPENDS += python3-devel python3-pip RPM_DEPENDS += python-virtualenv python36-jsonschema RPM_DEPENDS += devtoolset-7
docs/library/pyb.ADC: Remove outdated ADCAll code example.
@@ -170,44 +170,7 @@ The ADCAll Object The default value is 0xffffffff which means all analog inputs are active. If just the internal channels (16..18) are required, the mask value should be 0x70000. - It is possible to access channle 16..18 values without incurring the side effects of ``ADCAll``:: - - def adcread(chan): # 16 temp 17 vbat 18 vref - assert chan >= 16 and chan <= 18, 'Invalid ADC channel' - start = pyb.millis() - timeout = 100 - stm.mem32[stm.RCC + stm.RCC_APB2ENR] |= 0x100 # enable ADC1 clock.0x4100 - stm.mem32[stm.ADC1 + stm.ADC_CR2] = 1 # Turn on ADC - stm.mem32[stm.ADC1 + stm.ADC_CR1] = 0 # 12 bit - if chan == 17: - stm.mem32[stm.ADC1 + stm.ADC_SMPR1] = 0x200000 # 15 cycles - stm.mem32[stm.ADC + 4] = 1 << 23 - elif chan == 18: - stm.mem32[stm.ADC1 + stm.ADC_SMPR1] = 0x1000000 - stm.mem32[stm.ADC + 4] = 0xc00000 - else: - stm.mem32[stm.ADC1 + stm.ADC_SMPR1] = 0x40000 - stm.mem32[stm.ADC + 4] = 1 << 23 - stm.mem32[stm.ADC1 + stm.ADC_SQR3] = chan - stm.mem32[stm.ADC1 + stm.ADC_CR2] = 1 | (1 << 30) | (1 << 10) # start conversion - while not stm.mem32[stm.ADC1 + stm.ADC_SR] & 2: # wait for EOC - if pyb.elapsed_millis(start) > timeout: - raise OSError('ADC timout') - data = stm.mem32[stm.ADC1 + stm.ADC_DR] # clear down EOC - stm.mem32[stm.ADC1 + stm.ADC_CR2] = 0 # Turn off ADC - return data - - def v33(): - return 4096 * 1.21 / adcread(17) - - def vbat(): - return 1.21 * 2 * adcread(18) / adcread(17) # 2:1 divider on Vbat channel - - def vref(): - return 3.3 * adcread(17) / 4096 - - def temperature(): - return 25 + 400 * (3.3 * adcread(16) / 4096 - 0.76) - - Note that this example is only valid for the F405 MCU and all values are not corrected by Vref and - factory calibration data. + Example:: + + adcall = pyb.ADCAll(12, 0x70000) # 12 bit resolution, internal channels + temp = adcall.read_core_temp()
tcmur/unmap: fix the NOTE comment
@@ -1882,8 +1882,11 @@ static int handle_unmap_internal(struct tcmu_device *dev, struct tcmulib_cmd *or * large num blocks into OPTIMAL UNMAP GRANULARITY size. * * NOTE: here we always asumme the OPTIMAL UNMAP GRANULARITY - * equals to UNMAP GRANULARITY ALIGNMENT, if not in feature - * and following align and split algorithm should be changed. + * equals to UNMAP GRANULARITY ALIGNMENT to simplify the + * calculate algorithm, but in future for some new devices + * who could support and they must have different values + * to make the unmap to be more efficient, the following + * align and split calculate algorithm should be changed. */ lbas = opt_unmap_gran - (lba & mask); lbas = min(lbas, nlbas);
gate prep in skip
*/ #include "all.h" - -/* functions -*/ u3_noun - u3qb_skip(u3_noun a, - u3_noun b) + _skip_in(u3j_site* sit_u, u3_noun a) { if ( 0 == a ) { return a; else if ( c3n == u3du(a) ) { return u3_none; } else { - u3_noun hoz = u3n_slam_on(u3k(b), u3k(u3h(a))); - u3_noun vyr = u3qb_skip(u3t(a), b); + u3_noun hoz = u3j_gate_slam(sit_u, u3k(u3h(a))); + u3_noun vyr = _skip_in(sit_u, u3t(a)); switch ( hoz ) { case c3y: return vyr; } } } + +/* functions +*/ + u3_noun + u3qb_skip(u3_noun a, + u3_noun b) + { + u3j_site sit_u; + u3_noun pro; + u3j_gate_prep(&sit_u, b); + pro = _skip_in(&sit_u, a); + u3j_gate_lose(&sit_u); + return pro; + } u3_noun u3wb_skip(u3_noun cor) {
No need to create persist and accessories folder manually?
@@ -263,8 +263,8 @@ function checkHomebridge { fi # create homebridge dir and add Mainuser ownership mkdir /home/$MAINUSER/.homebridge - mkdir /home/$MAINUSER/.homebridge/persist - mkdir /home/$MAINUSER/.homebridge/accessories + #mkdir /home/$MAINUSER/.homebridge/persist + #mkdir /home/$MAINUSER/.homebridge/accessories touch /home/$MAINUSER/.homebridge/config.json chown -R $MAINUSER /home/$MAINUSER/.homebridge
Package: Add a third optional argument to select compiler for Bootstrapping
-- Check the command line arguments, and show some help if needed. --- - local usage = 'usage is: package <branch> <type>\n' .. + local allowedCompilers = {} + + if os.ishost("windows") then + allowedCompilers = { + "vs2019", + "vs2017", + "vs2015", + "vs2013", + "vs2012", + "vs2010", + "vs2008", + "vs2005", + } + elseif os.ishost("linux") or os.ishost("bsd") then + allowedCompilers = { + "gcc", + "clang", + } + elseif os.ishost("macosx") then + allowedCompilers = { + "clang", + } + else + error("Unsupported host os", 0) + end + + local usage = 'usage is: package <branch> <type> [<compiler>]\n' .. ' <branch> is the name of the release branch to target\n' .. - ' <type> is one of "source" or "binary"\n' + ' <type> is one of "source" or "binary"\n' .. + ' <compiler> (default: ' .. allowedCompilers[1] .. ') is one of ' .. table.implode(allowedCompilers, "", "", " ") - if #_ARGS ~= 2 then + if #_ARGS ~= 2 and #_ARGS ~= 3 then error(usage, 0) end local branch = _ARGS[1] local kind = _ARGS[2] + local compiler = _ARGS[3] or allowedCompilers[1] if kind ~= "source" and kind ~= "binary" then + print("Invalid package kind: "..kind) error(usage, 0) end + if not table.contains(allowedCompilers, compiler) then + print("Invalid compiler: "..compiler) + error(usage, 0) + end + + local compilerIsVS = compiler:startswith("vs") -- -- Make sure I've got what I've need to be happy. local required = { "git" } - if not os.ishost("windows") then + if not compilerIsVS then table.insert(required, "make") - table.insert(required, "cc") - else - if not os.getenv("VS140COMNTOOLS") then - error("required tool 'Visual Studio 2015' not found", 0) - end + table.insert(required, compiler) end for _, value in ipairs(required) do -- print("Bootstraping Premake...") - if os.ishost("windows") then - z = execQuiet("Bootstrap.bat") + if compilerIsVS then + z = os.execute("Bootstrap.bat " .. compiler) else - local os_map = { - linux = "linux", - macosx = "osx", - } - z = execQuiet("make -j -f Bootstrap.mak %s", os_map[os.host()]) + z = os.execute("make -j -f Bootstrap.mak " .. os.host()) end if not z then error("Failed to Bootstrap Premake", 0)
lib: mbedtls: comment out Python3 check and 3dparty dir
@@ -69,18 +69,18 @@ set(CTR_DRBG_128_BIT_KEY_WARNING "${WARNING_BORDER}" "${WARNING_BORDER}") # Python 3 is only needed here to check for configuration warnings. -if(NOT CMAKE_VERSION VERSION_LESS 3.15.0) - set(Python3_FIND_STRATEGY LOCATION) - find_package(Python3 COMPONENTS Interpreter) - if(Python3_Interpreter_FOUND) - set(MBEDTLS_PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) - endif() -else() - find_package(PythonInterp 3) - if(PYTHONINTERP_FOUND) - set(MBEDTLS_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) - endif() -endif() +#if(NOT CMAKE_VERSION VERSION_LESS 3.15.0) +# set(Python3_FIND_STRATEGY LOCATION) +# find_package(Python3 COMPONENTS Interpreter) +# if(Python3_Interpreter_FOUND) +# set(MBEDTLS_PYTHON_EXECUTABLE ${Python3_EXECUTABLE}) +# endif() +#else() +# find_package(PythonInterp 3) +# if(PYTHONINTERP_FOUND) +# set(MBEDTLS_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE}) +# endif() +#endif() if(MBEDTLS_PYTHON_EXECUTABLE) # If 128-bit keys are configured for CTR_DRBG, display an appropriate warning @@ -241,8 +241,8 @@ endif(ENABLE_ZLIB_SUPPORT) add_subdirectory(include) -add_subdirectory(3rdparty) -list(APPEND libs ${thirdparty_lib}) +#add_subdirectory(3rdparty) +#list(APPEND libs ${thirdparty_lib}) add_subdirectory(library)
webterm: v1.0.0
:~ title+'Terminal' - info+'A web interface to your Urbit\'s command line (the dojo).' + info+'A web interface to your Urbit\'s command line.' color+0x2e.4347 - glob-http+['https://bootstrap.urbit.org/glob-0v6.ak34j.nao8k.dhqs4.s2atf.td1lc.glob' 0v6.ak34j.nao8k.dhqs4.s2atf.td1lc] + glob-http+['https://bootstrap.urbit.org/glob-0v1.fgmgl.utdgt.kdu3r.4e5f9.v58rk.glob' 0v1.fgmgl.utdgt.kdu3r.4e5f9.v58rk] base+'webterm' - version+[0 0 1] + version+[1 0 0] website+'https://tlon.io' license+'MIT' ==
OpenCanopy: Fix assertion with disabled mouse pointer
@@ -1151,7 +1151,9 @@ GuiDrawLoop ( // // Clear previous inputs. // + if (mPointerContext != NULL) { GuiPointerReset (mPointerContext); + } GuiKeyReset (mKeyContext); // // Main drawing loop, time and derieve sub-frequencies as required.
mbedtls: fix `esp_aes_gcm_update_ad()` API implementation
@@ -352,6 +352,8 @@ int esp_aes_gcm_starts( esp_gcm_context *ctx, /* Initialize AES-GCM context */ memset(ctx->ghash, 0, sizeof(ctx->ghash)); ctx->data_len = 0; + ctx->aad = NULL; + ctx->aad_len = 0; ctx->iv = iv; ctx->iv_len = iv_len; @@ -371,6 +373,15 @@ int esp_aes_gcm_starts( esp_gcm_context *ctx, gcm_gen_table(ctx); } + /* Once H is obtained we need to derive J0 (Initial Counter Block) */ + esp_gcm_derive_J0(ctx); + + /* The initial counter block keeps updating during the esp_gcm_update call + * however to calculate final authentication tag T we need original J0 + * so we make a copy here + */ + memcpy(ctx->ori_j0, ctx->J0, 16); + ctx->gcm_state = ESP_AES_GCM_STATE_START; return ( 0 ); @@ -395,26 +406,14 @@ int esp_aes_gcm_update_ad( esp_gcm_context *ctx, return -1; } - /* Initialize AES-GCM context */ - memset(ctx->ghash, 0, sizeof(ctx->ghash)); - ctx->data_len = 0; - - ctx->aad = aad; - ctx->aad_len = aad_len; - if (ctx->gcm_state != ESP_AES_GCM_STATE_START) { ESP_LOGE(TAG, "AES context in invalid state!"); return -1; } - /* Once H is obtained we need to derive J0 (Initial Counter Block) */ - esp_gcm_derive_J0(ctx); - - /* The initial counter block keeps updating during the esp_gcm_update call - * however to calculate final authentication tag T we need original J0 - * so we make a copy here - */ - memcpy(ctx->ori_j0, ctx->J0, 16); + /* Initialise associated data */ + ctx->aad = aad; + ctx->aad_len = aad_len; esp_gcm_ghash(ctx, ctx->aad, ctx->aad_len, ctx->ghash);
libarrakis: fix Hakefile to include pmap_ds sources
@@ -212,6 +212,17 @@ in arch_include "k1om" = "include/arch/x86_64" arch_include _ = "" + -- sources specific to the pmap implementation + pmap_unified_srcs = [ "pmap_slab_mgmt.c" ] + pmap_srcs "x86_64" Config.LL = pmap_unified_srcs ++ [ "pmap_ll.c" ] + pmap_srcs "x86_64" Config.ARRAY = pmap_unified_srcs ++ [ "pmap_array.c" ] + pmap_srcs "k1om" Config.LL = pmap_unified_srcs ++ [ "pmap_ll.c" ] + pmap_srcs "k1om" Config.ARRAY = pmap_unified_srcs ++ [ "pmap_array.c" ] + pmap_srcs "aarch64" Config.LL = pmap_unified_srcs ++ [ "pmap_ll.c" ] + pmap_srcs "aarch64" Config.ARRAY = pmap_unified_srcs ++ [ "pmap_array.c" ] + pmap_srcs "arm" _ = [ ] -- armv7 uses its own pmap_ds implementation + pmap_srcs _ _ = [ ] + pmap_includes "x86_64" Config.LL = [ "include" </> "pmap_ll" ] pmap_includes "x86_64" Config.ARRAY = [ "include" </> "pmap_array" ] pmap_includes "aarch64" Config.LL = [ "include" </> "pmap_ll" ] @@ -224,7 +235,7 @@ in build library { target = "arrakis", architectures = [arch], cFiles = arch_srcs arch ++ archfam_srcs (archFamily arch) - ++ common_srcs ++ idc_srcs, + ++ common_srcs ++ idc_srcs ++ pmap_srcs (archFamily arch) Config.pmap_datastructure, assemblyFiles = arch_assembly (archFamily arch), addCFlags = [ "-DARRAKIS", "-DMORECORE_PAGESIZE="++(morecore_pagesize arch) ], flounderBindings = [ "mem", "octopus", "interdisp", "spawn", "arrakis",
kernel: access_ok: properly check that buffer is in user space Check that all of the provided buffer is in user space rather than just the buffer's base address.
bool access_ok(uint8_t type, lvaddr_t buffer, size_t size) { debug(SUBSYS_SYSCALL, "%s: buffer=%#"PRIxLVADDR", size=%zu\n", __FUNCTION__, buffer, size); - // Check that `buffer` is a user space address, i.e. below MEMORY_OFFSET - if (buffer >= MEMORY_OFFSET) { - return SYS_ERR_INVALID_USER_BUFFER; + // Check that the provided buffer is fully in user space, i.e. below MEMORY_OFFSET + if (buffer + size >= MEMORY_OFFSET) { + return false; } // check if we have valid ptentries for base .. base + npages
Use `setenv`instead as `putenv` makes Lutris' wine crash for some reason (threading?)
@@ -727,18 +727,13 @@ void init_system_info(){ char *dir = dirname((char*)wineProcess.c_str()); stringstream findVersion; findVersion << "\"" << dir << "/wine\" --version"; - bool env_exists = false; - if (getenv("WINELOADERNOEXEC")) { - static char removenoexec[] = "WINELOADERNOEXEC"; - putenv(removenoexec); - env_exists = true; - } + const char *wine_env = getenv("WINELOADERNOEXEC"); + if (wine_env) + unsetenv("WINELOADERNOEXEC"); wineVersion = exec(findVersion.str()); std::cout << "WINE VERSION = " << wineVersion << "\n"; - if (env_exists) { - static char noexec[] = "WINELOADERNOEXEC=1"; - putenv(noexec); - } + if (wine_env) + setenv("WINELOADERNOEXEC", wine_env, 1); } } else {
sgx-tools/README: clarify the depenencies to libsgx-dcap-quote-verify-dev/libsgx-dcap-quote-verify-devel
## Dependency - golang 1.14 or above. -- [SGX DCAP](https://github.com/intel/SGXDataCenterAttestationPrimitives): please download and install the rpm(centos) or deb(ubuntu) from "https://download.01.org/intel-sgx/sgx-dcap/#version#linux/distro" - - libsgx-dcap-quote-verify-dev(ubuntu) or libsgx-dcap-quote-verify-devel(centos) +- libsgx-dcap-quote-verify-devel (CentOS) / libsgx-dcap-quote-verify-dev (Ubuntu) from [official Intel SGX DCAP release page](https://01.org/intel-software-guard-extensions/downloads). ## Build
Removed backwards compatibility unused settings introcuduced with nrf5281x support.
@@ -451,10 +451,6 @@ syscfg.defs: - "!XTAL_RC" deprecated: 1 -syscfg.vals.MCU_NRF52810: - MCU_TARGET: nRF52810 -syscfg.vals.MCU_NRF52811: - MCU_TARGET: nRF52811 syscfg.vals.MCU_NRF52832: MCU_TARGET: nRF52832 syscfg.vals.MCU_NRF52840:
slog %crud tanks in %dill when we don't have a duct
[:_(moz [(need hey.all) %give %init p.q.hic]) ..^$] =+ nus=(ax hen q.hic) ?~ nus + ?. ?=(%crud -.q.hic) ~& [%dill-no-flow q.hic] [~ ..^$] + ~& [%dill-no-flow %crud p.q.hic] + [((slog (flop q.q.hic)) ~) ..^$] =^ moz all abet:(call:u.nus q.hic) [moz ..^$] ::
Enable HKDF EXTRACT/EXPAND algs
@@ -611,6 +611,10 @@ extern "C" { #define PSA_WANT_ALG_HMAC 1 #define MBEDTLS_PSA_BUILTIN_ALG_HKDF 1 #define PSA_WANT_ALG_HKDF 1 +#define MBEDTLS_PSA_BUILTIN_ALG_HKDF_EXTRACT 1 +#define PSA_WANT_ALG_HKDF_EXTRACT 1 +#define MBEDTLS_PSA_BUILTIN_ALG_HKDF_EXPAND 1 +#define PSA_WANT_ALG_HKDF_EXPAND 1 #endif /* MBEDTLS_HKDF_C */ #if defined(MBEDTLS_MD_C)
[Chenyu Zhao] : Fix bugs
@@ -13,6 +13,15 @@ log: max_backups: 7 max_age: 67 +mysql: + host: "127.0.0.1" + port: 3306 + user: "root" + password: "123456" + dbname: "lmp" + max_open_conns: 200 + max_idle_conns: 50 + influxdb: host: "127.0.0.1" port: 8086
travis: Use multi-line text
@@ -37,8 +37,16 @@ addons: - cunit before_install: - $CC --version - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then CMAKE_OPTS=" -DENABLE_ASAN=1" AUTOTOOLS_OPTS=" --enable-asan"; fi - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$CXX" = "g++" ]; then export CXX="g++-8" CC="gcc-8" EXTRA_LDFLAGS="-fuse-ld=gold"; else export CXX="clang++" CC="clang"; fi; fi + - | + if [ "$TRAVIS_OS_NAME" == "linux" ]; then + CMAKE_OPTS=" -DENABLE_ASAN=1" + AUTOTOOLS_OPTS="--enable-asan" + if [ "$CXX" = "g++" ]; then + export CXX="g++-8" CC="gcc-8" EXTRA_LDFLAGS="-fuse-ld=gold" + else + export CXX="clang++" CC="clang" + fi + fi - $CC --version - cmake --version before_script: @@ -46,11 +54,18 @@ before_script: - ./ci/build_openssl.sh - ./ci/build_nghttp3.sh # configure ngtcp2 - - if [ "$CI_BUILD" == "autotools" ]; then autoreconf -i; fi - export PKG_CONFIG_PATH=$PWD/../openssl/build/lib/pkgconfig:$PWD/../nghttp3/build/lib/pkgconfig LDFLAGS="$EXTRA_LDFLAGS -Wl,-rpath,$PWD/../openssl/build/lib" - - if [ "$CI_BUILD" == "autotools" ]; then ./configure --enable-werror $AUTOTOOLS_OPTS; fi - # Set CMAKE_LIBRARY_ARCHITECTURE to workaround failure to parse implicit link information from GCC 5 - - if [ "$CI_BUILD" == "cmake" ]; then cmake $CMAKE_OPTS -DCMAKE_LIBRARY_ARCHITECTURE=x86_64-linux-gnu; fi + - | + if [ "$CI_BUILD" == "autotools" ]; then + autoreconf -i + ./configure --enable-werror $AUTOTOOLS_OPTS + fi + # Set CMAKE_LIBRARY_ARCHITECTURE to workaround failure to parse + # implicit link information from GCC 5 + - | + if [ "$CI_BUILD" == "cmake" ]; then + cmake $CMAKE_OPTS -DCMAKE_LIBRARY_ARCHITECTURE=x86_64-linux-gnu + fi script: # Now build ngtcp2 examples and test - make
Stop server from expecting Certificate message when not requested In a non client-auth renegotiation where the original handshake *was* client auth, then the server will expect the client to send a Certificate message anyway resulting in a connection failure.
@@ -347,6 +347,8 @@ static int state_machine(SSL *s, int server) */ s->ctx->stats.sess_accept_renegotiate++; } + + s->s3->tmp.cert_request = 0; } else { s->ctx->stats.sess_connect++; @@ -354,7 +356,6 @@ static int state_machine(SSL *s, int server) memset(s->s3->client_random, 0, sizeof(s->s3->client_random)); s->hit = 0; - s->s3->tmp.cert_request = 0; s->s3->tmp.cert_req = 0; if (SSL_IS_DTLS(s)) {
Remove useless extra parenthesis
@@ -122,7 +122,7 @@ void Recep_GetHeader(volatile uint8_t *data) } } - if ((ctx.rx.status.rx_framing_error == false)) + if (ctx.rx.status.rx_framing_error == false) { if (data_size) { @@ -359,7 +359,7 @@ ll_service_t *Recep_GetConcernedLLService(header_t *header) // Check all ll_service id for (i = 0; i < ctx.ll_service_number; i++) { - if ((header->target == ctx.ll_service_table[i].id)) + if (header->target == ctx.ll_service_table[i].id) { return (ll_service_t *)&ctx.ll_service_table[i]; }
CI: Disable cache Sometimes the cache breaks and the test fails. The test will continue to fail unless we update the cache key or get rid of the broken cache.. Disable the cache action because it looks unstable
@@ -18,13 +18,6 @@ jobs: uses: ruby/setup-ruby@master with: ruby-version: 2.3 - - name: Cache Ruby dependencies - uses: actions/cache@v1 - with: - path: ./vendor/bundle - key: v1-linux-2.3-${{ hashFiles('rmagick.gemspec') }} - restore-keys: | - v1-linux-2.3-${{ hashFiles('rmagick.gemspec') }} - name: Build and test with Rake run: | bundle install --path=vendor/bundle --jobs 4 --retry 3 @@ -45,13 +38,6 @@ jobs: name: Linux, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }} steps: - uses: actions/checkout@v2 - - name: Cache ImageMagick - uses: actions/cache@v1 - with: - path: ./build-ImageMagick - key: v1-linux-imagemagick-${{ matrix.imagemagick-version.full }} - restore-keys: | - v1-linux-imagemagick-${{ matrix.imagemagick-version.full }} - name: Set up Ruby ${{ matrix.ruby-version }} uses: ruby/setup-ruby@master with: @@ -60,13 +46,6 @@ jobs: run: | export IMAGEMAGICK_VERSION=${{ matrix.imagemagick-version.full }} ./before_install_linux.sh - - name: Cache Ruby dependencies - uses: actions/cache@v1 - with: - path: ./vendor/bundle - key: v1-linux-${{ matrix.ruby-version }}-${{ hashFiles('rmagick.gemspec') }} - restore-keys: | - v1-linux-${{ matrix.ruby-version }}-${{ hashFiles('rmagick.gemspec') }} - name: Build and test with Rake run: | bundle install --path=vendor/bundle --jobs 4 --retry 3 @@ -84,13 +63,6 @@ jobs: name: macOS, Ruby ${{ matrix.ruby-version }}, IM ${{ matrix.imagemagick-version.major-minor }} steps: - uses: actions/checkout@v2 - - name: Cache ImageMagick - uses: actions/cache@v1 - with: - path: ./build-ImageMagick - key: v1-macos-imagemagick-${{ matrix.imagemagick-version.full }} - restore-keys: | - v1-macos-imagemagick-${{ matrix.imagemagick-version.full }} - name: Set up Ruby ${{ matrix.ruby-version }} uses: ruby/setup-ruby@master with: @@ -98,13 +70,6 @@ jobs: - name: Update/Install packages run: | IMAGEMAGICK_VERSION=${{ matrix.imagemagick-version.full }} ./before_install_osx.sh - - name: Cache Ruby dependencies - uses: actions/cache@v1 - with: - path: ./vendor/bundle - key: v1-macos-${{ matrix.ruby-version }}-${{ hashFiles('rmagick.gemspec') }} - restore-keys: | - v1-macos-${{ matrix.ruby-version }}-${{ hashFiles('rmagick.gemspec') }} - name: Build and test with Rake run: | bundle install --path=vendor/bundle --jobs 4 --retry 3
Cleanup HAPI session as well
@@ -430,6 +430,22 @@ cleanupHAPI() return true; } +bool +cleanupSession() +{ + if ( !Util::theHAPISession.get() ) + { + return true; + } + + // If session is not initialize, then don't try to close it. + CHECK_HAPI_AND_RETURN( HAPI_IsSessionValid( Util::theHAPISession.get() ), true ); + + CHECK_HAPI_AND_RETURN( HAPI_CloseSession( Util::theHAPISession.get() ), false ); + + return true; +} + void updateTimelineCallback(void* clientData) { HAPI_TimelineOptions timelineOptions; @@ -640,7 +656,7 @@ uninitializePlugin(MObject obj) status = plugin.deregisterCommand("houdiniAsset"); CHECK_MSTATUS_AND_RETURN_IT(status); - if(cleanupHAPI()) + if(cleanupHAPI() && cleanupSession()) { MGlobal::displayInfo("Houdini Engine cleaned up successfully."); }
btc-provider: ping _only_ once every 30 seconds
?- -.comm %set-credentials :_ state(host-info [api-url.comm %.n network.comm 0 *(set ship)]) - :~ do-ping:hc - (start-ping-timer:hc ~s30) - == + ~[(start-ping-timer:hc ~s30)] :: %add-whitelist :- ~ ?. (is-whitelisted:hc src.bowl) ~|("btc-provider: blocked client {<src.bowl>}" !!) ~& > "btc-provider: accepted client {<src.bowl>}" - :- [do-ping:hc]~ - this(clients.host-info (~(put in clients.host-info) src.bowl)) + `this(clients.host-info (~(put in clients.host-info) src.bowl)) :: ++ on-arvo ~/ %on-arvo :: ?: ?=([%ping-timer *] wir) :_ this - :~ do-ping:hc + :~ do-ping (start-ping-timer:hc ~s30) == =^ cards state == [cards this] :: + ++ do-ping + ^- card + =/ act=action [%ping ~] + :* %pass /ping/[(scot %da now.bowl)] %agent + [our.bowl %btc-provider] %poke + %btc-provider-action !>(act) + == + :: :: Handles HTTP responses from RPC servers. Parses for errors, :: then handles response. For actions that require collating multiple :: RPC calls, uses req-card to call out to RPC again if more |= interval=@dr ^- card [%pass /ping-timer %arvo %b %wait (add now.bowl interval)] -:: -++ do-ping - ^- card - =/ act=action [%ping ~] - :* %pass /ping/[(scot %da now.bowl)] %agent - [our.bowl %btc-provider] %poke - %btc-provider-action !>(act) - == --
option/posix: Implement more socket operations
@@ -59,9 +59,19 @@ ssize_t recvfrom(int, void *__restrict, size_t, int, struct sockaddr *__restrict __builtin_unreachable(); } -ssize_t recvmsg(int, struct msghdr *, int) { - __ensure(!"Not implemented"); - __builtin_unreachable(); +ssize_t recvmsg(int fd, struct msghdr *msgh, int flags) { + __ensure(msgh->msg_iovlen); + + frigg::infoLogger() << "mlibc: recvmsg() control length: " << msgh->msg_controllen + << frigg::endLog; + + ssize_t size; + if(mlibc::sys_read(fd, msgh->msg_iov[0].iov_base, msgh->msg_iov[0].iov_len, &size)) + return -1; + + msgh->msg_controllen = 0; + + return size; } ssize_t send(int, const void *, size_t, int) { @@ -70,10 +80,15 @@ ssize_t send(int, const void *, size_t, int) { } ssize_t sendmsg(int fd, const struct msghdr *msgh, int flags) { - size_t size = 0; - for(size_t i = 0; i < msgh->msg_iovlen; i++) - size += msgh->msg_iov[i].iov_len; + __ensure(msgh->msg_iovlen); + frigg::infoLogger() << "mlibc: sendmsg() control length: " << msgh->msg_controllen + << frigg::endLog; + __ensure(!msgh->msg_controllen); + + ssize_t size; + if(mlibc::sys_write(fd, msgh->msg_iov[0].iov_base, msgh->msg_iov[0].iov_len, &size)) + return -1; return size; }
vm/page: prevent allocation of new kernel ptables
@@ -293,7 +293,7 @@ int _page_map(pmap_t *pmap, void *vaddr, addr_t pa, int attrs) page_t *ap = NULL; while (pmap_enter(pmap, pa, vaddr, attrs, ap) < 0) { - if ((ap = _page_alloc(SIZE_PAGE, PAGE_OWNER_KERNEL | PAGE_KERNEL_PTABLE)) == NULL) + if (vaddr > (void *)VADDR_KERNEL || (ap = _page_alloc(SIZE_PAGE, PAGE_OWNER_KERNEL | PAGE_KERNEL_PTABLE)) == NULL) return -ENOMEM; } return EOK;
ixfr-out, fix compression domain in error case.
@@ -253,12 +253,12 @@ query_state_type query_ixfr(struct nsd *nsd, struct query *query) * serial, then serve a single SOA with our current serial */ current_serial = zone_get_current_serial(zone); if(compare_serial(qserial, current_serial) >= 0) { - query_add_compression_domain(query, zone->apex, - QHEADERSZ); if(!zone->soa_rrset || zone->soa_rrset->rr_count != 1){ RCODE_SET(query->packet, RCODE_SERVFAIL); return QUERY_PROCESSED; } + query_add_compression_domain(query, zone->apex, + QHEADERSZ); if(packet_encode_rr(query, zone->apex, &zone->soa_rrset->rrs[0], zone->soa_rrset->rrs[0].ttl)) {
doc: update partition desc for up2 board modify partition desc table of up2 board to make it consistent with launch uos script.
[base] # The sequence matters, and the index starts from p1. # The fastboot ABL by default boots from the 2nd partition. -partitions = sos_rootfs sos_boot data_partition +partitions = data_partition sos_boot sos_rootfs device = auto +[partition.data_partition] +label = data_partition +len = 20000 +type = linux + [partition.sos_boot] label = sos_boot len = 100 @@ -16,11 +21,6 @@ type = linux [partition.sos_rootfs] label = sos_rootfs -len = 4000 -type = linux - -[partition.data_partition] -label = data_partition len = -1 type = linux # ------------------ END MIX-IN DEFINITIONS ------------------
debugging comment free
@@ -662,23 +662,31 @@ static void comment_set(t_comment *x, t_symbol *s, int argc, t_atom * argv) canvas_dirty(x->x_glist, 1); */ } -static void comment_free(t_comment *x) -{ - if (x->x_active) - { - post("bug [comment]: comment_free"); + +static void comment_free(t_comment *x){ + if (x->x_active){ +// post("bug [comment]: comment_free"); pd_unbind((t_pd *)x, gensym("#key")); pd_unbind((t_pd *)x, gensym("#keyname")); } - if (x->x_transclock) clock_free(x->x_transclock); - if (x->x_bindsym) - { + if (x->x_transclock) + clock_free(x->x_transclock); + if(x->x_bindsym){ +// post("free [comment]: bindsym = %s", x->x_bindsym); pd_unbind((t_pd *)x, x->x_bindsym); - if (!x->x_bbpending) +// post("unbind pd"); + if(!x->x_bbpending){ +// post("unbind commentsink"); pd_unbind(commentsink, x->x_bindsym); } - if (x->x_binbuf && !x->x_ready) binbuf_free(x->x_binbuf); - if (x->x_textbuf) freebytes(x->x_textbuf, x->x_textbufsize); + } + if (x->x_binbuf && !x->x_ready){ + // post("binbuf_free"); + binbuf_free(x->x_binbuf); + } + if (x->x_textbuf) + freebytes(x->x_textbuf, x->x_textbufsize); +// post("done with free"); } //these new methods (2017) do nothing and are placeholders - DK 2017
add unicore client to list of other agent clients
@@ -170,3 +170,4 @@ Any application that needs an access token can use [```liboidc-agent2```](api.md oidc-agent. The following applications are already integrated with oidc-agent: - [wattson](https://github.com/indigo-dc/wattson) - [orchent](https://github.com/indigo-dc/orchent) +- [UNICORE command line client](https://www.unicore.eu)
[core] change backtrace format to put addr first (better monospaced alignment of frame num, addr, offset, name)
@@ -361,8 +361,8 @@ ck_backtrace (FILE *fp) } } - fprintf(fp, "%u: %s (+0x%x) [%p]\n", - frame, name, (unsigned int)offset, (void *)(uintptr_t)ip); + fprintf(fp, "%.2u: [%.012lx] (+%04x) %s\n", + frame, (uintptr_t)ip, (unsigned int)offset, name); } if (0 == rc) return;
feat(util) Allow both $VAR and ${VAR} template variables
@@ -24,16 +24,21 @@ function util.set_file_contents(filename, contents) return true end --- Barebones string-based template function for generating C/Lua code. --- Replaces ${VAR} placeholders in the `code` template by the corresponding +-- Barebones string-based template function for generating C/Lua code. Replaces +-- $VAR and ${VAR} placeholders in the `code` template by the corresponding -- strings in the `substs` table. function util.render(code, substs) - return (string.gsub(code, "%$%b{}", function(matched) - local k = matched:sub(3, -2) -- remove "${" and "}" + return (string.gsub(code, "%$({?)([A-Za-z_][A-Za-z_0-9]*)(}?)", function(a, k, b) + if a == "{" and b == "" then + error("unmatched ${ in template") + end local v = substs[k] if not v then error("Internal compiler error: missing template variable " .. k) end + if a == "" and b == "}" then + v = v .. b + end return v end)) end
add missing local fix
function m.precompiledHeader(cfg, condition) - prjcfg, filecfg = p.config.normalize(cfg) + local prjcfg, filecfg = p.config.normalize(cfg) if filecfg then if prjcfg.pchsource == filecfg.abspath and not prjcfg.flags.NoPCH then m.element('PrecompiledHeader', condition, 'Create')
Fix vulkan driver version shown for Nvidia and Intel on Windows
@@ -2280,17 +2280,30 @@ static VkResult overlay_CreateSwapchainKHR( struct swapchain_data *swapchain_data = new_swapchain_data(*pSwapchain, device_data); setup_swapchain_data(swapchain_data, pCreateInfo, device_data->instance->params); - swapchain_data->sw_stats.version_vk.major = VK_VERSION_MAJOR(device_data->properties.apiVersion); - swapchain_data->sw_stats.version_vk.minor = VK_VERSION_MINOR(device_data->properties.apiVersion); - swapchain_data->sw_stats.version_vk.patch = VK_VERSION_PATCH(device_data->properties.apiVersion); + const VkPhysicalDeviceProperties& prop = device_data->properties; + swapchain_data->sw_stats.version_vk.major = VK_VERSION_MAJOR(prop.apiVersion); + swapchain_data->sw_stats.version_vk.minor = VK_VERSION_MINOR(prop.apiVersion); + swapchain_data->sw_stats.version_vk.patch = VK_VERSION_PATCH(prop.apiVersion); swapchain_data->sw_stats.engineName = device_data->instance->engineName; swapchain_data->sw_stats.engineVersion = device_data->instance->engineVersion; std::stringstream ss; - ss << device_data->properties.deviceName; - ss << " (" << VK_VERSION_MAJOR(device_data->properties.driverVersion); - ss << "." << VK_VERSION_MINOR(device_data->properties.driverVersion); - ss << "." << VK_VERSION_PATCH(device_data->properties.driverVersion); + ss << prop.deviceName; + if (prop.vendorID == 0x10de) { + ss << " (" << ((prop.driverVersion >> 22) & 0x3ff); + ss << "." << ((prop.driverVersion >> 14) & 0x0ff); + ss << "." << std::setw(2) << std::setfill('0') << ((prop.driverVersion >> 6) & 0x0ff); +#ifdef _WIN32 + } else if (prop.vendorID == 0x8086) { + ss << " (" << (prop.driverVersion >> 14); + ss << "." << (prop.driverVersion & 0x3fff); + } +#endif + } else { + ss << " (" << VK_VERSION_MAJOR(prop.driverVersion); + ss << "." << VK_VERSION_MINOR(prop.driverVersion); + ss << "." << VK_VERSION_PATCH(prop.driverVersion); + } ss << ")"; swapchain_data->sw_stats.deviceName = ss.str();
fixed typo for resource compilation (wrong copy/paste)
@@ -114,13 +114,11 @@ cmd_ : $(OBJ_LIB) %.o: %.s $(CC) -x assembler-with-cpp -MMD $(FLAGS_LIB) -c $< -o $@ -out/%.o: %.rs +%.o: %.rs $(CC) -x assembler-with-cpp $(FLAGS) -c $*.rs -o $@ - $(CP) $*.d out/$*.d - $(RM) $*.d %.rs: %.res - $(RESCOMP) $*.res $*.rs -dep out/$*.o + $(RESCOMP) $*.res $*.rs -dep $*.o %.o80: %.s80 $(ASMZ80) $(FLAGSZ80_LIB) $< $@ out.lst
Coding: Update Markdown guides
@@ -184,7 +184,7 @@ Most notably use: - File Ending is `.md` or integrated within Doxygen comments - Only use `#` characters at the left side of headers/titles -- Use tabs or fences for code/examples +- Use fences for code/examples - Prefer fences which indicate the used language for better syntax highlighting - Fences with sh are for the [shell recorder syntax](/tests/shell/shell_recorder/tutorial_wrapper) - `README.md` and tutorials should be written exclusively with shell recorder syntax
API: Fix Coverity Warning CID 177944
@@ -3182,7 +3182,7 @@ static void *vl_api_sw_interface_set_lldp_t_print (vl_api_sw_interface_set_lldp_t * mp, void *handle) { u8 *s; - u8 null_data[128]; + u8 null_data[256]; memset (null_data, 0, sizeof (null_data));
`sock_flush_strong` should check errno within loop
@@ -1040,7 +1040,8 @@ error: after all the data was sent. This is a "busy" wait, polling isn't performed. */ void sock_flush_strong(intptr_t uuid) { - while (sock_flush(uuid) == 0) + errno = 0; + while (sock_flush(uuid) == 0 && errno == 0) ; } /**
mgmt/imgmgr: Return error if erase failed
@@ -340,6 +340,9 @@ imgr_erase(struct mgmt_cbuf *cb) } rc = flash_area_erase(imgr_state.upload.fa, 0, imgr_state.upload.fa->fa_size); + if (rc) { + return MGMT_ERR_EINVAL; + } flash_area_close(imgr_state.upload.fa); imgr_state.upload.fa = NULL; } else {
use user-provided log_level in bpf_prog_load For the case where user provided a log buffer, the user provided log_level is already been used. For the case where user provided a log_level and bcc needs to allocate buffer, the log_level is fixed to 1. Use user provided log level instead.
@@ -448,6 +448,7 @@ int bpf_prog_load(enum bpf_prog_type prog_type, const char *name, if (tmp_log_buf) free(tmp_log_buf); tmp_log_buf_size = LOG_BUF_SIZE; + if (attr.log_level == 0) attr.log_level = 1; for (;;) { tmp_log_buf = malloc(tmp_log_buf_size);
BugID:17860488: Improve channel lock
@@ -155,9 +155,16 @@ static void aws_switch_dst_chan(int channel); static int aws_amend_dst_chan = 0; void aws_switch_channel(void) { + os_mutex_lock(zc_mutex); if (aws_amend_dst_chan != 0) { aws_switch_dst_chan(aws_amend_dst_chan); aws_amend_dst_chan = 0; + os_mutex_unlock(zc_mutex); + return; + } + + if (aws_state == AWS_CHN_LOCKED) { + os_mutex_unlock(zc_mutex); return; } @@ -167,11 +174,14 @@ void aws_switch_channel(void) os_awss_switch_channel(channel, 0, NULL); awss_trace("chan %d\r\n", channel); } while (0); + os_mutex_unlock(zc_mutex); } void aws_set_dst_chan(int channel) { + os_mutex_lock(zc_mutex); aws_amend_dst_chan = channel; + os_mutex_unlock(zc_mutex); } static void aws_switch_dst_chan(int channel)
[chainmaker][#436]modify global variable value
@@ -183,7 +183,8 @@ START_TEST(test_001Wallet_0005CreateLoadWalletFailureNoExist) ck_assert_int_eq(rtnVal, BOAT_ERROR_PERSISTER_READ_FAIL); /* 2-2. verify the global variables that be affected */ - ck_assert(g_boat_iot_sdk_context.wallet_list[0].is_used == false); + ck_assert(g_boat_iot_sdk_context.wallet_list[0].is_used == true); + ck_assert(g_boat_iot_sdk_context.wallet_list[1].is_used == false); } END_TEST
Update nsd.conf.sample
@@ -325,6 +325,11 @@ remote-control: # The authentication domain name as defined in RFC8310. #auth-domain-name: "example.com" + # Client certificate and private key for Mutual TLS authentication + #client-cert: "path/to/clientcert.pem" + #client-key: "path/to/clientkey.key" + #client-key-pw: "password" + # Patterns have zone configuration and they are shared by one or more zones. # # pattern:
move receive window forward...shutdown the underlying lwip tcp on close()
@@ -123,7 +123,6 @@ static void read_complete(sock s, thread t, void *dest, u64 length) set_syscall_return(t, -ENOTCONN); return; } - struct pbuf *p = queue_peek(s->incoming); u64 xfer = MIN(length, p->len); runtime_memcpy(dest, p->payload, xfer); @@ -134,7 +133,7 @@ static void read_complete(sock s, thread t, void *dest, u64 length) dequeue(s->incoming); pbuf_free(p); } - // tcp_recved() to move the receive window + tcp_recved(s->lw, xfer); } static CLOSURE_2_0(read_hup, void, sock, thread); @@ -195,6 +194,9 @@ static int socket_close(sock s) { kernel k = current->p->k; heap h = k->general; + if (s->state == SOCK_OPEN) { + tcp_close(s->lw); + } deallocate_queue(s->notify, SOCK_QUEUE_LEN); deallocate_queue(s->waiting, SOCK_QUEUE_LEN); deallocate_queue(s->incoming, SOCK_QUEUE_LEN);
Options for test coverage in platformio.ini
@@ -15,18 +15,25 @@ default_envs = native [env:native] platform = native test_transport = custom - test_build_project_src = true build_type = debug build_flags = -I inc -I test + -lgcov + --coverage + -fprofile-arcs + +extra_scripts = + ../test/unit_test_script.py + ; Uncomment this line to activate Unit Test Debug ; ------------------------------------------------ ; -D UNIT_TEST_DEBUG + ; Uncomment and fill the value to debug required unit test directory ; (e.g: "debug_test = memory_allocator") ; ------------------------------------------------
Fix issue with CLR_RT_UnicodeHelper::ConvertFromUTF8
@@ -122,6 +122,13 @@ int CLR_RT_UnicodeHelper::CountNumberOfBytes( int max ) //--// +// dev note: need the pragma bellow because there are a couple of 'smart' hacks in +// the switch cases to improve the algorithm +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wimplicit-fallthrough" +#endif + bool CLR_RT_UnicodeHelper::ConvertFromUTF8( int iMaxChars, bool fJustMove, int iMaxBytes ) { NATIVE_PROFILE_CLR_CORE(); @@ -143,14 +150,7 @@ bool CLR_RT_UnicodeHelper::ConvertFromUTF8( int iMaxChars, bool fJustMove, int i switch(ch & 0xF0) { - case 0x00: - if(ch == 0) - { - inputUTF8--; - goto ExitFalse; - } - break; - + case 0x00: if(ch == 0) { inputUTF8--; goto ExitFalse; } case 0x10: case 0x20: case 0x30: @@ -321,6 +321,10 @@ Exit: return res; } +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif + bool CLR_RT_UnicodeHelper::ConvertToUTF8( int iMaxChars, bool fJustMove ) { NATIVE_PROFILE_CLR_CORE();
admin/prun: update version for prun
Summary: Convenience utility for parallel job launch Name: %{pname}%{PROJ_DELIM} -Version: 2.0 +Version: 2.1 Release: 1%{?dist} License: Apache-2.0 Group: %{PROJ_NAME}/admin
Documentation: Add link
@@ -177,7 +177,7 @@ in configuration files, but are "representatives", "proxies" or So that every tool has a consistent view to the key database it is vital that every application does a `ksLookup` for every key it uses. So even if your application iterates over keys, -always remember to do a cascading lookup for every single key! +always remember to do a [cascading](cascading.md) lookup for every single key! Thus we are interested in the value we use:
stm32/usb: Don't nul pyb_hid_report_desc if MICROPY_HW_USB_HID disabled. So this code can be used if pyb_hid_report_desc is not included in the port's root pointer list.
@@ -221,7 +221,9 @@ void pyb_usb_init0(void) { for (int i = 0; i < MICROPY_HW_USB_CDC_NUM; ++i) { usb_device.usbd_cdc_itf[i].attached_to_repl = false; } + #if MICROPY_HW_USB_HID MP_STATE_PORT(pyb_hid_report_desc) = MP_OBJ_NULL; + #endif pyb_usb_vcp_init0(); }
fix warning of parent scope
@@ -16,8 +16,8 @@ else() set( ECCODES_LITTLE_ENDIAN 1 ) endif() -set( ECCODES_BIG_ENDIAN ${ECCODES_BIG_ENDIAN} PARENT_SCOPE ) -set( ECCODES_LITTLE_ENDIAN ${ECCODES_LITTLE_ENDIAN} PARENT_SCOPE ) +set( ECCODES_BIG_ENDIAN ${ECCODES_BIG_ENDIAN} ) +set( ECCODES_LITTLE_ENDIAN ${ECCODES_LITTLE_ENDIAN} ) if( NOT DEFINED IEEE_BE ) check_c_source_runs(
[components/drivers] added function declaration
* Change Logs: * Date Author Notes * 2019-01-31 flybreak first version + * 2021-06-23 linpeng added function declaration */ +#ifndef __SENSOR_H__ +#define __SENSOR_H__ #include <rtthread.h> -#include <rtdevice.h> +#ifdef __cplusplus +extern "C" +{ +#endif + +int rt_hw_sensor_register(rt_sensor_t sensor, + const char *name, + rt_uint32_t flag, + void *data); + +#ifdef __cplusplus +} +#endif + +#endif /*__SENSOR_H__*/
Missing changes entry about OPENSSL_str[n]casecmp
@@ -120,6 +120,13 @@ breaking changes, and mappings for the large list of deprecated functions. ### Changes between 3.0.2 and 3.0.3 + * Case insensitive string comparison is reimplemented via new locale-agnostic + comparison functions OPENSSL_str[n]casecmp always using the POSIX locale for + comparison. The previous implementation had problems when the Turkish locale + was used. + + *Dmitry Belyavskiy* + * Fixed a bug in the c_rehash script which was not properly sanitising shell metacharacters to prevent command injection. This script is distributed by some operating systems in a manner where it is automatically executed. On
hark-chat-hook: poke hark-store for watching channels
++ chat-update |= =update:chat-store ^- (quip card _state) - [~ state] + :_ state + ?+ -.update ~ + %message (process-envelope path.update envelope.update) + :: + %messages + %- zing + (turn envelopes.update (cury process-envelope path.update)) + == + :: + ++ process-envelope + |= [=path =envelope:chat-store] + ^- (list card) + ?. ?& (~(has in watching) path) + !=(author.envelope our.bowl) + == + ~ + =/ =index:store + [%chat path] + =/ =contents:store + [%chat ~[envelope]] + ~[(poke-store %add index when.envelope %.n contents)] + :: + ++ poke-store + |= =action:store + ^- card + =/ =cage + hark-action+!>(action) + [%pass /store %agent [our.bowl %hark-store] %poke cage] -- :: ++ on-peek on-peek:def -- |_ =bowl:gall :: +:: ++ give |= [paths=(list path) =update:hook] ^- (list card)