[PATCH] D79130: [scudo] Initialize the allocator in setTrackAllocationStacks.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 29 15:06:28 PDT 2020
eugenis created this revision.
eugenis added reviewers: pcc, cryptoad.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
If this is called before the malloc call in a thread (or in the whole
program), the lazy initialization of the allocation can overwrite
Options.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D79130
Files:
compiler-rt/lib/scudo/standalone/combined.h
Index: compiler-rt/lib/scudo/standalone/combined.h
===================================================================
--- compiler-rt/lib/scudo/standalone/combined.h
+++ compiler-rt/lib/scudo/standalone/combined.h
@@ -721,6 +721,7 @@
void disableMemoryTagging() { Primary.disableMemoryTagging(); }
void setTrackAllocationStacks(bool Track) {
+ initThreadMaybe();
Options.TrackAllocationStacks = Track;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79130.261046.patch
Type: text/x-patch
Size: 426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200429/2dc3fb16/attachment.bin>
More information about the llvm-commits
mailing list