[compiler-rt] [scudo] [MTE] resize stack depot for allocation ring buffer (PR #74515)
Florian Mayer via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 5 15:06:43 PST 2024
================
@@ -917,8 +919,14 @@ class Allocator {
Primary.Options.clear(OptionBit::AddLargeAllocationSlack);
}
- const char *getStackDepotAddress() const {
- return reinterpret_cast<const char *>(&Depot);
+ const char *getStackDepotAddress() {
+ initThreadMaybe();
+ return reinterpret_cast<char *>(Depot);
+ }
+
+ uptr getStackDepotSize() {
+ initThreadMaybe();
----------------
fmayer wrote:
I am not sure that's a good idea. E.g. if we call `mapAndInitializeRingBuffer` and someone else calls `initThreadMaybe` on another thread, we would have to add synchronization into the `mapAndInitializeRingBuffer`.
https://github.com/llvm/llvm-project/pull/74515
More information about the llvm-commits
mailing list