summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/lsan/lsan_common.h
diff options
context:
space:
mode:
authorFrancis Ricci <francisjricci@gmail.com>2017-04-19 14:00:35 +0000
committerFrancis Ricci <francisjricci@gmail.com>2017-04-19 14:00:35 +0000
commit2096fa4bf9b288072134879e1426ac31e4c5c47b (patch)
tree90cce5ddc84b9e789efff817dda8504a82dcdaa8 /compiler-rt/lib/lsan/lsan_common.h
parent8ea76fa9b4503847aa0bd784d2a26df5d3429aea (diff)
downloadbcm5719-llvm-2096fa4bf9b288072134879e1426ac31e4c5c47b.tar.gz
bcm5719-llvm-2096fa4bf9b288072134879e1426ac31e4c5c47b.zip
Move valid caller-pc checks out of platform-specific checks
Summary: ProcessPlatformSpecificAllocations for linux leak sanitizer iterated over memory chunks and ran two checks concurrently: 1) Ensured the pc was valid 2) Checked whether it was a linker allocation All platforms will need the valid pc check, so it is moved out of the platform- specific file. To prevent code and logic duplication, the linker allocation check is moved as well, with the name of the linker supplied by the platform-specific module. In cases where we don't need to check for linker allocations (ie Darwin), this name will be a nullptr, and we'll only run the caller pc checks. Reviewers: kubamracek, alekseyshl, kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32130 llvm-svn: 300690
Diffstat (limited to 'compiler-rt/lib/lsan/lsan_common.h')
-rw-r--r--compiler-rt/lib/lsan/lsan_common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/lib/lsan/lsan_common.h b/compiler-rt/lib/lsan/lsan_common.h
index 0bb575b294e..88d5f1ca77d 100644
--- a/compiler-rt/lib/lsan/lsan_common.h
+++ b/compiler-rt/lib/lsan/lsan_common.h
@@ -212,6 +212,10 @@ uptr PointsIntoChunk(void *p);
uptr GetUserBegin(uptr chunk);
// Helper for __lsan_ignore_object().
IgnoreObjectResult IgnoreObjectLocked(const void *p);
+
+// Return the linker module, if valid for the platform.
+LoadedModule *GetLinker();
+
// Wrapper for chunk metadata operations.
class LsanMetadata {
public:
OpenPOWER on IntegriCloud