[llvm-branch-commits] [compiler-rt-branch] r195668 - Merging r195652:
Sergey Matveev
earthdok at google.com
Mon Nov 25 09:40:17 PST 2013
Author: smatveev
Date: Mon Nov 25 11:40:17 2013
New Revision: 195668
URL: http://llvm.org/viewvc/llvm-project?rev=195668&view=rev
Log:
Merging r195652:
------------------------------------------------------------------------
r195652 | smatveev | 2013-11-25 19:54:31 +0400 (Mon, 25 Nov 2013) | 3 lines
[lsan] Unbreak lsan_testlib.cc.
Also, add missing logging output.
------------------------------------------------------------------------
Modified:
compiler-rt/branches/release_34/ (props changed)
compiler-rt/branches/release_34/lib/lsan/lsan_common.cc
compiler-rt/branches/release_34/lib/lsan/lsan_preinit.cc
compiler-rt/branches/release_34/lib/lsan/tests/lsan_testlib.cc
Propchange: compiler-rt/branches/release_34/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov 25 11:40:17 2013
@@ -1 +1 @@
-/compiler-rt/trunk:195427,195433-195434,195436,195442,195570,195642-195643
+/compiler-rt/trunk:195427,195433-195434,195436,195442,195570,195642-195643,195652
Modified: compiler-rt/branches/release_34/lib/lsan/lsan_common.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_34/lib/lsan/lsan_common.cc?rev=195668&r1=195667&r2=195668&view=diff
==============================================================================
--- compiler-rt/branches/release_34/lib/lsan/lsan_common.cc (original)
+++ compiler-rt/branches/release_34/lib/lsan/lsan_common.cc Mon Nov 25 11:40:17 2013
@@ -275,6 +275,8 @@ static void ClassifyAllChunks(SuspendedT
// The check here is relatively expensive, so we do this in a separate flood
// fill. That way we can skip the check for chunks that are reachable
// otherwise.
+ if (flags()->log_pointers)
+ Report("Processing platform-specific allocations.\n");
ProcessPlatformSpecificAllocations(&frontier);
FloodFillTag(&frontier, kReachable);
Modified: compiler-rt/branches/release_34/lib/lsan/lsan_preinit.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_34/lib/lsan/lsan_preinit.cc?rev=195668&r1=195667&r2=195668&view=diff
==============================================================================
--- compiler-rt/branches/release_34/lib/lsan/lsan_preinit.cc (original)
+++ compiler-rt/branches/release_34/lib/lsan/lsan_preinit.cc Mon Nov 25 11:40:17 2013
@@ -14,7 +14,11 @@
#include "lsan.h"
-#if !defined(PIC)
+#ifndef LSAN_USE_PREINIT_ARRAY
+#define LSAN_USE_PREINIT_ARRAY 1
+#endif
+
+#if LSAN_USE_PREINIT_ARRAY && !defined(PIC)
// We force __lsan_init to be called before anyone else by placing it into
// .preinit_array section.
__attribute__((section(".preinit_array"), used))
Modified: compiler-rt/branches/release_34/lib/lsan/tests/lsan_testlib.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_34/lib/lsan/tests/lsan_testlib.cc?rev=195668&r1=195667&r2=195668&view=diff
==============================================================================
--- compiler-rt/branches/release_34/lib/lsan/tests/lsan_testlib.cc (original)
+++ compiler-rt/branches/release_34/lib/lsan/tests/lsan_testlib.cc Mon Nov 25 11:40:17 2013
@@ -14,12 +14,12 @@
/* Usage:
clang++ ../sanitizer_common/sanitizer_*.cc ../interception/interception_*.cc \
lsan*.cc tests/lsan_testlib.cc -I. -I.. -g -ldl -lpthread -fPIC -shared -O2 \
- -o lsan.so
+ -DLSAN_USE_PREINIT_ARRAY=0 -o lsan.so
LD_PRELOAD=./lsan.so /your/app
*/
#include "lsan.h"
__attribute__((constructor))
void constructor() {
- __lsan::Init();
+ __lsan_init();
}
More information about the llvm-branch-commits
mailing list