summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/asan/asan_flags.inc
Commit message (Collapse)AuthorAgeFilesLines
* [compiler-rt] Better lint output for .inc filesVitaly Buka2019-09-121-6/+7
| | | | llvm-svn: 371702
* [sanitizers][windows] Rtl-Heap Interception and testsMatthew G McGovern2019-07-091-0/+2
| | | | | | | | | - Adds interceptors for Rtl[Allocate|Free|Size|ReAllocate]Heap - Adds unit tests for the new interceptors and expands HeapAlloc tests to demonstrate new functionality. Reviewed as D62927 llvm-svn: 365422
* Revert "[sanitizers][windows] Rtl-Heap Interception and tests"JF Bastien2019-07-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Causes build failure on clang-ppc64be-linux-lnt: compiler-rt/lib/asan/asan_malloc_win.cc:23:2: error: #error "Missing arch or unsupported platform for Windows." #error "Missing arch or unsupported platform for Windows." ^~~~~ compiler-rt/lib/asan/asan_malloc_win.cc:25:10: fatal error: heapapi.h: No such file or directory #include <heapapi.h> ^~~~~~~~~~~ compilation terminated. [39/1151] Building CXX object projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_debugging.cc.o [40/1151] Building CXX object projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o FAILED: projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o /usr/bin/c++ -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/compiler-rt/lib/asan -Icompiler-rt/lib/asan -Iinclude -I/home/buildbots/ppc64be-clang-lnt-test/clang-ppc64be-lnt/llvm/include -Icompiler-rt/lib/asan/.. -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -std=c++11 -Wno-unused-parameter -O2 -UNDEBUG -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fvisibility=hidden -fno-lto -O3 -g -Wno-variadic-macros -Wno-non-virtual-dtor -fno-rtti -MD -MT projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o -MF projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o.d -o projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.powerpc64.dir/asan_malloc_win.cc.o -c compiler-rt/lib/asan/asan_malloc_win.cc compiler-rt/lib/asan/asan_malloc_win.cc:23:2: error: #error "Missing arch or unsupported platform for Windows." #error "Missing arch or unsupported platform for Windows." ^~~~~ compiler-rt/lib/asan/asan_malloc_win.cc:25:10: fatal error: heapapi.h: No such file or directory #include <heapapi.h> ^~~~~~~~~~~ llvm-svn: 365384
* [sanitizers][windows] Rtl-Heap Interception and testsMatthew G McGovern2019-07-081-0/+2
| | | | | | | | | - Adds interceptors for Rtl[Allocate|Free|Size|ReAllocate]Heap - Adds unit tests for the new interceptors and expands HeapAlloc tests to demonstrate new functionality. Reviewed as D62927 llvm-svn: 365381
* 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
* [asan] Remove use_odr_indicator runtime flagVitaly Buka2018-12-041-2/+0
| | | | | | | | | | | | | | Summary: Flag was added for testing 3 years ago. Probably it's time to simplify code and usage by removing it. Reviewers: eugenis, m.ostapenko Subscribers: mehdi_amini, kubamracek, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D55254 llvm-svn: 348315
* [asan] Fix bug introduced by r331647Walter Lee2018-05-081-1/+1
| | | | | | unmap_shadow_on_exit was inadvertently flipped for non-RTEMS. llvm-svn: 331737
* [asan] Set flags appropriately for RTEMSWalter Lee2018-05-071-2/+3
| | | | | | | | Disable both unmap_shadow_on_exit and protect_shadow_gap. Differential Revision: https://reviews.llvm.org/D46461 llvm-svn: 331647
* Make detect_invalid_pointer_pairs option to be tristate.Alex Shlyapnikov2018-02-011-3/+3
| | | | | | | | | | | | | | | | Summary: With the change, one can choose not to report comparison (or subtraction) of a pointer with nullptr pointer. Reviewers: kcc, jakubjelinek, alekseyshl Reviewed By: alekseyshl Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D41479 llvm-svn: 323995
* [compiler-rt] Move dump_instruction_bytes and dump_registers into ↵Vitaly Buka2017-09-131-5/+0
| | | | | | | | | | | | | | sanitizer_common Summary: Part of https://github.com/google/sanitizers/issues/637 Reviewers: eugenis, alekseyshl Subscribers: kubamracek, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D37766 llvm-svn: 313117
* Add new ASAN_OPTION: sleep_after_init.Kostya Serebryany2017-08-021-0/+4
| | | | | | | | | | | | | | Summary: As mentioned in https://github.com/google/sanitizers/issues/834, suggested option can be handy for debugging. Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D35409 llvm-svn: 309854
* [asan] Move AsanCheckDynamicRTPrereqs check under flagMaxim Ostapenko2017-03-311-0/+3
| | | | | | | | | | The patch addresses https://github.com/google/sanitizers/issues/786. Currently AsanCheckDynamicRTPrereqs prevents dynamic ASan runtime from running in some important environments e.g. cowbuilder and fakeroot that may also work with interposition. Let's allow users to switch off the check given that they know what they do. Differential Revision: https://reviews.llvm.org/D31420 llvm-svn: 299188
* [asan] Implement "scribble" flags, which overwrite free'd memory with 0x55Kuba Mracek2017-03-301-0/+6
| | | | | | | | This patch implements "Malloc Scribble" in ASan via "max_free_fill_size" and "free_fill_byte" flags, which can be used to overwrite free()'d memory. We also match the behavior of MallocScribble and MallocPreScribble env vars on macOS (see https://developer.apple.com/library/content/documentation/Performance/Conceptual/ManagingMemory/Articles/MallocDebug.html), which is a helpful tool to detect use-after-free bugs that happen in non-instrumented code. Differential Revision: https://reviews.llvm.org/D30101 llvm-svn: 299085
* Add allocator_frees_and_returns_null_on_realloc_zero=false flag for ↵Filipe Cabecinhas2017-03-291-0/+4
| | | | | | | | | | | | | | | | | | | compatibility with allocators which allow a realloc(p, 0) and don't free the pointer. Summary: I know of two implementations that do this (ASan is not protecting against accessing the returned memory for now, just like malloc(0)): SIE libc on the PS4 dlmalloc has a flag for this This allows us to properly support this behaviour. Reviewers: vsk, kcc Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D31295 llvm-svn: 299016
* Expose thread local quarantine size as ASAN option.Evgeniy Stepanov2016-12-221-0/+6
| | | | | | | | | | | | | | Summary: Make thread local quarantine size an option so it can be turned off to save memory. Reviewers: eugenis Patch by Alex Shlyapnikov. Subscribers: kubabrecka, llvm-commits Differential Revision: https://reviews.llvm.org/D28027 llvm-svn: 290373
* [asan] Add a "dump_registers" flag to print out CPU registers after a SIGSEGVKuba Mracek2016-11-261-0/+3
| | | | | | | | This patch prints out all CPU registers after a SIGSEGV. These are available in the signal handler context. Only implemented for Darwin. Can be turned off with the dump_registers flag. Differential Revision: https://reviews.llvm.org/D11365 llvm-svn: 287957
* [asan] alloc_dealloc_mismatch=0 by default on Android.Evgeniy Stepanov2016-09-131-1/+1
| | | | | | | All known (to me) Android deployments are disabling this flag anyway. The in-tree script (asan_device_setup) does that, too. llvm-svn: 281410
* [asan] Remove runtime flag detect_stack_use_after_scopeVitaly Buka2016-08-291-2/+0
| | | | | | | | | | | | | | | Summary: We are going to use store instructions to poison some allocas. Runtime flag will require branching in instrumented code on every lifetime intrinsic. We'd like to avoid that. Reviewers: eugenis Subscribers: llvm-commits, kubabrecka Differential Revision: https://reviews.llvm.org/D23967 llvm-svn: 279981
* Add detect_stack_use_after_scope runtime flagVitaly Buka2016-07-191-0/+2
| | | | | | | | | | Summary: This flag could be used to disable check in runtime. Subscribers: kubabrecka Differential Revision: https://reviews.llvm.org/D22495 llvm-svn: 276004
* [sanitizer] Add memset, memmove, and memcpy to the common interceptorsDerek Bruening2016-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Currently, sanitizer_common_interceptors.inc has an implicit, undocumented assumption that the sanitizer including it has previously declared interceptors for memset and memmove. Since the memset, memmove, and memcpy routines require interception by many sanitizers, we add them to the set of common interceptions, both to address the undocumented assumption and to speed future tool development. They are intercepted under a new flag intercept_intrin. The tsan interceptors are removed in favor of the new common versions. The asan and msan interceptors for these are more complex (they incur extra interception steps and their function bodies are exposed to the compiler) so they opt out of the common versions and keep their own. Reviewers: vitalybuka Subscribers: zhaoqin, llvm-commits, kcc Differential Revision: http://reviews.llvm.org/D18465 llvm-svn: 264451
* Fix typo in asan_flags.George Burgess IV2016-02-081-1/+1
| | | | | | Patch by Michael Stapelberg. llvm-svn: 260147
* [asan] re-commit r259961, this time making the test Linux-OnlyKostya Serebryany2016-02-081-0/+2
| | | | llvm-svn: 260128
* [asan] Introduce new approach for ODR violation detection based on odr ↵Maxim Ostapenko2016-02-081-0/+2
| | | | | | | | | | | | | | indicator symbols. This is a compiler-rt part of this http://reviews.llvm.org/D15642 patch. Here, we add a new approach for ODR violation detection. Instead of using __asan_region_is_poisoned(g->beg, g->size_with_redzone) on global address (that would return false now due to using private alias), we can use new globally visible indicator symbol to perform the check. Differential Revision: http://reviews.llvm.org/D15644 llvm-svn: 260076
* Revert r259961, r259978, r259981.Nico Weber2016-02-071-2/+0
| | | | | | | | | | | | The "sanitizer-windows" buildbot has been failing for two days because of this: FAILED: cl.exe asan_report.cc asan_scariness_score.h(60) : error C2536: '__asan::ScarinessScore::__asan::ScarinessScore::descr' : cannot specify explicit initializer for arrays asan_scariness_score.h(60) : see declaration of '__asan::ScarinessScore::descr' llvm-svn: 260059
* [asan] add an experimental feature that prints the scariness score of the ↵Kostya Serebryany2016-02-061-0/+2
| | | | | | error message. To enable it use ASAN_OPTIONS=print_scariness=1 llvm-svn: 259961
* [ASan] Change the links in asa_flags.inc to point to GitHub.Alexander Potapenko2015-12-041-4/+4
| | | | llvm-svn: 254732
* [ASan] Retire mac_ignore_invalid_free, remove some dead code.Alexander Potapenko2015-12-041-3/+0
| | | | | | | | | | mac_ignore_invalid_free was helpful when ASan runtime used to intercept CFAllocator and sometimes corrupted its memory. This behavior had been long gone, and the flag was unused. This patch also deletes ReportMacCfReallocUnknown(), which was used by the CFAllocator realloc() wrapper. llvm-svn: 254722
* [asan] add an experimental flag protect_shadow_gap. If set to false, the ↵Kostya Serebryany2015-11-141-0/+1
| | | | | | shadow gap will not be mprotect-ed and all hell may break loose. But this makes CUDA's cuInit() pass. llvm-svn: 253108
* [ASan] Enable optional ASan recovery.Yury Gribov2015-11-111-0/+3
| | | | | | Differential Revision: http://reviews.llvm.org/D12318 llvm-svn: 252723
* [Sanitizers] Make abort_on_error common flag.Alexey Samsonov2015-08-271-4/+0
| | | | | | | | | | | | | | Summary: Teach all sanitizers to call abort() instead of _exit() after printing an error report, if requested. This behavior is the default on Mac OS. Reviewers: kcc, kubabrecka Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12332 llvm-svn: 246205
* [Sanitizers] Unify the semantics and usage of "exitcode" runtime flag across ↵Alexey Samsonov2015-08-211-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | all sanitizers. Summary: Merge "exitcode" flag from ASan, LSan, TSan and "exit_code" from MSan into one entity. Additionally, make sure sanitizer_common now uses the value of common_flags()->exitcode when dying on error, so that this flag will automatically work for other sanitizers (UBSan and DFSan) as well. User-visible changes: * "exit_code" MSan runtime flag is now deprecated. If explicitly specified, this flag will take precedence over "exitcode". The users are encouraged to migrate to the new version. * __asan_set_error_exit_code() and __msan_set_exit_code() functions are removed. With few exceptions, we don't support changing runtime flags during program execution - we can't make them thread-safe. The users should use __sanitizer_set_death_callback() that would call _exit() with proper exit code instead. * Plugin tools (LSan and UBSan) now inherit the exit code of the parent tool. In particular, this means that ASan would now crash the program with exit code "1" instead of "23" if it detects leaks. Reviewers: kcc, eugenis Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12120 llvm-svn: 245734
* [asan,tsan,msan] move the memcmp interceptor from asan/tsan to ↵Kostya Serebryany2015-07-291-3/+0
| | | | | | sanitizer_common. This may potentially lead to more reports from msan as it now sees the reads inside memcmp. To disable, use the flag intercept_memcmp=0. Likewise, it may potentially cause new races to appear due to more strict memcmp checking (flag strict_memcmp=1) llvm-svn: 243595
* [asan] Set abort_on_error=1 by default on OS XKuba Brecka2015-07-281-1/+1
| | | | | | | | This sets the default ASan flags to abort_on_error=1 on OS X. For unit tests and lit tests we set ASAN_OPTIONS back to abort_on_error=0 before running the tests (to avoid crashing). I added two tests that intentionally don't respect the default ASAN_OPTIONS to test the behavior of an empty ASAN_OPTIONS (on OS X we should crash, on Linux we should exit()). Differential Revision: http://reviews.llvm.org/D7203 llvm-svn: 243418
* [Sanitizer] Refactor SuppressionContext class.Alexey Samsonov2015-02-201-0/+1
| | | | | | | | | | | | | | SuppressionContext is no longer a singleton, shared by all sanitizers, but a regular class. Each of ASan, LSan, UBSan and TSan now have their own SuppressionContext, which only parses suppressions specific to that sanitizer. "suppressions" flag is moved away from common flags into tool-specific flags, so the user now may pass ASAN_OPTIONS=suppressions=asan_supp.txt LSAN_OPIONS=suppressions=lsan_supp.txt in a single invocation. llvm-svn: 230026
* [asan] add flag quarantine_size_mb, deprecate quarantine_sizeKostya Serebryany2015-01-071-2/+4
| | | | llvm-svn: 225337
* [Sanitizer] Change the runtime flag representation.Alexey Samsonov2015-01-071-0/+142
This mirrors r225239 to all the rest sanitizers: ASan, DFSan, LSan, MSan, TSan, UBSan. Now the runtime flag type, name, default value and description is located in the single place in the .inc file. llvm-svn: 225327
OpenPOWER on IntegriCloud