llvm-project/compiler-rt/lib/asan
Dmitry Vyukov 123c58ea26 sanitizer_common: enable format string checking
Enable -Wformat in sanitizer_common now that it's
cleaned up from existing warnings.
But disable it in all sanitizers for now since
they are not cleaned up yet, but inherit sanitizer_common CFLAGS.

Depends on D107980.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D107981
2021-08-13 13:44:52 +02:00
..
scripts [compiler-rt] Handle None value when polling addr2line pipe 2021-05-10 09:46:06 +01:00
tests [clang] accept -fsanitize-ignorelist= in addition to -fsanitize-blacklist= 2021-05-04 10:24:00 -04:00
.clang-format Revert "sanitizers: increase .clang-format columns to 100" 2021-07-28 09:40:21 +02:00
CMakeLists.txt sanitizer_common: enable format string checking 2021-08-13 13:44:52 +02:00
README.txt
asan.syms.extra
asan_activation.cpp compiler-rt: Rename .cc file in lib/asan to .cpp 2019-08-01 13:43:28 +00:00
asan_activation.h
asan_activation_flags.inc
asan_allocator.cpp sanitizer_common: add thread safety annotations 2021-07-12 11:46:49 +02:00
asan_allocator.h [RISCV][ASAN] support code for architecture-specific parts of asan 2020-10-04 15:21:48 +03:00
asan_debugging.cpp Update compiler-rt cpplint.py 2019-09-11 21:33:06 +00:00
asan_descriptions.cpp sanitizer_common: introduce kInvalidTid/kMainTid 2021-04-30 15:58:05 +02:00
asan_descriptions.h Revert "Revert "[compiler-rt][asan] Make wild-pointer crash error more useful"" 2021-03-12 11:35:50 -05:00
asan_errors.cpp [asan] Remove Asan, Ubsan support of RTEMS and Myriad 2021-06-15 12:59:05 -07:00
asan_errors.h Reland "[ASan] Do not misrepresent high value address dereferences as null dereferences" 2019-10-10 17:19:58 +00:00
asan_fake_stack.cpp Cleanup for final comment on https://reviews.llvm.org/D103304 2021-06-09 13:47:12 -07:00
asan_fake_stack.h compiler-rt: Rename .cc file in lib/asan to .cpp 2019-08-01 13:43:28 +00:00
asan_flags.cpp [asan] Remove Asan, Ubsan support of RTEMS and Myriad 2021-06-15 12:59:05 -07:00
asan_flags.h
asan_flags.inc [asan] Remove Asan, Ubsan support of RTEMS and Myriad 2021-06-15 12:59:05 -07:00
asan_fuchsia.cpp [asan][fuchsia] Implement PlatformUnpoisonStacks 2021-07-28 18:02:19 -07:00
asan_globals.cpp sanitizers: switch BlockingMutex(LINKER_INITIALIZED) to Mutex 2021-07-28 15:09:34 +02:00
asan_globals_win.cpp Remove NOLINTs from compiler-rt 2019-09-11 23:19:48 +00:00
asan_ignorelist.txt [clang] accept -fsanitize-ignorelist= in addition to -fsanitize-blacklist= 2021-05-04 10:24:00 -04:00
asan_init_version.h
asan_interceptors.cpp [asan] Remove Asan, Ubsan support of RTEMS and Myriad 2021-06-15 12:59:05 -07:00
asan_interceptors.h [asan] Remove Asan, Ubsan support of RTEMS and Myriad 2021-06-15 12:59:05 -07:00
asan_interceptors_memintrinsics.cpp [asan] Remove Asan, Ubsan support of RTEMS and Myriad 2021-06-15 12:59:05 -07:00
asan_interceptors_memintrinsics.h Remove a few straggler ".cc"s in compiler-rt/lib 2019-08-01 17:53:25 +00:00
asan_interceptors_vfork.S [RISCV][ASAN] implementation for vfork interceptor for riscv64 2020-09-22 22:23:29 -07:00
asan_interface.inc Update and improve compiler-rt tests for -mllvm -asan_use_after_return=(never|[runtime]|always). 2021-06-08 14:39:06 -07:00
asan_interface_internal.h [sanitizers] Remove unneeded MaybeCall*DefaultOptions() and nullptr checks 2020-09-08 10:12:05 -07:00
asan_internal.h [asan] Remove Asan, Ubsan support of RTEMS and Myriad 2021-06-15 12:59:05 -07:00
asan_linux.cpp [asan][memprof] Declare _DYNAMIC and fix -Wparentheses 2020-12-27 20:28:59 -08:00
asan_lock.h
asan_mac.cpp [compiler-rt][asan] decommit shadow memory for unmaps in fuchsia. 2020-07-21 11:07:47 -07:00
asan_malloc_linux.cpp [asan] Remove Asan, Ubsan support of RTEMS and Myriad 2021-06-15 12:59:05 -07:00
asan_malloc_mac.cpp compiler-rt: Rename .cc file in lib/asan to .cpp 2019-08-01 13:43:28 +00:00
asan_malloc_win.cpp Remove unused variables, as suggested by @mcgov. 2019-11-04 14:55:51 -05:00
asan_mapping.h [asan] Remove Asan, Ubsan support of RTEMS and Myriad 2021-06-15 12:59:05 -07:00
asan_mapping_sparc64.h [asan] Dedup MemToShadowSize 2020-07-17 02:40:08 -07:00
asan_memory_profile.cpp compiler-rt: Rename .cc file in lib/asan to .cpp 2019-08-01 13:43:28 +00:00
asan_new_delete.cpp [asan] Remove Asan, Ubsan support of RTEMS and Myriad 2021-06-15 12:59:05 -07:00
asan_poisoning.cpp [asan] Remove Asan, Ubsan support of RTEMS and Myriad 2021-06-15 12:59:05 -07:00
asan_poisoning.h [asan] Remove Asan, Ubsan support of RTEMS and Myriad 2021-06-15 12:59:05 -07:00
asan_posix.cpp [Sanitizer][NFC] Fix typo 2021-03-01 23:47:03 +00:00
asan_preinit.cpp compiler-rt: Rename .cc file in lib/asan to .cpp 2019-08-01 13:43:28 +00:00
asan_premap_shadow.cpp [compiler-rt][asan][hwasan] Refactor shadow setup into sanitizer_common (NFCI) 2020-07-16 11:47:05 -07:00
asan_premap_shadow.h
asan_report.cpp sanitizers: switch BlockingMutex(LINKER_INITIALIZED) to Mutex 2021-07-28 15:09:34 +02:00
asan_report.h [sanitizer] Implement reallocarray. 2019-05-01 17:33:01 +00:00
asan_rtl.cpp [asan] Modified ASAN_MEMORY_ACCESS_CALLBACK to use a function call to ReportGenericErrorWrapper. 2021-07-22 21:20:24 +00:00
asan_scariness_score.h [compiler-rt] Remove some cpplint filters 2019-09-12 02:20:36 +00:00
asan_shadow_setup.cpp [asan] Remove Asan, Ubsan support of RTEMS and Myriad 2021-06-15 12:59:05 -07:00
asan_stack.cpp [sanitizer] Simplify __sanitizer::BufferedStackTrace::UnwindImpl implementations 2021-05-13 21:26:31 -07:00
asan_stack.h sanitizer_common: deduplicate CheckFailed 2021-05-12 08:50:53 +02:00
asan_stats.cpp sanitizers: switch BlockingMutex(LINKER_INITIALIZED) to Mutex 2021-07-28 15:09:34 +02:00
asan_stats.h Revert r369472 and r369441 2019-08-21 05:06:21 +00:00
asan_suppressions.cpp Remove NOLINTs from compiler-rt 2019-09-11 23:19:48 +00:00
asan_suppressions.h compiler-rt: Rename .cc file in lib/asan to .cpp 2019-08-01 13:43:28 +00:00
asan_thread.cpp sanitizers: switch BlockingMutex(LINKER_INITIALIZED) to Mutex 2021-07-28 15:09:34 +02:00
asan_thread.h sanitizer_common: add simpler ThreadRegistry ctor 2021-07-13 22:52:25 -07:00
asan_win.cpp [ASan] Fix broken Windows build due to 596d534ac3. 2021-01-23 09:09:06 -08:00
asan_win_dll_thunk.cpp Remove NOLINTs from compiler-rt 2019-09-11 23:19:48 +00:00
asan_win_dynamic_runtime_thunk.cpp Remove NOLINTs from compiler-rt 2019-09-11 23:19:48 +00:00
asan_win_weak_interception.cpp compiler-rt: Rename .cc file in lib/asan to .cpp 2019-08-01 13:43:28 +00:00
weak_symbols.txt Revert "Update and improve compiler-rt tests for -mllvm -asan_use_after_return=(never|[runtime]|always)." 2021-06-05 00:39:50 -07:00

README.txt

AddressSanitizer RT
================================
This directory contains sources of the AddressSanitizer (ASan) runtime library.

Directory structure:
README.txt       : This file.
Makefile.mk      : File for make-based build.
CMakeLists.txt   : File for cmake-based build.
asan_*.{cc,h}    : Sources of the asan runtime library.
scripts/*        : Helper scripts.
tests/*          : ASan unit tests.

Also ASan runtime needs the following libraries:
lib/interception/      : Machinery used to intercept function calls.
lib/sanitizer_common/  : Code shared between various sanitizers.

ASan runtime currently also embeds part of LeakSanitizer runtime for
leak detection (lib/lsan/lsan_common.{cc,h}).

ASan runtime can only be built by CMake. You can run ASan tests
from the root of your CMake build tree:

make check-asan

For more instructions see:
https://github.com/google/sanitizers/wiki/AddressSanitizerHowToBuild