summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_common.h
Commit message (Collapse)AuthorAgeFilesLines
...
* [asan] Exclude non-executable mappings from coverage.Evgeniy Stepanov2014-06-111-1/+3
| | | | llvm-svn: 210649
* [asancov] Faster coverage in memory-mapped mode.Evgeniy Stepanov2014-06-051-1/+1
| | | | | | | | Use caller pc of __sanitizer_cov_module_init to figure out when 2 sequential calls are from the same module; skip .sancov.map file update in this case. llvm-svn: 210267
* [sancov] Handle fork.Evgeniy Stepanov2014-06-041-0/+2
| | | | | | | | | | Reset coverage data on fork(). For memory-mapped mode (coverage_direct=1) this helps avoid loss of data (before this change two processes would write to the same file simultaneously). For normal mode, this reduces coverage dump size, because PCs from the parent process are no longer inherited by the child. llvm-svn: 210180
* [asan] Enable ASan on PowerPC.Evgeniy Stepanov2014-05-301-1/+5
| | | | | | Patch by Peter Bergner. llvm-svn: 209879
* [asancov] Write coverage directly to a memory-mapped file.Evgeniy Stepanov2014-05-271-0/+7
| | | | | | | | | | | This way does not require a __sanitizer_cov_dump() call. That's important on Android, where apps can be killed at arbitrary time. We write raw PCs to disk instead of module offsets; we also write memory layout to a separate file. This increases dump size by the factor of 2 on 64-bit systems. llvm-svn: 209653
* [msan] Chained origins re-design.Evgeniy Stepanov2014-05-211-0/+5
| | | | | | | | | | | | | | | | | Generalize StackDepot and create a new specialized instance of it to efficiently (i.e. without duplicating stack trace data) store the origin history tree. This reduces memory usage for chained origins roughly by an order of magnitude. Most importantly, this new design allows us to put two limits on stored history data (exposed in MSAN_OPTIONS) that help avoid exponential growth in used memory on certain workloads. See comments in lib/msan/msan_origin.h for more details. llvm-svn: 209284
* [sanitizer] Support sandboxing in sanitizer coverage.Sergey Matveev2014-05-191-1/+2
| | | | | | | | | | | Summary: Sandboxed code may now pass additional arguments to __sanitizer_sandbox_on_notify() to force all coverage data to be dumped to a single file (the default is one file per module). The user may supply a file or socket to write to. The latter option can be used to broker out the file writing functionality. If -1 is passed, we pre-open a file. llvm-svn: 209121
* tsan: stop background thread when sandbox is enabledDmitry Vyukov2014-04-241-0/+1
| | | | | | Fixes https://code.google.com/p/thread-sanitizer/issues/detail?id=56 llvm-svn: 207114
* [asan] added internal flag mmap_limit_mbKostya Serebryany2014-04-141-0/+2
| | | | llvm-svn: 206178
* tsan: include what you useDmitry Vyukov2014-03-051-0/+1
| | | | | | VPrintf uses common_flags() llvm-svn: 202974
* A set of trivial changes to support sanitizers on FreeBSD.Alexey Samsonov2014-03-041-1/+1
| | | | | | Patch by Viktor Kutuzov! llvm-svn: 202801
* [sanitizer] Add a flag to enable/disable report colorization.Evgeniy Stepanov2014-02-261-0/+1
| | | | llvm-svn: 202249
* AdjustStackSizeLinux() is used in Lsan, Tsan and Msan non-Linux-specific ↵Kostya Serebryany2014-02-241-0/+1
| | | | | | | | | code so it seems it should have more generic name and moved to a common scope. Renamed to AdjustStackSize. Patch by Viktor Kutuzov. llvm-svn: 202011
* [sanitizer] replace MostSignificantSetBitIndex with ↵Kostya Serebryany2014-02-131-0/+13
| | | | | | LeastSignificantSetBitIndex in bit vector (to iterate bits in increasing order) llvm-svn: 201339
* [sanitizer] Use system unwinder in signal handlers on Android.Evgeniy Stepanov2014-02-111-0/+2
| | | | | | | | | | 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
* [libsanitizer] Workaround for ↵Alexander Potapenko2014-02-031-0/+2
| | | | | | | | https://code.google.com/p/address-sanitizer/issues/detail?id=261 If pthread_get_stacksize_np() returns 512K for the main thread on Mavericks, obtain the stack size from the current stack rlimit. llvm-svn: 200703
* [asan] Read extra flags from a system property on activation on Android.Evgeniy Stepanov2014-01-311-0/+2
| | | | llvm-svn: 200550
* [ASan] Move the SIGSEGV/SIGBUS handling to sanitizer_commonAlexander Potapenko2014-01-311-0/+4
| | | | | | | This change is a part of refactoring intended to have common signal handling behavior in all tools. This particular CL moves InstallSignalHandlers() into sanitizer_common (making it InstallDeadlySignalHandlers()), but doesn't enable default signal handlers for any tool other than ASan. llvm-svn: 200542
* [ASan] Move the sigaltstack() bits to sanitizer_common.Alexander Potapenko2014-01-281-0/+4
| | | | | | | This change is a part of refactoring intended to have common signal handling behavior in all tools. Note that this particular change doesn't enable use_sigaltstack support in every tool. llvm-svn: 200310
* [asan] Android logging.Evgeniy Stepanov2014-01-231-0/+6
| | | | | | This change duplicates all ASan output to system log on Android. llvm-svn: 199887
* [sanitizer] Replace inline with INLINE.Evgeniy Stepanov2014-01-231-1/+1
| | | | llvm-svn: 199883
* [asan] allow asan to use SizeClassAllocator32 on a 64-bit platform (if ↵Kostya Serebryany2013-12-261-6/+0
| | | | | | SANITIZER_CAN_USE_ALLOCATOR64=0). No functionality change by default is intended llvm-svn: 198044
* [msan] Replace wrap_indirect_calls runtime flag with an interface method.Evgeniy Stepanov2013-12-201-2/+2
| | | | llvm-svn: 197799
* [asan] add flag uar_noreserve to use noreserve mmap for fake stack. ↵Kostya Serebryany2013-12-131-0/+1
| | | | | | uar_noreserve=1 will save some memory but also negatively affect performance llvm-svn: 197233
* [sanitizer] Disable call wrapping when building for Go.Evgeniy Stepanov2013-12-131-1/+1
| | | | llvm-svn: 197232
* [msan] Wrap indirect calls from sanitizer rtl when running under DR.Evgeniy Stepanov2013-12-131-0/+17
| | | | llvm-svn: 197226
* Revert three patches which were committed without explicit contributionChandler Carruth2013-12-091-4/+0
| | | | | | | | | | | | | | | by their authors. This may break builds where others added code relying on these patches, but please *do not* revert this commit. Instead, we will prepare patches which fix the failures. Reverts the following commits: r168306: "[asan] support x32 mode in the fast stack unwinder. Patch by H.J. Lu" r168356: "[asan] more support for powerpc, patch by Peter Bergner" r196489: "[sanitizer] fix the ppc32 build (patch by Jakub Jelinek)" llvm-svn: 196802
* [sanitizer] Introduce VReport and VPrintf macros and use them in sanitizer code.Sergey Matveev2013-12-051-0/+8
| | | | | | Instead of "if (common_flags()->verbosity) Report(...)" we now have macros. llvm-svn: 196497
* [sanitizer] Fix log_path behavior with StopTheWorld.Sergey Matveev2013-12-041-0/+2
| | | | | | | | | | | | | | | | Summary: Fix race on report_fd/report_fd_pid between the parent process and the tracer task. Reviewers: samsonov Reviewed By: samsonov CC: llvm-commits, kcc, dvyukov Differential Revision: http://llvm-reviews.chandlerc.com/D2306 llvm-svn: 196385
* [Sanitizer] Fix a bug introduced in r196112. Add a test.Alexey Samsonov2013-12-031-1/+1
| | | | llvm-svn: 196263
* [sanitizer] Allow InternalMmapVector construction with zero capacity.Sergey Matveev2013-12-021-2/+1
| | | | llvm-svn: 196112
* Reapply asan coverage changes 194702-194704.Bob Wilson2013-11-151-0/+5
| | | | | | | | I still don't know what is causing our bootstrapped LTO buildbots to fail, but llvm r194701 seems to be OK and I can't imagine that these changes could cause the problem. llvm-svn: 194790
* Speculatively revert asan coverage changes 194702-194704.Bob Wilson2013-11-151-5/+0
| | | | | | | | | Apple's bootstrapped LTO builds have been failing, and these changes (along with llvm 194701) are the only things on the blamelist. I will either reapply these changes or help debug the problem, depending on whether this fixes the buildbots. llvm-svn: 194779
* [asan] Poor man's coverage that works with ASan (compiler-rt part)Kostya Serebryany2013-11-141-0/+5
| | | | llvm-svn: 194702
* [Sanitizer] Print symbolized stack frame using a single Printf() call.Alexey Samsonov2013-11-141-3/+22
| | | | | | | | This reduces the number of "write" syscalls performed to print a single stack frame description, and makes sanitizer output less intermixed with program output. Also, add a number of unit tests. llvm-svn: 194686
* [Sanitizer] Unify summary reporting across all sanitizers.Alexey Samsonov2013-11-011-3/+9
| | | | | | | | | | 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". llvm-svn: 193864
* Introduce an operator new for LowLevelAllocator, and convert most users to it.Peter Collingbourne2013-10-241-0/+5
| | | | llvm-svn: 193308
* tsan: be silent if verbosity=0Dmitry Vyukov2013-10-151-1/+0
| | | | | | | Currently tests fail with: Check failed: 'AAA' == 'AAA ==26017==Could not detach from thread 361395 (errno 3).' llvm-svn: 192711
* [lsan] Support ASan's stack-use-after-return mode in LSan.Sergey Matveev2013-10-141-0/+3
| | | | | | Treat the fake stack as live memory. llvm-svn: 192593
* [sanitizer] Define kPthreadDestructorIterations on POSIX systems.Sergey Matveev2013-10-111-0/+6
| | | | llvm-svn: 192453
* Refactor the usage of strip_path_prefix option and make it more consistent ↵Alexey Samsonov2013-10-041-0/+7
| | | | | | across sanitizers llvm-svn: 191943
* [Sanitizer] Refactor symbolization interface: use class instead of several ↵Alexey Samsonov2013-09-101-0/+31
| | | | | | functions. Move some code around to get rid of extra source files llvm-svn: 190410
* sanitizers: Make sure Visual Studio gets error reportsReid Kleckner2013-09-051-0/+3
| | | | | | | | | Visual Studio appears to close stderr before launching a non-console win32 program. This means we don't see any sanitizer reports. If stderr printing fails, call OutputDebugStringA to get the reports into the Visual Studio debugger console. llvm-svn: 190030
* [lsan] Colorize LSan reports.Sergey Matveev2013-09-031-0/+2
| | | | llvm-svn: 189804
* [Sanitizer] Add the way to find binary in PATHAlexey Samsonov2013-09-031-0/+1
| | | | llvm-svn: 189799
* [sanitizer] Add a fast version of StackDepotGet() for use in LSan.Sergey Matveev2013-08-261-0/+16
| | | | | | | Add a class that holds a snapshot of the StackDepot optimized for querying by ID. This allows us to speed up LSan dramatically. llvm-svn: 189217
* [sanitizer] Handle Die() in StopTheWorld.Sergey Matveev2013-08-261-1/+3
| | | | | | | | | Handle calls to Die() from the tracer thread. Fixes a bug where a CHECK could fail in the tracer thread, resulting in a call to AsanDie. The tracer thread then exited and the parent process continued execution despite its address space being in an unusable state. llvm-svn: 189216
* 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] Use less shadow on Win 32-bitTimur Iskhodzhanov2013-07-161-0/+1
| | | | llvm-svn: 186393
* [Sanitizer] Rename InternalVector to InternalMmapVectorAlexey Samsonov2013-06-141-8/+8
| | | | llvm-svn: 183972
OpenPOWER on IntegriCloud