Sergey Matveev
27ef175ef0
[lsan] Fix bug when discovering indirectly leaked objects.
...
If an object contains pointers to itself, that doesn't make it indirectly
leaked. D'oh!
llvm-svn: 192716
2013-10-15 16:00:11 +00:00
Sergey Matveev
43d90cbd86
[lsan] Support ASan's stack-use-after-return mode in LSan.
...
Treat the fake stack as live memory.
llvm-svn: 192593
2013-10-14 14:04:50 +00:00
Sergey Matveev
da9f5e7e7f
[asan] Improve thread lifetime tracking on POSIX systems.
...
Call AsanThread::Destroy() from a late-running TSD destructor.
Previously we called it before any user-registered TSD destructors, which caused
false positives in LeakSanitizer.
llvm-svn: 192585
2013-10-14 12:01:05 +00:00
Alexey Samsonov
f56ddf7fd1
[LSan] Don't report leaks with single-frame stack traces
...
llvm-svn: 191522
2013-09-27 13:54:20 +00:00
Alexey Samsonov
5b5c99d219
ASan, LSan, MSan: try to find llvm-symbolizer binary in PATH if it is not provided. Now we don't need to explicitly set the location of llvm-symbolizer in lit test configs.
...
llvm-svn: 189801
2013-09-03 13:22:51 +00:00
Alexey Samsonov
614a5ea990
Revert r189347: it breaks on machines w/o installed debug versions of system libraries
...
llvm-svn: 189350
2013-08-27 14:04:01 +00:00
Alexey Samsonov
ea0ef986e2
LSan: Check that dynamic linker library is properly symbolized
...
llvm-svn: 189347
2013-08-27 13:39:33 +00:00
Alexey Samsonov
903c3250d2
Slightly improve lint checker script and fix a few style issues
...
llvm-svn: 189092
2013-08-23 07:43:56 +00:00
Sergey Matveev
5371e90f7a
[lsan] Add a regression test for building C code.
...
llvm-svn: 189016
2013-08-22 14:48:44 +00:00
Sergey Matveev
f6ca04d468
[lsan] Add a stress test.
...
llvm-svn: 189012
2013-08-22 13:32:10 +00:00
Daniel Dunbar
bc5dbc435e
[tests] Update to use lit_config and lit package, as appropriate.
...
llvm-svn: 188116
2013-08-09 22:14:01 +00:00
Alexey Samsonov
fd078b9405
Enable pipefail for LSan tests
...
llvm-svn: 187873
2013-08-07 08:46:09 +00:00
Sergey Matveev
6459a370a7
[lsan] Add leak_check_at_exit flag.
...
We needed a way to tell LSan to invoke leak checking only if __do_leak_check()
is called explicitly. This can now be achieved by setting
leak_check_at_exit=false.
llvm-svn: 187578
2013-08-01 14:57:07 +00:00
Rafael Espindola
3cf7eb50a9
Disable pipefail for lsan.
...
llvm-svn: 187274
2013-07-26 23:42:16 +00:00
Hans Wennborg
2e304b6ffd
Use --driver-mode=g++ instead of -ccc-cxx; required after Clang r186605
...
llvm-svn: 186607
2013-07-18 20:48:50 +00:00
Sergey Matveev
655bd0d08c
[lsan] Add __lsan_do_leak_check() to the public interface.
...
Let users override the normal behavior to run leak checking earlier in
the process. Also fix a couple nits here and there.
llvm-svn: 186581
2013-07-18 14:06:07 +00:00
Sergey Matveev
ddd7b6a1c8
[lsan] Fix test.
...
llvm-svn: 185817
2013-07-08 14:08:05 +00:00
Sergey Matveev
bdeff959a1
[lsan] Handle fork() correctly.
...
Update the main thread's os_id on every pthread_create, and before
initiating leak checking. This ensures that we have the correct os_id even if we
have forked after Init().
llvm-svn: 185815
2013-07-08 12:57:24 +00:00
Alexey Samsonov
e71f37c1cd
Define the path to llvm-symbolizer tool in a common config to reduce copy-paste
...
llvm-svn: 185286
2013-06-30 14:47:38 +00:00
Sergey Matveev
202881d1fe
[lsan] Fix build again.
...
llvm-svn: 185157
2013-06-28 15:23:15 +00:00
Sergey Matveev
b3fa575f7b
[lsan] Fix build.
...
llvm-svn: 185156
2013-06-28 15:18:06 +00:00
Sergey Matveev
2b19ee3da8
[lsan] Add suppression support.
...
llvm-svn: 185152
2013-06-28 14:38:31 +00:00
Sergey Matveev
1c34897887
[lsan] Fix flaky test.
...
llvm-svn: 185079
2013-06-27 14:24:07 +00:00
Alexey Samsonov
895784a5b0
[LSan] Add the way to disable LSan at link time
...
llvm-svn: 185066
2013-06-27 09:35:50 +00:00
Sergey Matveev
4e0215a71c
Revert to C-style callbacks for iteration over allocator chunks.
...
Also clean up LSan code, fix some comments and replace void* with uptr
to bring down the number of reinterpret_casts.
llvm-svn: 184700
2013-06-24 08:34:50 +00:00
Sergey Matveev
b94d5e2d1c
[asan] Move lsan_disabled out of thread context.
...
Fix for the case where disabler is used in pthread key destructor.
llvm-svn: 184553
2013-06-21 14:51:52 +00:00
Sergey Matveev
dac35c24c0
[lsan] Move symbolization and reporting out of StopTheWorld callback.
...
llvm-svn: 184303
2013-06-19 14:04:11 +00:00
Alexey Samsonov
7e325fb477
Properly install LSan interface header, rely on sanitizer header presence in lit tests
...
llvm-svn: 183977
2013-06-14 11:45:36 +00:00
Sergey Matveev
978460c12c
[lsan] Harmonized some naming inconsistencies.
...
llvm-svn: 183748
2013-06-11 15:26:20 +00:00
Sergey Matveev
5129c5e56f
[lsan] Fix the unittest makefiles.
...
llvm-svn: 183735
2013-06-11 09:52:02 +00:00
Dmitry Vyukov
50ef53ebfc
tsan: fix lint warnings
...
llvm-svn: 183642
2013-06-10 10:00:54 +00:00
Sergey Matveev
ecc4f5ba8e
[lsan] Implement __lsan_ignore_object().
...
Leak annotation similar to HeapChecker's IgnoreObject().
llvm-svn: 183412
2013-06-06 14:17:56 +00:00
Alexey Samsonov
f6630ecee9
Simplify lit configs for asan/lsan/msan unit tests
...
llvm-svn: 183410
2013-06-06 13:48:20 +00:00
Alexey Samsonov
e3bf521b7c
Remove a bunch of copy-paste: use common config for sanitizer lit/unit tests
...
llvm-svn: 183407
2013-06-06 13:28:37 +00:00
Sergey Matveev
17ee1abfa7
[lsan] Add __lsan_disable() and __lsan_enable().
...
Objects allocated after a call to __lsan_disable() will be treated as
live memory. Also add a ScopedDisabler.
llvm-svn: 183099
2013-06-03 11:21:34 +00:00
Sergey Matveev
5494e0bec3
[lsan] Run the leak detection tests under both ASan and LSan.
...
Change the LSan lit test logic. Now "check-lsan" tests the leak
checking functionality in both standalone LSan and ASan.
llvm-svn: 183000
2013-05-31 13:13:55 +00:00
Sergey Matveev
e615432313
[lsan] Convert the remaining LSan tests to output tests.
...
llvm-svn: 182839
2013-05-29 10:12:37 +00:00
Alexey Samsonov
75289297af
Exclude sanitizer_nolibc_test from TSan test run. Fix lint warnings
...
llvm-svn: 182837
2013-05-29 09:40:07 +00:00
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
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
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