summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/lsan/lsan.h
Commit message (Collapse)AuthorAgeFilesLines
* [NFC][Sanitizer] Add new BufferedStackTrace::Unwind APIJulian Lettner2019-03-011-2/+2
| | | | | | | | | | | | | | | | | | | | | Retrying without replacing call sites in sanitizer_common (which might not have a symbol definition). Add new Unwind API. This is the final envisioned API with the correct abstraction level. It hides/slow fast unwinder selection from the caller and doesn't take any arguments that would leak that abstraction (i.e., arguments like stack_top/stack_bottom). GetStackTrace will become an implementation detail (private method) of the BufferedStackTrace class. Reviewers: vitalybuka Differential Revision: https://reviews.llvm.org/D58741 > llvm-svn: 355168 llvm-svn: 355172
* Revert "[NFC][Sanitizer] Add new BufferedStackTrace::Unwind API"Julian Lettner2019-03-011-2/+2
| | | | | | This reverts commit 6112f37e758ebf2405955e091a745f5003c1f562. llvm-svn: 355171
* [NFC][Sanitizer] Add new BufferedStackTrace::Unwind APIJulian Lettner2019-03-011-2/+2
| | | | | | | | | | | | | | | | Add new Unwind API. This is the final envisioned API with the correct abstraction level. It hides/slow fast unwinder selection from the caller and doesn't take any arguments that would leak that abstraction (i.e., arguments like stack_top/stack_bottom). GetStackTrace will become an implementation detail (private method) of the BufferedStackTrace class. Reviewers: vitalybuka Differential Revision: https://reviews.llvm.org/D58741 llvm-svn: 355168
* [NFC][Sanitizer] Pull up GetStackTrace into sanitizer_commonJulian Lettner2019-02-271-22/+0
| | | | | | | | | | | | | | | | | | | | We already independently declare GetStackTrace in all (except TSan) sanitizer runtime headers. Lets move it to sanitizer_stacktrace.h to have one canonical way to fill in a BufferedStackFrame. Also enables us to use it in sanitizer_common itself. This patch defines GetStackTrace for TSan and moves the function from ubsan_diag.cc to ubsan_diag_standalone.cc to avoid duplicate symbols for the UBSan-ASan runtime. Other than that this patch just moves the code out of headers and into the correct namespace. Reviewers: vitalybuka Differential Revision: https://reviews.llvm.org/D58651 llvm-svn: 355039
* [NFC][Sanitizer] Hard-code fast/slow unwinder at call siteJulian Lettner2019-02-271-1/+4
| | | | | | | | | | | | | Also assert that the caller always gets what it requested. This purely mechanical change simplifies future refactorings and eventual removal of BufferedStackTrace::Unwind. Reviewers: vitalybuka Differential Revision: https://reviews.llvm.org/D58557 llvm-svn: 355022
* [LSan] Fix `__sanitizer_print_stack_trace` via fast unwinderJulian Lettner2019-02-201-1/+2
| | | | | | | | | | Summary: Quick follow-up to: https://reviews.llvm.org/D58156 Reviewers: vitalybuka Differential Revision: https://reviews.llvm.org/D58358 llvm-svn: 354522
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [LSan] Export __lsan_initAlex Shlyapnikov2017-11-151-1/+1
| | | | | | | | | | | | | | | | | | | Summary: lsan_preinit.cc is meant to be linked into executable and calls lsan_init from .preinit_array section. But if liblsan is a shared library, then this doesn't work, because the symbol is not exported. This patch fixes that. The counterparts like asan_init or __tsan_init already do have SANITIZER_INTERFACE_ATTRIBUTE. Committing on behalf of jakubjelinek. Reviewers: alekseyshl, kcc Subscribers: llvm-commits Differential revision: https://reviews.llvm.org/D39889 llvm-svn: 318349
* [sanitizers] Rename GetStackTraceWithPcBpAndContextVitaly Buka2017-11-091-7/+5
| | | | | | Name does not need to enumerate arguments. llvm-svn: 317774
* [lsan] Extract GetStackTraceWithPcBpAndContext similar to asan versionVitaly Buka2017-09-141-15/+25
| | | | llvm-svn: 313239
* Add lsan interceptors for libdispatch functions on darwinFrancis Ricci2017-06-191-0/+2
| | | | | | | | | | | | | | | | | Summary: This is required for standalone LSan to work with libdispatch worker threads, and is a slimmed down version of the functionality provided for ASan in asan_mac.cc. Re-commit of r305695 with use_stacks=0 to get around a racy lingering pointer. Reviewers: alekseyshl, kubamracek, glider, kcc Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D34247 llvm-svn: 305732
* Revert "Add lsan interceptors for libdispatch functions on darwin"Francis Ricci2017-06-191-2/+0
| | | | | | This reverts r305695 llvm-svn: 305712
* Add lsan interceptors for libdispatch functions on darwinFrancis Ricci2017-06-191-0/+2
| | | | | | | | | | | | | | | Summary: This is required for standalone LSan to work with libdispatch worker threads, and is a slimmed down version of the functionality provided for ASan in asan_mac.cc. Reviewers: alekseyshl, kubamracek, glider, kcc Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D34247 llvm-svn: 305695
* Implement standalone lsan interceptors for OS XFrancis Ricci2017-04-111-0/+7
| | | | | | | | | | | | | | Summary: Mimicks the existing tsan and asan implementations of Darwin interception. Reviewers: kubamracek, kcc, glider Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D31889 llvm-svn: 299979
* [LSAN] Fix test swapcontext.cc on MIPSSagar Thakur2016-05-181-2/+5
| | | | | | | | | There is no frame validity check in the slow unwinder like there is in the fast unwinder due to which lsan reports a leak even for heap allocated coroutine in the test swapcontext.cc. Since mips/linux uses slow unwindwer instead of fast unwinder, the test fails for mips/linux. Therefore adding the checks before unwinding fixes the test for mips/linux. Reviewed by aizatsky. Differential: http://reviews.llvm.org/D19961 llvm-svn: 269882
* Revert "[LSAN] Fix test swapcontext.cc on MIPS"Renato Golin2016-04-221-5/+3
| | | | | | This reverts commit r266716, as it breaks the self-hosting on Thumb2 buildbot. llvm-svn: 267158
* [LSAN] Fix test swapcontext.cc on MIPSSagar Thakur2016-04-191-3/+5
| | | | | | | | | Summary: There is no frame validity check in the slow unwinder like there is in the fast unwinder due to which lsan reports a leak even for heap allocated coroutine in the test swapcontext.cc. Since mips/linux uses slow unwindwer instead of fast unwinder, the test fails for mips/linux. Therefore adding the checks before unwinding fixes the test for mips/linux. Reviewers: samsonov, earthdok, kcc Subscribers: llvm-commits, mohit.bhakkad, jaydeep Differential: http://reviews.llvm.org/D18690 llvm-svn: 266716
* [Sanitizer] Make StackTrace a lightweight reference to array of PCs, andAlexey Samsonov2014-10-261-11/+11
| | | | | | | | | | | | | | | | | | | | | | introduce a BufferedStackTrace class, which owns this array. Summary: This change splits __sanitizer::StackTrace class into a lightweight __sanitizer::StackTrace, which doesn't own array of PCs, and BufferedStackTrace, which owns it. This would allow us to simplify the interface of StackDepot, and eventually merge __sanitizer::StackTrace with __tsan::StackTrace. Test Plan: regression test suite. Reviewers: kcc, dvyukov Reviewed By: dvyukov Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5985 llvm-svn: 220635
* [lsan] Implement __sanitizer_print_stack_trace() in standalone LSan.Sergey Matveev2014-08-261-0/+20
| | | | llvm-svn: 216454
* [lsan] Unbreak standalone LSan's initialization by making it more like ASan's.Sergey Matveev2013-11-251-1/+5
| | | | | | | | No longer allow interceptors to be called during initialization, use the preinit array (instead of initializing at the first call to an intercepted function) and adopt the calloc() hack from ASan. llvm-svn: 195642
* [lsan] Standalone LSan initialization.Sergey Matveev2013-05-201-0/+23
llvm-svn: 182248
OpenPOWER on IntegriCloud