aboutsummaryrefslogtreecommitdiff
path: root/lib/lsan/lsan_common.cc
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-08-29 17:50:55 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-08-29 17:50:55 +0000
commitd6ad2d02b6234d03473f3874bbc0c129bb7586ee (patch)
tree275dab18d36076f02a13d4f5e52c5be5e6ff0028 /lib/lsan/lsan_common.cc
parent2a0cb7949b6072f45f5ddfd6fcd0d147ca2c2820 (diff)
downloadsrc-d6ad2d02b6234d03473f3874bbc0c129bb7586ee.tar.gz
src-d6ad2d02b6234d03473f3874bbc0c129bb7586ee.zip
Vendor import of compiler-rt release_70 branch r340910:vendor/compiler-rt/compiler-rt-release_70-r340910
Notes
Notes: svn path=/vendor/compiler-rt/dist-release_70/; revision=338382 svn path=/vendor/compiler-rt/compiler-rt-release_70-r340910/; revision=338383; tag=vendor/compiler-rt/compiler-rt-release_70-r340910
Diffstat (limited to 'lib/lsan/lsan_common.cc')
-rw-r--r--lib/lsan/lsan_common.cc9
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/lsan/lsan_common.cc b/lib/lsan/lsan_common.cc
index 012a673c3b25..eaa5cadc8ffb 100644
--- a/lib/lsan/lsan_common.cc
+++ b/lib/lsan/lsan_common.cc
@@ -100,8 +100,6 @@ static SuppressionContext *GetSuppressionContext() {
static InternalMmapVector<RootRegion> *root_regions;
-static uptr initialized_for_pid;
-
InternalMmapVector<RootRegion> const *GetRootRegions() { return root_regions; }
void InitializeRootRegions() {
@@ -115,7 +113,6 @@ const char *MaybeCallLsanDefaultOptions() {
}
void InitCommonLsan() {
- initialized_for_pid = internal_getpid();
InitializeRootRegions();
if (common_flags()->detect_leaks) {
// Initialization which can fail or print warnings should only be done if
@@ -571,12 +568,6 @@ static void CheckForLeaksCallback(const SuspendedThreadsList &suspended_threads,
static bool CheckForLeaks() {
if (&__lsan_is_turned_off && __lsan_is_turned_off())
return false;
- if (initialized_for_pid != internal_getpid()) {
- // If process was forked and it had threads we fail to detect references
- // from other threads.
- Report("WARNING: LeakSanitizer is disabled in forked process.\n");
- return false;
- }
EnsureMainThreadIDIsCorrect();
CheckForLeaksParam param;
param.success = false;