message
stringlengths
6
474
diff
stringlengths
8
5.22k
Netconn reorganize flush and add protection for concurrent access
@@ -67,26 +67,26 @@ static void flush_mboxes(esp_netconn_t* nc) { esp_pbuf_t* pbuf; esp_netconn_t* new_nc; + ESP_CORE_PROTECT(); /* Protect ESP core */ if (esp_sys_sem_isvalid(&nc->mbox_receive)) { - do { - if (!esp_sys_mbox_getnow(&nc->mbox_receive, (void **)&pbuf)) { - break; - } + while (esp_sys_mbox_getnow(&nc->mbox_receive, (void **)&pbuf)) { if (pbuf != NULL && (uint8_t *)pbuf != (uint8_t *)&recv_closed) { - esp_pbuf_free(pbuf); + esp_pbuf_free(pbuf); /* Free received data buffers */ } - } while (1); } - if (esp_sys_sem_isvalid(&nc->mbox_accept)) { - do { - if (!esp_sys_mbox_getnow(&nc->mbox_accept, (void *)&new_nc)) { - break; + esp_sys_sem_delete(&nc->mbox_receive); /* Delete message queue */ + esp_sys_sem_invalid(&nc->mbox_receive); /* Invalid handle */ } + if (esp_sys_sem_isvalid(&nc->mbox_accept)) { + while (esp_sys_mbox_getnow(&nc->mbox_accept, (void *)&new_nc)) { if (new_nc != NULL) { esp_netconn_close(new_nc); /* Close netconn connection */ } - } while (1); } + esp_sys_sem_delete(&nc->mbox_accept); /* Delete message queue */ + esp_sys_sem_invalid(&nc->mbox_accept); /* Invalid handle */ + } + ESP_CORE_UNPROTECT(); /* Release protection */ } /**
more useragents!
@@ -127,6 +127,9 @@ static const char *browsers[][2] = { {"okhttp", "Others"}, {"node", "Others"}, {"PrivacyBrowser", "Others"}, + {"Transmission", "Others"}, + {"libmpv", "Others"}, + {"aria2", "Others"}, /* Feed-reader-as-a-service */ {"AppleNewsBot", "Feeds"}, @@ -236,6 +239,9 @@ static const char *browsers[][2] = { {"Googlebot-Image", "Crawlers"}, {"ZmEu", "Crawlers"}, {"DowntimeDetector", "Crawlers"}, + {"MauiBot", "Crawlers"}, + {"Cloud", "Crawlers"}, + {"stagefright", "Crawlers"}, /* Podcast fetchers */
jenkins: escape path during archive
@@ -915,7 +915,7 @@ def archive(paths) { def dest = "${prefix}${env.STAGE_NAME}/" sh "mkdir -p ${dest}" paths.each { path -> - sh "cp -v ${path} ${dest} || true" + sh "cp -v \"${path}\" ${dest} || true" } archiveArtifacts artifacts: "${prefix}**", fingerprint: true, allowEmptyArchive: true } else {
[quorum][#690]add quorum type
@@ -62,7 +62,8 @@ typedef enum BOAT_PROTOCOL_FISCOBCOS, //!< FISCOBCOS Enterprise consortium chain BOAT_PROTOCOL_HWBCS, // huawei chain BOAT_PROTOCOL_CHAINMAKER, // chainmaker - BOAT_PROTOCOL_VENACHAIN // Venachain Enterprise consortium chain + BOAT_PROTOCOL_VENACHAIN, // Venachain Enterprise consortium chain + BOAT_PROTOCOL_QUORUM // quorum }BoatProtocolType; //!@brief Blockchain hash algorithm
set_config_by_name(): fix whitespace ...as suggested by our master version of pgindent.
@@ -7503,6 +7503,7 @@ set_config_by_name(PG_FUNCTION_ARGS) if (Gp_role == GP_ROLE_DISPATCH && !IsBootstrapProcessingMode()) { StringInfoData buffer; + initStringInfo(&buffer); appendStringInfo(&buffer, "SET "); if (is_local)
include/tinyara/mminfo.h : Add conditions for BIN_NAME_MAX BIN_NAME_MAX is declared in binary_manager.h, but there is no header include when DEBUG_MM_HEAPINFO and APP_BINARY_SEPARATION are enabled.
* Included Files ****************************************************************************/ #include <tinyara/config.h> - +#if defined(CONFIG_DEBUG_MM_HEAPINFO) && defined(CONFIG_APP_BINARY_SEPARATION) +#include <tinyara/binary_manager.h> +#endif /**************************************************************************** * Pre-processor Definitions ****************************************************************************/
[NFSU] framelimit bugfix 2
@@ -354,7 +354,7 @@ void Init() static auto szCustomUserFilesDirectoryInGameDir = iniReader.ReadString("MISC", "CustomUserFilesDirectoryInGameDir", "0"); static int nImproveGamepadSupport = iniReader.ReadInteger("MISC", "ImproveGamepadSupport", 0); static float fLeftStickDeadzone = iniReader.ReadFloat("MISC", "LeftStickDeadzone", 10.0f); - static int nFPSLimit = iniReader.ReadInteger("MISC", "FPSLimit", 120); + static int nFPSLimit = iniReader.ReadInteger("MISC", "FPSLimit", 60); int nHideDebugObjects = iniReader.ReadInteger("MISC", "HideDebugObjects", 0); bool bBlackMagazineFix = iniReader.ReadInteger("MISC", "BlackMagazineFix", 0) != 0; if (szCustomUserFilesDirectoryInGameDir.empty() || szCustomUserFilesDirectoryInGameDir == "0")
[chainmaker][#1140]modify the buf size of the response info
@@ -33,7 +33,7 @@ api_chainmaker.h is header file for BoAT IoT SDK chainmaker's interface. #define BOAT_HLCHAINMAKER_HTTP2_SEND_BUF_MAX_LEN 8192 //!< The maximum length of HTTP2 send buffer #define BOAT_HLCHAINMAKER_ARGS_MAX_NUM 10 #define BOAT_RESPONSE_CONTRACT_RESULT_MAX_LEN 100 -#define BOAT_RESPONSE_MESSAGE_MAX_LEN 10 +#define BOAT_RESPONSE_MESSAGE_MAX_LEN 2048 #define BAOT_CHAINMAKER_NODE_STR_LEN 127 // call a pre created user contract, tx included in block // query a pre-created user contract, tx not included in block
Relaxes timing on diff time test
@@ -45,7 +45,7 @@ TEST_F(TimeUtilsTestSuite, DiffTimeTest) { auto t2 = celix_gettime(CLOCK_MONOTONIC); auto diff = celix_difftime(&t1, &t2); EXPECT_GE(diff, 0.00001 /*10 us*/); - EXPECT_LT(diff, 0.001 /*1 ms*/); + EXPECT_LT(diff, 0.01 /*1 ms*/); } TEST_F(TimeUtilsTestSuite, ElapsedTimeTest) {
api/btc/signtx: refactor host request mock in unit tests
@@ -565,12 +565,9 @@ mod tests { locktime: self.locktime, } } - } - fn mock_host_responder(tx: alloc::rc::Rc<core::cell::RefCell<Transaction>>) { - *crate::hww::MOCK_NEXT_REQUEST.0.borrow_mut() = - Some(Box::new(move |response: Response| { - let tx = tx.borrow(); + /// Return the transaction part requested by the device. + fn make_host_request(&self, response: Response) -> Request { let next: pb::BtcSignNextResponse = match response { Response::BtcSignNext(next) => next, Response::Btc(pb::BtcResponse { @@ -579,37 +576,43 @@ mod tests { _ => panic!("wrong response type"), }; match NextType::from_i32(next.r#type).unwrap() { - NextType::Input => Ok(Request::BtcSignInput( - tx.inputs[next.index as usize].input.clone(), - )), - NextType::Output => Ok(Request::BtcSignOutput( - tx.outputs[next.index as usize].clone(), - )), - NextType::PrevtxInit => Ok(Request::Btc(pb::BtcRequest { + NextType::Input => { + Request::BtcSignInput(self.inputs[next.index as usize].input.clone()) + } + NextType::Output => { + Request::BtcSignOutput(self.outputs[next.index as usize].clone()) + } + NextType::PrevtxInit => Request::Btc(pb::BtcRequest { request: Some(pb::btc_request::Request::PrevtxInit( pb::BtcPrevTxInitRequest { - version: tx.inputs[next.index as usize].prevtx_version, - num_inputs: tx.inputs[next.index as usize].prevtx_inputs.len() as _, - num_outputs: tx.inputs[next.index as usize].prevtx_outputs.len() - as _, - locktime: tx.inputs[next.index as usize].prevtx_locktime, + version: self.inputs[next.index as usize].prevtx_version, + num_inputs: self.inputs[next.index as usize].prevtx_inputs.len() as _, + num_outputs: self.inputs[next.index as usize].prevtx_outputs.len() as _, + locktime: self.inputs[next.index as usize].prevtx_locktime, }, )), - })), - NextType::PrevtxInput => Ok(Request::Btc(pb::BtcRequest { + }), + NextType::PrevtxInput => Request::Btc(pb::BtcRequest { request: Some(pb::btc_request::Request::PrevtxInput( - tx.inputs[next.index as usize].prevtx_inputs[next.prev_index as usize] + self.inputs[next.index as usize].prevtx_inputs[next.prev_index as usize] .clone(), )), - })), - NextType::PrevtxOutput => Ok(Request::Btc(pb::BtcRequest { + }), + NextType::PrevtxOutput => Request::Btc(pb::BtcRequest { request: Some(pb::btc_request::Request::PrevtxOutput( - tx.inputs[next.index as usize].prevtx_outputs[next.prev_index as usize] + self.inputs[next.index as usize].prevtx_outputs[next.prev_index as usize] .clone(), )), - })), + }), _ => panic!("unexpected next response"), } + } + } + + fn mock_host_responder(tx: alloc::rc::Rc<core::cell::RefCell<Transaction>>) { + *crate::hww::MOCK_NEXT_REQUEST.0.borrow_mut() = + Some(Box::new(move |response: Response| { + Ok(tx.borrow().make_host_request(response)) })); }
Discard long packet if it has unexpected SCID
@@ -2970,6 +2970,14 @@ static ssize_t conn_recv_handshake_pkt(ngtcp2_conn *conn, const uint8_t *pkt, return (ssize_t)pktlen; } + /* Quoted from spec: Once a client has received an Initial packet + from the server, it MUST discard any packet it receives with a + different Source Connection ID. */ + if (!conn->server && (conn->flags & NGTCP2_CONN_FLAG_CONN_ID_NEGOTIATED) && + !ngtcp2_cid_eq(&conn->dcid, &hd.scid)) { + return (ssize_t)pktlen; + } + switch (hd.type) { case NGTCP2_PKT_0RTT_PROTECTED: if (!conn->server) { @@ -3994,6 +4002,13 @@ static ssize_t conn_recv_pkt(ngtcp2_conn *conn, const uint8_t *pkt, return (ssize_t)pktlen; } + /* Quoted from spec: Once a client has received an Initial packet + from the server, it MUST discard any packet it receives with a + different Source Connection ID. */ + if (!conn->server && !ngtcp2_cid_eq(&conn->dcid, &hd.scid)) { + return (ssize_t)pktlen; + } + switch (hd.type) { case NGTCP2_PKT_INITIAL: pktns = &conn->in_pktns;
fixed JNI version dep
@@ -20,11 +20,11 @@ if (DEPENDENCY_PHASE) set (DIRS ${JNI_INCLUDE_DIRS} ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2} ${JAVA_AWT_INCLUDE_PATH}) set (LIBS ${JAVA_MAWT_LIBRARY} ${JNI_LIBRARIES} ${JAVA_AWT_LIBRARY} ${JAVA_JVM_LIBRARY}) # for check_symbol_exists set (CMAKE_REQUIRED_INCLUDES ${DIRS}) - safe_check_symbol_exists (JNI_VERSION_11 jni.h JNI_CORRECT_VERSION) + safe_check_symbol_exists (JNI_VERSION_10 jni.h JNI_CORRECT_VERSION) unset (CMAKE_REQUIRED_INCLUDES) if (NOT JNI_CORRECT_VERSION) - remove_plugin (jni "jni.h does not define JNI_VERSION_11") + remove_plugin (jni "jni.h does not define JNI_VERSION_10") endif () else () remove_plugin (jni "JNI not found, please review your JDK installation and consider setting JAVA_HOME accordingly")
add SFPID frame to the logger
@@ -1228,6 +1228,11 @@ size_t picoquic_log_datagram_frame(FILE* F, uint64_t cnx_id64, uint8_t* bytes, s return byte_index; } +size_t picoquic_log_sfpid_frame(FILE* F, uint64_t cnx_id64, uint8_t* bytes, size_t bytes_max) { + fprintf(F, " \tSFPID FRAME: ID %u\n", be32toh(*((uint32_t *) (bytes+1)))); + return 5; +} + void picoquic_log_frames(FILE* F, uint64_t cnx_id64, uint8_t* bytes, size_t length) { size_t byte_index = 0; @@ -1342,6 +1347,10 @@ void picoquic_log_frames(FILE* F, uint64_t cnx_id64, uint8_t* bytes, size_t leng byte_index += picoquic_log_mp_ack_frame(F, cnx_id64, bytes + byte_index, length - byte_index); break; + case 0x29: /* FEC SFPID */ + byte_index += picoquic_log_sfpid_frame(F, cnx_id64, bytes + byte_index, + length - byte_index); + break; default: { /* Not implemented yet! */ uint64_t frame_id64;
boost version specified
@@ -17,6 +17,8 @@ matrix: env: C_COMPILER=clang CXX_COMPILER=clang++ before_install: - brew install ninja + - brew install [email protected] + - brew link --overwrite --force [email protected] # OS X - os: osx @@ -24,6 +26,8 @@ matrix: env: C_COMPILER=gcc CXX_COMPILER=g++ before_install: - brew install ninja + - brew install [email protected] + - brew link --overwrite --force [email protected] # Clang 4.0 - os: linux
dhtest: Add testcase for EVP_PKEY_CTX_set_dh_nid And a negative testcase for EVP_PKEY_CTX_set_dhx_rfc5114
@@ -744,6 +744,33 @@ static int dh_rfc5114_fix_nid_test(void) /* Tested function is called here */ if (!TEST_int_eq(EVP_PKEY_CTX_set_dhx_rfc5114(paramgen_ctx, 3), 1)) goto err; + /* Negative test */ + if (!TEST_int_eq(EVP_PKEY_CTX_set_dhx_rfc5114(paramgen_ctx, 99), 0)) + goto err; + /* If we're still running then the test passed. */ + ok = 1; +err: + EVP_PKEY_CTX_free(paramgen_ctx); + return ok; +} + +static int dh_set_dh_nid_test(void) +{ + int ok = 0; + EVP_PKEY_CTX *paramgen_ctx; + + /* Run the test. Success is any time the test does not cause a SIGSEGV interrupt */ + paramgen_ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_DH, 0); + if (!TEST_ptr(paramgen_ctx)) + goto err; + if (!TEST_int_eq(EVP_PKEY_paramgen_init(paramgen_ctx), 1)) + goto err; + /* Tested function is called here */ + if (!TEST_int_eq(EVP_PKEY_CTX_set_dh_nid(paramgen_ctx, NID_ffdhe2048), 1)) + goto err; + /* Negative test */ + if (!TEST_int_eq(EVP_PKEY_CTX_set_dh_nid(paramgen_ctx, NID_secp521r1), 0)) + goto err; /* If we're still running then the test passed. */ ok = 1; err: @@ -898,6 +925,7 @@ int setup_tests(void) ADD_TEST(dh_get_nid); ADD_TEST(dh_load_pkcs3_namedgroup_privlen_test); ADD_TEST(dh_rfc5114_fix_nid_test); + ADD_TEST(dh_set_dh_nid_test); #endif return 1; }
listbox.c: fix some comments..
@@ -122,8 +122,10 @@ static void listbox_add_columns (gftp_window_data *wdata) { /* - * gftp implements its own logic to sort rows + * gftp implements its own logic to sort rows (lib/misc.c) + * that is called by listbox_sort_rows() * set the "clickable" property to true and call listbox_sort_rows() + * and don't set the "sort-column-id" property */ GtkTreeView *treeview = GTK_TREE_VIEW (wdata->listbox); @@ -133,7 +135,7 @@ listbox_add_columns (gftp_window_data *wdata) /* icon */ //renderer = gtk_cell_renderer_pixbuf_new (); renderer = g_object_new (GTK_TYPE_CELL_RENDERER_PIXBUF, - "xalign", 0.5, /* justify left */ + "xalign", 0.5, /* justify center */ NULL); column = gtk_tree_view_column_new_with_attributes ("", renderer, @@ -151,7 +153,7 @@ listbox_add_columns (gftp_window_data *wdata) /* filename */ //renderer = gtk_cell_renderer_text_new (); renderer = g_object_new (GTK_TYPE_CELL_RENDERER_TEXT, - "xalign", 0.0, /* justify center */ + "xalign", 0.0, /* justify left */ NULL); column = g_object_new (GTK_TYPE_TREE_VIEW_COLUMN, "title", "Filename",
filter: kubernetes: updated the code to use the new base stream type
@@ -1425,7 +1425,7 @@ static int flb_kube_network_init(struct flb_kube *ctx, struct flb_config *config } /* Remove async flag from upstream */ - ctx->upstream->flags &= ~(FLB_IO_ASYNC); + flb_stream_disable_async_mode(&ctx->upstream->base); return 0; }
fix(test cmake): capitalize Ruby_EXECUTABLE variable
@@ -380,7 +380,7 @@ foreach( test_case_fname ${TEST_CASE_FILES} ) # Run ruby to generate source in build directory add_custom_command( OUTPUT ${test_runner_fname} - COMMAND ${Ruby_EXECUTABLE} ${generate_test_runner_rb} + COMMAND ${RUBY_EXECUTABLE} ${generate_test_runner_rb} ${test_case_fname} ${test_runner_fname} ${generate_test_runner_config} DEPENDS ${generate_test_runner_rb} ${test_case_fname}
add format attribute to set_dbparam src/tcbtdb.c:124:49: error: format string is not a string literal [-Werror,-Wformat-nonliteral] n = vsnprintf (params + len, DB_PARAMS - len, fmt, args); ^~~ 1 error generated.
@@ -114,6 +114,9 @@ tc_db_rmdir () * On error, a negative number is returned. * On success, the number of characters that would have been written is * returned. */ +#if defined(__GNUC__) || defined(__clang__) +__attribute__((__format__(printf,3,4))) +#endif static int set_dbparam (char *params, int len, const char *fmt, ...) {
utils.h,WEBP_ALIGN: make bitmask unsigned this fixes runtime warnings with clang -fsanitize=integer when using the WEBP_ALIGN_CST constant in WEBP_ALIGN: implicit conversion from type 'int' of value -32 (32-bit, signed) to type 'unsigned int' changed the value to (32-bit, unsigned)
@@ -64,7 +64,8 @@ WEBP_EXTERN void WebPSafeFree(void* const ptr); // Alignment #define WEBP_ALIGN_CST 31 -#define WEBP_ALIGN(PTR) (((uintptr_t)(PTR) + WEBP_ALIGN_CST) & ~WEBP_ALIGN_CST) +#define WEBP_ALIGN(PTR) (((uintptr_t)(PTR) + WEBP_ALIGN_CST) & \ + ~(uintptr_t)WEBP_ALIGN_CST) #include <string.h> // memcpy() is the safe way of moving potentially unaligned 32b memory.
include/wctype.h: remove duplicated prototype, iswctype It has two prototypes of iswctype.
@@ -122,7 +122,6 @@ int towctrans(wint_t, wctrans_t); wint_t towlower(wint_t); wint_t towupper(wint_t); wctrans_t wctrans(FAR const char *); -int iswctype(wint_t, wctype_t); wctype_t wctype(FAR const char *); #endif /* INCLUDE_WTYPE_H */
imgtool: Add complete trailer to HEX images When generating HEX output, instead of just adding the `magic`, also add the whole trailer (with erased value). This allows for HEX writing tools to erase the trailer region, avoiding possible issues when garbage exists there.
@@ -179,9 +179,13 @@ class Image(): self.base_addr = hex_addr h.frombytes(bytes=self.payload, offset=self.base_addr) if self.pad: - magic_addr = (self.base_addr + self.slot_size) - \ - len(boot_magic) - h.puts(magic_addr, boot_magic) + trailer_size = self._trailer_size(self.align, self.max_sectors, + self.overwrite_only, + self.enckey) + trailer_addr = (self.base_addr + self.slot_size) - trailer_size + padding = bytes([self.erased_val] * + (trailer_size - len(boot_magic))) + boot_magic + h.puts(trailer_addr, padding) h.tofile(path, 'hex') else: if self.pad:
nimble/ll: Minor coding style issue
@@ -2396,7 +2396,7 @@ ble_ll_hci_send_ext_adv_report(uint8_t ptype, struct os_mbuf *om, ble_ll_hci_event_send((uint8_t *)evt); evt = next_evt; - } while (offset < datalen && evt); + } while ((offset < datalen) && evt); BLE_LL_ASSERT(offset <= datalen);
use another method to grep the port
@@ -17,7 +17,7 @@ hosts: "/": file.dir: @{[ DOC_ROOT ]} EOT - my $out = `ss -tlnp sport $server->{port} 2>&1 | sed '1d'`; + my $out = `ss -tlnp | grep -w 0.0.0.0:$server->{port} 2>&1`; print($out); if ($reuseport eq 'ON') { my @lines = split(/\n/, $out);
docs - identify enum type support for GUCs
<topic id="topic_vsn_22l_z4"> <title>Parameter Types and Values</title> <body> - <p>All parameter names are case-insensitive. Every parameter takes a value of one of four - types: <codeph>Boolean</codeph>, <codeph>integer</codeph>, <codeph>floating point</codeph>, - or <codeph>string</codeph>. Boolean values may be written as <codeph>ON</codeph>, + <p>All parameter names are case-insensitive. Every parameter takes a value of one of the + following types: <codeph>Boolean</codeph>, <codeph>integer</codeph>, <codeph>floating point</codeph>, + <codeph>enum</codeph>, or <codeph>string</codeph>.</p> + <p>Boolean values may be specified as <codeph>ON</codeph>, <codeph>OFF</codeph>, <codeph>TRUE</codeph>, <codeph>FALSE</codeph>, <codeph>YES</codeph>, <codeph>NO</codeph>, <codeph>1</codeph>, <codeph>0</codeph> (all case-insensitive).</p> + <p>Enum-type parameters are specified in the same manner as string parameters, but are + restricted to a limited set of values. Enum parameter values are case-insensitive.</p> <p>Some settings specify a memory size or time value. Each of these has an implicit unit, which is either kilobytes, blocks (typically eight kilobytes), milliseconds, seconds, or minutes. Valid memory size units are <codeph>kB</codeph> (kilobytes), <codeph>MB</codeph>
Previous caused issues with lib-debub install. The debug install of openmp was not going into the lib-debug directory, adjust where to add the cmake options.
@@ -160,7 +160,7 @@ $AOMP_ORIGIN_RPATH \ -DLIBOMP_CPPFLAGS='-O0' \ -DLIBOMP_OMPD_SUPPORT=ON \ -DLIBOMP_OMPT_DEBUG=ON \ --DCMAKE_CXX_FLAGS="-g -I$AOMP_INSTALL_DIR/include" -DCMAKE_C_FLAGS=-g \ +-DCMAKE_C_FLAGS=-g \ -DOPENMP_SOURCE_DEBUG_MAP="\""-fdebug-prefix-map=$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/openmp=$AOMP_INSTALL_DIR/lib-debug/src/openmp"\"" " # The 'pip install --system' command is not supported on non-debian systems. This will disable @@ -181,8 +181,8 @@ $AOMP_ORIGIN_RPATH \ cd $BUILD_DIR/build/openmp_debug echo echo " -----Running openmp cmake for debug ---- " - echo ${AOMP_CMAKE} $MYCMAKEOPTS $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/openmp - ${AOMP_CMAKE} $MYCMAKEOPTS $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/openmp + echo ${AOMP_CMAKE} $MYCMAKEOPTS -DCMAKE_CXX_FLAGS="-g -I$AOMP_INSTALL_DIR/include" $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/openmp + ${AOMP_CMAKE} $MYCMAKEOPTS -DCMAKE_CXX_FLAGS="-g -I$AOMP_INSTALL_DIR/include" $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/openmp if [ $? != 0 ] ; then echo "ERROR openmp debug cmake failed. Cmake flags" echo " $MYCMAKEOPTS"
Rese the default to "new reno" so as to not change test results.
@@ -669,7 +669,7 @@ extern picoquic_congestion_algorithm_t* picoquic_newreno_algorithm; extern picoquic_congestion_algorithm_t* picoquic_cubic_algorithm; extern picoquic_congestion_algorithm_t* picoquic_fastcc_algorithm; -#define PICOQUIC_DEFAULT_CONGESTION_ALGORITHM picoquic_cubic_algorithm; +#define PICOQUIC_DEFAULT_CONGESTION_ALGORITHM picoquic_newreno_algorithm; picoquic_congestion_algorithm_t const* picoquic_get_congestion_algorithm(char const* alg_name);
fixed infinity loop caused by damaged pcapng file with total block length 0 and cpalen 0
@@ -5459,28 +5459,26 @@ while(1) pcapngbh->block_type = byte_swap_32(pcapngbh->block_type); pcapngbh->total_length = byte_swap_32(pcapngbh->total_length); } - resseek = lseek(fd, aktseek, SEEK_SET); - if(resseek < 0) + if(pcapngbh->total_length > (2 *MAXPACPSNAPLEN)) { pcapreaderrors++; - printf("failed to set file pointer\n"); + printf("failed to read pcapng header block\n"); break; } - - if(pcapngbh->total_length > (2 *MAXPACPSNAPLEN)) + resseek = lseek(fd, aktseek, SEEK_SET); + if(resseek < 0) { pcapreaderrors++; - printf("failed to read pcapng header block\n"); + printf("failed to set file pointer\n"); break; } res = read(fd, &pcpngblock, pcapngbh->total_length); - if(res != pcapngbh->total_length) + if((res == 0) || (res != pcapngbh->total_length)) { pcapreaderrors++; printf("failed to read pcapng header block\n"); break; } - if(pcapngbh->block_type == PCAPNGBLOCKTYPE) { pcapngshb = (section_header_block_t*) pcpngblock;
retry pthread create if it failes with ENOKEY
@@ -651,7 +651,12 @@ CxPlatThreadCreate( #else // CXPLAT_USE_CUSTOM_THREAD_CONTEXT - if (pthread_create(Thread, &Attr, Config->Callback, Config->Context)) { + // + // If pthread_create fails with ENOKEY, then try again without the attribute + // because the CPU might be offline. + // + if (pthread_create(Thread, &Attr, Config->Callback, Config->Context) && + (errno != ENOKEY || pthread_create(Thread, NULL, Config->Callback, Config->Context))) { Status = errno; QuicTraceEvent( LibraryErrorStatus,
luci-app-zerotier: fix adapter luci-theme-openwrt-2020
@@ -20,7 +20,7 @@ e.rmempty=false e.description = translate("Allow zerotier clients access your LAN network") e=t:option(DummyValue,"opennewwindow" , - translate("<input type=\"button\" class=\"cbi-button cbi-button-apply\" value=\"Zerotier.com\" onclick=\"window.open('https://my.zerotier.com/network')\" />")) + translate("<input type=\"button\" class=\"btn cbi-button cbi-button-apply\" value=\"Zerotier.com\" onclick=\"window.open('https://my.zerotier.com/network')\" />")) e.description = translate("Create or manage your zerotier network, and auth clients who could access") return a
Only do auditwheel on Linux
@@ -75,7 +75,7 @@ def build_wheel_native(conda_dir, deploy_dir, py_version): subprocess.check_call([ "/usr/bin/python3", "-m", - "pip", "install", "twine", "numpy", "auditwheel" + "pip", "install", "twine", "numpy" ]) print(">>> Installing setup deps in Python {} conda environment...".format(py_version)) @@ -193,6 +193,8 @@ def build_wheel_conda(conda_dir, deploy_dir, py_version): "conda", "run", "-p", conda_dir] + DASHDASH + [ "pip", "install", "twine", "numpy" ]) + + if platform.system() == "Linux" and platform.machine().startswith("x86"): subprocess.check_call([ "python3", "-m", "pip", "install", "auditwheel"
add wallet Underlying abstract interface
@@ -583,7 +583,22 @@ void BoatClose(BSINT32 sockfd, void* tlsContext, void* rsvd) } -BOAT_RESULT BoatPort_keyCreate( const BoatWalletPriKeyId_config config, BoatWalletPriKeyId* id ) + + +BOAT_RESULT BoatPort_keyCreate( const BoatWalletPriKeyId_config* config, BoatWalletPriKeyId* id ) { + //! @todo + retrun BOAT_SUCCESS; +} +BOAT_RESULT BoatPort_keyQuery( const BoatWalletPriKeyId_config* config, BoatWalletPriKeyId* id ) +{ + //! @todo + retrun BOAT_SUCCESS; +} + +BOAT_RESULT BoatPort_keyDelete( const BoatWalletPriKeyId_config* config, BoatWalletPriKeyId* id ) +{ + //! @todo + retrun BOAT_SUCCESS; }
ftp.c: allow commenting out supported features for testing purposes..
@@ -107,6 +107,7 @@ struct ftp_supported_feature ftp_supported_features[] = { FTP_FEAT_PRET, "PRET" }, { FTP_FEAT_EPSV, "EPSV" }, /* rfc2428 */ { FTP_FEAT_EPRT, "EPRT" }, /* rfc2428 */ + { 1, NULL }, }; static void rfc2389_feat_supported_cmd (ftp_protocol_data * ftpdat, char * cmd) @@ -115,7 +116,7 @@ static void rfc2389_feat_supported_cmd (ftp_protocol_data * ftpdat, char * cmd) char *p = cmd; int i; while (*p <= 32) p++; // strip leading spaces - for (i = 0; i < FTP_FEAT_TOTAL; i++) + for (i = 0; ftp_supported_features[i].str; i++) { if (strcmp (p, ftp_supported_features[i].str) == 0) { ftpdat->feat[i] = 1; @@ -193,14 +194,14 @@ static int ftp_read_response (gftp_request * request, int disconnect_on_42x) if (!line_ending) { // incomplete line, will need to fix snprintf (fixed_line, sizeof(fixed_line), "%s", line); - puts ("a"); + DEBUG_PUTS ("@ incomplete line, will need to fix\n") continue; } else if (*fixed_line) { // copy and complete line snprintf (fixed_line + strlen(fixed_line), sizeof(fixed_line) - strlen(fixed_line) - 1, "%s", line); line = fixed_line; - puts ("b"); + DEBUG_PUTS ("@@ copy and complete line\n") } }
feat(fabric parameters check): when creat fabric wallet, check the parameters "quantities"
@@ -139,6 +139,10 @@ static BOAT_RESULT BoatWalletCreatParaCheck(BoatProtocolType protocol_type,const /* code */ for (int j = 0; j < fabric_config_ptr->nodesCfg.layoutCfg[i].endorserGroupNum; j++) { + if(fabric_config_ptr->nodesCfg.layoutCfg[i].groupCfg[j].quantities == 0 || + fabric_config_ptr->nodesCfg.layoutCfg[i].groupCfg[j].quantities > fabric_config_ptr->nodesCfg.layoutCfg[i].groupCfg[j].endorserNumber){ + return BOAT_ERROR; + } /* code */ for (int k = 0; k < fabric_config_ptr->nodesCfg.layoutCfg[i].groupCfg[j].endorserNumber; k++) {
krane: remove als mutex According to the comments in CL:1666260, we don't need it anymore. TEST=make BRANCH=master Tested-by: Ting Shen
@@ -433,7 +433,6 @@ int board_get_version(void) /* Mutexes */ #ifdef SECTION_IS_RW static struct mutex g_lid_mutex; -static struct mutex g_als_mutex; static struct bmi160_drv_data_t g_bmi160_data; @@ -556,7 +555,6 @@ struct motion_sensor_t motion_sensors[] = { .location = MOTIONSENSE_LOC_LID, .drv = &tcs3400_drv, .drv_data = &g_tcs3400_data, - .mutex = &g_als_mutex, .port = I2C_PORT_ALS, .addr = TCS3400_I2C_ADDR, .rot_standard_ref = NULL,
Change macOS pipeline to SSE2; mini doesn't have avx2
@@ -112,7 +112,7 @@ pipeline { steps { sh ''' cd ./Source/ - make VEC=avx2 + make VEC=sse2 ''' } } @@ -127,7 +127,7 @@ pipeline { steps { sh ''' export PATH=$PATH:/usr/local/bin - python3 ./Test/astc_run_image_tests.py --test-set Small + python3 ./Test/astc_run_image_tests.py --test-set Small --encoder=sse2 ''' //perfReport(sourceDataFiles:'TestOutput/results.xml') //junit(testResults: 'TestOutput/results.xml')
set XDG_CURRENT_DESKTOP
@@ -18,7 +18,7 @@ fi echo $$ >"${RTD}"/instantosrunning # just in case, some systems might not do this -cd +cd || echo "failed to access home directory" # execute autostart even if instantautostart doesn't work if ! command -v instantautostart &>/dev/null; then @@ -52,6 +52,8 @@ while [ -e "${RTD}"/instantosrunning ]; do mkdir -p ~/.local/share fi + export XDG_CURRENT_DESKTOP="instantwm" + if iconf -i debug; then instantwm &>~/.local/share/instantos.log else
Add spring oauth2 client libs to webapp
<artifactId>spring-security-oauth2</artifactId> <version>${spring.oauth2.version}</version> </dependency> + <dependency> + <groupId>org.springframework.security</groupId> + <artifactId>spring-security-oauth2-client</artifactId> + <version>${spring.security.version}</version> + </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId>
bug fix to get counts across all ranks
@@ -4343,9 +4343,12 @@ NetworkManager::CreateNamedSelection(int id, const SelectionProperties &props) if(sel != 0) { - summary.SetCellCount(sel->GetSize()); + // Sum the cells and send to all procs. + long cellCount = sel->GetSize(); - // Some way to get the total number of cells for the summary... + SumLongAcrossAllProcessors(cellCount); + + summary.SetCellCount(cellCount); } return summary;
mfu: support aarch64 aarch64 kernel is not found SYS_getdents. If SYS_getdents is not defined, use sys_getdents64.
@@ -161,6 +161,9 @@ static void walk_getdents_process_dir(const char* dir, CIRCLE_handle* handle) return; } +#if !defined(SYS_getdents) && defined(SYS_getdents64) +#define SYS_getdents SYS_getdents64 +#endif /* Read all directory entries */ while (1) { /* execute system call to get block of directory entries */
Roll back r3385205
@@ -4,8 +4,8 @@ import sys import platform import json -URLS = ["https://storage.mds.yandex.net/get-devtools-opensource/479623/fa90a8e4d5af00d7d372f16a4323074b"] -MD5 = "fa90a8e4d5af00d7d372f16a4323074b" +URLS = ["https://storage.mds.yandex.net/get-devtools-opensource/233854/bef46b6b2f6ac13e76ddea51f4944cff"] +MD5 = "bef46b6b2f6ac13e76ddea51f4944cff" RETRIES = 5 HASH_PREFIX = 10
Fix hcd_edpt_clear_stall
@@ -765,19 +765,17 @@ bool hcd_edpt_clear_stall(uint8_t dev_addr, uint8_t ep_addr) { uint16_t volatile *ctr = addr_to_pipectr(dev_addr, ep_addr); TU_ASSERT(ctr); + + const uint32_t pid = *ctr & 0x3; + if (pid & 2) { + *ctr = pid & 2; + *ctr = 0; + } *ctr = USB_PIPECTR_SQCLR; unsigned const epn = tu_edpt_number(ep_addr); if (!epn) return true; - if (tu_edpt_dir(ep_addr)) { /* IN */ - const unsigned num = _hcd.ep[dev_addr - 1][1][epn - 1]; - hcd_int_disable(0); - USB0.PIPESEL.WORD = num; - if (USB0.PIPECFG.BIT.TYPE != 1) { - *ctr = USB_PIPECTR_PID_BUF; - } - hcd_int_enable(0); - } else { + if (!tu_edpt_dir(ep_addr)) { /* OUT */ *ctr = USB_PIPECTR_PID_BUF; } return true;
Update the CI/CD check for memory leak
@@ -20,7 +20,7 @@ jobs: run: | cmake -DCMAKE_BUILD_TYPE=Debug -DDISABLE_HTTP=1 -B ./build cmake --build ./build - ./dictu tests/runTests.du | tee /dev/stderr | grep -q 'Total memory usage: 0' + ./dictu tests/runTests.du | tee /dev/stderr | grep -q 'Total bytes lost: 0' - name: Remove build directory run: | rm -rf build @@ -30,7 +30,7 @@ jobs: sudo apt-get install -y libcurl4-openssl-dev cmake -DCMAKE_BUILD_TYPE=Debug -B ./build cmake --build ./build - ./dictu tests/runTests.du | tee /dev/stderr | grep -q 'Total memory usage: 0' + ./dictu tests/runTests.du | tee /dev/stderr | grep -q 'Total bytes lost: 0' test-mac-cmake: name: Test on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -44,7 +44,7 @@ jobs: run: | cmake -DCMAKE_BUILD_TYPE=Debug -DDISABLE_HTTP=1 -B ./build cmake --build ./build - ./dictu tests/runTests.du | tee /dev/stderr | grep -q 'Total memory usage: 0' + ./dictu tests/runTests.du | tee /dev/stderr | grep -q 'Total bytes lost: 0' - name: Remove build directory run: | rm -rf build @@ -52,7 +52,7 @@ jobs: run: | cmake -DCMAKE_BUILD_TYPE=Debug -B ./build cmake --build ./build - ./dictu tests/runTests.du | tee /dev/stderr | grep -q 'Total memory usage: 0' + ./dictu tests/runTests.du | tee /dev/stderr | grep -q 'Total bytes lost: 0' test-windows-cmake: name: Test on ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -78,4 +78,4 @@ jobs: sudo apt-get install -y libcurl4-openssl-dev cmake -DCMAKE_BUILD_TYPE=Debug -B ./build cmake --build ./build - ./dictu examples/runExamples.du | tee /dev/stderr | grep -q 'Total memory usage: 0' + ./dictu examples/runExamples.du | tee /dev/stderr | grep -q 'Total bytes lost: 0'
Fix bug while polling/cleaning event timers
@@ -395,6 +395,8 @@ poll_event_callback_timers(oc_list_t list, struct oc_memb *cb_pool) if (event_cb->callback(event_cb->data) == DONE) { oc_list_remove(list, event_cb); oc_memb_free(cb_pool, event_cb); + event_cb = oc_list_head(list); + continue; } else { OC_PROCESS_CONTEXT_BEGIN(&timed_callback_events); oc_etimer_restart(&event_cb->timer);
Use case-insensitive string comparison for ethereum wallets. Fixes
@@ -149,7 +149,7 @@ namespace Miningcore.Blockchain.Ethereum messageBus.NotifyBlockConfirmationProgress(poolConfig.Id, block, coin); // is it block mined by us? - if(blockInfo.Miner == poolConfig.Address) + if(string.Equals(blockInfo.Miner, poolConfig.Address, StringComparison.OrdinalIgnoreCase)) { // additional check // NOTE: removal of first character of both sealfields caused by @@ -211,7 +211,7 @@ namespace Miningcore.Blockchain.Ethereum var uncle = uncleResponses.Where(x => x.Error == null && x.Response != null) .Select(x => x.Response.ToObject<DaemonResponses.Block>()) - .FirstOrDefault(x => x.Miner == poolConfig.Address); + .FirstOrDefault(x => string.Equals(x.Miner, poolConfig.Address, StringComparison.OrdinalIgnoreCase)); if(uncle != null) {
Only enable fix_quasi_reduction when testing Avoid compiler error due to the fix_quasi_reduction function is static and has not been used.
@@ -118,15 +118,7 @@ void mbedtls_mpi_mod_raw_sub(mbedtls_mpi_uint *X, (void) mbedtls_mpi_core_add_if(X, N->p, N->limbs, (unsigned) c); } -void mbedtls_mpi_mod_raw_mul(mbedtls_mpi_uint *X, - const mbedtls_mpi_uint *A, - const mbedtls_mpi_uint *B, - const mbedtls_mpi_mod_modulus *N, - mbedtls_mpi_uint *T) -{ - mbedtls_mpi_core_montmul(X, A, B, N->limbs, N->p, N->limbs, - N->rep.mont.mm, T); -} +#if defined(MBEDTLS_TEST_HOOKS) MBEDTLS_STATIC_TESTABLE void mbedtls_mpi_mod_raw_fix_quasi_reduction(mbedtls_mpi_uint *X, @@ -137,6 +129,18 @@ void mbedtls_mpi_mod_raw_fix_quasi_reduction(mbedtls_mpi_uint *X, (void) mbedtls_mpi_core_add_if(X, N->p, N->limbs, (unsigned) c); } +#endif /* MBEDTLS_TEST_HOOKS */ + +void mbedtls_mpi_mod_raw_mul(mbedtls_mpi_uint *X, + const mbedtls_mpi_uint *A, + const mbedtls_mpi_uint *B, + const mbedtls_mpi_mod_modulus *N, + mbedtls_mpi_uint *T) +{ + mbedtls_mpi_core_montmul(X, A, B, N->limbs, N->p, N->limbs, + N->rep.mont.mm, T); +} + /* END MERGE SLOT 2 */ /* BEGIN MERGE SLOT 3 */
vcl: fix vcl_session_write_ready when connecting Applications like curl will poll the fd after a non-blocking connect, so we need to avoid returning the wrong event. Type: fix
@@ -317,6 +317,10 @@ vcl_session_write_ready (vcl_session_t * s) else return VPPCOM_EBADFD; } + else if (s->session_state == VCL_STATE_UPDATED) + { + return 0; + } else { return (s->session_state == VCL_STATE_DISCONNECT) ?
sysdeps/managarm: convert sys_readlink to helix_ng
@@ -1992,50 +1992,31 @@ int sys_stat(fsfd_target fsfdt, int fd, const char *path, int flags, struct stat int sys_readlink(const char *path, void *data, size_t max_size, ssize_t *length) { SignalGuard sguard; - HelAction actions[4]; - globalQueue.trim(); managarm::posix::CntRequest<MemoryAllocator> req(getSysdepsAllocator()); req.set_request_type(managarm::posix::CntReqType::READLINK); req.set_path(frg::string<MemoryAllocator>(getSysdepsAllocator(), path)); - frg::string<MemoryAllocator> ser(getSysdepsAllocator()); - req.SerializeToString(&ser); - actions[0].type = kHelActionOffer; - actions[0].flags = kHelItemAncillary; - actions[1].type = kHelActionSendFromBuffer; - actions[1].flags = kHelItemChain; - actions[1].buffer = ser.data(); - actions[1].length = ser.size(); - actions[2].type = kHelActionRecvInline; - actions[2].flags = kHelItemChain; - actions[3].type = kHelActionRecvToBuffer; - actions[3].flags = 0; - actions[3].buffer = data; - actions[3].length = max_size; - HEL_CHECK(helSubmitAsync(getPosixLane(), actions, 4, - globalQueue.getQueue(), 0, 0)); - - auto element = globalQueue.dequeueSingle(); - auto offer = parseHandle(element); - auto send_req = parseSimple(element); - auto recv_resp = parseInline(element); - auto recv_data = parseLength(element); - - HEL_CHECK(offer->error); - HEL_CHECK(send_req->error); - HEL_CHECK(recv_resp->error); - HEL_CHECK(recv_data->error); + auto [offer, send_req, recv_resp, recv_data] = exchangeMsgsSync( + getPosixLane(), + helix_ng::offer( + helix_ng::sendBragiHeadOnly(req, getSysdepsAllocator()), + helix_ng::recvInline(), + helix_ng::recvBuffer(data, max_size)) + ); + HEL_CHECK(offer.error()); + HEL_CHECK(send_req.error()); + HEL_CHECK(recv_resp.error()); managarm::posix::SvrResponse<MemoryAllocator> resp(getSysdepsAllocator()); - resp.ParseFromArray(recv_resp->data, recv_resp->length); + resp.ParseFromArray(recv_resp.data(), recv_resp.length()); if(resp.error() == managarm::posix::Errors::FILE_NOT_FOUND) { return ENOENT; }else if(resp.error() == managarm::posix::Errors::ILLEGAL_ARGUMENTS) { return EINVAL; }else{ __ensure(resp.error() == managarm::posix::Errors::SUCCESS); - *length = recv_data->length; + *length = recv_data.actualLength(); return 0; } }
Document how to constrain the spod scheduling
@@ -234,6 +234,19 @@ into the allowed list. All profiles not complying with this rule, it will be rej Also every time when the list of allowed syscalls is modified in the spod configuration, the operator will automatically identify the already installed profiles which are not compliant and remove them. +## Constrain spod scheduling + +You can constrain the spod scheduling via the spod configuration by setting either the `tolerations` or `affinity`. + +``` +kubectl -n security-profiles-operator patch spod spod --type merge -p +'{"spec":{"tolerations": [{...}]}}' +``` + +``` +kubectl -n security-profiles-operator patch spod spod --type merge -p +'{"spec":{"affinity": {...}}}' +``` ## Create a seccomp profile Use the `SeccompProfile` kind to create profiles. Example:
schema macros BUGFIX handle macro's params more safely Allow safely use of ternary operator passing function to the macro.
@@ -532,12 +532,12 @@ uint8_t lysc_iff_getop(uint8_t *list, size_t pos); * @brief Macro to free [sized array](@ref sizedarrays) of items using the provided free function. The ARRAY itself is also freed, * but the memory is not sanitized. */ -#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){FUNC(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);} +#define FREE_ARRAY(CTX, ARRAY, FUNC) {LY_ARRAY_COUNT_TYPE c__; LY_ARRAY_FOR(ARRAY, c__){(FUNC)(CTX, &(ARRAY)[c__]);}LY_ARRAY_FREE(ARRAY);} /** * @brief Macro to free the specified MEMBER of a structure using the provided free function. The memory is not sanitized. */ -#define FREE_MEMBER(CTX, MEMBER, FUNC) if (MEMBER) {FUNC(CTX, MEMBER);free(MEMBER);} +#define FREE_MEMBER(CTX, MEMBER, FUNC) if (MEMBER) {(FUNC)(CTX, MEMBER);free(MEMBER);} /** * @brief Macro to free [sized array](@ref sizedarrays) of strings stored in the context's dictionary. The ARRAY itself is also freed,
sys/log: Re-add LOG_MODULE_PERUSER This constant was removed in a recent commit (46a14478933942708562e33a4650f2fede37342e). We should keep this constant around to maintain backwards compatibility. Applications may define their own log modules with IDs based on this constant.
@@ -67,6 +67,7 @@ struct log; #define LOG_MODULE_IOTIVITY 7 #define LOG_MODULE_TEST 8 +#define LOG_MODULE_PERUSER 64 #define LOG_MODULE_MAX (255) #define LOG_ETYPE_STRING (0)
More dumb syntax updates to update_latest.yml workflow.
@@ -48,7 +48,7 @@ jobs: name: Update CDN Latest runs-on: ubuntu-latest needs: info - if: ${{ needs.info.outputs.tag != "" && needs.info.outputs.prerelease == "" }} + if: ${{ needs.info.outputs.tag != '' && needs.info.outputs.prerelease == '' }} steps: - name: Update dl/scope/latest env: @@ -73,7 +73,7 @@ jobs: name: Update Latest Tag in Dockerhub runs-on: ubuntu-latest needs: [info,update-cdn-latest] - if: ${{ needs.info.outputs.tag != "" && needs.info.outputs.prerelease == "" }} + if: ${{ needs.info.outputs.tag != '' && needs.info.outputs.prerelease == '' }} steps: - name: Login to Dockerhub uses: docker/login-action@v2
Fix custom_angle with rewrite of traj tool Fix custom_angle with new traj tool
@@ -72,7 +72,7 @@ int main_traj(int argc, char* argv[]) OPT_SET('3', &conf.d3d, "3D"), OPT_SET('c', &conf.asym_traj, "asymmetric trajectory [DC sampled]"), OPT_VEC2('z', &z_usamp, "Ref:Acel", "Undersampling in z-direction."), - OPT_STRING('C', &custom_angle, "file", "custom_angle"), + OPT_STRING('C', &custom_angle, "file", "custom_angle file [phi + i * psi]"), }; cmdline(&argc, argv, 1, 1, usage_str, help_str, ARRAY_SIZE(opts), opts); @@ -90,7 +90,7 @@ int main_traj(int argc, char* argv[]) if(Y != sdims[0]){ - debug_printf(DP_INFO, "According to the custom angle file : y = %d\n",sdims[0]); + debug_printf(DP_INFO, "According to the custom angle file : number of projection (y) = %d\n",sdims[0]); Y = sdims[0]; } @@ -215,13 +215,13 @@ int main_traj(int argc, char* argv[]) angle2 = s * M_PI / Y * (conf.full_circle ? 2 : 1) * split; if (NULL != custom_angle) - angle2 = cimag(custom_angle_val[p%X]); + angle2 = cimag(custom_angle_val[j]); } if (NULL != custom_angle) - angle = creal(custom_angle_val[p%X]); + angle = creal(custom_angle_val[j]); float d[3] = { 0., 0., 0 };
[mod_openssl] error if ssl.engine in wrong section (fixes error if ssl.engine in wrong section of config. ssl.engine is valid only in global scope or $SERVER["socket"] condition x-ref: "HTTPS requests timeout when cert not set for socket"
@@ -566,7 +566,8 @@ network_init_ssl (server *srv, void *p_d) } /* PEM file is require */ log_error_write(srv, __FILE__, __LINE__, "s", - "ssl.pemfile has to be set"); + "ssl.pemfile has to be set " + "when ssl.engine = \"enable\""); return -1; } } @@ -989,6 +990,12 @@ SETDEFAULTS_FUNC(mod_openssl_set_defaults) } } } + + if (0 != i && s->ssl_enabled && config->comp != COMP_SERVER_SOCKET) { + log_error_write(srv, __FILE__, __LINE__, "s", + "ssl.engine is valid only in global scope " + "or $SERVER[\"socket\"] condition"); + } } if (0 != network_init_ssl(srv, p)) return HANDLER_ERROR;
Make FreeBSD manpath consistent for mbld
@@ -68,7 +68,7 @@ case $OS in echo export INST_MAN=$prefix/man/man >> config.mk echo 'const Sys = "FreeBSD"' >> mbld/config.myr echo 'const Linkcmd = ["ld", "-o"]' >> mbld/config.myr - echo "const Manpath = \"share/man/man\"" >> mbld/config.myr + echo "const Manpath = \"man/man\"" >> mbld/config.myr ;; *OpenBSD*) echo 'export SYS=openbsd' >> config.mk
[win32] adding function for hiding MenuBar. Usage: rhoconfig.txt < "w32_hide_menu_bar = 1"
@@ -74,14 +74,10 @@ QMenuBar* QtMainWindow::createMenu() { QMenuBar * menuBar = new QMenuBar(this); - QMenu *mMain = new QMenu("Main", this); - //mMain->addAction("Exit", this, SLOT(on_actionExit_triggered())); mMain->addAction("Exlt", this, SLOT(on_actionExit_triggered())); menuBar->addMenu(mMain); - //if (menuMain == NULL) { menuMain = mMain; - //} #ifndef OS_WINDOWS_DESKTOP QMenu * menuSimulate = new QMenu("Simulate", this); @@ -98,7 +94,6 @@ QMenuBar* QtMainWindow::createMenu() { menuBar->addMenu(menuSimulate); #endif - QMenu * menuHelp = new QMenu("Help", this); //menuHelp->addAction("About", this, SLOT(on_actionAbout_triggered())); menuHelp->addAction("Info", this, SLOT(on_actionAbout_triggered())); @@ -117,9 +112,8 @@ QtMainWindow::QtMainWindow(QWidget *parent) : QMainWindow(parent), mainWindowCal if (RHOCONF().getBool("start_maximized")){ setWindowState(windowState() | Qt::WindowMaximized); } - createMenu(); -currentThreadId = QThread::currentThreadId();//this->thread()->currentThreadId(); + currentThreadId = QThread::currentThreadId(); #if !defined(RHODES_EMULATOR) QPixmap icon(QCoreApplication::applicationDirPath().append(QDir::separator()).append("icon.png")); @@ -174,8 +168,6 @@ currentThreadId = QThread::currentThreadId();//this->thread()->currentThreadId() QObject::connect(webView, SIGNAL(urlChanged(QUrl)), this, SLOT(on_webView_urlChanged(QUrl))); verticalLayout->addWidget(webView); - - connect(this, SIGNAL(navigate(QString,int)), this, SLOT(slotNavigate(QString,int)), Qt::QueuedConnection); @@ -246,6 +238,9 @@ currentThreadId = QThread::currentThreadId();//this->thread()->currentThreadId() } setMenuBar(createMenu()); + if (RHOCONF().getInt("w32_hide_menu_bar")){ + this->menuBar()->hide(); + } } QtMainWindow::~QtMainWindow()
Fix typo in glossary Reported privately by Justin Pryzby
Contains the values of <glossterm linkend="glossary-tuple">row</glossterm> attributes (i.e. the data) for a <glossterm linkend="glossary-relation">relation</glossterm>. - The heap is realized within one of more + The heap is realized within one or more <glossterm linkend="glossary-file-segment">file segments</glossterm> in the relation's <glossterm linkend="glossary-fork">main fork</glossterm>. </para>
firfilt/autotest: adding scale, ensuring value is ignored
@@ -38,6 +38,9 @@ void autotest_firfilt_cccf_coefficients_test() // design filter from external coefficients firfilt_cccf q = firfilt_cccf_create(h0, h_len); + // set scale: note that this is not used when computing coefficients + firfilt_cccf_set_scale(q, -0.4f + _Complex_I*0.7f); + // get coefficients from filter object firfilt_cccf_get_coefficients(q, h1);
CCode: Improve variable names in `readConfig`
@@ -84,23 +84,21 @@ void setDefaultConfig (CCodeData * const mapping) */ void readConfig (CCodeData * const mapping, KeySet * const config, Key const * const root) { - Key const * cur = 0; - while ((cur = ksNext (config)) != 0) + Key const * key = 0; + while ((key = ksNext (config)) != 0) { /* Ignore keys that are not directly below the config root key or have an incorrect size */ - if (keyRel (root, cur) != 1 || keyGetBaseNameSize (cur) != 3 || keyGetValueSize (cur) != 3) continue; + if (keyRel (root, key) != 1 || keyGetBaseNameSize (key) != 3 || keyGetValueSize (key) != 3) continue; - int res; - res = elektraHexcodeConvFromHex (keyBaseName (cur)[1]); - res += elektraHexcodeConvFromHex (keyBaseName (cur)[0]) * 16; + int character = elektraHexcodeConvFromHex (keyBaseName (key)[1]); + character += elektraHexcodeConvFromHex (keyBaseName (key)[0]) * 16; - int val; - val = elektraHexcodeConvFromHex (keyString (cur)[1]); - val += elektraHexcodeConvFromHex (keyString (cur)[0]) * 16; + int replacement = elektraHexcodeConvFromHex (keyString (key)[1]); + replacement += elektraHexcodeConvFromHex (keyString (key)[0]) * 16; /* Hexencode this character! */ - mapping->encode[res & 255] = val; - mapping->decode[val & 255] = res; + mapping->encode[character & 255] = replacement; + mapping->decode[replacement & 255] = character; } }
fix duplicated issuer url bug fix
@@ -187,7 +187,9 @@ list_t* getSuggestableIssuers() { if (space) { *space = '\0'; } + if (findInList(issuers, elem) == NULL) { list_rpush(issuers, list_node_new(oidc_sprintf(elem))); + } elem = strtok(NULL, "\n"); } secFree(fileContent);
Pass disp->driver to rounder_cb in lv_inv_area Pass pointer to disp->driver to rounder_cb in lv_inv_area instead of pointer to disp_refr->driver as lv_inv_area is called when no refresh is ongoing (lv_disp_drv_register).
@@ -115,7 +115,7 @@ void lv_inv_area(lv_disp_t * disp, const lv_area_t * area_p) /*The area is truncated to the screen*/ if(suc != false) { - if(disp->driver.rounder_cb) disp->driver.rounder_cb(&disp_refr->driver, &com_area); + if(disp->driver.rounder_cb) disp->driver.rounder_cb(&disp->driver, &com_area); /*Save only if this area is not in one of the saved areas*/ uint16_t i;
Correct hic id for stm32f103xb
@@ -224,8 +224,8 @@ HIC_STRING_TO_ID = { 'kl26z': 0x97969901, 'lpc11u35': 0x97969902, 'sam3u2c': 0x97969903, - 'stm32f103xb': 0x97969904, 'lpc4322': 0x97969905, + 'stm32f103xb': 0x97969908, } BOARD_ID_LOCKED_WHEN_ERASED = set([
Minor improvements in ssl_client.c
@@ -794,7 +794,8 @@ static int ssl_prepare_client_hello( mbedtls_ssl_context *ssl ) */ int renegotiating = 0; #if defined(MBEDTLS_SSL_RENEGOTIATION) - renegotiating = ( ssl->renego_status != MBEDTLS_SSL_INITIAL_HANDSHAKE ); + if( ssl->renego_status != MBEDTLS_SSL_INITIAL_HANDSHAKE ) + renegotiating = 1; #endif if( !renegotiating ) {
[chainmaker][#436]add tests test_03Contract_0004InvokeFailureContractNoExist
@@ -141,10 +141,33 @@ START_TEST(test_03Contract_0003InvokeFailureContractNull) ck_assert_int_eq(result, BOAT_SUCCESS); result = BoatHlchainmakerContractInvoke(&tx_ptr, "save", NULL, true, &invoke_reponse); ; - ck_assert(result == 0); + ck_assert(result == BOAT_SUCCESS); + if (result == BOAT_SUCCESS) + { + ck_assert(invoke_reponse.code == BOAT_SUCCESS); + ck_assert(invoke_reponse.gas_used == 0); + } } END_TEST +START_TEST(test_03Contract_0004InvokeFailureContractNoExist) +{ + BOAT_RESULT result; + BoatHlchainmakerTx tx_ptr; + BoatInvokeReponse invoke_reponse; + + result = test_contrct_invoke_prepara(&tx_ptr); + ck_assert_int_eq(result, BOAT_SUCCESS); + + result = BoatHlchainmakerContractInvoke(&tx_ptr, "save", "test", true, &invoke_reponse); ; + ck_assert(result == BOAT_SUCCESS); + if (result == BOAT_SUCCESS) + { + ck_assert(invoke_reponse.code == BOAT_SUCCESS); + ck_assert(invoke_reponse.gas_used == 0); + } +} +END_TEST Suite *make_contract_suite(void) { @@ -160,6 +183,7 @@ Suite *make_contract_suite(void) tcase_add_test(tc_contract_api, test_03Contract_0001InvokeFailureTxNull); tcase_add_test(tc_contract_api, test_03Contract_0002InvokeFailureMethodNull); tcase_add_test(tc_contract_api, test_03Contract_0003InvokeFailureContractNull); + tcase_add_test(tc_contract_api, test_03Contract_0004InvokeFailureContractNoExist); return s_contract; }
ADDING FEC - log decoded packet
+#include <picoquic_logger.h> #include "picoquic_internal.h" #include "block_framework.h" #include "memory.h" @@ -355,6 +356,7 @@ static __attribute__((always_inline)) int recover_block(picoquic_cnx_t *cnx, bpf args[2] = (protoop_arg_t) ph.epoch; args[3] = picoquic_current_time(); args[4] = (protoop_arg_t) cnx->path[0]; + picoquic_log_frames_cnx(NULL, cnx, 1, fb->source_symbols[i]->data + ph.offset, fb->source_symbols[i]->data_length - ph.offset); pp = get_pp_noparam("decode_frames", 5, args, outs); // TODO: trigger ack for packet ret = (int) plugin_run_protoop(cnx, &pp);
Use mbedtls_xor in ARIA
@@ -588,7 +588,6 @@ int mbedtls_aria_crypt_cbc( mbedtls_aria_context *ctx, const unsigned char *input, unsigned char *output ) { - int i; unsigned char temp[MBEDTLS_ARIA_BLOCKSIZE]; ARIA_VALIDATE_RET( ctx != NULL ); @@ -608,8 +607,7 @@ int mbedtls_aria_crypt_cbc( mbedtls_aria_context *ctx, memcpy( temp, input, MBEDTLS_ARIA_BLOCKSIZE ); mbedtls_aria_crypt_ecb( ctx, input, output ); - for( i = 0; i < MBEDTLS_ARIA_BLOCKSIZE; i++ ) - output[i] = (unsigned char)( output[i] ^ iv[i] ); + mbedtls_xor( output, output, iv, MBEDTLS_ARIA_BLOCKSIZE ); memcpy( iv, temp, MBEDTLS_ARIA_BLOCKSIZE ); @@ -622,8 +620,7 @@ int mbedtls_aria_crypt_cbc( mbedtls_aria_context *ctx, { while( length > 0 ) { - for( i = 0; i < MBEDTLS_ARIA_BLOCKSIZE; i++ ) - output[i] = (unsigned char)( input[i] ^ iv[i] ); + mbedtls_xor( output, input, iv, MBEDTLS_ARIA_BLOCKSIZE ); mbedtls_aria_crypt_ecb( ctx, output, output ); memcpy( iv, output, MBEDTLS_ARIA_BLOCKSIZE );
added popdown and autofocus to command palette
@@ -26,12 +26,23 @@ function doSub() { ); } +var palette = false; + window.addEventListener("message", (event) => { let popup = document.getElementById("popup"); let input = document.getElementById("input"); + if (palette) { + palette = false; + popup.style = "display:hidden;"; + input.style = "visibility:hidden !important;"; + input.value = ""; + } else { + palette = true; + popup.style = "position:absolute; left: 0; top: 0; display:block; width: 100%; height: 100%; margin: 0 0; background-color:white;"; input.style = ""; + input.focus(); input.addEventListener("keyup", (e) => { if (e.keyCode !== 13) { return; } popup.style = "display:hidden;"; @@ -50,8 +61,7 @@ window.addEventListener("message", (event) => { ); }); - - + } }); setFrame();
Fix bug in dotnet module. Found by Vitaly Kamluk (@vkamluk)
@@ -1145,7 +1145,7 @@ void dotnet_parse_tilde_2( for (i = 0; i < num_rows; i++) { - if (!fits_in_pe(pe, table_offset, row_size)) + if (!fits_in_pe(pe, row_ptr, row_size)) break; assemblyref_table = (PASSEMBLYREF_TABLE) row_ptr;
removed unneeded code fragment
@@ -55,9 +55,6 @@ void seat_destroy(struct sway_seat *seat) { free(seat); } -static struct sway_seat_node *seat_node_from_node( - struct sway_seat *seat, struct sway_node *node); - static void seat_node_destroy(struct sway_seat_node *seat_node) { wl_list_remove(&seat_node->destroy.link); wl_list_remove(&seat_node->link);
Remove some flags from viewconf.c
##### "NBR_TABLE_MAX_NEIGHBORS": _______________ NBR_TABLE_CONF_MAX_NEIGHBORS ##### "NETSTACK_MAX_ROUTE_ENTRIES": ____________ NETSTACK_MAX_ROUTE_ENTRIES ##### "UIP_CONF_BUFFER_SIZE": __________________ UIP_CONF_BUFFER_SIZE -##### "UIP_CONF_ROUTER": _______________________ UIP_CONF_ROUTER -##### "NBR_TABLE_FIND_REMOVABLE": ______________ NBR_TABLE_FIND_REMOVABLE ##### "UIP_CONF_UDP": __________________________ UIP_CONF_UDP ##### "UIP_UDP_CONNS": _________________________ UIP_UDP_CONNS ##### "UIP_CONF_TCP": __________________________ UIP_CONF_TCP ##### "UIP_ND6_SEND_NA": _______________________ UIP_ND6_SEND_NA ##### "UIP_ND6_AUTOFILL_NBR_CACHE": ____________ UIP_ND6_AUTOFILL_NBR_CACHE ##### "SICSLOWPAN_CONF_FRAG": __________________ SICSLOWPAN_CONF_FRAG -##### "SICSLOWPAN_CONF_MAC_MAX_PAYLOAD": _______ SICSLOWPAN_CONF_MAC_MAX_PAYLOAD ##### "SICSLOWPAN_COMPRESSION": ________________ SICSLOWPAN_COMPRESSION ##### "LOG_CONF_LEVEL_RPL": ____________________ LOG_CONF_LEVEL_RPL ##### "LOG_CONF_LEVEL_TCPIP": __________________ LOG_CONF_LEVEL_TCPIP
libcupsfilters: Corrected log typo in imagetoraster()
@@ -291,7 +291,7 @@ imagetoraster(int inputfd, /* I - File descriptor input stream */ outformat = OUTPUT_FORMAT_CUPS_RASTER; if (log) log(ld, FILTER_LOGLEVEL_DEBUG, - "imagetorater: Final output format: %s", + "imagetoraster: Final output format: %s", (outformat == OUTPUT_FORMAT_CUPS_RASTER ? "CUPS Raster" : (outformat == OUTPUT_FORMAT_PWG_RASTER ? "PWG Raster" : (outformat == OUTPUT_FORMAT_APPLE_RASTER ? "Apple Raster" :
dpdk_esp_encrypt: add to prefetch data The memory areas storing vlib_buffer_t and ip4|6_and_esp_header_t are not prefetched. The patch help dpdk_esp_encrypt to reduce 18 clocks/pkt from 149 to 131 on Haswell when running IPsec in tunnel mode.
@@ -155,8 +155,8 @@ dpdk_esp_encrypt_inline (vlib_main_t * vm, while (n_left_from > 0 && n_left_to_next > 0) { clib_error_t *error; - u32 bi0; - vlib_buffer_t *b0 = 0; + u32 bi0, bi1; + vlib_buffer_t *b0, *b1; u32 sa_index0; ip4_and_esp_header_t *ih0, *oh0 = 0; ip6_and_esp_header_t *ih6_0, *oh6_0 = 0; @@ -169,7 +169,7 @@ dpdk_esp_encrypt_inline (vlib_main_t * vm, u8 trunc_size; u16 rewrite_len; u16 udp_encap_adv = 0; - struct rte_mbuf *mb0 = 0; + struct rte_mbuf *mb0; struct rte_crypto_op *op; u16 res_idx; @@ -188,6 +188,16 @@ dpdk_esp_encrypt_inline (vlib_main_t * vm, /* mb0 */ CLIB_PREFETCH (mb0, CLIB_CACHE_LINE_BYTES, STORE); + if (n_left_from > 1) + { + bi1 = from[1]; + b1 = vlib_get_buffer (vm, bi1); + + CLIB_PREFETCH (b1, CLIB_CACHE_LINE_BYTES, LOAD); + CLIB_PREFETCH (b1->data - CLIB_CACHE_LINE_BYTES, + CLIB_CACHE_LINE_BYTES, STORE); + } + op = ops[0]; ops += 1; ASSERT (op->status == RTE_CRYPTO_OP_STATUS_NOT_PROCESSED);
Replace the margin with padding
border: 1px solid #eee; background-image: url(test_image_reader.png); background-size: contain; - margin-bottom: 10px; + margin: 5px 0; } .container { - margin-bottom: 10px; + padding: 5px 0; } .text-sp { font-size: 18sp;
machinarium: use correct fiber in machine_write() cb
@@ -41,15 +41,15 @@ mm_write_cb(mm_fd_t *handle) return 0; if (errno == EINTR) continue; - io->connect_status = errno; - mm_scheduler_wakeup(io->connect_fiber); + io->write_status = errno; + mm_scheduler_wakeup(io->write_fiber); return 0; } io->write_pos += rc; left = io->write_size - io->write_pos; assert(left >= 0); } - io->connect_status = 0; + io->write_status = 0; mm_scheduler_wakeup(io->write_fiber); return 0; }
chip/stm32/usart-stm32f0.c: Format with clang-format BRANCH=none TEST=none
@@ -54,8 +54,7 @@ static void usart_variant_disable(struct usart_config const *config) * Only disable the shared interrupt for USART3/4 if both USARTs are * now disabled. */ - if ((index == 0) || - (index == 1) || + if ((index == 0) || (index == 1) || (index == 2 && configs[3] == NULL) || (index == 3 && configs[2] == NULL)) task_disable_irq(config->hw->irq);
implement new task construction; sets up stack for first call to context_switch
@@ -86,16 +86,18 @@ task_small_t* task_construct(uint32_t entry_point) { memset(new_task, 0, sizeof(task_small_t)); new_task->id = next_pid++; - registers_t initial_register_state = {0}; - initial_register_state.ds = GDT_BYTE_INDEX_KERNEL_DATA; - initial_register_state.eip = entry_point; - - char* stack = kmalloc(0x1000); - initial_register_state.esp = stack; - initial_register_state.ebp = stack; - - new_task->register_state = initial_register_state; - new_task->_has_run = false; + uint32_t stack_size = 0x2000; + char *stack = kmalloc(stack_size); + uint32_t *stack_top = (uint32_t *)(stack + stack_size - 0x4); // point to top of malloc'd stack + + *(stack_top--) = entry_point; //Address of task's startup function + *(stack_top--) = 0; //eax + *(stack_top--) = 0; //ebx + *(stack_top--) = 0; //esi + *(stack_top--) = 0; //edi + *(stack_top) = 0; //ebp + + new_task->context = (struct context*)stack_top; _tasking_add_task_to_runlist(new_task);
Removes commented out code.
@@ -1216,65 +1216,3 @@ static void celix_waitForPendingRegisteredEvents(celix_service_registry_t *regis } celixThreadMutex_unlock(&registry->pendingRegisterEvents.mutex); } \ No newline at end of file - -//static void celix_serviceRegistry_triggerListenerHooks(celix_service_registry_t *registry, const char* serviceName, const celix_properties_t *properties) { -// //If this is a listener hook, invoke the callback with all current listeners -// if (strcmp(serviceName, OSGI_FRAMEWORK_LISTENER_HOOK_SERVICE_NAME) == 0) { -// celix_array_list_t *infos = NULL; -// service_reference_pt ref = NULL; -// listener_hook_service_pt hook = NULL; -// -// status = CELIX_DO_IF(status, arrayList_create(&infos)); -// -// if (status == CELIX_SUCCESS) { -// celix_status_t subs = CELIX_SUCCESS; -// -// celixThreadMutex_lock(&framework->serviceListenersLock); -// for (i = 0; i < arrayList_size(framework->serviceListeners); i++) { -// celix_fw_service_listener_entry_t *listener = arrayList_get(framework->serviceListeners, i); -// bundle_context_t *context = NULL; -// listener_hook_info_pt info = NULL; -// bundle_context_pt lContext = NULL; -// -// subs = CELIX_DO_IF(subs, bundle_getContext(entry->bnd, &context)); -// if (subs == CELIX_SUCCESS) { -// info = (listener_hook_info_pt) malloc(sizeof(*info)); -// if (info == NULL) { -// subs = CELIX_ENOMEM; -// } -// } -// -// subs = CELIX_DO_IF(subs, bundle_getContext(listener->bundle, &lContext)); -// if (subs == CELIX_SUCCESS) { -// info->context = lContext; -// info->removed = false; -// } -// subs = CELIX_DO_IF(subs, filter_getString(listener->filter, &info->filter)); -// -// if (subs == CELIX_SUCCESS) { -// arrayList_add(infos, info); -// } -// else{ -// fw_logCode(framework->logger, OSGI_FRAMEWORK_LOG_ERROR, status, "Could not pass all listeners to the hook: %s", serviceName); -// free(info); -// } -// } -// celixThreadMutex_unlock(&framework->serviceListenersLock); -// -// status = CELIX_DO_IF(status, serviceRegistry_getServiceReference(framework->registry, framework->bundle, -// *registration, &ref)); -// status = CELIX_DO_IF(status, fw_getService(framework,framework->bundle, ref, (const void **) &hook)); -// if (status == CELIX_SUCCESS) { -// hook->added(hook->handle, infos); -// } -// status = CELIX_DO_IF(status, serviceRegistry_ungetService(framework->registry, framework->bundle, ref, NULL)); -// status = CELIX_DO_IF(status, serviceRegistry_ungetServiceReference(framework->registry, framework->bundle, ref)); -// -// for (int j = 0; j < arrayList_size(infos); j++) { -// listener_hook_info_pt info = arrayList_get(infos, j); -// free(info); -// } -// arrayList_destroy(infos); -// } -// } -//} \ No newline at end of file
mcu/nrf5340_net: Add support for APPROTECT setup This is required for enabling debugging support.
@@ -29,6 +29,7 @@ NOTICE: This file has been modified by Nordic Semiconductor ASA. #include <nrf_erratas.h> #include <system_nrf5340_network.h> #include <mcu/cmsis_nvic.h> +#include <system_nrf53_approtect.h> /*lint ++flb "Enter library region" */ @@ -84,6 +85,9 @@ void SystemInit(void) } } + /* Handle fw-branch APPROTECT setup. */ + nrf53_handle_approtect(); + SystemCoreClockUpdate(); NVIC_Relocate();
board_inspector: Remove dead code in parser.py A DualNamePath clause is a NamePath that only follows rootchar or prefixpath. Thus, it is never necessary to check if a dot is necessary for separating segments before a DualNamePath. This patch removes the code that conduct that check.
@@ -106,8 +106,6 @@ class NameStringFactory(Factory): # Object name if ord(char) == grammar.AML_DUAL_NAME_PREFIX: - if acc and acc[-1] not in ["\\", "^"]: - acc += "." acc += stream.get_fixed_length_string(4) acc += "." acc += stream.get_fixed_length_string(4)
VERSION bump to version 2.0.179
@@ -61,7 +61,7 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) # set version of the project set(LIBYANG_MAJOR_VERSION 2) set(LIBYANG_MINOR_VERSION 0) -set(LIBYANG_MICRO_VERSION 178) +set(LIBYANG_MICRO_VERSION 179) set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION}) # set version of the library set(LIBYANG_MAJOR_SOVERSION 2)
[Doc] python apidoc: sort alphabetically
@@ -374,4 +374,5 @@ def source_read(app, docname, source): def setup(app): app.connect('source-read', source_read) -autodoc_member_order = 'bysource' +#default is alphabetical which is better. +#autodoc_member_order = 'bysource'
Update compile API URL Update the compile API URL. Additionally raise an exception if a target could not be built.
@@ -41,7 +41,7 @@ import time import requests import logging -MBED_API_SERVER = 'https://developer.mbed.org' +MBED_API_SERVER = 'https://os.mbed.com/' def build_repo(user, password, repo, platform, destdir, @@ -130,6 +130,8 @@ def build_repo(user, password, repo, platform, destdir, fd.write(chunk) logging.info("Finished!") + else: + raise Exception("Failed to build platform %s" % platform) return destination if __name__ == "__main__":
admin/nagios: add --with-initdir=%{_unitdir} to configure step to avoid nagios installer putting systemd file in non-default location
@@ -193,6 +193,7 @@ install -p -m 0644 %{SOURCE10} %{SOURCE11} %{SOURCE12} html/images/logos/ --with-perlcache \ --with-template-objects \ --with-template-extinfo \ + --with-initdir=%{_unitdir} \ %if 0%{?sles_version} || 0%{?suse_version} --with-httpd-conf=/etc/apache2/conf.d \ %else @@ -292,8 +293,6 @@ exit 0 %ifarch aarch64 %if 0%{?sles_version} || 0%{?suse_version} /usr/lib/systemd/system/nagios.service -%else -/lib/systemd/system/nagios.service %endif %else /etc/init.d/nagios
Fix ocsp app exit code If we run the ocsp command line app and the responder returns a non-successful status code then the app should exit with a failure code. Based on an original patch by Tatsuhiro Tsujikawa. Fixes
@@ -697,11 +697,9 @@ redo_accept: if (i != OCSP_RESPONSE_STATUS_SUCCESSFUL) { BIO_printf(out, "Responder Error: %s (%d)\n", OCSP_response_status_str(i), i); - if (!ignore_err) { - ret = 0; + if (!ignore_err) goto end; } - } if (resp_text) OCSP_RESPONSE_print(out, resp, 0);
signv4: renamed flb_digest to flb_hash
#include <fluent-bit/flb_sds.h> #include <fluent-bit/flb_utils.h> #include <fluent-bit/flb_hmac.h> -#include <fluent-bit/flb_digest.h> +#include <fluent-bit/flb_hash.h> #include <fluent-bit/flb_http_client.h> #include <fluent-bit/flb_signv4.h> #include <fluent-bit/flb_aws_credentials.h> @@ -68,7 +68,7 @@ static int hmac_sha256_sign(unsigned char out[32], { int result; - result = flb_hmac_simple(FLB_DIGEST_SHA256, + result = flb_hmac_simple(FLB_HASH_SHA256, key, key_len, msg, msg_len, out, 32); @@ -743,12 +743,12 @@ static flb_sds_t flb_signv4_canonical_request(struct flb_http_client *c, payload_hash = flb_sds_create("UNSIGNED-PAYLOAD"); } else { if (c->body_len > 0 && post_params == FLB_FALSE) { - result = flb_digest_simple(FLB_DIGEST_SHA256, + result = flb_hash_simple(FLB_HASH_SHA256, (unsigned char *) c->body_buf, c->body_len, sha256_buf, sizeof(sha256_buf)); } else { - result = flb_digest_simple(FLB_DIGEST_SHA256, + result = flb_hash_simple(FLB_HASH_SHA256, (unsigned char *) NULL, 0, sha256_buf, sizeof(sha256_buf)); } @@ -971,7 +971,7 @@ static flb_sds_t flb_signv4_string_to_sign(struct flb_http_client *c, } /* Hash of Canonical Request */ - result = flb_digest_simple(FLB_DIGEST_SHA256, + result = flb_hash_simple(FLB_HASH_SHA256, (unsigned char *) cr, flb_sds_len(cr), sha256_buf, sizeof(sha256_buf));
Clarify if-automatic listens on 0.0.0.0 and ::
@@ -126,9 +126,12 @@ interface and port number), if not specified the default port (from Same as interface: (for ease of compatibility with nsd.conf). .TP .B interface\-automatic: \fI<yes or no> -Detect source interface on UDP queries and copy them to replies. This -feature is experimental, and needs support in your OS for particular socket -options. Default value is no. +Listen on all addresses on all (current and future) interfaces, detect the +source interface on UDP queries and copy them to replies. This is a lot like +ip-transparent, but this option services all interfaces whilst with +ip-transparent you can select which (future) interfaces unbound provides +service on. This feature is experimental, and needs support in your OS for +particular socket options. Default value is no. .TP .B outgoing\-interface: \fI<ip address or ip6 netblock> Interface to use to connect to the network. This interface is used to send
docs: update the instruction
@@ -45,8 +45,9 @@ Close the Terminal that bot-echo is running or type "Ctrl-C" to kill it. #### Debug Memory Errors -* The recommanded method - Using SaiphC to build your bot and all runtime memory errors will be reported. The [instruction](/docs/SAIPH.md). +* The recommanded method: + Using SaiphC to build your bot, and run the executable. All runtime memory errors will be reported. + The [instruction](/docs/SAIPH.md) to use SaiphC to build bots. * Using valgrind, which is more convenient but cannot report all runtime memory errors. ```
SOVERSION bump to version 5.4.7
@@ -45,7 +45,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_ # with backward compatible change and micro version is connected with any internal change of the library. set(SYSREPO_MAJOR_SOVERSION 5) set(SYSREPO_MINOR_SOVERSION 4) -set(SYSREPO_MICRO_SOVERSION 6) +set(SYSREPO_MICRO_SOVERSION 7) set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION}) set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
Edit USERS-GUIDE.md Make initial copy edits to file.
-# DAPLink Users Guide -There are three interfaces that DAPLink provides. These are drag-n-drop programming, a serial port and debugging support. In addition DAPLink firmware can be updated using the drag-n-drop programming interface of the bootloader. +# DAPLink users guide +DAPLink provides three interface. These are drag-and-drop programming, a serial port and debugging support. In addition, you can update DAPLink firmware using the drag-and-drop programming interface of the bootloader. -## Drag-n-drop Programming -Program the target microcontroller by copying or saving a file in one of the supported formats to the DAPLink drive. Upon completion the drive will re-mount. If a failure occurs then the file ``FAIL.TXT`` will appear on the drive containing information about the failure. +## Drag-and-drop programming + +Program the target microcontroller by copying or saving a file in one of the supported formats to the DAPLink drive. Upon completion, the drive remounts. If a failure occurs, the file `FAIL.TXT` appears on the drive containing information about the failure. Supported file formats: -* Raw binary file -* Intel Hex +- Raw binary file. +- Intel Hex. + +## Serial port -## Serial Port The serial port is connected directly to the target MCU allowing for bidirectional communication. It also allows the target to be reset by sending a break command over the serial port. Supported baud rates: -* 9600 -* 14400 -* 19200 -* 28800 -* 38400 -* 56000 -* 57600 -* 115200 -Note - Most DAPLink implementations support other baud rates in addition to the ones listed here. +- 9600. +- 14400. +- 19200. +- 28800. +- 38400. +- 56000. +- 57600. +- 115200. +Note: Most DAPLink implementations support other baud rates in addition to the ones listed here. ## Debugging -Debugging can be done with any IDE that supports the CMSIS-DAP protocol. Some tools capable of debugging are: -* [pyOCD](https://github.com/mbedmicro/pyOCD) -* [uVision](http://www.keil.com/) -* [IAR](https://www.iar.com/) - +You can debug with any IDE that supports the CMSIS-DAP protocol. Some tools capable of debugging are: +- [pyOCD](https://github.com/mbedmicro/pyOCD). +- [uVision](http://www.keil.com/). +- [IAR](https://www.iar.com/). -## Firmware Update +## Firmware update -To update the firmware on a device hold the reset button while attaching USB. The device will boot into bootloader mode. From there copy the appropriate firmware onto the drive. If successful the device will leave bootloader mode and start running the new firmware. Otherwise the bootloader will display ``FAIL.TXT`` with an explanation of what went wrong. +To update the firmware on a device, hold the reset button while attaching USB. The device boots into bootloader mode. From there, copy the appropriate firmware onto the drive. If successful, the device leaves bootloader mode and starts running the new firmware. Otherwise, the bootloader displays `FAIL.TXT` with an explanation of what went wrong.
out_stackdriver: enable upstream configuration
@@ -856,6 +856,12 @@ static int cb_stackdriver_init(struct flb_output_instance *ins, return -1; } + /* Load config map */ + ret = flb_output_config_map_set(ins, (void *) ctx); + if (ret == -1) { + return -1; + } + /* Set context */ flb_output_set_context(ins, ctx);
Update to >= to keep symmetry
@@ -691,14 +691,14 @@ int pocl_buffer_boundcheck_3d(const size_t buffer_size, origin[1] * rp + origin[0]; - size_t byte_offset_end = origin[0] + region[0] + + size_t byte_offset_end = origin[0] + region[0]-1 + rp * (origin[1] + region[1]-1) + sp * (origin[2] + region[2]-1); POCL_RETURN_ERROR_ON((byte_offset_begin > buffer_size), CL_INVALID_VALUE, "%sorigin is outside the %sbuffer", prefix, prefix); - POCL_RETURN_ERROR_ON((byte_offset_end > buffer_size), CL_INVALID_VALUE, + POCL_RETURN_ERROR_ON((byte_offset_end >= buffer_size), CL_INVALID_VALUE, "%sorigin+region is outside the %sbuffer", prefix, prefix); return CL_SUCCESS; }
prevent overflow in RgbaFile cachePadding
@@ -171,16 +171,16 @@ cachePadding (ptrdiff_t size) static int LOG2_CACHE_LINE_SIZE = 8; - int i = LOG2_CACHE_LINE_SIZE + 2; + size_t i = LOG2_CACHE_LINE_SIZE + 2; while ((size >> i) > 1) ++i; - if (size > (1 << (i + 1)) - 64) - return 64 + ((1 << (i + 1)) - size); + if (size > (1ll << (i + 1)) - 64ll) + return 64ll + ((1ll << (i + 1ll)) - size); - if (size < (1 << i) + 64) - return 64 + ((1 << i) - size); + if (size < (1ll << i) + 64ll) + return 64ll + ((1ll << i) - size); return 0; }
Fix parser memory leaks.
@@ -320,6 +320,17 @@ get_interface_type(int c, int *type_r, gnc_t gnc, void *closure) return c; } +static void +free_filter(struct filter *f) +{ + free(f->ifname); + free(f->id); + free(f->prefix); + free(f->src_prefix); + free(f->neigh); + free(f->action.src_prefix); + free(f); +} static int parse_filter(int c, gnc_t gnc, void *closure, struct filter **filter_return) @@ -341,7 +352,7 @@ parse_filter(int c, gnc_t gnc, void *closure, struct filter **filter_return) } c = getword(c, &token, gnc, closure); if(c < -1) { - free(filter); + free_filter(filter); return -2; } @@ -478,7 +489,7 @@ parse_filter(int c, gnc_t gnc, void *closure, struct filter **filter_return) error: free(token); - free(filter); + free_filter(filter); return -2; } @@ -619,6 +630,8 @@ parse_anonymous_ifconf(int c, gnc_t gnc, void *closure, return c; error: + if(if_conf->ifname) + free(if_conf->ifname); free(if_conf); return -2; } @@ -711,6 +724,7 @@ add_ifconf(struct interface_conf *if_conf, struct interface_conf **if_confs) while(next) { if(strcmp(next->ifname, if_conf->ifname) == 0) { merge_ifconf(next, if_conf, next); + free(if_conf->ifname); free(if_conf); if_conf = next; goto done; @@ -732,6 +746,7 @@ flush_ifconf(struct interface_conf *if_conf) { if(if_conf == interface_confs) { interface_confs = if_conf->next; + free(if_conf->ifname); free(if_conf); return; } else { @@ -739,6 +754,7 @@ flush_ifconf(struct interface_conf *if_conf) while(prev) { if(prev->next == if_conf) { prev->next = if_conf->next; + free(if_conf->ifname); free(if_conf); return; }
Improve cmake build behaviour with non-host cpu targets 1. Supply appropriate values for C/Z GEMM unroll when cross-compiling for CORE2 or ARMV7 2. Add the required xLOCAL_BUFFER_SIZE parameters for cross-compiling CORE2 3. Add -DFORCE_<target> option to getarch when building with -DTARGET=target for
@@ -105,6 +105,7 @@ if (DEFINED CORE AND CMAKE_CROSSCOMPILING AND NOT (${HOST_OS} STREQUAL "WINDOWSS # Perhaps this should be inside a different file as it grows larger file(APPEND ${TARGET_CONF_TEMP} "#define ${TCORE}\n" + "#define CORE_${TCORE}\n" "#define CHAR_CORENAME \"${TCORE}\"\n") if ("${TCORE}" STREQUAL "CORE2") file(APPEND ${TARGET_CONF_TEMP} @@ -119,15 +120,19 @@ if (DEFINED CORE AND CMAKE_CROSSCOMPILING AND NOT (${HOST_OS} STREQUAL "WINDOWSS "#define HAVE_SSE\n" "#define HAVE_SSE2\n" "#define HAVE_SSE3\n" - "#define HAVE_SSSE3\n") + "#define HAVE_SSSE3\n" + "#define SLOCAL_BUFFER_SIZE\t16384\n" + "#define DLOCAL_BUFFER_SIZE\t16384\n" + "#define CLOCAL_BUFFER_SIZE\t16384\n" + "#define ZLOCAL_BUFFER_SIZE\t16384\n") set(SGEMM_UNROLL_M 8) set(SGEMM_UNROLL_N 4) set(DGEMM_UNROLL_M 4) set(DGEMM_UNROLL_N 4) - set(CGEMM_DEFAULT_UNROLL_M 4) - set(CGEMM_DEFAULT_UNROLL_N 2) - set(ZGEMM_DEFAULT_UNROLL_M 2) - set(ZGEMM_DEFAULT_UNROLL_N 2) + set(CGEMM_UNROLL_M 4) + set(CGEMM_UNROLL_N 2) + set(ZGEMM_UNROLL_M 2) + set(ZGEMM_UNROLL_N 2) elseif ("${TCORE}" STREQUAL "ARMV7") file(APPEND ${TARGET_CONF_TEMP} "#define L1_DATA_SIZE\t65536\n" @@ -143,6 +148,10 @@ if (DEFINED CORE AND CMAKE_CROSSCOMPILING AND NOT (${HOST_OS} STREQUAL "WINDOWSS set(SGEMM_UNROLL_N 4) set(DGEMM_UNROLL_M 4) set(DGEMM_UNROLL_N 4) + set(CGEMM_UNROLL_M 2) + set(CGEMM_UNROLL_N 2) + set(ZGEMM_UNROLL_M 2) + set(ZGEMM_UNROLL_N 2) elseif ("${TCORE}" STREQUAL "ARMV8") file(APPEND ${TARGET_CONF_TEMP} "#define L1_DATA_SIZE\t32768\n" @@ -331,6 +340,9 @@ else(NOT CMAKE_CROSSCOMPILING) set(GETARCH_FLAGS ${GETARCH_FLAGS} -DFORCE_GENERIC) else() list(APPEND GETARCH_SRC ${PROJECT_SOURCE_DIR}/cpuid.S) + if (DEFINED TARGET_CORE) + set(GETARCH_FLAGS ${GETARCH_FLAGS} -DFORCE_${TARGET_CORE}) + endif () endif () if ("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsStore")
Minor improvements to test code script
@@ -126,9 +126,11 @@ code that is generated or read from helpers and platform files. This script replaces following fields in the template and generates the test source file: -__MBEDTLS_TEST_TEMPLATE__TEST_COMMON_HELPERS <-- All common code from helpers.function +__MBEDTLS_TEST_TEMPLATE__TEST_COMMON_HELPERS + All common code from helpers.function is substituted here. -__MBEDTLS_TEST_TEMPLATE__FUNCTIONS_CODE <-- Test functions are substituted here +__MBEDTLS_TEST_TEMPLATE__FUNCTIONS_CODE + Test functions are substituted here from the input test_suit_xyz.function file. C preprocessor checks are generated for the build dependencies specified @@ -137,21 +139,25 @@ __MBEDTLS_TEST_TEMPLATE__FUNCTIONS_CODE <-- Test functions are substitut functions with code to expand the string parameters read from the data file. -__MBEDTLS_TEST_TEMPLATE__EXPRESSION_CODE <-- This script enumerates the +__MBEDTLS_TEST_TEMPLATE__EXPRESSION_CODE + This script enumerates the expressions in the .data file and generates code to handle enumerated expression Ids and return the values. -__MBEDTLS_TEST_TEMPLATE__DEP_CHECK_CODE <-- This script enumerates all +__MBEDTLS_TEST_TEMPLATE__DEP_CHECK_CODE + This script enumerates all build dependencies and generate code to handle enumerated build dependency Id and return status: if the dependency is defined or not. -__MBEDTLS_TEST_TEMPLATE__DISPATCH_CODE <-- This script enumerates the functions +__MBEDTLS_TEST_TEMPLATE__DISPATCH_CODE + This script enumerates the functions specified in the input test data file and generates the initializer for the function table in the template file. -__MBEDTLS_TEST_TEMPLATE__PLATFORM_CODE <-- Platform specific setup and test +__MBEDTLS_TEST_TEMPLATE__PLATFORM_CODE + Platform specific setup and test dispatch code. """ @@ -985,10 +991,7 @@ def write_test_source_file(template_file, c_file, snippets): braced = "(?P<braced>(?!))" # If not already matched, a "__MBEDTLS_TEST_TEMPLATE__" prefix is invalid. invalid = "(?P<invalid>__MBEDTLS_TEST_TEMPLATE__)" - placeholder_pattern = re.compile(escaped \ - + "|" + named \ - + "|" + braced \ - + "|" + invalid) + placeholder_pattern = re.compile("|".join([escaped, named, braced, invalid])) with open(template_file, 'r') as template_f, open(c_file, 'w') as c_f: for line_no, line in enumerate(template_f.readlines(), 1):
update ya tool arc revert show names for commit option for run fuse in single thread mode
}, "arc": { "formula": { - "sandbox_id": [412001663], + "sandbox_id": [413571119], "match": "arc" }, "executable": {
pass key and name props to radio buttons
@@ -13,12 +13,14 @@ import { RadioButton, RadioButtonGroup } from 'material-ui/RadioButton' const RadioButtons = ({ id, value, meta, options, onChange }) => ( <RadioButtonGroup id={id} + name={id} defaultSelected={value} onChange={(evt, value) => onChange(value)} style={{ display: 'inline-block', position: 'relative', top: 7, marginTop: -11 }} > {options.map(option => <RadioButton + key={id + '-' + option} value={option} label={option} style={{ display: 'inline-block', width: 'auto', paddingRight: 32 }}
Squashed 'opae-libs/' changes from 45aafb87..d0b18204 release: update version to 2.0.1 git-subtree-dir: opae-libs git-subtree-split:
@@ -29,7 +29,7 @@ project(opae-libs) set(OPAE_VERSION_MAJOR 2 CACHE STRING "OPAE major version" FORCE) set(OPAE_VERSION_MINOR 0 CACHE STRING "OPAE minor version" FORCE) -set(OPAE_VERSION_REVISION 0 CACHE STRING "OPAE revision version" FORCE) +set(OPAE_VERSION_REVISION 1 CACHE STRING "OPAE revision version" FORCE) set(OPAE_VERSION ${OPAE_VERSION_MAJOR}.${OPAE_VERSION_MINOR}.${OPAE_VERSION_REVISION} CACHE STRING "OPAE version" FORCE)
Fix Clients for Windows pipeline Use macro WIN32 to bypass some codes like poll.
#ifndef FRONTEND #include "postgres.h" #include "cdb/cdbvars.h" +#endif +#ifndef WIN32 #include <poll.h> #endif @@ -3277,7 +3279,7 @@ internal_cancel(SockAddr *raddr, int be_pid, int be_key, CancelRequestPacket cp; } crp; -#ifndef FRONTEND +#ifndef WIN32 struct pollfd pollFds[1]; int pollRet; @@ -3334,7 +3336,7 @@ retry4: * one we thought we were canceling. Note we don't actually expect this * read to obtain any data, we are just waiting for EOF to be signaled. */ -#ifndef FRONTEND +#ifndef WIN32 retry5: pollFds[0].fd = tmpsock; pollFds[0].events = POLLIN;
normalize axis quaternion axis-angle constructor
@@ -90,49 +90,44 @@ glm_quat_init(versor q, float x, float y, float z, float w) { } /*! - * @brief creates NEW quaternion with individual axis components + * @brief creates NEW quaternion with axis vector * * @param[out] q quaternion * @param[in] angle angle (radians) - * @param[in] x axis.x - * @param[in] y axis.y - * @param[in] z axis.z + * @param[in] axis axis */ CGLM_INLINE void -glm_quat(versor q, float angle, float x, float y, float z) { +glm_quatv(versor q, float angle, vec3 axis) { + vec3 k; float a, c, s; a = angle * 0.5f; c = cosf(a); s = sinf(a); - q[0] = s * x; - q[1] = s * y; - q[2] = s * z; + glm_normalize_to(axis, k); + + q[0] = s * k[0]; + q[1] = s * k[1]; + q[2] = s * k[2]; q[3] = c; } /*! - * @brief creates NEW quaternion with axis vector + * @brief creates NEW quaternion with individual axis components * * @param[out] q quaternion * @param[in] angle angle (radians) - * @param[in] axis axis + * @param[in] x axis.x + * @param[in] y axis.y + * @param[in] z axis.z */ CGLM_INLINE void -glm_quatv(versor q, float angle, vec3 axis) { - float a, c, s; - - a = angle * 0.5f; - c = cosf(a); - s = sinf(a); - - q[0] = s * axis[0]; - q[1] = s * axis[1]; - q[2] = s * axis[2]; - q[3] = c; +glm_quat(versor q, float angle, float x, float y, float z) { + vec3 axis = {x, y, z}; + glm_quatv(q, angle, axis); } /*!