[llvm-dev] ASan: provide interface to iterate over all fakestack frames

Johan Engelen via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 24 11:06:00 PDT 2019


Hi all,
  We are using ASan together with LDC for D code. D has a garbage
collector, and in its mark/sweep algorithm we need to scan the stack for
pointers. When ASan's FakeStack is enabled, the GC does not see pointers on
the stack anymore leading to predictable problems of objects being
collected while we do have a reference to them on the stack.
What I need is a way to scan all fakestack frames. Something similar to
FakeStack::ForEachFakeFrame(RangeIteratorCallback callback, void *arg);
or
__lsan::ForEachExtraStackRange(tid_t os_id, RangeIteratorCallback callback,
void *arg)
but both these functions are not exported so not available outside the ASan
library.

Did I miss something and is such an external interface already available?
Or do I need to implement this myself and submit a patch? Any ideas about
the design/implementation of the interface?

Thanks,
  Johan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191024/fe450df4/attachment.html>


More information about the llvm-dev mailing list