[LSan] Introduce a callback mechanism to allow adding data reachable from ThreadConte...
authorDan Liew <dliew@apple.com>
Thu, 21 Jan 2021 23:48:41 +0000 (15:48 -0800)
committerDan Liew <dliew@apple.com>
Sat, 23 Jan 2021 03:26:02 +0000 (19:26 -0800)
commitdd922bc2a62163cef442646974324943c551725e
tree1c15a847c3a8c3cf8ce18d68381e871eec6d3266
parent6fe193bf271521c5dd1a50949e83b246a9820ce2
[LSan] Introduce a callback mechanism to allow adding data reachable from ThreadContexts to the frontier.

This mechanism is intended to provide a way to treat the `arg` pointer
of a created (but not yet started) thread as reachable. In future
patches this will be implemented in `GetAdditionalThreadContextPtrs`.

A separate implementation of `GetAdditionalThreadContextPtrs` exists
for ASan and LSan runtimes because they need to be implemented
differently in future patches.

rdar://problem/63537240

Differential Revision: https://reviews.llvm.org/D95183
compiler-rt/lib/asan/asan_allocator.cpp
compiler-rt/lib/lsan/lsan_allocator.cpp
compiler-rt/lib/lsan/lsan_common.cpp
compiler-rt/lib/lsan/lsan_common.h