Index: compiler-rt/lib/scudo/standalone/allocator_config.h =================================================================== --- compiler-rt/lib/scudo/standalone/allocator_config.h +++ compiler-rt/lib/scudo/standalone/allocator_config.h @@ -60,7 +60,7 @@ struct DefaultConfig { using SizeClassMap = DefaultSizeClassMap; - static const bool MaySupportMemoryTagging = false; + static const bool MaySupportMemoryTagging = true; #if SCUDO_CAN_USE_PRIMARY64 typedef SizeClassAllocator64 Primary; Index: compiler-rt/lib/scudo/standalone/combined.h =================================================================== --- compiler-rt/lib/scudo/standalone/combined.h +++ compiler-rt/lib/scudo/standalone/combined.h @@ -998,7 +998,7 @@ SecondaryT Secondary; QuarantineT Quarantine; TSDRegistryT TSDRegistry; - pthread_once_t PostInitNonce = PTHREAD_ONCE_INIT; + pthread_once_t PostInitNonce MAYBE_INIT(= PTHREAD_ONCE_INIT); #ifdef GWP_ASAN_HOOKS gwp_asan::GuardedPoolAllocator GuardedAlloc; Index: compiler-rt/lib/scudo/standalone/hostlib/readme.txt =================================================================== --- /dev/null +++ compiler-rt/lib/scudo/standalone/hostlib/readme.txt @@ -0,0 +1,9 @@ +This directory holds the cmake file(s) for creation of a host library version +of scudo standalone. + +For Windows10 this can be generated by: + + cmake -G "Visual Studio 15 2017 Win64" -B build + +Then using Visual Studio to build the 'scudo-sa.sln' solution found in the +build directory. Index: compiler-rt/lib/scudo/standalone/include/scudo/interface.h =================================================================== --- compiler-rt/lib/scudo/standalone/include/scudo/interface.h +++ compiler-rt/lib/scudo/standalone/include/scudo/interface.h @@ -14,12 +14,12 @@ extern "C" { -__attribute__((weak)) const char *__scudo_default_options(); +WEAK const char *__scudo_default_options(); // Post-allocation & pre-deallocation hooks. // They must be thread-safe and not use heap related functions. -__attribute__((weak)) void __scudo_allocate_hook(void *ptr, size_t size); -__attribute__((weak)) void __scudo_deallocate_hook(void *ptr); +WEAK void __scudo_allocate_hook(void *ptr, size_t size); +WEAK void __scudo_deallocate_hook(void *ptr); void __scudo_print_stats(void); Index: compiler-rt/lib/scudo/standalone/wind.cpp =================================================================== --- compiler-rt/lib/scudo/standalone/wind.cpp +++ compiler-rt/lib/scudo/standalone/wind.cpp @@ -1,4 +1,4 @@ -//===-- linux.cpp -----------------------------------------------*- C++ -*-===// +//===-- wind.cpp -----------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information.