Commit Graph

424 Commits

Author SHA1 Message Date
Sergey Matveev 39e8a6d87e [lsan] Begin converting LSan tests to output tests.
In this CL all old tests are removed and one LIT test is added.

llvm-svn: 182730
2013-05-27 11:41:46 +00:00
Sergey Matveev 9cda3df8bd [sanitizer] Move FindThreadByOSIdLocked from lsan to sanitizer_common.
llvm-svn: 182728
2013-05-27 10:35:51 +00:00
Alexey Samsonov 9c2bcf8c15 Improve support for compiler-rt tests in CMake build.
Now compiler-rt tests run correctly if compiler-rt is checked out into
arbitrary directory (not necessarily projects/compiler-rt).
Patch by Greg Fitzgerald!

llvm-svn: 182726
2013-05-27 09:35:24 +00:00
Sergey Matveev e45a0677a6 [lsan] Allow the ignored TLS range to be empty.
llvm-svn: 182657
2013-05-24 18:07:53 +00:00
Sergey Matveev 37dff38495 [lsan] Minor adjustments to LSan messages.
llvm-svn: 182648
2013-05-24 15:36:30 +00:00
Sergey Matveev c7715a228a [lsan] Prettify LSan reports and add a summary.
llvm-svn: 182646
2013-05-24 14:49:13 +00:00
Sergey Matveev bc880f3a54 [lsan] Add exitcode flag. Kill the process if leaks are found.
llvm-svn: 182641
2013-05-24 13:16:02 +00:00
Sergey Matveev a4a01975d5 [lsan] Add lit test support.
"check-lsan" now runs both the tests from lib/lsan/tests and any lit
tests found under lib/lsan/lit_tests.

llvm-svn: 182583
2013-05-23 12:58:56 +00:00
Sergey Matveev bb12f840b5 [lsan] Ensure lsan is initialized when interceptors are called.
Also remove unnecessary ifdefs.

llvm-svn: 182571
2013-05-23 10:24:44 +00:00
Alexey Samsonov 49eb5700e2 Revert r182465 and add lsan-common library to makefile-based build
llvm-svn: 182470
2013-05-22 13:20:37 +00:00
Sergey Matveev 20ccf95f80 [lsan] Invoke leak detection with atexit().
Keeps it consistent between ASan and LSan.

llvm-svn: 182399
2013-05-21 17:56:45 +00:00
Sergey Matveev 17f5705d3c [asan] Do not invoke LSan hooks unless CAN_SANITIZE_LEAKS.
llvm-svn: 182389
2013-05-21 15:35:34 +00:00
Sergey Matveev 620744556a [lsan] Change CMakeLists to build the common LSan module for ASan.
Also, define CAN_SANITIZE_LEAKS.

llvm-svn: 182383
2013-05-21 14:12:11 +00:00
Sergey Matveev aa0b45a094 [lsan] LSan in LD_PRELOAD library form.
llvm-svn: 182376
2013-05-21 12:49:33 +00:00
Alexey Samsonov cbbdfc50ee Build LSan on x86_64 only if this target is supported
llvm-svn: 182272
2013-05-20 14:16:45 +00:00
Sergey Matveev 6dd91e475a [lsan] Fix r182256.
Add missing call to GetUserBegin().

llvm-svn: 182267
2013-05-20 14:04:56 +00:00
Sergey Matveev bcfd838bcb [lsan] GetUserBegin() in LSan.
Separate the notions of user-visible chunk and allocator chunk, to facilitate
ASan integration.

llvm-svn: 182256
2013-05-20 13:08:23 +00:00
Sergey Matveev 3c20829559 [lsan] CMakeLists and lit test configs for LSan.
llvm-svn: 182251
2013-05-20 11:13:33 +00:00
Sergey Matveev 48c1d1acad [lsan] Tests for LeakSanitizer.
llvm-svn: 182250
2013-05-20 11:09:27 +00:00
Sergey Matveev b5483be858 [lsan] Common leak checking module.
Leak checking functionality which will be shared between
LSan/ASan/MSan.

llvm-svn: 182249
2013-05-20 11:06:50 +00:00
Sergey Matveev 3d97cdd140 [lsan] Standalone LSan initialization.
llvm-svn: 182248
2013-05-20 11:04:43 +00:00
Sergey Matveev a5f9691dfb [lsan] Interceptors for standalone LSan.
llvm-svn: 182247
2013-05-20 11:01:40 +00:00
Sergey Matveev c7d003ec43 [lsan] Thread registry for standalone LSan.
llvm-svn: 182246
2013-05-20 10:57:53 +00:00
Sergey Matveev 866abfb3fe [lsan] Allocator for standalone LSan.
This is the first in a series of CLs implementing LeakSanitizer.
http://clang.llvm.org/docs/LeakSanitizer.html

llvm-svn: 182245
2013-05-20 10:54:00 +00:00