summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc
Commit message (Collapse)AuthorAgeFilesLines
* compiler-rt: Rename .cc file in lib/sanitizer_common to .cppNico Weber2019-07-311-158/+0
| | | | | | | | | | | See https://reviews.llvm.org/D58620 for discussion, and for the commands I ran. In addition I also ran for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done and manually updated (many) references to renamed files found by that. llvm-svn: 367463
* [NFC][Sanitizer] Hard-code fast/slow unwinder at call siteJulian Lettner2019-02-271-0/+2
| | | | | | | | | | | | | 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
* [NFC][Sanitizer] Rename BufferedStackTrace::FastUnwindStackJulian Lettner2019-02-221-3/+3
| | | | | | | | | | | | | | | | FastUnwindStack -> UnwindFast SlowUnwindStack -> UnwindSlow Stack is redundant, verb should come first. SlowUnwindStackWithContext(uptr pc, void *context, u32 max_depth) -> SlowUnwindStack WithContext is redundant, since it is a required parameter. Reviewers: vitalybuka Differential Revision: https://reviews.llvm.org/D58551 llvm-svn: 354696
* 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
* [sanitizer] Include inlined frames into __sanitizer_symbolize_pc outputVitaly Buka2018-10-021-5/+19
| | | | | | | | | | | | | | | | Summary: Behavior for existing used is not changing as the first line is going to be the same, and it was invalid to try to read more lines. New clients can read until they get empty string. Reviewers: eugenis, morehouse Subscribers: kubamracek, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D52743 llvm-svn: 343605
* Revert "[sanitizer] Include inlined frames into __sanitizer_symbolize_pc output"Jessica Paquette2018-10-021-19/+5
| | | | | | | | | This reverts r343554. It was breaking some bots: http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA/49997/ llvm-svn: 343600
* [sanitizer] Include inlined frames into __sanitizer_symbolize_pc outputVitaly Buka2018-10-021-5/+19
| | | | | | | | | | | | | | | | Summary: Behavior for existing used is not changing as the first line is going to be the same, and it was invalid to try to read more lines. New clients can read until they get empty string. Reviewers: eugenis, morehouse Subscribers: kubamracek, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D52743 llvm-svn: 343554
* Do not crash with missing symbolication when running in DEDUP modeGeorge Karpenkov2017-07-101-1/+2
| | | | | | | | | Printing stacktrace from ASAN crashes with a segfault in DEDUP mode when symbolication is missing. Differential Revision: https://reviews.llvm.org/D34914 llvm-svn: 307577
* [sanitizers] __sanitizer_get_module_and_offset_for_pc interface functionMike Aizatsky2016-12-051-0/+22
| | | | | | | | | | | | Summary: The function computes full module name and coverts pc into offset. Reviewers: kcc Subscribers: kubabrecka Differential Revision: https://reviews.llvm.org/D26820 llvm-svn: 288711
* [sanitizer] rename __sanitizer_symbolize_data to ↵Kostya Serebryany2016-09-191-2/+2
| | | | | | __sanitizer_symbolize_global (to avoid conflict with another definition) llvm-svn: 281902
* [sanitizer] add __sanitizer_symbolize_data (can only print the names of the ↵Kostya Serebryany2016-09-191-4/+16
| | | | | | globals for now) llvm-svn: 281886
* [sanitizer] Fixup 2: Do not introduce __sanitizer namespace globallyAnna Zaks2016-09-151-0/+1
| | | | | | This got committed by mistake. Should fix some bots. llvm-svn: 281668
* [compiler-rt] Do not introduce __sanitizer namespace globallyAnna Zaks2016-09-151-3/+3
| | | | | | | | | | | | The definitions in sanitizer_common may conflict with definitions from system headers because: The runtime includes the system headers after the project headers (as per LLVM coding guidelines). lib/sanitizer_common/sanitizer_internal_defs.h pollutes the namespace of everything defined after it, which is all/most of the sanitizer .h and .cc files and the included system headers with: using namespace __sanitizer; // NOLINT This patch solves the problem by introducing the namespace only within the sanitizer namespaces as proposed by Dmitry. Differential Revision: https://reviews.llvm.org/D21947 llvm-svn: 281657
* [sanitizer] fix a potential buffer overflow due to __sanitizer_symbolize_pc ↵Kostya Serebryany2016-09-091-0/+3
| | | | | | (need to put a zero after strncmp). LOL llvm-svn: 281015
* [sanitizer] add __sanitizer_symbolize_pc. ↵Kostya Serebryany2016-08-251-0/+19
| | | | | | https://github.com/google/sanitizers/issues/322 llvm-svn: 279780
* [sanitizers] introduce a common run-time option dedup_token_length to help ↵Kostya Serebryany2016-05-281-0/+9
| | | | | | with report deduplication, off by default for now. See https://github.com/google/sanitizers/issues/684 llvm-svn: 271085
* [sanitizer] add #ifdefs around slow unwinder to fix OS X debug buildKuba Brecka2015-07-021-0/+4
| | | | | | | | | | A recent change in slow unwinder causes the OS X build to fail when using COMPILER_RT_DEBUG=On. Let's fix this by #ifdef'ing it with #if SANITIZER_CAN_SLOW_UNWIND. See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150622/284294.html Reviewed at http://reviews.llvm.org/D10870 llvm-svn: 241261
* [sanitizer_common] Added VS-style output for source locationsFilipe Cabecinhas2015-06-041-1/+2
| | | | | | | | | | | | | | | | | | | | | Summary: With this patch, we have a flag to toggle displaying source locations in the regular style: file:line:column or Visual Studio style: file(line,column) This way, they get picked up on the Visual Studio output window and one can double-click them to get to that file location. Reviewers: samsonov, rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10113 llvm-svn: 239000
* [msan] Better use-after-free reports.Evgeniy Stepanov2015-01-221-1/+1
| | | | | | | | | | | | | By attaching an extra integer tag to heap origins, we are able to distinguish between uninits - created by heap allocation, - created by heap deallocation (i.e. use-after-free), - created by __msan_allocated_memory call, - etc. See https://code.google.com/p/memory-sanitizer/issues/detail?id=35. llvm-svn: 226821
* Simplify Symbolizer::SymbolizePC() interface.Alexey Samsonov2014-12-021-14/+5
| | | | | | | | | | | Return a linked list of AddressInfo objects, instead of using an array of these objects as an output parameter. This simplifies the code in callers of this function (especially TSan). Fix a few memory leaks from internal allocator, when the returned AddressInfo objects were not properly cleared. llvm-svn: 223145
* [Sanitizer] Introduce "stack_trace_format" runtime flag.Alexey Samsonov2014-11-061-2/+2
| | | | | | | | | | | | | | | | This flag can be used to specify the format of stack frames - user can now provide a string with placeholders, which should be printed for each stack frame with placeholders replaced with actual data. For example "%p" will be replaced by PC, "%s" will be replaced by the source file name etc. "DEFAULT" value enforces default stack trace format currently used in all the sanitizers except TSan. This change also implements __sanitizer_print_stack_trace interface function in TSan. llvm-svn: 221469
* [Sanitizer] Introduce generic stack frame rendering machineryAlexey Samsonov2014-11-051-26/+11
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit introduces function __sanitizer::RenderFrame() that allows to render the contents of AddressInfo (essentially, symbolized stack frame) using the custom format string. This function can be used to implement stack frame formatting for both ThreadSanitizer and generic StackTrace::Print(), used in another places. This paves the way towards allowing user to control the format of stack frames, obtaining them in any format he desires, and/or enforcing the consistent output from all sanitizers. Test Plan: compiler-rt test suite Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6140 llvm-svn: 221409
* [Sanitizer] Make StackTrace a lightweight reference to array of PCs, andAlexey Samsonov2014-10-261-8/+8
| | | | | | | | | | | | | | | | | | | | | | 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
* Remove unused local variableAlexey Samsonov2014-10-201-5/+2
| | | | llvm-svn: 220247
* [sanitizer] Make stack traces from dlclose()'d modules more meaningful.Sergey Matveev2014-05-231-0/+8
| | | | | | | Previously, they silently omitted PCs belonging to unknown modules. Now we print (<unknown module>) instead. llvm-svn: 209522
* Avoid doing any work when unwinding stack traces with 0 or 1 frameAlexey Samsonov2014-03-041-2/+11
| | | | llvm-svn: 202837
* [sanitizer] Fix build.Evgeniy Stepanov2014-02-111-1/+1
| | | | llvm-svn: 201152
* [sanitizer] Use system unwinder in signal handlers on Android.Evgeniy Stepanov2014-02-111-5/+10
| | | | | | | | | | Because of the way Bionic sets up signal stack frames, libc unwinder is unable to step through it, resulting in broken SEGV stack traces. Luckily, libcorkscrew.so on Android implements an unwinder that can start with a signal context, thus sidestepping the issue. llvm-svn: 201151
* [Sanitizer] Don't use MemoryMappingLayout in StackTrace::PrintStack - it is ↵Alexey Samsonov2013-12-251-0/+48
| | | | | | now a responsibility of Symbolizer class. llvm-svn: 198006
* [ASan] Do not rely on malloc context in allocator reports.Alexey Samsonov2013-11-131-0/+2
| | | | | | | | | | | Invoke a fatal stack trace unwinder when ASan prints allocator-relevant error reports (double-free, alloc-dealloc-mismatch, invalid-free). Thus we'll be able to print complete stack trace even if allocation/free stacks are not stored (malloc_context_size=0). Based on the patch by Yuri Gribov! llvm-svn: 194579
* [Sanitizer] Make StackTrace::Unwind the only public way to unwind a stack trace.Alexey Samsonov2013-11-071-8/+2
| | | | llvm-svn: 194196
* [Sanitizer] Call Windows unwinder 'slow' and share StackTrace::Unwind across ↵Alexey Samsonov2013-11-071-0/+32
all platforms. No functionality change. llvm-svn: 194193
OpenPOWER on IntegriCloud