summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan/asan_stack.cc
Commit message (Collapse)AuthorAgeFilesLines
* [ASan] Allow to atomically modify malloc_context_size at runtime.Alexey Samsonov2014-12-161-0/+15
| | | | | | | | | | | | | | | | | | Summary: Introduce __asan::malloc_context_size atomic that is used to determine required malloc/free stack trace size. It is initialized with common_flags()->malloc_context_size flag, but can later be overwritten at runtime (e.g. when ASan is activated / deactivated). Test Plan: regression test suite Reviewers: kcc, eugenis Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6645 llvm-svn: 224305
* [ASan] Get rid of ASan-specific functions for printing stack tracesAlexey Samsonov2013-12-191-14/+0
| | | | llvm-svn: 197672
* [ASan] Get rid of __asan_symbolize functionAlexey Samsonov2013-12-191-17/+1
| | | | llvm-svn: 197670
* [Sanitizer] Implement Symbolizer class on WindowsTimur Iskhodzhanov2013-12-181-1/+1
| | | | llvm-svn: 197571
* [ASan] Return interface attribute to __sanitizer_print_stack_traceAlexey Samsonov2013-12-041-1/+4
| | | | llvm-svn: 196364
* [asan] Fix build error.Sergey Matveev2013-12-031-1/+0
| | | | llvm-svn: 196303
* [sanitizer] Expose __sanitizer_print_stack_trace().Sergey Matveev2013-12-031-0/+6
| | | | | | | Expose a new interface function for debugging code built with sanitizer tools. Add an ASan implementation. llvm-svn: 196302
* Consistently use StackTrace::PrintStack in ASan, LSan and MSanAlexey Samsonov2013-11-011-5/+0
| | | | llvm-svn: 193834
* [Sanitizer] Simplify StackTrace::PrintStack interface: prefer common flags ↵Alexey Samsonov2013-10-291-3/+2
| | | | | | to turn on/off the symbolization llvm-svn: 193587
* asan/msan: separate different report blocks with new linesDmitry Vyukov2013-10-281-1/+3
| | | | | | this makes the reports consistent with tsan, and much more readable. llvm-svn: 193520
* [asan] fix stack trace printing on MacKostya Serebryany2013-10-181-0/+4
| | | | llvm-svn: 192990
* [asan] reduce the size of AsanThreadContext by storing the stack trace in ↵Kostya Serebryany2013-10-181-2/+5
| | | | | | the stack depot llvm-svn: 192979
* Refactor the usage of strip_path_prefix option and make it more consistent ↵Alexey Samsonov2013-10-041-2/+2
| | | | | | across sanitizers llvm-svn: 191943
* Define SANITIZER_INTERFACE_ATTRIBUTE on Windows and fix all the places where ↵Timur Iskhodzhanov2013-08-131-1/+1
| | | | | | SANITIZER_INTERFACE_ATTRIBUTE or SANITIZER_ATTRIBUTE_WEAK are used llvm-svn: 188261
* [asan] Common flags in ASan.Sergey Matveev2013-05-061-2/+3
| | | | | | | Some flags that are common to ASan/MSan/TSan/LSan have been moved to sanitizer_common. llvm-svn: 181193
* [sanitizer] Replace more platform checks with SANITIZER_ constants.Evgeniy Stepanov2013-03-191-1/+1
| | | | llvm-svn: 177400
* [ASan] Split ASan interface header into private and public parts. Add a test ↵Alexey Samsonov2013-01-311-1/+1
| | | | | | that makes sure users can include interface header llvm-svn: 174058
* ASan: change the strategy we use for installing malloc/free/symbolization ↵Alexey Samsonov2012-12-071-2/+8
| | | | | | hooks on Linux: don't provide a default no-op implementations for hooks in runtime, and optionally call hooks if they are provided by the user. Don't force weak interface functions into runtime. llvm-svn: 169641
* [Sanitizer/ASan] Simplify the code that prints and symbolizes stack traces. ↵Alexey Samsonov2012-10-021-8/+9
| | | | | | Fall back to module+offset if user-provided symbolizer failed. Use weak function __asan_symbolize instead of __asan_set_symbolize_callback in ASan interface, so that we're able to symbolize reports for errors that happen before the main() is called, for example, during module initialization. llvm-svn: 165000
* Relocate the external headers provided by ASan and the common sanitizerChandler Carruth2012-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | library. These headers are intended to be available to user code when built with AddressSanitizer (or one of the other sanitizer's in the future) to interface with the runtime library. As such, they form stable external C interfaces, and the headers shouldn't be located within the implementation. I've pulled them out into what seem like fairly obvious locations and names, but I'm wide open to further bikeshedding of these names and locations. I've updated the code and the build system to cope with the new locations, both CMake and Makefile. Please let me know if this breaks anyone's build. The eventual goal is to install these headers along side the Clang builtin headers when we build the ASan runtime and install it. My current thinking is to locate them at: <prefix>/lib/clang/X.Y/include/sanitizer/common_interface_defs.h <prefix>/lib/clang/X.Y/include/sanitizer/asan_interface.h <prefix>/lib/clang/X.Y/include/sanitizer/... But maybe others have different suggestions? Fixing the style of the #include between these headers at least unblocks experimentation with installing them as they now should work when installed in these locations. llvm-svn: 162822
* [asan] actually move StackTrace to sanitizer_commonKostya Serebryany2012-08-281-205/+1
| | | | llvm-svn: 162757
* [asan] even more refactoring to move StackTrace to sanitizer_commonKostya Serebryany2012-08-281-16/+23
| | | | llvm-svn: 162754
* [asan] more refactoring to move StackTrace to sanitizer_commonKostya Serebryany2012-08-281-12/+4
| | | | llvm-svn: 162752
* [asan] some renaming before we move StackTrace into sanitizer_commonKostya Serebryany2012-08-281-11/+9
| | | | llvm-svn: 162747
* [asan] get rid of AsanPrintf in favor of Printf from sanitizer_commonKostya Serebryany2012-08-281-8/+8
| | | | llvm-svn: 162746
* [Sanitizer] Rename ProcessMaps to MemoryMappingLayout and fix Windows build ↵Alexey Samsonov2012-08-271-1/+1
| | | | | | by providing stub implementation llvm-svn: 162671
* [ASan] get rid of ASAN_USE_EXTERNAL_SYMBOLIZER compiler def in favor of ↵Alexey Samsonov2012-08-221-20/+21
| | | | | | __asan_set_symbolize_callback interface function. Now the user doesn't have to recompile ASan runtime to provide its own symbolizer llvm-svn: 162358
* Patch the frame address regardless of the frame number.Alexander Potapenko2012-08-151-6/+2
| | | | llvm-svn: 161946
* Use SANITIZER_INTERFACE_ATTRIBUTE instead of ↵Alexander Potapenko2012-08-151-0/+2
| | | | | | | | __attribute__((visibility("default"))) Export CheckFailed, asan_malloc, asan_free, asan_memalign, AsanStackTrace::CompressStack, AsanStackTrace::UncompressStack from the dynamic runtime library. llvm-svn: 161943
* [ASan] add new ASan option 'strip_path_prefix' to remove useless prefices ↵Alexey Samsonov2012-08-061-5/+17
| | | | | | from filenames in stack traces llvm-svn: 161321
* [ASan] subtract one from PCs in ASan error reports (as they originally ↵Alexey Samsonov2012-07-191-2/+16
| | | | | | contain return addresses). Make output tests stricter. llvm-svn: 160508
* [ASan] Use common flags parsing machinery.Alexey Samsonov2012-07-091-1/+1
| | | | llvm-svn: 159933
* [ASan] Minor fix in symbolizer output.Alexey Samsonov2012-07-041-1/+1
| | | | llvm-svn: 159709
* [Sanitizer] Extend a symbolizer code. Implemented for Linux only. Use ↵Alexey Samsonov2012-07-031-2/+8
| | | | | | dl_iterate_phdr to get virtual addresses of mapped module sections. To symbolize an address from a module, map this module to memory and obtain pointers to debug info sections. Later these pointers can be passed to constructor of DWARF context-in-memory from LLVM DebugInfo lib. llvm-svn: 159652
* [Sanitizer] Use ProcessMaps in symbolizer to get module name and offset for ↵Alexey Samsonov2012-06-151-11/+16
| | | | | | instruction address llvm-svn: 158522
* [ASan] don't include deleted headerAlexey Samsonov2012-06-141-1/+0
| | | | llvm-svn: 158448
* [Sanitizer] __asan::AsanProcMaps -> __sanitizer::ProcessMaps.Alexey Samsonov2012-06-071-1/+2
| | | | llvm-svn: 158139
* [Sanitizer]: Introduce a common internal printf function. For now, also use ↵Alexey Samsonov2012-06-061-7/+7
| | | | | | tool-specific wrappers TsanPrintf (its output is controlled by TSan flags) and AsanPrintf (which copies its results to the ASan-private buffer). Supported formats: %[z]{d,u,x}, %s, %p. Re-write all format strings in TSan according to this format (this should have no effect on 64-bit platforms). llvm-svn: 158065
* [Sanitizer] remove using namespace __sanitizer linesAlexey Samsonov2012-06-051-2/+0
| | | | llvm-svn: 157999
* Remove file-type tags for .cc files in ASan run-time libraryAlexey Samsonov2012-06-041-1/+1
| | | | llvm-svn: 157927
* [ASan] Use ASan option symbolize to turn on internal symbolizer (in development)Alexey Samsonov2012-06-041-4/+23
| | | | llvm-svn: 157924
* [asan] more renamingKostya Serebryany2012-05-311-6/+6
| | | | llvm-svn: 157747
* [asan] more renamingKostya Serebryany2012-05-311-36/+36
| | | | llvm-svn: 157746
* [asan] Support for %z to Printf()Evgeniy Stepanov2012-03-211-10/+10
| | | | | | | | | | | | At the moment, asan internal Printf() uses %l modifier for printing values of size_t and related types. This works, because we control both the implementation of Printf and all its uses, but can be a little misleading. This change adds support for %z to Printf(). All callers that print sizes and pointers as integers are switched to %zu / %zx. llvm-svn: 153177
* [asan]: fix off-by-one error in stack unwinder (asan issue #44; reproduced ↵Kostya Serebryany2012-03-081-1/+1
| | | | | | thanks to 'csmith' fuzzer) llvm-svn: 152347
* AddressSanitizer: replace all "real_X" calls with "REAL(X)"Alexey Samsonov2012-02-081-2/+2
| | | | llvm-svn: 150073
* EHABI-based stack trace on ARM.Evgeniy Stepanov2012-01-191-8/+0
| | | | | | | The change removes the unused FLAG_fast_unwind, and forces EHABI-based unwind on ARM, and fast (FP-based) unwind everywhere else. llvm-svn: 148468
* Delete sysinfo/* and all references to it.Alexander Potapenko2012-01-181-94/+4
| | | | llvm-svn: 148386
* [asan] fix mac build once moreKostya Serebryany2012-01-091-2/+0
| | | | llvm-svn: 147796
* [asan] use dl_iterate_phdr for pre-symbolization on linux instead of parsing ↵Kostya Serebryany2012-01-051-14/+5
| | | | | | /proc/self/maps llvm-svn: 147628
OpenPOWER on IntegriCloud