summaryrefslogtreecommitdiff
path: root/lib/lsan
Commit message (Collapse)AuthorAge
* [ASan] Add CMake configs for libclang_rt.asan_iossim_dynamic.dylib Alexander Potapenko2013-11-07
| | | | | | | | | | | CMake changes to build the ASan runtime for the iOS simulator. This is a universal library targeting the same architectures as the OSX ASan runtime does, thus the iossim version can't live in the same universal libclang_rt.asan_osx_dynamic.dylib The difference between the OSX and iossim builds is in the -mios-simulator-version-min and -ios_simulator_version_min flags that tell Clang to compile and link iossim code. The iossim runtime can only be built on a machine with both Xcode and the iOS Simulator SDK installed. If xcodebuild -version -sdk iphonesimulator Path returns a nonempty path, it is used when compiling and linking the iossim runtime. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194199 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Unify summary reporting across all sanitizers.Alexey Samsonov2013-11-01
| | | | | | | | | | | This change unifies the summary printing across sanitizers: now each tool uses specific version of ReportErrorSummary() method, which deals with symbolization of the top frame and formatting a summary message. This change modifies the summary line for ASan+LSan mode: now the summary mentions "AddressSanitizer" instead of "LeakSanitizer". git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193864 91177308-0d34-0410-b5e6-96231b3b80d8
* Consistently use StackTrace::PrintStack in ASan, LSan and MSanAlexey Samsonov2013-11-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193834 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Simplify StackTrace::PrintStack interface: prefer common flags ↵Alexey Samsonov2013-10-29
| | | | | | to turn on/off the symbolization git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193587 91177308-0d34-0410-b5e6-96231b3b80d8
* Overhaul the symbolizer interface.Peter Collingbourne2013-10-25
| | | | | | | | | | | | | | | | | | | | | | This moves away from creating the symbolizer object and initializing the external symbolizer as separate steps. Those steps now always take place together. Sanitizers with a legacy requirement to specify their own symbolizer path should use InitSymbolizer to initialize the symbolizer with the desired path, and GetSymbolizer to access the symbolizer. Sanitizers with no such requirement (e.g. UBSan) can use GetOrInitSymbolizer with no need for initialization. The symbolizer interface has been made thread-safe (as far as I can tell) by protecting its member functions with mutexes. Finally, the symbolizer interface no longer relies on weak externals, the introduction of which was probably a mistake on my part. Differential Revision: http://llvm-reviews.chandlerc.com/D1985 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193448 91177308-0d34-0410-b5e6-96231b3b80d8
* Continue to keep 'SUMMARY: ' prefix in lsan. Whoops!Nick Lewycky2013-10-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193232 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] When detect_leaks=false, be completely silent.Sergey Matveev2013-10-21
| | | | | | | | In particular, don't make a fuss if we're passed a malformed suppressions file, or if we have trouble identifying ld.so. Also, make LSan interface functions no-ops in this case. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@193108 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Fix bug when discovering indirectly leaked objects.Sergey Matveev2013-10-15
| | | | | | | If an object contains pointers to itself, that doesn't make it indirectly leaked. D'oh! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192716 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: use verbosity flag in sanitizer_common code directlyDmitry Vyukov2013-10-15
| | | | | | | | now it's available from common_flags() git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192705 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Support ASan's stack-use-after-return mode in LSan.Sergey Matveev2013-10-14
| | | | | | Treat the fake stack as live memory. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192593 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Improve thread lifetime tracking on POSIX systems.Sergey Matveev2013-10-14
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192585 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Turn GetStackTrace() into StackTrace::Unwind()Alexey Samsonov2013-10-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192533 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Move the PTHREAD_DESTRUCTOR_ITERATIONS constant to ↵Sergey Matveev2013-10-11
| | | | | | | | sanitizer_linux.h. Add a test. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@192442 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the usage of strip_path_prefix option and make it more consistent ↵Alexey Samsonov2013-10-04
| | | | | | across sanitizers git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191943 91177308-0d34-0410-b5e6-96231b3b80d8
* [LSan] Rework r191522 - treat allocations with short stack traces as liveAlexey Samsonov2013-09-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191662 91177308-0d34-0410-b5e6-96231b3b80d8
* [LSan] Don't report leaks with single-frame stack tracesAlexey Samsonov2013-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191522 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] Fix deadlock in stack unwinder on android/x86.Evgeniy Stepanov2013-09-12
| | | | | | | | Fixes PR17116. Patch by 林作健 (manjian2006 at gmail.com). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190590 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sanitizer] Refactor symbolization interface: use class instead of several ↵Alexey Samsonov2013-09-10
| | | | | | functions. Move some code around to get rid of extra source files git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@190410 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Colorize LSan reports.Sergey Matveev2013-09-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189804 91177308-0d34-0410-b5e6-96231b3b80d8
* ASan, LSan, MSan: try to find llvm-symbolizer binary in PATH if it is not ↵Alexey Samsonov2013-09-03
| | | | | | provided. Now we don't need to explicitly set the location of llvm-symbolizer in lit test configs. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189801 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r189347: it breaks on machines w/o installed debug versions of system ↵Alexey Samsonov2013-08-27
| | | | | | libraries git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189350 91177308-0d34-0410-b5e6-96231b3b80d8
* LSan: Check that dynamic linker library is properly symbolizedAlexey Samsonov2013-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189347 91177308-0d34-0410-b5e6-96231b3b80d8
* [sanitizer] Add a fast version of StackDepotGet() for use in LSan.Sergey Matveev2013-08-26
| | | | | | | Add a class that holds a snapshot of the StackDepot optimized for querying by ID. This allows us to speed up LSan dramatically. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189217 91177308-0d34-0410-b5e6-96231b3b80d8
* Slightly improve lint checker script and fix a few style issuesAlexey Samsonov2013-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189092 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Add a regression test for building C code.Sergey Matveev2013-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189016 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Add a stress test.Sergey Matveev2013-08-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189012 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Build standalone LSan with -fno-rtti.Sergey Matveev2013-08-22
| | | | | | Fix issue where C code could not be built with -fsanitize=leak. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@189010 91177308-0d34-0410-b5e6-96231b3b80d8
* [LSan] Add support for building standalone LSan runtime to Make build ↵Alexey Samsonov2013-08-20
| | | | | | (compiler-rt part) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188804 91177308-0d34-0410-b5e6-96231b3b80d8
* Define SANITIZER_INTERFACE_ATTRIBUTE on Windows and fix all the places where ↵Timur Iskhodzhanov2013-08-13
| | | | | | SANITIZER_INTERFACE_ATTRIBUTE or SANITIZER_ATTRIBUTE_WEAK are used git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188261 91177308-0d34-0410-b5e6-96231b3b80d8
* [tests] Update to use lit_config and lit package, as appropriate.Daniel Dunbar2013-08-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@188116 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable pipefail for LSan testsAlexey Samsonov2013-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187873 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Add leak_check_at_exit flag.Sergey Matveev2013-08-01
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187578 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable pipefail for lsan.Rafael Espindola2013-07-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@187274 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Make __lsan_do_leak_check() honor the detect_leaks flag.Sergey Matveev2013-07-22
| | | | | | Also move detect_leaks to common flags. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186821 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Print direct leaks first.Sergey Matveev2013-07-22
| | | | | | Direct leaks are higher priority, so it makes sense to have them on top. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186819 91177308-0d34-0410-b5e6-96231b3b80d8
* Use --driver-mode=g++ instead of -ccc-cxx; required after Clang r186605Hans Wennborg2013-07-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186607 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Add __lsan_do_leak_check() to the public interface.Sergey Matveev2013-07-18
| | | | | | | Let users override the normal behavior to run leak checking earlier in the process. Also fix a couple nits here and there. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186581 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Increase the hardcoded limit on number of leaks.Sergey Matveev2013-07-12
| | | | | | We never expected to see so many leaks in the real world. Until we did. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@186157 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Fix test.Sergey Matveev2013-07-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185817 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Handle fork() correctly.Sergey Matveev2013-07-08
| | | | | | | | 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(). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185815 91177308-0d34-0410-b5e6-96231b3b80d8
* [LSan] Use overridable hook to report error summaryAlexey Samsonov2013-07-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185805 91177308-0d34-0410-b5e6-96231b3b80d8
* Define the path to llvm-symbolizer tool in a common config to reduce copy-pasteAlexey Samsonov2013-06-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185286 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Fix build again.Sergey Matveev2013-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185157 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Fix build.Sergey Matveev2013-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185156 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] When verbosity > 1, always print suppressions and summary (even if no ↵Sergey Matveev2013-06-28
| | | | | | | | leaks found). Also fix an output bug. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185153 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Add suppression support.Sergey Matveev2013-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185152 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Fix flaky test.Sergey Matveev2013-06-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185079 91177308-0d34-0410-b5e6-96231b3b80d8
* [LSan] Add the way to disable LSan at link timeAlexey Samsonov2013-06-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@185066 91177308-0d34-0410-b5e6-96231b3b80d8
* [lsan] Define interceptors more correctly. Also, always clear allocated memory.Sergey Matveev2013-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184849 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert to C-style callbacks for iteration over allocator chunks.Sergey Matveev2013-06-24
| | | | | | | Also clean up LSan code, fix some comments and replace void* with uptr to bring down the number of reinterpret_casts. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@184700 91177308-0d34-0410-b5e6-96231b3b80d8