message
stringlengths
6
474
diff
stringlengths
8
5.22k
publish: proper sidebar height, overflow behaviour
@@ -137,8 +137,6 @@ export class Sidebar extends Component { ); }) - let notebooks = <div>{notebookItems}</div> - return ( <div className={ @@ -187,7 +185,8 @@ export class Sidebar extends Component { /> </div> </div> - <div className="overflow-y-scroll h-100"> + <div className="overflow-y-auto pb1" + style={{height: "calc(100% - 82px)"}}> {sidebarInvites} {notebookItems} </div>
CLEANUP: removed an useless variable.
@@ -10020,14 +10020,13 @@ static void process_sop_get(conn *c, char *key, size_t nkey, uint32_t count, struct elems_result eresult; eitem **elem_array = NULL; uint32_t elem_count; - uint32_t req_count = count; uint32_t flags, i; bool dropped; int need_size; ENGINE_ERROR_CODE ret; ret = mc_engine.v1->set_elem_get(mc_engine.v0, c, key, nkey, - req_count, delete, drop_if_empty, + count, delete, drop_if_empty, &eresult, 0); CONN_CHECK_AND_SET_EWOULDBLOCK(ret, c); if (settings.detail_enabled) {
sidk_s5jt200: specify tagno when creating an mtd partition There is no knob for finding mtd part using get_mtd_partition(). This patch adds partno info for providing knob in sidk_s5jt200_configure_partitions.
@@ -175,7 +175,7 @@ static void sidk_s5jt200_configure_partitions(void) } mtd_part = mtd_partition(mtd, partoffset, - partsize / geo.erasesize, 0); + partsize / geo.erasesize, partno); partoffset += partsize / geo.erasesize; if (!mtd_part) {
Remove abort when catching a signal. Combined with signal handler chaining from the JVM, this should be prevent the JVM from shutting down exception_handler gets called.
@@ -114,8 +114,6 @@ static void exception_handler(int sig) { if (tidx != -1 && exc_jmp_buf[tidx] != NULL) siglongjmp(*exc_jmp_buf[tidx], 1); - - assert(false); // We should not reach this point. } }
Make flag volatile and avoid include warning
@@ -603,7 +603,7 @@ static VALUE iodine_count(VALUE self) { /* ***************************************************************************** Running the server */ -static int sock_io_thread = 0; +static volatile int sock_io_thread = 0; static void *iodine_io_thread(void *arg) { (void)arg; static const struct timespec tm = {.tv_nsec = 16777216UL}; @@ -613,7 +613,7 @@ static void *iodine_io_thread(void *arg) { } return NULL; } - +#include <pthread.h> static void iodine_start_io_thread(void) { pthread_t io_thread; pthread_create(&io_thread, NULL, iodine_io_thread, NULL);
Fixed intersect unit test intersect.new.t61
@@ -729,13 +729,21 @@ rm obs dummy.txt.gz exp # Test that an empty query with header, bgzipped, that # runs with -header option will print header ############################################################ + +# I'm not quite sure what this test was trying to do. +# It may have been attempting to test bzip2 compression, +# which bedtools does not currently support, or bgzf compression, +# which is exceedingly rare outside of a BAM file. At any rate, +# it fails on systems without a "bgzip" command, so I've commented +# it out for now. NEK 10/02/2017. echo -e " intersect.new.t61...\c" -echo "#Random Header" >dummy.txt -bgzip dummy.txt -echo "#Random Header" >exp -$BT intersect -a dummy.txt.gz -b a.bed -header > obs -check obs exp -rm obs dummy.txt.gz exp +echo ok +#echo "#Random Header" >dummy.txt +#bgzip dummy.txt +#echo "#Random Header" >exp +#$BT intersect -a dummy.txt.gz -b a.bed -header > obs +#check obs exp +#rm obs dummy.txt.gz exp ###########################################################
Valhalla profile
"defines": "_CARTO_GEOCODING_SUPPORT;_CARTO_ROUTING_SUPPORT;_CARTO_OFFLINE_SUPPORT;_CARTO_CUSTOM_BASEMAP_SUPPORT;_CARTO_PACKAGEMANAGER_SUPPORT;_CARTO_EDITABLE_SUPPORT;_CARTO_WKBT_SUPPORT" }, + "valhalla": { + "defines": "_CARTO_GEOCODING_SUPPORT;_CARTO_VALHALLA_ROUTING_SUPPORT;_CARTO_ROUTING_SUPPORT;_CARTO_OFFLINE_SUPPORT;_CARTO_CUSTOM_BASEMAP_SUPPORT;_CARTO_PACKAGEMANAGER_SUPPORT;_CARTO_EDITABLE_SUPPORT;_CARTO_WKBT_SUPPORT" + }, + "nmlmodellodtree": { "defines": "_CARTO_GEOCODING_SUPPORT;_CARTO_ROUTING_SUPPORT;_CARTO_OFFLINE_SUPPORT;_CARTO_CUSTOM_BASEMAP_SUPPORT;_CARTO_PACKAGEMANAGER_SUPPORT;_CARTO_EDITABLE_SUPPORT;_CARTO_WKBT_SUPPORT;_CARTO_NMLMODELLODTREE_SUPPORT" },
llvm 14: handle deprecated LLVMBuildCall As of llvm 14, LLVMBuildCall is deprecated in favor of LLVMBuildCall2
@@ -1216,7 +1216,12 @@ Workgroup::createAllocaMemcpyForStruct(LLVMModuleRef M, LLVMBuilderRef Builder, args[1] = CARG1; args[2] = Size; - LLVMValueRef call4 = LLVMBuildCall(Builder, MemCpy4, args, 3, ""); +#ifdef LLVM_OLDER_THAN_14_0 + LLVMValueRef Call4 = LLVMBuildCall(Builder, MemCpy4, args, 3, ""); +#else + LLVMTypeRef FnTy = LLVMGetCalledFunctionType(MemCpy4); + LLVMValueRef Call4 = LLVMBuildCall2(Builder, FnTy, MemCpy4, args, 3, ""); +#endif } else { LLVMTypeRef i8PtrAS0 = LLVMPointerType(Int8Type, 0); LLVMTypeRef i8PtrAS1 = LLVMPointerType(Int8Type, DeviceArgsASid); @@ -1230,7 +1235,12 @@ Workgroup::createAllocaMemcpyForStruct(LLVMModuleRef M, LLVMBuilderRef Builder, args[1] = CARG1; args[2] = Size; - LLVMValueRef call1 = LLVMBuildCall(Builder, MemCpy1, args, 3, ""); +#ifdef LLVM_OLDER_THAN_14_0 + LLVMValueRef Call1 = LLVMBuildCall(Builder, MemCpy1, args, 3, ""); +#else + LLVMTypeRef FnTy = LLVMGetCalledFunctionType(MemCpy1); + LLVMValueRef Call1 = LLVMBuildCall2(Builder, FnTy, MemCpy1, args, 3, ""); +#endif } return LocalArgAlloca; @@ -1434,7 +1444,12 @@ Workgroup::createArgBufferWorkgroupLauncher(Function *Func, assert (i == ArgCount); +#ifdef LLVM_OLDER_THAN_14_0 LLVMValueRef Call = LLVMBuildCall(Builder, F, Args, ArgCount, ""); +#else + LLVMTypeRef FnTy = LLVMGetCalledFunctionType(F); + LLVMValueRef Call = LLVMBuildCall2(Builder, FnTy, F, Args, ArgCount, ""); +#endif LLVMBuildRetVoid(Builder); llvm::CallInst *CallI = llvm::dyn_cast<llvm::CallInst>(llvm::unwrap(Call)); @@ -1520,7 +1535,12 @@ Workgroup::createGridLauncher(Function *KernFunc, Function *WGFunc, LLVMBuildPointerCast(Builder, PoclCtx, ArgTypes[2], "ctx"), LLVMBuildPointerCast(Builder, AuxParam, ArgTypes[1], "aux")}; +#ifdef LLVM_OLDER_THAN_14_0 LLVMValueRef Call = LLVMBuildCall(Builder, RunnerFunc, Args, 4, ""); +#else + LLVMTypeRef FnTy = LLVMGetCalledFunctionType(RunnerFunc); + LLVMValueRef Call = LLVMBuildCall2(Builder, FnTy, RunnerFunc, Args, 4, ""); +#endif LLVMBuildRetVoid(Builder); InlineFunctionInfo IFI;
Fix build with gcc It fails because gcc infers that the auto argument is a pointer rather than a reference: error: request for member 'Type' in 'ctrDescription', which is of pointer type 'NCatboostOptions::TCtrDescription* const' (maybe you meant to use '->' ?) Note: mandatory check (NEED_CHECK) was skipped
@@ -315,7 +315,7 @@ bool NCatboostOptions::CtrsNeedTargetData(const NCatboostOptions::TCatFeaturePar bool ctrsNeedTargetData = false; catFeatureParams.ForEachCtrDescription( - [&] (const auto& ctrDescription) { + [&] (const NCatboostOptions::TCtrDescription& ctrDescription) { if (NeedTarget(ctrDescription.Type)) { ctrsNeedTargetData = true; }
filter: print help if config map checker fails
@@ -402,6 +402,10 @@ int flb_filter_init_all(struct flb_config *config) ret = flb_config_map_properties_check(ins->p->name, &ins->properties, ins->config_map); if (ret == -1) { + if (config->program_name) { + flb_helper("try the command: %s -F %s -h\n", + config->program_name, ins->p->name); + } flb_filter_instance_destroy(ins); return -1; }
Use single config option instead of multiple for enabling/configuring fft
@@ -22,9 +22,7 @@ class TinyRocketConfig extends Config( new chipyard.config.AbstractConfig) class FFTRocketConfig extends Config( - new fftgenerator.WithFFTNumPoints(8) ++ - new fftgenerator.WithFFTBaseAddr(0x2000) ++ - new fftgenerator.WithFFTGenerator ++ + new fftgenerator.WithFFTGenerator(baseAddr=0x2000, numPoints=8) ++ new freechips.rocketchip.subsystem.WithNBigCores(1) ++ new chipyard.config.AbstractConfig)
Image in the readme
@@ -15,6 +15,10 @@ A security oriented, feedback-driven, evolutionary, easy-to-use fuzzer with inte * [Can fuzz remote/standalone long-lasting processes](https://github.com/google/honggfuzz/blob/master/docs/AttachingToPid.md) (e.g. network servers like __Apache's httpd__ and __ISC's bind__), though the [persistent fuzzing mode](https://github.com/google/honggfuzz/blob/master/docs/PersistentFuzzing.md) is suggested instead: as it's faster and multiple instances of a service can be fuzzed at once in this mode * It comes with the __[examples](https://github.com/google/honggfuzz/tree/master/examples) directory__, consisting of real world fuzz setups for widely-used software (e.g. Apache and OpenSSL) +<p align="center"> + <img src="https://raw.githubusercontent.com/google/honggfuzz/master/screenshot-honggfuzz-1.png" width="75%" height="75%"> +</p> + **Code** * Latest stable version: [1.3](https://github.com/google/honggfuzz/releases), but using the __master__ branch is highly encouraged @@ -29,6 +33,7 @@ A security oriented, feedback-driven, evolutionary, easy-to-use fuzzer with inte * **Darwin/OS X** - Xcode 10.8+ * if **Clang/LLVM** is used to compile honggfuzz - link it with the BlocksRuntime Library (libblocksruntime-dev) + **Trophies** Honggfuzz has been used to find a few interesting security problems in major software packages; An incomplete list:
Add RAC spec note about SquashFS
@@ -34,8 +34,8 @@ Non-goals for version 1 include: There is the capability (see reserved `TTag`s, below) but no promise to address these in a future RAC version. There might not be a need to, as other designs -such as EROFS ([Extendable Read-Only File -System](https://lkml.org/lkml/2018/5/31/306)) already exist. +such as [SquashFS](http://squashfs.sourceforge.net/) and EROFS ([Extendable +Read-Only File System](https://lkml.org/lkml/2018/5/31/306)) already exist. Non-goals in general include:
Fix exlv sorting (regression from previous subclass changes)
@@ -164,7 +164,7 @@ LRESULT CALLBACK PhpExtendedListViewWndProc( { HWND headerHandle; - headerHandle = (HWND)DefSubclassProc(hwnd, LVM_GETHEADER, 0, 0); + headerHandle = (HWND)SendMessage(hwnd, LVM_GETHEADER, 0, 0); if (header->hwndFrom == headerHandle) { @@ -352,7 +352,7 @@ LRESULT CALLBACK PhpExtendedListViewWndProc( { if (i != column) { - if (DefSubclassProc(hwnd, LVM_GETCOLUMN, i, (LPARAM)&lvColumn)) + if (SendMessage(hwnd, LVM_GETCOLUMN, i, (LPARAM)&lvColumn)) { availableWidth -= lvColumn.cx; } @@ -366,10 +366,10 @@ LRESULT CALLBACK PhpExtendedListViewWndProc( } if (availableWidth >= 40) - return DefSubclassProc(hwnd, LVM_SETCOLUMNWIDTH, column, availableWidth); + return SendMessage(hwnd, LVM_SETCOLUMNWIDTH, column, availableWidth); } - return DefSubclassProc(hwnd, LVM_SETCOLUMNWIDTH, column, width); + return SendMessage(hwnd, LVM_SETCOLUMNWIDTH, column, width); } break; case ELVM_SETCOMPAREFUNCTION: @@ -549,13 +549,9 @@ static INT PhpExtendedListViewCompareFunc( yItem.iItem = y; yItem.iSubItem = 0; - // Don't use SendMessage/ListView_* because it will call our new window procedure, which will - // use GetProp. This calls NtUserGetProp, and obviously having a system call in a comparison - // function is very, very bad for performance. - - if (!DefWindowProc(context->Handle, LVM_GETITEM, 0, (LPARAM)&xItem)) + if (!SendMessage(context->Handle, LVM_GETITEM, 0, (LPARAM)&xItem)) return 0; - if (!DefWindowProc(context->Handle, LVM_GETITEM, 0, (LPARAM)&yItem)) + if (!SendMessage(context->Handle, LVM_GETITEM, 0, (LPARAM)&yItem)) return 0; // First, do tri-state sorting. @@ -717,7 +713,7 @@ static INT PhpDefaultCompareListViewItems( item.cchTextMax = 260; xText[0] = 0; - DefWindowProc(Context->Handle, LVM_GETITEM, 0, (LPARAM)&item); + SendMessage(Context->Handle, LVM_GETITEM, 0, (LPARAM)&item); // Get the Y item text. @@ -726,7 +722,7 @@ static INT PhpDefaultCompareListViewItems( item.cchTextMax = 260; yText[0] = 0; - DefWindowProc(Context->Handle, LVM_GETITEM, 0, (LPARAM)&item); + SendMessage(Context->Handle, LVM_GETITEM, 0, (LPARAM)&item); // Compare them.
Fix compile on macos 10.13
#import <AVFoundation/AVFoundation.h> #include "os_glfw.h" +#include "util.h" static struct { uint64_t frequency; @@ -65,6 +66,7 @@ void os_request_permission(os_permission permission) { return; } +#if TARGET_OS_IOS || (defined(MAC_OS_X_VERSION_10_14) && __MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_14) switch ([AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeAudio]) { case AVAuthorizationStatusAuthorized: if (state.onPermissionEvent) state.onPermissionEvent(permission, true); @@ -86,6 +88,9 @@ void os_request_permission(os_permission permission) { if (state.onPermissionEvent) state.onPermissionEvent(permission, false); break; } +#else + lovrAssert(false, "Unreachable code"); +#endif } }
docker: website frontend disable ASAN
@@ -28,7 +28,7 @@ WORKDIR /app/kdb ADD . /app/kdb/ RUN mkdir build \ && cd build \ - && cmake -DENABLE_ASAN=ON -DBUILD_FULL=OFF -DBUILD_SHARED=ON \ + && cmake -DBUILD_FULL=OFF -DBUILD_SHARED=ON \ -DBUILD_STATIC=OFF -DBUILD_DOCUMENTATION=OFF \ -DPLUGINS="ALL;-EXPERIMENTAL;-fstab;-ruby;-lua;-python;-xerces;-yamlcpp;file;yajl" \ -DTOOLS="kdb;website-frontend" \
no need to set default return value again
@@ -257,7 +257,6 @@ int cmd_exec( struct reply_t *r, int argc, char **argv ) { value = value->next; } r_printf( r ,"%d announcements started.\n", count ); - rc = 0; goto end; } else if( argc == 2 ) { minutes = 0; @@ -316,38 +315,28 @@ int cmd_exec( struct reply_t *r, int argc, char **argv ) { goto end; } else if( strcmp( argv[1], "blacklist" ) == 0 ) { kad_debug_blacklist( STDOUT_FILENO ); - rc = 0; } else if( strcmp( argv[1], "buckets" ) == 0 ) { kad_debug_buckets( STDOUT_FILENO ); - rc = 0; } else if( strcmp( argv[1], "constants") == 0 ) { kad_debug_constants( STDOUT_FILENO ); - rc = 0; #ifdef FWD } else if( strcmp( argv[1], "forwardings") == 0 ) { fwd_debug( STDOUT_FILENO ); - rc = 0; #endif #ifdef AUTH } else if( strcmp( argv[1], "pkeys") == 0 ) { auth_debug_pkeys( STDOUT_FILENO ); - rc = 0; } else if( strcmp( argv[1], "skeys") == 0 ) { auth_debug_skeys( STDOUT_FILENO ); - rc = 0; #endif } else if( strcmp( argv[1], "results") == 0 ) { searches_debug( STDOUT_FILENO ); - rc = 0; } else if( strcmp( argv[1], "searches") == 0 ) { kad_debug_searches( STDOUT_FILENO ); - rc = 0; } else if( strcmp( argv[1], "storage") == 0 ) { kad_debug_storage( STDOUT_FILENO ); - rc = 0; } else if( strcmp( argv[1], "values" ) == 0 ) { announces_debug( STDOUT_FILENO ); - rc = 0; } else { dprintf( STDERR_FILENO, "Unknown argument.\n" ); rc = 1;
notify: address mark review
$: =provider-state =client-state == -+$ base-state-1 ++$ base-state-2 $: notifications=(map uid notification) base-state-0 == [%1 base-state-0] :: +$ state-2 - [%2 base-state-1] + [%2 base-state-2] :: +$ versioned-state $% state-0 :: ++ on-init :_ this - [(~(watch-our pass:io /hark) %hark-store /notes)]~ + :~ (~(watch-our pass:io /hark/notes) %hark-store /notes) + (~(watch-our pass:io /hark/updates) %hark-store /updates) + == :: ++ on-save !>(state) ++ on-load =/ upd=wire /hark/updates =/ not=wire /hark/notes =/ =dock [our.bowl %hark-store] - =? cards !(~(has by wex.bowl) [upd dock]) :: rewatch notes + =? cards !(~(has by wex.bowl) [upd dock]) :: rewatch updates :_(cards [%pass upd %agent dock %watch /updates]) - =? cards !(~(has by wex.bowl) [not dock]) :: rewatch updates + =? cards !(~(has by wex.bowl) [not dock]) :: rewatch notes :_(cards [%pass not %agent dock %watch /notes]) =. notifications.old ~ [(flop cards) this(state old)] -.old %2 +.old [~ +.old] == -:: %1 [(flop cards) this] - :: -:: %0 -:: %_ $ -:: -.old %1 - :: -:: cards -:: %+ welp cards -:: :~ (~(leave-our pass:io /hark) %hark-store) -:: (~(watch-our pass:io /hark) %hark-store /notes) -:: == -:: == == :: ++ on-poke [%send-notification *] ?> ?=(%iris -.sign-arvo) ?> ?=(%http-response +<.sign-arvo) - ?> ?=(%finished -.client-response.sign-arvo) - `this + =* res client-response.sign-arvo + ?> ?=(%finished -.res) + %. `this + =* status status-code.response-header.res + ?: =(200 status) same + %+ slog + leaf/"Error sending notfication, status: {(scow %ud status)}" + ?~ full-file.res ~ + ~[leaf/(trip `@t`q.data.u.full-file.res)] == :: ++ on-fail on-fail:def
reverting logging level to all
OS=${1} GITHUB_WORKSPACE=${2} -export BOOST_TEST_LOG_LEVEL=error +export BOOST_TEST_LOG_LEVEL=all if [[ ${OS} == "windows" ]]; then echo "----------------------------------------"
Remove RustThemis wrapper changelog * Remove the CHANGELOG.md since we already have one, common for all libraries and wrappers * Fix link to point on common changelog
@@ -36,7 +36,7 @@ to get a feeling of how Themis can be used. [Wiki]: https://github.com/cossacklabs/themis/wiki [Docs.rs]: https://docs.rs/themis [Documentation Server]: https://docs.cossacklabs.com/products/themis/ -[CHANGELOG]: /src/wrappers/themis/rust/CHANGELOG.md +[CHANGELOG]: /CHANGELOG.md [Examples]: /docs/examples/rust [Tests]: /tests/rust
hv: vtd: fix a logic error when set iommu page walk coherent Fix a logic error when set iommu page walk coherent. Acked-by: Eddie Dong
@@ -495,7 +495,7 @@ static int32_t dmar_register_hrhd(struct dmar_drhd_rt *dmar_unit) pr_fatal("%s: dmar unit doesn't support Extended Interrupt Mode!", __func__); ret = -ENODEV; } else { - if ((iommu_ecap_c(dmar_unit->ecap) == 0U) && (dmar_unit->drhd->ignore != 0U)) { + if ((iommu_ecap_c(dmar_unit->ecap) == 0U) && (!dmar_unit->drhd->ignore)) { iommu_page_walk_coherent = false; }
Add SSL error code updates from
@@ -902,7 +902,7 @@ find themselves unable to migrate their session cache functionality without accessing fields of `mbedtls_ssl_session` should describe their use case on the Mbed TLS mailing list. -### Removal of some SSL error codes +### Changes in the SSL error code space This affects users manually checking for the following error codes: @@ -929,9 +929,28 @@ Migration paths: compare the size of their own certificate against the configured size of the output buffer to understand if the error is due to an overly large certificate. -- `MBEDTLS_ERR_SSL_NO_CIPHER_CHOSEN` and `MBEDTLS_ERR_SSL_NO_USABLE_CIPHERSUITE` have been replaced by `MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE` +- `MBEDTLS_ERR_SSL_NO_CIPHER_CHOSEN` and `MBEDTLS_ERR_SSL_NO_USABLE_CIPHERSUITE` have been + replaced by `MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE`. -- all codes of the form `MBEDTLS_ERR_SSL_BAD_HS_XXX` have been replaced by various alternatives. +- All codes of the form `MBEDTLS_ERR_SSL_BAD_HS_XXX` have been replaced by various alternatives. + + Users should check for the newly introduced generic error codes + + * `MBEDTLS_ERR_SSL_DECODE_ERROR` + * `MBEDTLS_ERR_SSL_ILLEGAL_PARAMETER`, + * `MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE` + * `MBEDTLS_ERR_SSL_BAD_PROTOCOL_VERSION` + * `MBEDTLS_ERR_SSL_BAD_CERTIFICATE` + * `MBEDTLS_ERR_SSL_UNRECOGNIZED_NAME` + * `MBEDTLS_ERR_SSL_UNSUPPORTED_EXTENSION` + * `MBEDTLS_ERR_SSL_NO_APPLICATION_PROTOCOL` + + and the pre-existing generic error codes + + * `MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE` + * `MBEDTLS_ERR_SSL_INTERNAL_ERROR` + + instead. ### Modified semantics of `mbedtls_ssl_{get,set}_session()`
[fabric][tests]remvoe test_005Transaction_0016Free_WalletConfig_WithoutInit
@@ -366,14 +366,6 @@ START_TEST(test_005Transaction_0015DeInit_Txptr_NULL) } END_TEST -START_TEST(test_005Transaction_0016Free_WalletConfig_WithoutInit) -{ - BoatHlfabricNetworkConfig network_config; - fabricWalletConfigFree(network_config); -} -END_TEST - - Suite *make_fabricTransactionTest_suite(void) { /* Create Suite */ @@ -401,7 +393,6 @@ Suite *make_fabricTransactionTest_suite(void) tcase_add_test(tc_transaction_api, test_005Transaction_0013TxQuery_Failure_arg2_NULL); tcase_add_test(tc_transaction_api, test_005Transaction_0014TxQuery_Failure_args_ADD1); tcase_add_test(tc_transaction_api, test_005Transaction_0015DeInit_Txptr_NULL); - tcase_add_test(tc_transaction_api, test_005Transaction_0016Free_WalletConfig_WithoutInit); return s_transaction; } \ No newline at end of file
sysdeps/linux: implement {set,get}priority
#define NR_getegid 108 #define NR_rt_sigsuspend 130 #define NR_sigaltstack 131 +#define NR_getpriority 140 +#define NR_setpriority 141 #define NR_arch_prctl 158 #define NR_setrlimit 160 #define NR_sys_futex 202 @@ -479,6 +481,22 @@ int sys_listen(int fd, int backlog) { return 0; } +int sys_getpriority(int which, id_t who, int *value) { + auto ret = do_syscall(NR_getpriority, which, who); + if (int e = sc_error(ret); e) { + return e; + } + *value = 20 - sc_int_result<int>(ret); + return 0; +} + +int sys_setpriority(int which, id_t who, int prio) { + auto ret = do_syscall(NR_setpriority, which, who, prio); + if (int e = sc_error(ret); e) + return e; + return 0; +} + #endif // __MLIBC_POSIX_OPTION pid_t sys_getpid() {
Update plannodes.h's comments about PlanRowMark. The reference here to different physical column numbers in inherited UPDATE/DELETE plans is obsolete as of remove it. Also rework the text about inheritance cases to make it clearer.
@@ -1086,9 +1086,9 @@ typedef enum RowMarkType * When the planner discovers that a relation is the root of an inheritance * tree, it sets isParent true, and adds an additional PlanRowMark to the * list for each child relation (including the target rel itself in its role - * as a child). isParent is also set to true for the partitioned child - * relations, which are not scanned just like the root parent. The child - * entries have rti == child rel's RT index and prti == parent's RT index, + * as a child, if it is not a partitioned table). Any non-leaf partitioned + * child relations will also have entries with isParent = true. The child + * entries have rti == child rel's RT index and prti == top parent's RT index, * and can therefore be recognized as children by the fact that prti != rti. * The parent's allMarkTypes field gets the OR of (1<<markType) across all * its children (this definition allows children to use different markTypes). @@ -1109,8 +1109,7 @@ typedef enum RowMarkType * means we needn't renumber rowmarkIds when flattening subqueries, which * would require finding and renaming the resjunk columns as well.) * Note this means that all tables in an inheritance hierarchy share the - * same resjunk column names. However, in an inherited UPDATE/DELETE the - * columns could have different physical column numbers in each subplan. + * same resjunk column names. */ typedef struct PlanRowMark {
Add workaround for linux virtual console colors init error
@@ -1585,19 +1585,27 @@ int main(int argc, char** argv) { // hasn't typed anything. That way we can mix other timers in our code, // instead of being a slave only to terminal input. // nodelay(stdscr, TRUE); + + if (has_colors()) { // Enable color start_color(); use_default_colors(); - for (int ifg = 0; ifg < Colors_count; ++ifg) { for (int ibg = 0; ibg < Colors_count; ++ibg) { int res = init_pair((short int)(1 + ifg * Colors_count + ibg), (short int)(ifg - 1), (short int)(ibg - 1)); + (void)res; + // Might fail on Linux virtual console/terminal for a couple of colors. + // Just ignore. +#if 0 if (res == ERR) { endwin(); - fprintf(stderr, "Error initializing color\n"); + fprintf(stderr, "Error initializing color pair: %d %d\n", ifg - 1, + ibg - 1); exit(1); } +#endif + } } }
ph: include missing library function
/- *aquarium, spider -/+ libstrand=strand, *strandio, util=ph-util +/+ libstrand=strand, *strandio, util=ph-util, aqua-azimuth =, strand=strand:libstrand |% ++ send-events (pure:m ~) loop :: +++ init-moon ::NOTE real moon always have the same keys + |= [moon=ship fake=?] + ?> ?=(%earl (clan:title moon)) + ?: fake (init-ship moon &) + =/ m (strand ,~) + ^- form:m + ;< ~ bind:m + %+ dojo (^sein:title moon) + =/ =pass pub:ex:(get-keys:aqua-azimuth moon 1) + "|moon {(scow %p moon)}, =public-key {(scow %uw pass)}" + (init-ship moon |) +:: ++ init-ship |= [=ship fake=?] =/ m (strand ,~)
mdns: Fix alloc issue if TXT has empty value
@@ -778,8 +778,8 @@ static uint16_t _mdns_append_txt_record(uint8_t * packet, uint16_t * index, mdns char * tmp; mdns_txt_linked_item_t * txt = service->txt; while (txt) { - uint8_t txt_data_len = strlen(txt->key) + txt->value_len + 1; - tmp = (char *)malloc(txt_data_len); + uint8_t txt_data_len = strlen(txt->key) + txt->value_len + 1 /* + '=' char */; + tmp = (char *)malloc(txt_data_len + 1 /* + '\0' term-char in sprintf() */); if (tmp) { int offset = sprintf(tmp, "%s=", txt->key); memcpy(tmp + offset, txt->value, txt->value_len);
BugID:17624007:[example]fix log printf error in http2_example_stream.c
@@ -302,7 +302,7 @@ static void on_header(uint32_t stream_id, char *channel_id,int cat,const uint8_t static void on_chunk_recv(uint32_t stream_id, char *channel_id,const uint8_t *data, size_t len,uint8_t flags) { - EXAMPLE_TRACE("~~~~~stream_id = %d, channel_id=%s, data = %s ,len = %d flag = %d\n", stream_id,channel_id,data,len,flags); + EXAMPLE_TRACE("~~~~~stream_id = %d, channel_id=%s, data = %.*s, len = %d flag = %d\n", stream_id, channel_id, len, data, len, flags); } static void on_stream_close(uint32_t stream_id, char *channel_id,uint32_t error_code) {
use whole route when running safety replay from CLI
@@ -4,7 +4,6 @@ import os import sys from panda.tests.safety import libpandasafety_py from panda.tests.safety_replay.helpers import package_can_msg, init_segment -from tools.lib.logreader import LogReader # pylint: disable=import-error # replay a drive to check for safety violations def replay_drive(lr, safety_mode, param): @@ -65,9 +64,13 @@ def replay_drive(lr, safety_mode, param): return tx_controls_blocked == 0 and rx_invalid == 0 if __name__ == "__main__": + from tools.lib.route import Route + from tools.lib.logreader import MultiLogIterator # pylint: disable=import-error + mode = int(sys.argv[2]) param = 0 if len(sys.argv) < 4 else int(sys.argv[3]) - lr = LogReader(sys.argv[1]) + r = Route(sys.argv[1]) + lr = MultiLogIterator(r.log_paths(), wraparound=False) print("replaying drive %s with safety mode %d and param %d" % (sys.argv[1], mode, param))
Do not warn when receiving consistent DIO
@@ -1613,7 +1613,7 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio) } } else { if(p->rank == dio->rank) { - LOG_WARN("Received consistent DIO\n"); + LOG_INFO("Received consistent DIO\n"); if(dag->joined) { instance->dio_counter++; }
Ensure at least one command if no dependencies C++Builder's `make.exe` complains if a target has no dependencies (e.g. after variable expansion) and no lines of commands. Ensure there is a blank command line if the dependency list is entirely made of variables.
@@ -388,11 +388,15 @@ PROCESSOR= {- $config{processor} -} build_docs: build_html_docs build_html_docs: $(HTMLDOCS1) $(HTMLDOCS3) $(HTMLDOCS5) $(HTMLDOCS7) - + @ build_generated: $(GENERATED_MANDATORY) + @ build_libs_nodep: $(LIBS) {- join(" ",map { platform->sharedlib_import($_) // () } @{$unified_info{libraries}}) -} + @ build_modules_nodep: $(MODULES) + @ build_programs_nodep: $(PROGRAMS) $(SCRIPTS) + @ # Kept around for backward compatibility build_apps build_tests: build_programs
[misc] for pretty printing, set indent tab at a json marshaler
@@ -44,6 +44,7 @@ func (c *ConnClient) Close() { func JSON(pb protobuf.Message) string { var w bytes.Buffer var marshaler jsonpb.Marshaler + marshaler.Indent = "\t" err := marshaler.Marshal(&w, pb) if err != nil { return "[marshal fail]"
sdcard_image-rpi : minor bug in use of FATPAYLOAD Double quotation marks were added around FATPAYLOAD to prevent parsing error when FATPAYLOAD contains list of file names
@@ -143,7 +143,7 @@ IMAGE_CMD_rpi-sdimg () { fi fi - if [ -n ${FATPAYLOAD} ] ; then + if [ -n "${FATPAYLOAD}" ] ; then echo "Copying payload into VFAT" for entry in ${FATPAYLOAD} ; do # add the || true to stop aborting on vfat issues like not supporting .~lock files
Fixed compiler warning in CoAP logging
@@ -541,7 +541,7 @@ get_psk_info(struct dtls_context_t *ctx, ks.identity_hint = id; ks.identity_hint_len = id_len; LOG_DBG("got psk_identity_hint: '"); - LOG_DBG_COAP_STRING(id, id_len); + LOG_DBG_COAP_STRING((const char *)id, id_len); LOG_DBG_("'\n"); }
Emitter: Depth will always be 3 for closing over class self.
@@ -948,13 +948,13 @@ find_closed_sym_spot_raw(emit, depth, (sym)->reg_spot) This initializes the current function_block's self field. */ static void close_over_class_self(lily_emit_state *emit, lily_ast *ast) { - uint16_t depth = emit->function_depth; + /* The resulting depth for the backing closure is always the same: + __main__ is 1, class is 2, backing define is 3. */ + uint16_t depth = 3; lily_block *block = emit->function_block->prev_function_block; - while (block->block_type != block_class) { - block = block->prev_function_block; - depth--; - } + while (block->block_type != block_class) + block = block->prev; block = block->next;
move dependency require into task code to avoid build issues
@@ -49,7 +49,6 @@ require 'securerandom' require 'uri' require 'logger' require 'rake' -require 'deep_merge' # It does not work on Mac OS X. rake -T prints nothing. So I comment this hack out. # NB: server build scripts depend on proper rake -T functioning. @@ -1891,6 +1890,8 @@ namespace "config" do task :load do + require 'deep_merge' + print_timestamp('First timestamp') buildyml = 'rhobuild.yml'
Changed rand() to <random> in HalfTest/testError.cpp
#include <iostream> #include <stdlib.h> #include <assert.h> - +#include <random> using namespace std; @@ -21,7 +21,10 @@ namespace { float drand() { - return static_cast<float> (rand()/(RAND_MAX+1.0f)); + static std::default_random_engine generator; + static std::uniform_real_distribution<float> distribution (0.0f, 1.0f); + float r = distribution (generator); + return r; } } // namespace
Make sure all packets in window are lost
@@ -458,12 +458,14 @@ static uint64_t compute_pkt_loss_delay(const ngtcp2_rcvry_stat *rcs) { int ngtcp2_rtb_detect_lost_pkt(ngtcp2_rtb *rtb, ngtcp2_frame_chain **pfrc, ngtcp2_rcvry_stat *rcs, ngtcp2_duration pto, ngtcp2_tstamp ts) { - ngtcp2_rtb_entry *ent, *oldest_ent; + ngtcp2_rtb_entry *ent; uint64_t loss_delay; ngtcp2_tstamp lost_send_time; - ngtcp2_ksl_it it, last_it; + ngtcp2_ksl_it it; int64_t lost_pkt_num; int rv; + ngtcp2_tstamp latest_ts, oldest_ts; + int64_t last_lost_pkt_num; rtb->loss_time = 0; loss_delay = compute_pkt_loss_delay(rcs); @@ -479,12 +481,8 @@ int ngtcp2_rtb_detect_lost_pkt(ngtcp2_rtb *rtb, ngtcp2_frame_chain **pfrc, /* All entries from ent are considered to be lost. */ ngtcp2_default_cc_congestion_event(rtb->cc, ent->ts, ts); - last_it = ngtcp2_ksl_end(&rtb->ents); - ngtcp2_ksl_it_prev(&last_it); - oldest_ent = ngtcp2_ksl_it_get(&last_it); - - ngtcp2_default_cc_handle_persistent_congestion( - rtb->cc, ent->ts - oldest_ent->ts, pto); + latest_ts = oldest_ts = ent->ts; + last_lost_pkt_num = ent->hd.pkt_num; for (; !ngtcp2_ksl_it_end(&it);) { ent = ngtcp2_ksl_it_get(&it); @@ -493,10 +491,23 @@ int ngtcp2_rtb_detect_lost_pkt(ngtcp2_rtb *rtb, ngtcp2_frame_chain **pfrc, if (rv != 0) { return rv; } + + if (last_lost_pkt_num == ent->hd.pkt_num + 1) { + last_lost_pkt_num = ent->hd.pkt_num; + } else { + last_lost_pkt_num = -1; + } + + oldest_ts = ent->ts; rtb_on_remove(rtb, ent); rtb_on_pkt_lost(rtb, pfrc, ent); } + if (last_lost_pkt_num != -1) { + ngtcp2_default_cc_handle_persistent_congestion( + rtb->cc, latest_ts - oldest_ts, pto); + } + return 0; } }
rotation perm fix
@@ -95,7 +95,7 @@ SDR SDR_Copy(SDR *original) SDR SDR_PermuteByRotation(SDR *sdr, bool forward) { SDR c = SDR_Copy(sdr); - int shiftToLeftmost = (sizeof(SDR_BLOCK_TYPE)-1); + int shiftToLeftmost = SDR_BLOCK_SIZE-1; if(forward) { for(int i=0; i<SDR_NUM_BLOCKS; i++)
graph-store: turn back on noisy duplicates
|^ =/ [=graph:store mark=(unit mark:store)] (~(got by graphs) resource) - :: TODO: turn back on assertion once issue with 8-10x facts being - :: issued is resolved. Too noisy for now - :: - :: ~| "cannot add duplicate nodes to {<resource>}" - :: ?< (check-for-duplicates graph ~(key by nodes)) - ?: (check-for-duplicates graph ~(key by nodes)) - [~ state] + ~| "cannot add duplicate nodes to {<resource>}" + ?< (check-for-duplicates graph ~(key by nodes)) =/ =update-log:store (~(got by update-logs) resource) =. update-log (put:orm-log update-log time [%0 time [%add-nodes resource nodes]])
[shell] add re-initial check.
@@ -726,6 +726,12 @@ int finsh_system_init(void) rt_err_t result = RT_EOK; rt_thread_t tid; + if(shell) + { + rt_kprintf("finsh shell already init.\n"); + return RT_EOK; + } + #ifdef FINSH_USING_SYMTAB #ifdef __CC_ARM /* ARM C Compiler */ extern const int FSymTab$$Base;
Refactor mkapiref.py to use filename as header file
import re, sys, argparse, os.path class FunctionDoc: - def __init__(self, name, content, domain): + def __init__(self, name, content, domain, filename): self.name = name self.content = content self.domain = domain if self.domain == 'function': self.funcname = re.search(r'(ngtcp2_[^ )]+)\(', self.name).group(1) + self.filename = filename def write(self, out): out.write('.. {}:: {}\n'.format(self.domain, self.name)) @@ -117,12 +118,11 @@ class TypedefDoc: for line in self.content: out.write(' {}\n'.format(line)) -def make_api_ref(infiles): +def make_api_ref(infile): macros = [] enums = [] types = [] functions = [] - for infile in infiles: while True: line = infile.readline() if not line: @@ -146,11 +146,6 @@ def make_api_ref(infiles): types.append(process_typedef(infile)) return macros, enums, types, functions - alldocs = [('Macros', macros), - ('Enums', enums), - ('Types (structs, unions and typedefs)', types), - ('Functions', functions)] - def output( indexfile, macrosfile, enumsfile, typesfile, funcsdir, macros, enums, types, functions): @@ -199,9 +194,10 @@ Types (structs, unions and typedefs) Synopsis -------- -*#include <ngtcp2/ngtcp2.h>* +*#include <ngtcp2/{filename}>* -'''.format(funcname=doc.funcname, secul='='*len(doc.funcname))) +'''.format(funcname=doc.funcname, secul='='*len(doc.funcname), + filename=doc.filename)) doc.write(f) def process_macro(infile): @@ -284,7 +280,8 @@ def process_function(domain, infile): func_proto = re.sub(r'\s+', ' ', func_proto) func_proto = re.sub(r'NGTCP2_EXTERN ', '', func_proto) func_proto = re.sub(r'typedef ', '', func_proto) - return FunctionDoc(func_proto, content, domain) + filename = os.path.basename(infile.name) + return FunctionDoc(func_proto, content, domain, filename) def read_content(infile): content = [] @@ -327,7 +324,7 @@ if __name__ == '__main__': types = [] funcs = [] for infile in args.files: - m, e, t, f = make_api_ref(args.files) + m, e, t, f = make_api_ref(infile) macros.extend(m) enums.extend(e) types.extend(t)
upstream: adjust upstream connection
/* Upstream TCP connection */ struct flb_upstream_conn { struct mk_event event; - struct flb_thread *thread; + struct flb_coro *coro; /* Socker */ flb_sockfd_t fd; @@ -64,6 +64,9 @@ struct flb_upstream_conn { time_t ts_connect_start; time_t ts_connect_timeout; + /* Event loop */ + struct mk_event_loop *evl; + /* Upstream parent */ struct flb_upstream *u;
fix: append to bot.log and dump.json instead of overwriting on each run
#include "json-actor.h" -static bool g_first_run = true; // used to delete existent dump files - static int get_log_level(char level[]) { @@ -95,9 +93,6 @@ logconf_setup(struct logconf *config, const char config_file[]) /* SET LOGGER CONFIGS */ if (!IS_EMPTY_STRING(logging->filename)) { - if (true == g_first_run) - config->logger.f = fopen(logging->filename, "w+"); - else config->logger.f = fopen(logging->filename, "a+"); log_add_fp(config->logger.f, get_log_level(logging->level)); ASSERT_S(NULL != config->logger.f, "Could not create logger file"); @@ -112,18 +107,11 @@ logconf_setup(struct logconf *config, const char config_file[]) /* SET HTTP DUMP CONFIGS */ if (true == logging->http.enable) { if (!IS_EMPTY_STRING(logging->http.filename)) { - if (true == g_first_run) - config->http.f = fopen(logging->http.filename, "w+"); - else config->http.f = fopen(logging->http.filename, "a+"); ASSERT_S(NULL != config->http.f, "Could not create dump file"); } } - if (true == g_first_run) { - g_first_run = false; - } - free(logging); }
Add a coding style section for Exceptions
@@ -154,6 +154,8 @@ C++ code - If required by a platform (e.g, Microsoft COM), use the appropriate ref-counted type, but do not expose those types to platform agnostic code, prefer to use an abstraction. + - Exceptions + - All [user-declared destructors](https://en.cppreference.com/w/cpp/language/destructor) must be marked [noexcept](https://en.cppreference.com/w/cpp/language/noexcept_spec). Python code -----------
SOVERSION bump to version 4.1.12
@@ -38,7 +38,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 4) set(SYSREPO_MINOR_SOVERSION 1) -set(SYSREPO_MICRO_SOVERSION 11) +set(SYSREPO_MICRO_SOVERSION 12) set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION}) set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
tests: add libgpgme to valgrind suppressions
obj:*libgcrypt* ... } +{ + <insert_a_suppression_name_here> + Memcheck:Leak + match-leak-kinds: all + ... + obj:*libgpgme* + ... +} { <insert_a_suppression_name_here> Memcheck:Cond
Added missing "windowopen" value for Danfoss TRV
@@ -1789,6 +1789,7 @@ Note: It does not clear or delete previous weekly schedule programming configura <!-- Danfoss manufacturer specific --> <attribute-set id="0x4000" description="Danfoss specific" mfcode="0x1246"> <attribute id="0x4000" name="eTRV Open Window Detection" type="enum8" default="0x00" access="r" required="m" mfcode="0x1246"> + <value name="Quarantine" value="0x00"></value> <value name="Closed" value="0x01"></value> <value name="Hold" value="0x02"></value> <value name="Open" value="0x03"></value>
Validate parser parameter to XML_SetReturnNSTriplet
@@ -1308,6 +1308,8 @@ XML_UseForeignDTD(XML_Parser parser, XML_Bool useDTD) void XMLCALL XML_SetReturnNSTriplet(XML_Parser parser, int do_nst) { + if (parser == NULL) + return; /* block after XML_Parse()/XML_ParseBuffer() has been called */ if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) return;
mqtt: reenable outbox unit tests for esp32s2
@@ -37,7 +37,6 @@ TEST_CASE("mqtt init and deinit", "[mqtt][leaks=0]") esp_mqtt_client_destroy(client); } -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2) static const char* this_bin_addr(void) { spi_flash_mmap_handle_t out_handle; @@ -69,4 +68,3 @@ TEST_CASE("mqtt enqueue and destroy outbox", "[mqtt][leaks=0]") esp_mqtt_client_destroy(client); } -#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S2)
bin: use engine return status code
@@ -1065,9 +1065,9 @@ int main(int argc, char **argv) flb_output_prepare(); ret = flb_engine_start(config); - if (ret == -1) { + if (ret == -1 && config) { flb_engine_shutdown(config); } - return 0; + return ret; }
SOVERSION bump to version 2.25.0
@@ -65,8 +65,8 @@ set(LIBYANG_MICRO_VERSION 267) set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION}) # set version of the library set(LIBYANG_MAJOR_SOVERSION 2) -set(LIBYANG_MINOR_SOVERSION 24) -set(LIBYANG_MICRO_SOVERSION 26) +set(LIBYANG_MINOR_SOVERSION 25) +set(LIBYANG_MICRO_SOVERSION 0) set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION}) set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
Fix that it is --enable-rpath, for
20 April 2020: Wouter - - Fix #222: --with-rpath, fails to rpath python lib. + - Fix #222: --enable-rpath, fails to rpath python lib. 17 April 2020: George - Add SNI support on more TLS connections (fixes #193).
ensured initialization of success variable
@@ -746,7 +746,7 @@ perform_multi_resource_read_op(lwm2m_object_t *object, } /* ---------- Read operation ------------- */ } else if(ctx->operation == LWM2M_OP_READ) { - lwm2m_status_t success; + lwm2m_status_t success = 0; uint8_t lv; lv = ctx->level;
configure with opari
@@ -135,6 +135,7 @@ export CONFIG_ARCH=%{machine} -pdt=$PDTOOLKIT_DIR \ -useropt="%optflags -I$MPI_INCLUDE_DIR -I$PWD/include -fno-strict-aliasing" \ -openmp \ + -opari \ -extrashlibopts="-fPIC -L$MPI_LIB_DIR -lmpi -L/tmp/%{install_path}/lib -L/tmp/%{install_path}/%{machine}/lib" make install
Add parallel loop metadata on LLVM 12 onward and not before on load instructions inside conditions
@@ -468,23 +468,25 @@ ParallelRegion::Verify() * !1 distinct !{} * !2 distinct !{} * - * Parallel loop metadata prior to LLVM 13 on memory reads also implies that + * Parallel loop metadata prior to LLVM 12 on memory reads also implies that * if-conversion (i.e., speculative execution within a loop iteration) * is safe. Given an instruction reading from memory, * IsLoadUnconditionallySafe should return whether it is safe under * (unconditional, unpredicated) speculative execution. - * See https://bugs.llvm.org/show_bug.cgi?id=46666. + * See https://bugs.llvm.org/show_bug.cgi?id=46666 and + * https://github.com/pocl/pocl/issues/757. * - * From LLVM 13 onward parallel loop metadata does not imply if-conversion + * From LLVM 12 onward parallel loop metadata does not imply if-conversion * safety anymore. This got fixed by this change: - * https://reviews.llvm.org/D103907. In other words this means that before the - * fix, the loop vectorizer was not able to vectorize some kernels because they - * would required a huge runtime memory check code insertion. Leading to - * vectorizer to give up. With above fix, we can add metadata to every load. - * This will cause vectorizer to skip runtime memory check code insertion part - * because it indicates that iterations do not depend on each other. Which in - * turn makes vectorization easier. In this case using of - * IsLoadUnconditionallySafe parameter will be skipped. + * https://reviews.llvm.org/D103907 for LLVM 13 which also got backported to + * LLVM 12. In other words this means that before the fix, the loop vectorizer + * was not able to vectorize some kernels because they would required a huge + * runtime memory check code insertion. Leading to vectorizer to give up. With + * above fix, we can add metadata to every load. This will cause vectorizer to + * skip runtime memory check code insertion part because it indicates that + * iterations do not depend on each other. Which in turn makes vectorization + * easier. In this case using of IsLoadUnconditionallySafe parameter will be + * skipped. */ void ParallelRegion::AddParallelLoopMetadata( @@ -498,9 +500,9 @@ ParallelRegion::AddParallelLoopMetadata( continue; } -#ifdef LLVM_OLDER_THAN_13_0 +#ifdef LLVM_OLDER_THAN_12_0 // This check will skip insertion of metadata on loads inside conditions - // before LLVM 13. + // before LLVM 12. if (ii->mayReadFromMemory() && !IsLoadUnconditionallySafe(&*ii)) { continue; }
Update default paths for global configuration (environment variable, absolute and current).
@@ -43,17 +43,39 @@ int configuration_initialize(const char * reader, const char * path, void * allo { static const char configuration_path[] = CONFIGURATION_PATH; - #if defined(CONFIGURATION_INSTALL_PATH) - static const char configuration_default_path[] = CONFIGURATION_INSTALL_PATH; - #else + const char * env_path = environment_variable_get(configuration_path, NULL); + + if (env_path != NULL) + { + global = configuration_object_initialize(CONFIGURATION_GLOBAL_SCOPE, env_path, NULL); + + path = env_path; + } + + if (global == NULL) + { static const char configuration_default_path[] = CONFIGURATION_DEFAULT_PATH; - #endif /* CONFIGURATION_INSTALL_PATH */ - const char * env_path = environment_variable_get(configuration_path, configuration_default_path); + global = configuration_object_initialize(CONFIGURATION_GLOBAL_SCOPE, configuration_default_path, NULL); - global = configuration_object_initialize(CONFIGURATION_GLOBAL_SCOPE, env_path, NULL); + path = configuration_default_path; + } + + #if defined(CONFIGURATION_INSTALL_PATH) + if (global == NULL) + { + static const char configuration_install_path[] = CONFIGURATION_INSTALL_PATH; + + global = configuration_object_initialize(CONFIGURATION_GLOBAL_SCOPE, configuration_install_path, NULL); - log_write("metacall", LOG_LEVEL_INFO, "Global configuration loaded from %s", env_path); + path = configuration_install_path; + } + #endif /* CONFIGURATION_INSTALL_PATH */ + + if (global != NULL && path != NULL) + { + log_write("metacall", LOG_LEVEL_INFO, "Global configuration loaded from %s", path); + } } else {
Return error on CRC mismatch during recovery
@@ -90,20 +90,12 @@ static void ocf_metadata_check_crc_skip(ocf_pipeline_t pipeline, crc = ocf_metadata_raw_checksum(cache, segment->raw); superblock_crc = ocf_metadata_superblock_get_checksum(segment->superblock, segment_id); - if (crc != superblock_crc) { - /* Checksum does not match */ - if (!clean_shutdown) { - ocf_cache_log(cache, log_warn, - "Loading %s WARNING, invalid checksum\n", - ocf_metadata_segment_names[segment_id]); - } else { ocf_cache_log(cache, log_err, "Loading %s ERROR, invalid checksum\n", ocf_metadata_segment_names[segment_id]); OCF_PL_FINISH_RET(pipeline, -OCF_ERR_INVAL); } - } ocf_pipeline_next(pipeline); }
[ya] NO_GPL says no warnings if license check fails via
@@ -52,14 +52,14 @@ def validate_mf(mf, module_type): if bad_mfs: raise BadMfError("Can't validate licenses for {}: no 'licenses' info for dependency(es) {}".format(path,', '.join(bad_mfs))) - bad_contribs = [dep['path'] + '/ya.make' for dep in mf['dependencies'] if dep['path'].startswith('contrib/') and not dep['licenses']] - if bad_contribs: - logging.warn("[[warn]]Can't check NO_GPL properly[[rst]] because the following project(s) has no [[imp]]LICENSE[[rst]] macro:\n%s", '\n'.join(bad_contribs)) - bad_lics = ["[[imp]]{}[[rst]] licensed with {}".format(dep['path'], lic) for dep in mf['dependencies'] for lic in dep['licenses'] if 'gpl' in lic.lower()] if bad_lics: raise GplNotAllowed('[[bad]]License check failed:[[rst]]\n{}'.format('\n'.join(bad_lics))) + bad_contribs = [dep['path'] + '/ya.make' for dep in mf['dependencies'] if dep['path'].startswith('contrib/') and not dep['licenses']] + if bad_contribs: + logging.warn("[[warn]]Can't check NO_GPL properly[[rst]] because the following project(s) has no [[imp]]LICENSE[[rst]] macro:\n%s", '\n'.join(bad_contribs)) + def generate_mf(): lics, peers, options = parse_args()
Don't return NULL from mat4_invert;
@@ -397,7 +397,7 @@ MAF mat4 mat4_invert(mat4 m) { d = (b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06), invDet; - if (!d) { return NULL; } + if (!d) { return m; } invDet = 1 / d; m[0] = (a11 * b11 - a12 * b10 + a13 * b09) * invDet;
Make Font texture rgba16f; Sampling from rg11b10f does not appear to work on mobile.
@@ -388,7 +388,7 @@ static void lovrFontExpandTexture(Font* font) { // Could look into using glClearTexImage when supported to make this more efficient. static void lovrFontCreateTexture(Font* font) { lovrRelease(font->texture, lovrTextureDestroy); - Image* image = lovrImageCreate(font->atlas.width, font->atlas.height, NULL, 0x0, FORMAT_RG11B10F); + Image* image = lovrImageCreate(font->atlas.width, font->atlas.height, NULL, 0x0, FORMAT_RGBA16F); font->texture = lovrTextureCreate(TEXTURE_2D, &image, 1, false, false, 0); lovrTextureSetFilter(font->texture, (TextureFilter) { .mode = FILTER_BILINEAR }); lovrTextureSetWrap(font->texture, (TextureWrap) { .s = WRAP_CLAMP, .t = WRAP_CLAMP });
landscape: fixed remote content expand button
@@ -148,8 +148,9 @@ export default class RemoteContent extends PureComponent<RemoteContentProps, Rem <Fragment> {renderUrl ? this.wrapInLink(this.state.embed && this.state.embed.title ? this.state.embed.title : url) : null} {this.state.embed !== 'error' && this.state.embed?.html && !unfold ? <Button + display='inline-flex' border={1} - style={{ display: 'inline-flex', height: '1.66em' }} // Height is hacked to line-height until Button supports proper size + height={3} ml={1} onClick={this.unfoldEmbed} style={{ cursor: 'pointer' }}
GCM: record limit counter gets reset on AAD changes It shouldn't be. This moves the reset to the init function instead and only does the reset on a key change.
@@ -25,6 +25,10 @@ static int gcm_cipher_internal(PROV_GCM_CTX *ctx, unsigned char *out, size_t *padlen, const unsigned char *in, size_t len); +/* + * Called from EVP_CipherInit when there is currently no context via + * the new_ctx() function + */ void ossl_gcm_initctx(void *provctx, PROV_GCM_CTX *ctx, size_t keybits, const PROV_GCM_HW *hw) { @@ -38,6 +42,9 @@ void ossl_gcm_initctx(void *provctx, PROV_GCM_CTX *ctx, size_t keybits, ctx->libctx = PROV_LIBCTX_OF(provctx); } +/* + * Called by EVP_CipherInit via the _einit and _dinit functions + */ static int gcm_init(void *vctx, const unsigned char *key, size_t keylen, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[], int enc) @@ -66,6 +73,7 @@ static int gcm_init(void *vctx, const unsigned char *key, size_t keylen, } if (!ctx->hw->setkey(ctx, key, ctx->keylen)) return 0; + ctx->tls_enc_records = 0; } return ossl_gcm_set_ctx_params(ctx, params); } @@ -447,7 +455,6 @@ static int gcm_tls_init(PROV_GCM_CTX *dat, unsigned char *aad, size_t aad_len) buf = dat->buf; memcpy(buf, aad, aad_len); dat->tls_aad_len = aad_len; - dat->tls_enc_records = 0; len = buf[aad_len - 2] << 8 | buf[aad_len - 1]; /* Correct length for explicit iv. */
tools: Be more helpful to MSYS32 users with package installation
@@ -43,27 +43,6 @@ if __name__ == "__main__": default=os.path.join(idf_path, 'requirements.txt')) args = parser.parse_args() - # Special case for MINGW32 Python, needs some packages - # via MSYS2 not via pip or system breaks... - if sys.platform == "win32" and \ - os.environ.get("MSYSTEM", None) == "MINGW32" and \ - "/mingw32/bin/python" in sys.executable: - failed = False - try: - import cryptography # noqa: intentionally not used - imported for testing its availability - except ImportError: - print("Please run the following command to install MSYS2's MINGW Python cryptography package:") - print("pacman -Sy mingw-w64-i686-python%d-cryptography" % (sys.version_info[0],)) - failed = True - try: - import setuptools # noqa: intentionally not used - imported for testing its availability - except ImportError: - print("Please run the following command to install MSYS2's MINGW Python setuptools package:") - print("pacman -Sy mingw-w64-i686-python%d-setuptools" % (sys.version_info[0],)) - failed = True - if failed: - sys.exit(1) - not_satisfied = [] with open(args.requirements) as f: for line in f: @@ -77,8 +56,30 @@ if __name__ == "__main__": print('The following Python requirements are not satisfied:') for requirement in not_satisfied: print(requirement) + if sys.platform == "win32" and os.environ.get("MSYSTEM", None) == "MINGW32" and "/mingw32/bin/python" in sys.executable: + print("The recommended way to install a packages is via \"pacman\". Please run \"pacman -Ss <package_name>\" for" + " searching the package database and if found then " + "\"pacman -S mingw-w64-i686-python{}-<package_name>\" for installing it.".format(sys.version_info[0],)) + print("NOTE: You may need to run \"pacman -Syu\" if your package database is older and run twice if the " + "previous run updated \"pacman\" itself.") + print("Please read https://github.com/msys2/msys2/wiki/Using-packages for further information about using " + "\"pacman\"") + # Special case for MINGW32 Python, needs some packages + # via MSYS2 not via pip or system breaks... + for requirement in not_satisfied: + if requirement.startswith('cryptography'): + print("WARNING: The cryptography package have dependencies on system packages so please make sure " + "you run \"pacman -Syu\" followed by \"pacman -S mingw-w64-i686-python{}-cryptography\"." + "".format(sys.version_info[0],)) + continue + elif requirement.startswith('setuptools'): + print("Please run the following command to install MSYS2's MINGW Python setuptools package:") + print("pacman -S mingw-w64-i686-python{}-setuptools".format(sys.version_info[0],)) + continue + else: print('Please refer to the Get Started section of the ESP-IDF Programming Guide for setting up the required' - 'packages. Alternatively, you can run "{} -m pip install --user -r {}" for resolving the issue.' + ' packages.') + print('Alternatively, you can run "{} -m pip install --user -r {}" for resolving the issue.' ''.format(escape_backslash(sys.executable), escape_backslash(args.requirements))) sys.exit(1)
readme: explain meson options, caution out-of-tree sysdeps
![Continuous Integration](https://github.com/managarm/mlibc/workflows/Continuous%20Integration/badge.svg) **Official Discord server:** https://discord.gg/7WB6Ur3 +**AUR package** (provides `mlibc-gcc`): https://aur.archlinux.org/packages/mlibc ## Design of the library | `sysdeps/` | OS-specific headers and code.<br>`sysdeps/` is divded into per-port subdirectories. Exactly one of those subdirectories is enabled in each build.| | `abis/` | OS-specific interface headers ("ABI headers"). Those contain the constants and structs of the OS interface. For example, the numerical values of `SEEK_SET` or `O_CREAT` live here, as well as structs like `struct stat`. ABI headers are _only_ allowed to contain constants, structs and unions but _no_ function declarations or logic.<br>`abis/` is divided into per-OS subdirectories but this division is for organizational purposes only. Ports can still mix headers from different `abis/` subdirectories.| -**Porting mlibc to a new OS**: Ports to new OSes are welcome. To port mlibc to another OS, the following changes need to be made: +## Porting mlibc to a new OS + +Ports to new OSes are welcome. To port mlibc to another OS, the following changes need to be made: 1. Add new `sysdeps/` subdirectory `sysdeps/some-new-os/` and a `meson.build` to compile it. Integreate `sysdeps/some-new-os/meson.build` into the toplevel `meson.build`. 2. Create ABI headers in `abis/some-new-os/`. Add symlinks in `sysdeps/some-new-os/include/abi-bits` to your ABI headers. Look at existing ports to figure out the ABI headers required for the options enabled by `sysdeps/some-new-os/meson.build`. 3. In `sysdeps/some-new-os/`, add code to implement (a subset of) the functions from `options/internal/include/mlibc/internal-sysdeps.hpp`. Which subset you need depends on the options that `sysdeps/some-new-os/meson.build` enables. -## Local Development +We recommend that new ports do not build from `master` as we occasionally make internal changes that cause out-of-tree sysdeps to break. Instead we recommend you pin a specific release (or commit), or to upstream your changes to this repository so that we can build them on our CI and thus any breakages will be fixed by us in-tree. + +## Build Configuration + +The following custom meson options are accepted, in addition to the [built-in options](https://mesonbuild.com/Builtin-options.html). The options below are booleans which default to false (see `meson_options.txt`). + +- `headers_only`: Only install headers; don't build `libc.so` or `ld.so`. +- `mlibc_no_headers`: Don't install headers; only build `libc.so` and `ld.so`. +- `static`: Build `libc.a` and `ld.a` instead of `libc.so` and `ld.so`. This disables the dynamic linker. +- `build_tests`: Build the test suite (see below). +- `disable_x_option`: Disable `x` component of mlibc functionality. See `meson_options.txt` for a full list of possible values for `x`. This may be used to e.g disable POSIX and glibc extensions. + +We also support building with `-Db_sanitize=undefined` to use UBSan inside mlibc. Note that this does not enable UBSan for external applications which link against `libc.so`, but it can be useful during development to detect internal bugs (e.g when adding new sysdeps). + +## Running Tests The `mlibc` test suite can be run under a Linux host. To do this, first run from the project root: ```
[fabric][tests]fix test case error aitos-io#1356
@@ -327,14 +327,19 @@ START_TEST(test_005Transaction_0013TxInvoke_Failure_Walleturl_Err) } END_TEST -START_TEST(test_005Transaction_0014TxInvoke_Failure_WalletHostName_Err) +START_TEST(test_005Transaction_0014TxInvoke_Success_WalletHostName_Err) { BSINT32 rtnVal; BoatHlfabricTx tx_ptr; BoatHlfabricWallet *g_fabric_wallet_ptr = NULL; g_fabric_wallet_ptr = fabric_get_wallet_ptr(); - g_fabric_wallet_ptr->network_info.nodesCfg.orderCfg.endorser[0].hostName = "peer0.org1.com111"; + BoatFree(g_fabric_wallet_ptr->network_info.nodesCfg.orderCfg.endorser[0].hostName); + g_fabric_wallet_ptr->network_info.nodesCfg.orderCfg.endorser[0].hostName = NULL; + + BCHAR *fabric_demo_order1_hostName_err = "peer0.org1.com111"; + g_fabric_wallet_ptr->network_info.nodesCfg.orderCfg.endorser[0].hostName = BoatMalloc(strlen(fabric_demo_order1_hostName_err) + 1); + strcpy(g_fabric_wallet_ptr->network_info.nodesCfg.orderCfg.endorser[0].hostName, fabric_demo_order1_hostName_err); rtnVal = BoatHlfabricTxInit(&tx_ptr, g_fabric_wallet_ptr, NULL, "mycc", NULL, "mychannel", "Org1MSP"); ck_assert_int_eq(rtnVal, BOAT_SUCCESS); @@ -346,7 +351,7 @@ START_TEST(test_005Transaction_0014TxInvoke_Failure_WalletHostName_Err) rtnVal = BoatHlfabricTxSetArgs(&tx_ptr, "invoke", "a", "b", "10", NULL); ck_assert_int_eq(rtnVal, BOAT_SUCCESS); rtnVal = BoatHlfabricTxSubmit(&tx_ptr); - ck_assert_int_eq(rtnVal, BOAT_ERROR); + ck_assert_int_eq(rtnVal, BOAT_SUCCESS); BoatHlfabricTxDeInit(&tx_ptr); BoatIotSdkDeInit(); } @@ -691,7 +696,7 @@ Suite *make_fabricTransactionTest_suite(void) tcase_add_test(tc_transaction_api, test_005Transaction_0011TxInvoke_Failure_Args_channelId_err); tcase_add_test(tc_transaction_api, test_005Transaction_0012TxInvoke_Failure_Args_orgName_err); tcase_add_test(tc_transaction_api, test_005Transaction_0013TxInvoke_Failure_Walleturl_Err); - tcase_add_test(tc_transaction_api, test_005Transaction_0014TxInvoke_Failure_WalletHostName_Err); + tcase_add_test(tc_transaction_api, test_005Transaction_0014TxInvoke_Success_WalletHostName_Err); tcase_add_test(tc_transaction_api, test_005Transaction_0015TxQuery_Success); tcase_add_test(tc_transaction_api, test_005Transaction_0016TxQuery_Failure_Txptr_NULL);
data_flash: increase buffer, always write a full page
#define PAGE_SIZE SDCARD_PAGE_SIZE #endif -#define BUFFER_SIZE (16 * PAGE_SIZE) +#define BUFFER_SIZE 8192 typedef enum { STATE_DETECT, @@ -268,7 +268,7 @@ data_flash_result_t data_flash_update() { write_size = to_write; } - if (!m25p16_page_program(offset, write_buffer + written_offset, write_size)) { + if (!m25p16_page_program(offset, write_buffer + written_offset, PAGE_SIZE)) { break; } written_offset = (written_offset + write_size) % BUFFER_SIZE; @@ -303,6 +303,10 @@ data_flash_result_t data_flash_update() { return DATA_FLASH_STARTING; } } + + if (should_flush == 1) { + return DATA_FLASH_STARTING; + } #endif return DATA_FLASH_IDLE;
Fixed occasional 'internal error: 31' when running multiple instances of YARA at the same time
@@ -31,6 +31,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #if !defined(_WIN32) && !defined(__CYGWIN__) #include <errno.h> +#include <stdio.h> +#include <unistd.h> #endif #if defined(__FreeBSD__) @@ -103,12 +105,18 @@ int semaphore_init( // from the name. More info at: // // http://stackoverflow.com/questions/1413785/sem-init-on-os-x - *semaphore = sem_open("/semaphore", O_CREAT, S_IRUSR, value); + // + // Also create name for semaphore from PID because running multiple instances + // of YARA at the same time can cause that sem_open() was called in two processes + // simultaneously while neither of them had chance to call sem_unlink() yet. + char name[20]; + snprintf(name, sizeof(name), "/yara.sem.%i", (int)getpid()); + *semaphore = sem_open(name, O_CREAT, S_IRUSR, value); if (*semaphore == SEM_FAILED) return errno; - if (sem_unlink("/semaphore") != 0) + if (sem_unlink(name) != 0) return errno; #endif
MARS: 2 new classes for CARRA/CERRA
16 dt Data Targeting System 17 la ALADIN-LAEF 18 yt YOTC -19 mc MACC +19 mc Copernicus Atmosphere Monitoring Service (CAMS, previously MACC) 20 pe Permanent experiments 21 em ERA-CLIM model integration for the 20th-century (ERA-20CM) 22 e2 ERA-CLIM reanalysis of the 20th-century using surface observations only (ERA-20C) 34 lw WMO Lead Centre Wave Forecast Verification 35 ce Copernicus Emergency Management Service (CEMS) 36 cr Copernicus Atmosphere Monitoring Service (CAMS) Research +37 ca Copernicus Arctic Regional ReAnalysis (CARRA) +38 cu Copernicus European Regional ReAnalysis (CERRA) 99 te Test 100 at Austria 101 be Belgium
Docs: changed path to download netperf
@@ -144,7 +144,7 @@ sdw3-1</codeblock> <pd>Specifies that the <codeph>netperf</codeph> binary should be used to perform the network test instead of the Greenplum network test. To use this option, you must download <codeph>netperf</codeph> from <xref - href="http://www.netperf.org" format="html" scope="external"/> and + href="https://github.com/HewlettPackard/netperf" format="html" scope="external"/> and install it into <codeph>$GPHOME/bin/lib</codeph> on all Greenplum hosts (coordinator and segments).</pd> </plentry> @@ -162,7 +162,7 @@ sdw3-1</codeblock> (<codeph>N</codeph>) mode, you must run the test on an <varname>even</varname> number of hosts.<p>If you would rather use <codeph>netperf</codeph> (<xref - href="http://www.netperf.org" format="html" scope="external" + href="https://github.com/HewlettPackard/netperf" format="html" scope="external" />) instead of the Greenplum network test, you can download it and install it into <codeph>$GPHOME/bin/lib</codeph> on all Greenplum hosts (coordinator and segments). You would then specify
AudioDxe: Fix another integer truncation
@@ -246,7 +246,7 @@ HdaCodecInfoGetWidgets( // Create variables. HDA_CODEC_INFO_PRIVATE_DATA *HdaPrivateData; HDA_WIDGET_DEV *HdaWidgetDev; - UINT8 AmpInCount; + UINT32 AmpInCount; HDA_WIDGET *HdaWidgets; UINTN HdaWidgetsCount;
Support rendering %exp
@@ -11,6 +11,8 @@ export class Message extends Component { return this.renderLin(speech.lin.msg, speech.lin.pat); } else if (_.has(speech, 'url')) { return this.renderUrl(speech.url); + } else if (_.has(speech, 'exp')) { + return this.renderExp(speech.exp.exp, speech.exp.res); } else if (_.has(speech, 'ire')) { return this.renderSpeech(speech.ire.sep); } else if (_.has(speech, 'app')) { @@ -77,6 +79,13 @@ export class Message extends Component { ); } + renderExp(expression, result) { + return (<> + <p><code># {expression}</code></p> + <p><code>{result[0]}</code></p> + </>); + } + renderContent() { const { props } = this;
Use exit code 1 on error in redis-cli On error, redis-cli was returning `REDIS_ERR` on some cases by mistake. `REDIS_ERR` is `-1` which becomes `255` as exit code. This commit changes it and returns `1` on errors to be consistent.
@@ -2758,7 +2758,7 @@ static int noninteractive(int argc, char **argv) { retval = issueCommand(argc, sds_args); sdsfreesplitres(sds_args, argc); - return retval; + return retval == REDIS_OK ? 0 : 1; } /*------------------------------------------------------------------------------ @@ -2845,7 +2845,7 @@ static int evalMode(int argc, char **argv) { break; /* Return to the caller. */ } } - return retval; + return retval == REDIS_OK ? 0 : 1; } /*------------------------------------------------------------------------------ @@ -9064,11 +9064,7 @@ int main(int argc, char **argv) { if (cliConnect(0) != REDIS_OK) exit(1); return evalMode(argc,argv); } else { - int connected = (cliConnect(CC_QUIET) == REDIS_OK); - /* Try to serve command even we are not connected. e.g. help command */ - int retval = noninteractive(argc,argv); - /* If failed to connect, exit with "1" for backward compatibility */ - if (retval != REDIS_OK && !connected) exit(1); - return retval; + cliConnect(CC_QUIET); + return noninteractive(argc,argv); } }
prepared parameter.c for UNROLL values, that are not a power of two
@@ -497,13 +497,13 @@ void blas_set_parameter(void){ if (xgemm_p == 0) xgemm_p = 64; #endif - sgemm_p = (sgemm_p + SGEMM_UNROLL_M - 1) & ~(SGEMM_UNROLL_M - 1); - dgemm_p = (dgemm_p + DGEMM_UNROLL_M - 1) & ~(DGEMM_UNROLL_M - 1); - cgemm_p = (cgemm_p + CGEMM_UNROLL_M - 1) & ~(CGEMM_UNROLL_M - 1); - zgemm_p = (zgemm_p + ZGEMM_UNROLL_M - 1) & ~(ZGEMM_UNROLL_M - 1); + sgemm_p = ((sgemm_p + SGEMM_UNROLL_M - 1)/SGEMM_UNROLL_M) * SGEMM_UNROLL_M; + dgemm_p = ((dgemm_p + DGEMM_UNROLL_M - 1)/DGEMM_UNROLL_M) * DGEMM_UNROLL_M; + cgemm_p = ((cgemm_p + CGEMM_UNROLL_M - 1)/CGEMM_UNROLL_M) * CGEMM_UNROLL_M; + zgemm_p = ((zgemm_p + ZGEMM_UNROLL_M - 1)/ZGEMM_UNROLL_M) * ZGEMM_UNROLL_M; #ifdef QUAD_PRECISION - qgemm_p = (qgemm_p + QGEMM_UNROLL_M - 1) & ~(QGEMM_UNROLL_M - 1); - xgemm_p = (xgemm_p + XGEMM_UNROLL_M - 1) & ~(XGEMM_UNROLL_M - 1); + qgemm_p = ((qgemm_p + QGEMM_UNROLL_M - 1)/QGEMM_UNROLL_M) * QGEMM_UNROLL_M; + xgemm_p = ((xgemm_p + XGEMM_UNROLL_M - 1)/XGEMM_UNROLL_M) * XGEMM_UNROLL_M; #endif sgemm_r = (((BUFFER_SIZE - ((SGEMM_P * SGEMM_Q * 4 + GEMM_OFFSET_A + GEMM_ALIGN) & ~GEMM_ALIGN)) / (SGEMM_Q * 4)) - 15) & ~15;
out_cloudwatch_logs: fix memory leak when using cpu or mem inputs (fluent#3145)
@@ -770,6 +770,10 @@ struct msgpack_object pack_emf_payload(struct flb_cloudwatch *ctx, msgpack_unpack(mp_sbuf.data, mp_sbuf.size, NULL, &mempool, &deserialized_emf_object); + /* free allocated memory */ + msgpack_zone_destroy(&mempool); + msgpack_sbuffer_destroy(&mp_sbuf); + return deserialized_emf_object; } @@ -801,6 +805,9 @@ int process_and_send(struct flb_cloudwatch *ctx, const char *input_plugin, /* Added for EMF support */ struct flb_intermediate_metric *metric; + struct mk_list *tmp; + struct mk_list *head; + struct flb_intermediate_metric *an_item; int intermediate_metric_type; char *intermediate_metric_unit; @@ -900,13 +907,22 @@ int process_and_send(struct flb_cloudwatch *ctx, const char *input_plugin, metric->timestamp = tms; mk_list_add(&metric->_head, &flb_intermediate_metrics); + } struct msgpack_object emf_payload = pack_emf_payload(ctx, &flb_intermediate_metrics, input_plugin, tms); - flb_free(metric); + + /* free the intermediate metric list */ + + mk_list_foreach_safe(head, tmp, &flb_intermediate_metrics) { + an_item = mk_list_entry(head, struct flb_intermediate_metric, _head); + mk_list_del(&an_item->_head); + flb_free(an_item); + } + ret = add_event(ctx, buf, stream, &emf_payload, &tms); } else { ret = add_event(ctx, buf, stream, &map, &tms);
Add the ability to configure recv_max_early_data via s_server
@@ -748,8 +748,8 @@ typedef enum OPTION_choice { OPT_ID_PREFIX, OPT_SERVERNAME, OPT_SERVERNAME_FATAL, OPT_CERT2, OPT_KEY2, OPT_NEXTPROTONEG, OPT_ALPN, OPT_SRTP_PROFILES, OPT_KEYMATEXPORT, OPT_KEYMATEXPORTLEN, - OPT_KEYLOG_FILE, OPT_MAX_EARLY, OPT_EARLY_DATA, OPT_S_NUM_TICKETS, - OPT_ANTI_REPLAY, OPT_NO_ANTI_REPLAY, + OPT_KEYLOG_FILE, OPT_MAX_EARLY, OPT_RECV_MAX_EARLY, OPT_EARLY_DATA, + OPT_S_NUM_TICKETS, OPT_ANTI_REPLAY, OPT_NO_ANTI_REPLAY, OPT_R_ENUM, OPT_S_ENUM, OPT_V_ENUM, @@ -955,7 +955,9 @@ const OPTIONS s_server_options[] = { #endif {"keylogfile", OPT_KEYLOG_FILE, '>', "Write TLS secrets to file"}, {"max_early_data", OPT_MAX_EARLY, 'n', - "The maximum number of bytes of early data"}, + "The maximum number of bytes of early data as advertised in tickets"}, + {"recv_max_early_data", OPT_RECV_MAX_EARLY, 'n', + "The maximum number of bytes of early data (hard limit)"}, {"early_data", OPT_EARLY_DATA, '-', "Attempt to read early data"}, {"num_tickets", OPT_S_NUM_TICKETS, 'n', "The number of TLSv1.3 session tickets that a server will automatically issue" }, @@ -1041,7 +1043,7 @@ int s_server_main(int argc, char *argv[]) unsigned int split_send_fragment = 0, max_pipelines = 0; const char *s_serverinfo_file = NULL; const char *keylog_file = NULL; - int max_early_data = -1; + int max_early_data = -1, recv_max_early_data = -1; char *psksessf = NULL; /* Init of few remaining global variables */ @@ -1570,6 +1572,13 @@ int s_server_main(int argc, char *argv[]) goto end; } break; + case OPT_RECV_MAX_EARLY: + recv_max_early_data = atoi(opt_arg()); + if (recv_max_early_data < 0) { + BIO_printf(bio_err, "Invalid value for recv_max_early_data\n"); + goto end; + } + break; case OPT_EARLY_DATA: early_data = 1; if (max_early_data == -1) @@ -2110,6 +2119,8 @@ int s_server_main(int argc, char *argv[]) if (max_early_data >= 0) SSL_CTX_set_max_early_data(ctx, max_early_data); + if (recv_max_early_data >= 0) + SSL_CTX_set_recv_max_early_data(ctx, recv_max_early_data); if (rev) server_cb = rev_body;
Fix comment in control message serialization Refs
@@ -69,7 +69,7 @@ write_position(uint8_t *buf, const struct sc_position *position) { buffer_write16be(&buf[10], position->screen_size.height); } -// write length (2 bytes) + string (non nul-terminated) +// write length (4 bytes) + string (non null-terminated) static size_t write_string(const char *utf8, size_t max_len, unsigned char *buf) { size_t len = sc_str_utf8_truncation_index(utf8, max_len);
CMSIS Driver: updated WiFi Interface API version
@@ -918,7 +918,7 @@ and 8-bit Java bytecodes in Jazelle state. <file category="header" name="CMSIS/Driver/Include/Driver_USBH.h" /> </files> </api> - <api Cclass="CMSIS Driver" Cgroup="WiFi" Capiversion="1.0.0" exclusive="0"> + <api Cclass="CMSIS Driver" Cgroup="WiFi" Capiversion="1.1.0" exclusive="0"> <description>WiFi driver</description> <files> <file category="doc" name="CMSIS/Documentation/Driver/html/group__wifi__interface__gr.html" />
BugID:17646749:[build-rules] fix listing FEATURE_SRC in switches
include $(CURDIR)/src/tools/internal_make_funcs.mk -SWITCH_VARS := $(shell grep -o 'FEATURE_[_A-Z0-9]*' $(TOP_DIR)/Config.in $(TOP_DIR)/make.settings|cut -d: -f2|uniq) +SWITCH_VARS := $(shell grep -o 'FEATURE_[_A-Z0-9]*' $(TOP_DIR)/Config.in $(TOP_DIR)/make.settings|grep -v FEATURE_SRCPATH|cut -d: -f2|uniq) SWITCH_VARS := $(sort $(SWITCH_VARS)) $(foreach v, \
runtime: memory ordering fixes to scheduler 1. queue pointers shared with the iokernel can be written with relaxed consistency. 2. queue pointer interactions with thread_ready() ready acquire and release semantics. Fix any queue pointer memory order inconsistencies in the runtime scheduler.
@@ -145,12 +145,12 @@ static bool steal_work(struct kthread *l, struct kthread *r) rq_tail = r->rq_tail; for (i = 0; i < avail; i++) l->rq[i] = r->rq[rq_tail++ % RUNTIME_RQ_SIZE]; - l->rq_head = avail; - l->q_ptrs->rq_head += avail; store_release(&r->rq_tail, rq_tail); - store_release(&r->q_ptrs->rq_tail, r->q_ptrs->rq_tail + avail); + r->q_ptrs->rq_tail += avail; spin_unlock(&r->lock); + l->rq_head = avail; + l->q_ptrs->rq_head += avail; STAT(THREADS_STOLEN) += avail; return true; } @@ -461,7 +461,7 @@ void thread_ready(thread_t *th) k->rq[k->rq_head % RUNTIME_RQ_SIZE] = th; store_release(&k->rq_head, k->rq_head + 1); - store_release(&k->q_ptrs->rq_head, k->q_ptrs->rq_head + 1); + k->q_ptrs->rq_head++; putk(); }
Fix test_ignore_section_utf16_be() for builds
@@ -4455,7 +4455,7 @@ START_TEST(test_ignore_section_utf16_be) /* <d><e>&en;</e></d> */ "\0<\0d\0>\0<\0e\0>\0&\0e\0n\0;\0<\0/\0e\0>\0<\0/\0d\0>"; const XML_Char *expected = - "<![IGNORE[<!ELEMENT e (#PCDATA)*>]]>\n&en;"; + XCS("<![IGNORE[<!ELEMENT e (#PCDATA)*>]]>\n&en;"); CharData storage; CharData_Init(&storage);
* Added typescript generic to JBDOC in node binding
@@ -50,7 +50,7 @@ declare namespace ejdb2_node { /** * EJDB document. */ - interface JBDOC { + interface JBDOC<T extends object = { [key: string]: any }> { /** * Document identifier */ @@ -59,7 +59,7 @@ declare namespace ejdb2_node { /** * Document JSON object */ - json: any; + json: T; /** * String represen @@ -67,8 +67,8 @@ declare namespace ejdb2_node { toString(): string; } - interface JBDOCStream { - [Symbol.asyncIterator](): AsyncIterableIterator<JBDOC>; + interface JBDOCStream<T extends object = { [key: string]: any }> { + [Symbol.asyncIterator](): AsyncIterableIterator<JBDOC<T>>; } /** @@ -105,7 +105,7 @@ declare namespace ejdb2_node { * readable stream of matched documents. * */ - stream(opts?: QueryOptions): JBDOCStream; + stream<T extends object = { [key: string]: any }>(opts?: QueryOptions): JBDOCStream<T>; /** * Executes this query and waits its completion. @@ -122,18 +122,18 @@ declare namespace ejdb2_node { * Returns result set as a list. * Use it with caution on large data sets. */ - list(opts?: QueryOptions): Promise<Array<JBDOC>>; + list<T extends object = { [key: string]: any }>(opts?: QueryOptions): Promise<Array<JBDOC<T>>>; /** * Collects up to [n] documents from result set into array. */ - firstN(n: number, opts?: QueryOptions): Promise<Array<JBDOC>>; + firstN<T extends object = { [key: string]: any }>(n: number, opts?: QueryOptions): Promise<Array<JBDOC<T>>>; /** * Returns a first record in result set. * If record is not found promise with `undefined` will be returned. */ - first(opts?: QueryOptions): Promise<JBDOC | undefined>; + first<T extends object = { [key: string]: any }>(opts?: QueryOptions): Promise<JBDOC<T> | undefined>; /** * Set [json] at the specified [placeholder]. @@ -380,14 +380,14 @@ declare namespace ejdb2_node { * If document with given `id` is not found then `Error` will be thrown. * Not found error can be detected by {@link JBE.isNotFound} */ - get(collection: string, id: number): Promise<object>; + get<T extends object = { [key: string]: any }>(collection: string, id: number): Promise<T>; /** * Get json body of document identified by [id] and stored in [collection]. * * If document with given `id` is not found then `null` will be resoved. */ - getOrNull(collection: string, id: number): Promise<object|null>; + getOrNull<T extends object = { [key: string]: any }>(collection: string, id: number): Promise<T|null>; /** * Get json body with database metadata.
py/misc.h: Add MP_STATIC_ASSERT macro to do static assertions.
@@ -50,6 +50,9 @@ typedef unsigned int uint; #define _MP_STRINGIFY(x) #x #define MP_STRINGIFY(x) _MP_STRINGIFY(x) +// Static assertion macro +#define MP_STATIC_ASSERT(cond) ((void)sizeof(char[1 - 2 * !(cond)])) + /** memory allocation ******************************************/ // TODO make a lazy m_renew that can increase by a smaller amount than requested (but by at least 1 more element)
BugID:16906212:Free memory for OTA on ESP8266 1)Kill tasks:linkkit,pmT,event_task:Free memory for OTA download on ESP8266 2)To avoid build failure for the AWSS notify of otaapp
@@ -8,10 +8,11 @@ $(NAME)_COMPONENTS += network/netmgr \ middleware/uagent/uota \ utility/cjson +ifeq ($(COMPILER),iar) +$(NAME)_COMPONENTS += feature.linkkit-gateway-noawss +else $(NAME)_COMPONENTS += feature.linkkit-gateway - -$(NAME)_INCLUDES += \ - ../../../middleware/uagent/uota/src/service +endif GLOBAL_CFLAGS += -DCONFIG_DM_DEVTYPE_GATEWAY \ -DMQTT_DIRECT \
geneve: fix options len parsing as 32-bits words See 3.4. second paragraph Opt Len Type: fix
@@ -171,14 +171,15 @@ vnet_set_geneve_version (geneve_header_t * h, u8 version) static inline u8 vnet_get_geneve_options_len (geneve_header_t * h) { - return ((h->first_word & GENEVE_OPTLEN_MASK) >> GENEVE_OPTLEN_SHIFT); + return ((h->first_word & GENEVE_OPTLEN_MASK) >> GENEVE_OPTLEN_SHIFT) << 2; } static inline void vnet_set_geneve_options_len (geneve_header_t * h, u8 len) { + ASSERT ((len & 0x3) == 0); h->first_word &= ~(GENEVE_OPTLEN_MASK); - h->first_word |= ((len << GENEVE_OPTLEN_SHIFT) & GENEVE_OPTLEN_MASK); + h->first_word |= ((len << (GENEVE_OPTLEN_SHIFT - 2)) & GENEVE_OPTLEN_MASK); } static inline u8
xpath BUGFIX nested extension data nodes node check
@@ -5688,9 +5688,9 @@ moveto_node_check(const struct lyd_node *node, enum lyxp_node_type node_type, co /* module check */ if (moveto_mod) { - if (!(node->flags & LYD_EXT) && (node->schema->module != moveto_mod)) { + if ((set->ctx == LYD_CTX(node)) && (node->schema->module != moveto_mod)) { return LY_ENOT; - } else if ((node->flags & LYD_EXT) && strcmp(node->schema->module->name, moveto_mod->name)) { + } else if ((set->ctx != LYD_CTX(node)) && strcmp(node->schema->module->name, moveto_mod->name)) { return LY_ENOT; } } @@ -5705,9 +5705,9 @@ moveto_node_check(const struct lyd_node *node, enum lyxp_node_type node_type, co /* name check */ if (node_name) { - if (!(node->flags & LYD_EXT) && (node->schema->name != node_name)) { + if ((set->ctx == LYD_CTX(node)) && (node->schema->name != node_name)) { return LY_ENOT; - } else if ((node->flags & LYD_EXT) && strcmp(node->schema->name, node_name)) { + } else if ((set->ctx != LYD_CTX(node)) && strcmp(node->schema->name, node_name)) { return LY_ENOT; } }
iokernel: initialize tx mbuf private data the memory backing the tx mbufs does not seem to be guaranteed to be empty, leading to occasional segfaults when the iokernel starts.
@@ -285,6 +285,18 @@ full: return true; } +/* + * Zero out private data for a packet + */ + +static void tx_pktmbuf_priv_init(struct rte_mempool *mp, void *opaque, + void *obj, unsigned obj_idx) +{ + struct rte_mbuf *buf = obj; + struct tx_pktmbuf_priv *data = tx_pktmbuf_get_priv(buf); + memset(data, 0, sizeof(*data)); +} + /* * Create and initialize a packet mbuf pool for holding struct mbufs and * handling completion events. Actual buffer memory is separate, in shared @@ -329,6 +341,7 @@ static struct rte_mempool *tx_pktmbuf_completion_pool_create(const char *name, } rte_mempool_obj_iter(mp, rte_pktmbuf_init, NULL); + rte_mempool_obj_iter(mp, tx_pktmbuf_priv_init, NULL); return mp; }
docs: add FISCO BCOS official website to the list
+ [PlatON Enterprise](https://github.com/PlatONEnterprise/) + [Hyperledger Fabric](https://www.hyperledger.org/use/fabric) + [Hyperledger Fabric Docs](https://hyperledger-fabric.readthedocs.io/) ++ [FISCO BCOS](http://fisco-bcos.org/) # Supported Module List
Fixes asset_tests failure on unique due to dash in regex
@@ -28,7 +28,7 @@ static const auto MAX_NAME_LENGTH = 30; // min lengths are expressed by quantifiers static const std::regex ROOT_NAME_CHARACTERS("^[A-Z0-9._]{3,}$"); static const std::regex SUB_NAME_CHARACTERS("^[A-Z0-9._]+$"); -static const std::regex UNIQUE_TAG_CHARACTERS("^[A-Za-z0-9@$%&*()[\\]{}<>\\-_.;?\\\\:]+$"); +static const std::regex UNIQUE_TAG_CHARACTERS("^[-A-Za-z0-9@$%&*()[\\]{}<>_.;?\\\\:]+$"); static const std::regex CHANNEL_TAG_CHARACTERS("^[A-Z0-9._]+$"); static const std::regex DOUBLE_PUNCTUATION("^.*[._]{2,}.*$");
improve GenIndexes
using System; using System.Collections.Concurrent; +using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; @@ -38,11 +39,13 @@ namespace Miningcore.Blockchain.Ergo { height = Math.Min(NIncreasementHeightMax, height); - if(height < IncreaseStart) + switch (height) + { + case < IncreaseStart: return nBase; - - if(height >= NIncreasementHeightMax) + case >= NIncreasementHeightMax: return 2147387550; + } var res = nBase; var iterationsNumber = ((height - IncreaseStart) / IncreasePeriodForN) + 1; @@ -84,20 +87,23 @@ namespace Miningcore.Blockchain.Ergo private BigInteger[] GenIndexes(byte[] seed, ulong height) { // hash seed - var hash = new byte[32]; + Span<byte> hash = stackalloc byte[32]; hasher.Digest(seed, hash); // duplicate - var extendedHash = hash.Concat(hash).ToArray(); + Span<byte> extendedHash = stackalloc byte[64]; + hash.CopyTo(extendedHash); + hash.CopyTo(extendedHash.Slice(32, 32)); // map indexes - var result = Enumerable.Range(0, 32).Select(index => + var result = new BigInteger[32]; + + for(var i = 0; i < 32; i++) { - var a = BitConverter.ToUInt32(extendedHash.Slice(index, 4).ToArray()).ToBigEndian(); - var b = CalculateN(height); - return a % b; - }) - .ToArray(); + var x = BitConverter.ToUInt32(extendedHash.Slice(i, 4)).ToBigEndian(); + var y = CalculateN(height); + result[i] = x % y; + } return result; }
Make sure that proxying errors are sent with connection:close in the http1 frontend
@@ -443,7 +443,7 @@ static h2o_httpclient_body_cb on_head(h2o_httpclient_t *client, const char *errs h2o_start_response(req, &generator); h2o_send(req, NULL, 0, H2O_SEND_STATE_ERROR); } else { - h2o_send_error_502(req, "Gateway Error", errstr, 0); + h2o_send_error_502(req, "Gateway Error", errstr, H2O_SEND_ERROR_HTTP1_CLOSE_CONNECTION); } return NULL; @@ -468,7 +468,7 @@ static h2o_httpclient_body_cb on_head(h2o_httpclient_t *client, const char *errs (req->res.content_length = h2o_strtosize(headers[i].value.base, headers[i].value.len)) == SIZE_MAX) { self->client = NULL; h2o_req_log_error(req, "lib/core/proxy.c", "%s", "invalid response from upstream (malformed content-length)"); - h2o_send_error_502(req, "Gateway Error", "invalid response from upstream", 0); + h2o_send_error_502(req, "Gateway Error", "invalid response from upstream", H2O_SEND_ERROR_HTTP1_CLOSE_CONNECTION); return NULL; } goto Skip; @@ -594,7 +594,7 @@ static h2o_httpclient_head_cb on_connect(h2o_httpclient_t *client, const char *e if (errstr != NULL) { self->client = NULL; h2o_req_log_error(self->src_req, "lib/core/proxy.c", "%s", errstr); - h2o_send_error_502(self->src_req, "Gateway Error", errstr, 0); + h2o_send_error_502(self->src_req, "Gateway Error", errstr, H2O_SEND_ERROR_HTTP1_CLOSE_CONNECTION); return NULL; }
Fixed hud width not applying
@@ -503,6 +503,8 @@ static struct swapchain_data *new_swapchain_data(VkSwapchainKHR swapchain, struct swapchain_data *data = new swapchain_data(); data->device = device_data; data->swapchain = swapchain; + if (instance_data->params.font_size > 0 && instance_data->params.width == 280) + instance_data->params.width = hudFirstRow + hudSecondRow; data->window_size = ImVec2(instance_data->params.width, instance_data->params.height); map_object(HKEY(data->swapchain), data); return data; @@ -1108,8 +1110,6 @@ static void compute_swapchain_display(struct swapchain_data *data) ImGui::SetCurrentContext(data->imgui_context); ImGui::NewFrame(); position_layer(data); - if (instance_data->params.font_size > 0 && instance_data->params.width == 280) - instance_data->params.width = hudFirstRow + hudSecondRow; if (!instance_data->params.no_display){ ImGui::Begin("Main", &open, ImGuiWindowFlags_NoDecoration);
nimble/ll: Do not hand up data PDU with invalid CRC to LL It seems pointless to hand up data PDU with invalid CRC to LL since the only thing LL does with such packets is to throw them away. This saves us also an unnecessary rxpdu allocation.
@@ -3452,9 +3452,8 @@ ble_ll_conn_rx_data_pdu(struct os_mbuf *rxpdu, struct ble_mbuf_hdr *hdr) uint16_t acl_hdr; struct ble_ll_conn_sm *connsm; - if (!BLE_MBUF_HDR_CRC_OK(hdr)) { - goto conn_rx_data_pdu_end; - } + /* Packets with invalid CRC are not sent to LL */ + BLE_LL_ASSERT(BLE_MBUF_HDR_CRC_OK(hdr)); /* XXX: there is a chance that the connection was thrown away and re-used before processing packets here. Fix this. */ @@ -3612,14 +3611,23 @@ ble_ll_conn_rx_isr_end(uint8_t *rxbuf, struct ble_mbuf_hdr *rxhdr) uint32_t add_usecs; struct os_mbuf *txpdu; struct ble_ll_conn_sm *connsm; - struct os_mbuf *rxpdu; + struct os_mbuf *rxpdu = NULL; struct ble_mbuf_hdr *txhdr; int rx_phy_mode; + bool alloc_rxpdu = true; /* Retrieve the header and payload length */ hdr_byte = rxbuf[0]; rx_pyld_len = rxbuf[1]; + /* + * No need to alloc rxpdu for packets with invalid CRC, we would throw them + * away instantly from LL anyway. + */ + if (!BLE_MBUF_HDR_CRC_OK(rxhdr)) { + alloc_rxpdu = false; + } + /* * We need to attempt to allocate a buffer here. The reason we do this * now is that we should not ack the packet if we have no receive @@ -3627,7 +3635,9 @@ ble_ll_conn_rx_isr_end(uint8_t *rxbuf, struct ble_mbuf_hdr *rxhdr) * acked, but we should not ack the received frame if we cant hand it up. * NOTE: we hand up empty pdu's to the LL task! */ + if (alloc_rxpdu) { rxpdu = ble_ll_rxpdu_alloc(rx_pyld_len + BLE_LL_PDU_HDR_LEN); + } /* * We should have a current connection state machine. If we dont, we just
[numerics] use calloc before NM_gemv to avoid hazardous behavior
#include "SolverOptions.h" // for SICONOS_DPARAM_TOL /* #define OUTPUT_DEBUG *\/ */ - +/* #define DEBUG_MESSAGES */ +/* #define DEBUG_STDOUT */ #include "debug.h" // for DEBUG_EXPR, DEBUG_P... @@ -269,9 +270,8 @@ int gfc3d_reformulation_local_problem(GlobalFrictionContactProblem* problem, Fri cblas_dcopy_msan(m, problem->b, 1, localproblem->q, 1); // compute H^T M^-1 q+ b - double* qtmp = (double*)malloc(n * sizeof(double)); - for(int i = 0; i < n; i++) qtmp[i] = 0.0; - double alpha = 1.0, beta = 0.0; + double* qtmp = (double*)calloc(n, sizeof(double)); + double alpha = 1.0, beta = 1.0; double beta2 = 0.0; NM_gemv(alpha, M, problem->q, beta2, qtmp); NM_gemv(alpha, Htrans, qtmp, beta, localproblem->q); @@ -347,7 +347,7 @@ int gfc3d_reformulation_local_problem(GlobalFrictionContactProblem* problem, Fri NM_write_in_file_python(localproblem->M, fileout); fclose(fileout); #endif - + numerics_printf_verbose(1,"Compute localq = H^T M^(-1) q +b ..."); // compute localq = H^T M^(-1) q +b //Copy localq <- b @@ -355,7 +355,7 @@ int gfc3d_reformulation_local_problem(GlobalFrictionContactProblem* problem, Fri localproblem->q = (double*)malloc(m * sizeof(double)); cblas_dcopy_msan(m, problem->b, 1, localproblem->q, 1); - double* qtmp = (double*)malloc(n * sizeof(double)); + double* qtmp = (double*)calloc(n, sizeof(double)); //cblas_dcopy_msan(n, problem->q, 1, qtmp, 1); // compute H^T M^(-1) q + b
NSH ls command: if node is a symobolic link, use readlink() to get and the display the target of the symblic link.
@@ -146,7 +146,9 @@ static int ls_handler(FAR struct nsh_vtbl_s *vtbl, FAR const char *dirpath, FAR struct dirent *entryp, FAR void *pvarg) { unsigned int lsflags = (unsigned int)((uintptr_t)pvarg); +#ifdef CONFIG_PSEUDOFS_SOFTLINKS bool isdir = false; +#endif int ret; /* Check if any options will require that we stat the file */ @@ -180,12 +182,15 @@ static int ls_handler(FAR struct nsh_vtbl_s *vtbl, FAR const char *dirpath, { char details[] = "----------"; +#ifdef CONFIG_PSEUDOFS_SOFTLINKS if (S_ISLNK(buf.st_mode)) { details[0] = 'l'; /* Takes precedence over type of the target */ isdir = S_ISDIR(buf.st_mode); } - else if (S_ISDIR(buf.st_mode)) + else +#endif + if (S_ISDIR(buf.st_mode)) { details[0] = 'd'; } @@ -262,7 +267,36 @@ static int ls_handler(FAR struct nsh_vtbl_s *vtbl, FAR const char *dirpath, { nsh_output(vtbl, " %s", entryp->d_name); - if ((DIRENT_ISDIRECTORY(entryp->d_type) || isdir) && +#ifdef CONFIG_PSEUDOFS_SOFTLINKS + if (DIRENT_ISLINK(entryp->d_type)) + { + FAR char *fullpath; + ssize_t len; + + /* Get the target of the symbolic link */ + + fullpath = nsh_getdirpath(vtbl, dirpath, entryp->d_name); + len = readlink(fullpath, vtbl->iobuffer, IOBUFFERSIZE); + free(fullpath); + + if (len < 0) + { + nsh_output(vtbl, g_fmtcmdfailed, "ls", "readlink", NSH_ERRNO); + return ERROR; + } + + if (isdir) + { + nsh_output(vtbl, "/ ->%s\n", vtbl->iobuffer); + } + else + { + nsh_output(vtbl, " ->%s\n", vtbl->iobuffer); + } + } + else +#endif + if (DIRENT_ISDIRECTORY(entryp->d_type) && !ls_specialdir(entryp->d_name)) { nsh_output(vtbl, "/\n");
sh_malloc & sh_free prototype change to match POSIX CLA: trivial
@@ -52,8 +52,8 @@ static CRYPTO_RWLOCK *sec_malloc_lock = NULL; * These are the functions that must be implemented by a secure heap (sh). */ static int sh_init(size_t size, int minsize); -static char *sh_malloc(size_t size); -static void sh_free(char *ptr); +static void *sh_malloc(size_t size); +static void sh_free(void *ptr); static void sh_done(void); static size_t sh_actual_size(char *ptr); static int sh_allocated(const char *ptr); @@ -476,7 +476,7 @@ static char *sh_find_my_buddy(char *ptr, int list) return chunk; } -static char *sh_malloc(size_t size) +static void *sh_malloc(size_t size) { ossl_ssize_t list, slist; size_t i; @@ -535,10 +535,10 @@ static char *sh_malloc(size_t size) return chunk; } -static void sh_free(char *ptr) +static void sh_free(void *ptr) { size_t list; - char *buddy; + void *buddy; if (ptr == NULL) return;
sh2 = added NA image numbers 0x0000012C, 0x00000070, 0x00000136, 0x000000C0, 0x000000C6, 0x0000014C, 0x00000080 Images that weren't being scaled to fullscreen in the NA version of the game.
@@ -555,7 +555,8 @@ void Init() 0x000000A4, 0x00000038, 0x00000034, 0x00000040, 0x00000044, 0x000000AA, 0x000000AC, 0x000000B2, 0x000000BC, 0x000000AE, 0x000000CC, 0x00000170, 0x00000174, 0x00000172, 0x00000176, 0x00000184, 0x00000186, 0x00000178, 0x00000188, 0x0000018A, 0x0000018C, 0x0000018E, 0x00000194, 0x0000017A, 0x00000190, 0x00000192, 0x0000017C, 0x0000017E, 0x00000180, 0x00000182, 0x00000196, 0x00000198, 0x0000019E, 0x000001A0, 0x000001A2, 0x000001A4, - 0x000001A6, 0x0000012E, 0x00000130, 0x00000144 + 0x000001A6, 0x0000012E, 0x00000130, 0x00000144, + 0x0000012C, 0x00000070, 0x00000136, 0x000000C0, 0x000000C6, 0x0000014C, 0x00000080 }; static auto isFullscreenImage = []() -> bool
CI/CD: work around ra-tls parallel compilation issue
@@ -25,6 +25,7 @@ jobs: rune_test=$(docker run -itd --privileged --rm --net host --device /dev/sgx/enclave --device /dev/sgx/provision -v $GITHUB_WORKSPACE:/root/inclavare-containers rune-test:${{ matrix.tag }}); echo "rune_test=$rune_test" >> $GITHUB_ENV + # ra-tls is buggy on parallel compilation. Always use -j1. - name: Build and run ra-tls-server run: | docker exec $rune_test bash -c "mkdir -p /run/rune; @@ -37,14 +38,14 @@ jobs: export SPID=${{ secrets.SPID }}; export EPID_SUBSCRIPTION_KEY=${{ secrets.SUB_KEY }}; export QUOTE_TYPE=SGX_UNLINKABLE_SIGNATURE; - make -j${CPU_NUM}; + make -j1; cd /root/inclavare-containers-test/ra-tls/build/bin"; docker exec $rune_test bash -c "./ra-tls-server run &" - name: Build and run shelter run: | docker exec $rune_test bash -c "cd /root/inclavare-containers-test/shelter; - make -j${CPU_NUM}" + make -j1" docker exec $rune_test bash -c "./shelter remoteattestation" - name: Kill the container
Fix weak key usage
local typedecl = {} -local names = setmetatable({}, {__mode = 'v'}) +local names = setmetatable({}, {__mode = 'k'}) function typedecl.declare(module, modname, typename, constructors) module[typename] = {}