[PATCH] D94212: scudo: Add support for tracking stack traces of secondary allocations.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 24 15:53:01 PST 2021
eugenis added inline comments.
================
Comment at: compiler-rt/lib/scudo/standalone/combined.h:1113
+ // partially written state in getSecondaryErrorInfo().
+ atomic_store_relaxed(&Entry->Ptr, 0);
+ atomic_store_relaxed(&Entry->AllocationTrace, AllocationTrace);
----------------
Does this actually do anything if all stores are relaxed?
================
Comment at: compiler-rt/lib/scudo/standalone/combined.h:1135
+
+ storeRingBufferEntry(untagPointer(Ptr), Trace, Tid, Size, 0, 0);
+ }
----------------
Why create this ring buffer entry while the allocation is still alive?
This would add some complexity to error reporting, but we could iterate over the live secondary allocations to find the right one. That should reduce ring buffer traffic by 2x (not counting primary of course).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94212/new/
https://reviews.llvm.org/D94212
More information about the llvm-commits
mailing list