Index: lib/asan/asan_allocator.cc =================================================================== --- lib/asan/asan_allocator.cc +++ lib/asan/asan_allocator.cc @@ -274,9 +274,12 @@ atomic_store(&max_redzone, options.max_redzone, memory_order_release); } - void Initialize(const AllocatorOptions &options) { + void Initialize(const AllocatorOptions &options, bool linker_initialized) { SetAllocatorMayReturnNull(options.may_return_null); - allocator.Init(options.release_to_os_interval_ms); + if (linker_initialized) + allocator.InitLinkerInitialized(options.release_to_os_interval_ms); + else + allocator.Init(options.release_to_os_interval_ms); SharedInitCode(options); } @@ -817,7 +820,7 @@ } void InitializeAllocator(const AllocatorOptions &options) { - instance.Initialize(options); + instance.Initialize(options, /*linker_initialized*/ false); } void ReInitializeAllocator(const AllocatorOptions &options) {