| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[compiler-rt] Use portable "#!/usr/bin/env bash" shebang for tests. In build_symbolizer.sh we can safely remove the -eu argument from the shebang (which is an unportable construct), as the scripts sets **-e** and **-u** already. Differential Revision: https://reviews.llvm.org/D110039 | 4 年前 | |
[compiler-rt][CMake] Set --unwindlib=none when using LLVM libunwind We already link libunwind explicitly so avoid trying to link toolchain's default libunwind which may be missing. This matches what we already do for libcxx and libcxxabi. Differential Revision: https://reviews.llvm.org/D129472 | 3 年前 | |
Revert "sanitizers: increase .clang-format columns to 100" This reverts commit 5d1df6d220f1d6f726d9643848679d781750db64. There is a strong objection to this change: https://reviews.llvm.org/D106436#2905618 Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D106847 | 4 年前 | |
[ASan] Reland of D116182 to always link asan_static library. After landing D121813 the binary size increase introduced by this change can be minimized by using --gc-sections link options. D121813 allows each individual callbacks to be optimized out if not used. Reviewed By: vitalybuka, MaskRay Differential Revision: https://reviews.llvm.org/D122407 | 4 年前 | |
[ASan] Fix the links to bugs and wikipages. llvm-svn: 254735 | 10 年前 | |
[asan] Export __sancov_* symbols symbols. Add __sancov_* symbols to the export list. Differential Revision: https://reviews.llvm.org/D29317 llvm-svn: 293680 | 9 年前 | |
[ASan] Renamed SHADOW_XYZ to ASAN_SHADOW_XYZ. Follow up from D115271. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D115293 | 4 年前 | |
Update the file headers across all of the LLVM projects in the monorepo 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 | 7 年前 | |
Update the file headers across all of the LLVM projects in the monorepo 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 | 7 年前 | |
[NFC][sanitizer] Consolidate malloc hook invocations | 4 年前 | |
Revert "Reland "[NFC][compiler-rt][asan] Unify asan and lsan allocator settings"" This reverts commit b37d84aa8d59dde2fae7388da5101bf471ec3434. This broke aarch64 asan builders for fuchsia. I accidentally changed the allocator settings for fuchsia on aarch64 because the new asan allocator settings use: // AArch64/SANITIZER_CAN_USE_ALLOCATOR64 is only for 42-bit VMA // so no need to different values for different VMA. const uptr kAllocatorSpace = 0x10000000000ULL; const uptr kAllocatorSize = 0x10000000000ULL; // 3T. typedef DefaultSizeClassMap SizeClassMap; rather than reaching the final #else which would use fuchsia's lsan config. | 3 年前 | |
[ASan] Renamed SHADOW_XYZ to ASAN_SHADOW_XYZ. Follow up from D115271. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D115293 | 4 年前 | |
Fix -Wformat warnings reported by GCC. Differential Revision: https://reviews.llvm.org/D113099 | 4 年前 | |
Revert "Revert "[compiler-rt][asan] Make wild-pointer crash error more useful"" This reverts commit c578508b5bb20ccce5e2a43dd2afc41a49afec74. Reland now that unrelated crash has been resolved. | 5 年前 | |
[compiler-rt][sanitizer] Have all OOM-related error messages start with the same format This way downstream tools that read sanitizer output can differentiate between OOM errors reported by sanitizers from other sanitizer errors. Changes: - Introduce ErrorIsOOM for checking if a platform-specific error code from an "mmap" is an OOM err. - Add ReportOOMError which just prepends this error message to the start of a Report call. - Replace some Reports for OOMs with calls to ReportOOMError. - Update necessary tests. Differential Revision: https://reviews.llvm.org/D127161 | 3 年前 | |
[PATCH] ASAN: Align declaration with definition of a fn Fixes: https://bugs.llvm.org/show_bug.cgi?id=51641 Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D115447 | 4 年前 | |
[NFCI] Fix set-but-unused warning in asan_fake_stack.cpp | 4 年前 | |
compiler-rt: Rename .cc file in lib/asan to .cpp Like r367463, but for asan. llvm-svn: 367558 | 6 年前 | |
[Sanitizers][Darwin] Replace SANITIZER_MAC with SANITIZER_APPLE in source files This is a follow up to [Sanitizers][Darwin] Rename Apple macro SANITIZER_MAC -> SANITIZER_APPLE (D125816) Performed a global search/replace as in title against LLVM sources Differential Revision: https://reviews.llvm.org/D126263 | 4 年前 | |
Update the file headers across all of the LLVM projects in the monorepo 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 | 7 年前 | |
[Sanitizers][Darwin] Replace SANITIZER_MAC with SANITIZER_APPLE in source files This is a follow up to [Sanitizers][Darwin] Rename Apple macro SANITIZER_MAC -> SANITIZER_APPLE (D125816) Performed a global search/replace as in title against LLVM sources Differential Revision: https://reviews.llvm.org/D126263 | 4 年前 | |
[lsan] On Fuchsia, don't use atexit hook for leak checks This is a re-land of https://reviews.llvm.org/D86171 with fix. Fuchsia's system libraries are instrumented and use the lsan allocator for internal purposes. So leak checking needs to run after all atexit hooks and after the system libraries' internal exit-time hooks. The <zircon/sanitizer.h> hook API calls the __sanitizer_process_exit_hook function at exactly the right time. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D88248 | 4 年前 | |
[~NFC] Fix printf() type punning warning in asan_globals.cpp | 3 年前 | |
Remove NOLINTs from compiler-rt llvm-svn: 371687 | 6 年前 | |
[clang] accept -fsanitize-ignorelist= in addition to -fsanitize-blacklist= Use that for internal names (including the default ignorelists of the sanitizers). Differential Revision: https://reviews.llvm.org/D101832 | 5 年前 | |
Update the file headers across all of the LLVM projects in the monorepo 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 | 7 年前 | |
[libasan] Remove 4Mb stack limit for swapcontext unpoisoning Reviewed By: vitalybuka, eugenis Differential Revision: https://reviews.llvm.org/D129219 | 3 年前 | |
[Sanitizers][Darwin] Replace SANITIZER_MAC with SANITIZER_APPLE in source files This is a follow up to [Sanitizers][Darwin] Rename Apple macro SANITIZER_MAC -> SANITIZER_APPLE (D125816) Performed a global search/replace as in title against LLVM sources Differential Revision: https://reviews.llvm.org/D126263 | 4 年前 | |
[asan] Remove Asan, Ubsan support of RTEMS and Myriad Differential Revision: https://reviews.llvm.org/D104279 | 4 年前 | |
Remove a few straggler ".cc"s in compiler-rt/lib llvm-svn: 367589 | 6 年前 | |
Port address sanitizer to LoongArch Depends on D129371. It survived all GCC ASan tests. Changes are trivial and mostly "borrowed" RISC-V logics, except that a different SHADOW_OFFSET is used. Reviewed By: SixWeining, MaskRay, XiaodongLoong Differential Revision: https://reviews.llvm.org/D129418 | 3 年前 | |
[ASan] Reland of D116182 to always link asan_static library. After landing D121813 the binary size increase introduced by this change can be minimized by using --gc-sections link options. D121813 allows each individual callbacks to be optimized out if not used. Reviewed By: vitalybuka, MaskRay Differential Revision: https://reviews.llvm.org/D122407 | 4 年前 | |
Reland "[ASan] Use debuginfo for symbolization." This reverts commit 99796d06dbe11c8f81376ad1d42e7f17d2eff6ae. Hint: Looking here because your manual invocation of something in 'check-asan' broke? You need a new symbolizer (after D123538). An upcoming patch will remove the internal metadata for global variables. With D123534 and D123538, clang now emits DWARF debug info for constant strings (the only global variable type it was missing), and llvm-symbolizer is now able to symbolize all global variable addresses (where previously it wouldn't give you the file:line information). Move ASan's runtime over from the internal metadata to DWARF. Differential Revision: https://reviews.llvm.org/D127552 | 3 年前 | |
[asan] Reset stack bounds of context ClearShadowMemoryForContextStack assumes that context contains the stack bounds. This is not true for a context from getcontext or oucp of swapcontext. Reviewed By: kstoimenov Differential Revision: https://reviews.llvm.org/D130218 | 3 年前 | |
[asan] Reset stack bounds of context ClearShadowMemoryForContextStack assumes that context contains the stack bounds. This is not true for a context from getcontext or oucp of swapcontext. Reviewed By: kstoimenov Differential Revision: https://reviews.llvm.org/D130218 | 3 年前 | |
asan/tsan: move blocking mutex from asan to sanitizer_common llvm-svn: 172380 | 13 年前 | |
[asan] Reset stack bounds of context ClearShadowMemoryForContextStack assumes that context contains the stack bounds. This is not true for a context from getcontext or oucp of swapcontext. Reviewed By: kstoimenov Differential Revision: https://reviews.llvm.org/D130218 | 3 年前 | |
[sanitizer] Switch dlsym hack to internal_allocator Since glibc 2.34, dlsym does 1. malloc 1 2. malloc 2 3. free pointer from malloc 1 4. free pointer from malloc 2 These sequence was not handled by trivial dlsym hack. This fixes https://bugs.llvm.org/show_bug.cgi?id=52278 Reviewed By: eugenis, morehouse Differential Revision: https://reviews.llvm.org/D112588 | 4 年前 | |
[Sanitizers][Darwin] Replace SANITIZER_MAC with SANITIZER_APPLE in source files This is a follow up to [Sanitizers][Darwin] Rename Apple macro SANITIZER_MAC -> SANITIZER_APPLE (D125816) Performed a global search/replace as in title against LLVM sources Differential Revision: https://reviews.llvm.org/D126263 | 4 年前 | |
Remove unused variables, as suggested by @mcgov. Fixes warning: unused variable 'XXX' [-Wunused-const-variable] | 6 年前 | |
Port address sanitizer to LoongArch Depends on D129371. It survived all GCC ASan tests. Changes are trivial and mostly "borrowed" RISC-V logics, except that a different SHADOW_OFFSET is used. Reviewed By: SixWeining, MaskRay, XiaodongLoong Differential Revision: https://reviews.llvm.org/D129418 | 3 年前 | |
[ASan] Missed some SHADOW_XYZ uses on non-Linux platforms. Reviewed By: kstoimenov Differential Revision: https://reviews.llvm.org/D115307 | 4 年前 | |
compiler-rt: Rename .cc file in lib/asan to .cpp Like r367463, but for asan. llvm-svn: 367558 | 6 年前 | |
[Sanitizers][Darwin] Replace SANITIZER_MAC with SANITIZER_APPLE in source files This is a follow up to [Sanitizers][Darwin] Rename Apple macro SANITIZER_MAC -> SANITIZER_APPLE (D125816) Performed a global search/replace as in title against LLVM sources Differential Revision: https://reviews.llvm.org/D126263 | 4 年前 | |
sanitizer_common: make internal/external headers compatible This is a follow up to 4f3f4d672254 ("sanitizer_common: fix __sanitizer_get_module_and_offset_for_pc signature mismatch") which fixes a similar problem for msan build. I am getting the following error compiling a unit test for code that uses sanitizer_common headers and googletest transitively includes sanitizer interface headers: In file included from third_party/gwp_sanitizers/singlestep_test.cpp:3: In file included from sanitizer_common/sanitizer_common.h:19: sanitizer_interface_internal.h:41:5: error: typedef redefinition with different types ('struct __sanitizer_sandbox_arguments' vs 'struct __sanitizer_sandbox_arguments') } __sanitizer_sandbox_arguments; common_interface_defs.h:39:3: note: previous definition is here } __sanitizer_sandbox_arguments; Reviewed By: melver Differential Revision: https://reviews.llvm.org/D119546 | 4 年前 | |
[ASan] Renamed SHADOW_XYZ to ASAN_SHADOW_XYZ. Follow up from D115271. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D115293 | 4 年前 | |
[lsan] On Fuchsia, don't use atexit hook for leak checks This is a re-land of https://reviews.llvm.org/D86171 with fix. Fuchsia's system libraries are instrumented and use the lsan allocator for internal purposes. So leak checking needs to run after all atexit hooks and after the system libraries' internal exit-time hooks. The <zircon/sanitizer.h> hook API calls the __sanitizer_process_exit_hook function at exactly the right time. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D88248 | 4 年前 | |
compiler-rt: Rename .cc file in lib/asan to .cpp Like r367463, but for asan. llvm-svn: 367558 | 6 年前 | |
[ASan] Missed some SHADOW_XYZ uses on non-Linux platforms. Reviewed By: kstoimenov Differential Revision: https://reviews.llvm.org/D115307 | 4 年前 | |
Update the file headers across all of the LLVM projects in the monorepo 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 | 7 年前 | |
sanitizer_common: make internal/external headers compatible This is a follow up to 4f3f4d672254 ("sanitizer_common: fix __sanitizer_get_module_and_offset_for_pc signature mismatch") which fixes a similar problem for msan build. I am getting the following error compiling a unit test for code that uses sanitizer_common headers and googletest transitively includes sanitizer interface headers: In file included from third_party/gwp_sanitizers/singlestep_test.cpp:3: In file included from sanitizer_common/sanitizer_common.h:19: sanitizer_interface_internal.h:41:5: error: typedef redefinition with different types ('struct __sanitizer_sandbox_arguments' vs 'struct __sanitizer_sandbox_arguments') } __sanitizer_sandbox_arguments; common_interface_defs.h:39:3: note: previous definition is here } __sanitizer_sandbox_arguments; Reviewed By: melver Differential Revision: https://reviews.llvm.org/D119546 | 4 年前 | |
[sanitizer] Implement reallocarray. Summary: It's a cross of calloc and realloc. Sanitizers implement calloc-like check for size overflow. Reviewers: vitalybuka, kcc Subscribers: kubamracek, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D61108 llvm-svn: 359708 | 7 年前 | |
[Sanitizer][Darwin] Cleanup MaybeReexec() function and usage While investigating another issue, I noticed that MaybeReexec() never actually "re-executes via execv()" anymore. DyldNeedsEnvVariable() only returned true on macOS 10.10 and below. Usually, I try to avoid "unnecessary" cleanups (it's hard to be certain that there truly is no fallout), but I decided to do this one because: * I initially tricked myself into thinking that MaybeReexec() was relevant to my original investigation (instead of being dead code). * The deleted code itself is quite complicated. * Over time a few other things were mushed into MaybeReexec(): initializing MonotonicNanoTime(), verifying interceptors are working, and stripping the DYLD_INSERT_LIBRARIES env var to avoid problems when forking. * This platform-specific thing leaked into sanitizer_common.h. * The ReexecDisabled() config nob relies on the "strong overrides weak pattern", which is now problematic and can be completely removed. * ReexecDisabled() actually hid another issue with interceptors not working in unit tests. I added an explicit verify_interceptors (defaults to true) option instead. Differential Revision: https://reviews.llvm.org/D129157 | 3 年前 | |
[ASan] Added intermediate functions between assembly and __asan_report.* to avoid link errors. Instead of calling asan_report.* directly from assembly code they have been replaced with corresponding asan_report.*_asm function, which call asan_report.*. All asan_report.* are now undefined weak symbols, which allows DSOs to link when z defs is used. Reviewed By: MaskRay, morehouse Differential Revision: https://reviews.llvm.org/D118813 | 4 年前 | |
[ASan] Reland of D116182 to always link asan_static library. After landing D121813 the binary size increase introduced by this change can be minimized by using --gc-sections link options. D121813 allows each individual callbacks to be optimized out if not used. Reviewed By: vitalybuka, MaskRay Differential Revision: https://reviews.llvm.org/D122407 | 4 年前 | |
[compiler-rt] Remove some cpplint filters llvm-svn: 371704 | 6 年前 | |
Fix -Wformat warnings reported by GCC. Differential Revision: https://reviews.llvm.org/D113099 | 4 年前 | |
[sanitizer] Simplify __sanitizer::BufferedStackTrace::UnwindImpl implementations Intended to be NFC. D102046 relies on the refactoring for stack boundaries. | 5 年前 | |
sanitizer_common: deduplicate CheckFailed We have some significant amount of duplication around CheckFailed functionality. Each sanitizer copy-pasted a chunk of code. Some got random improvements like dealing with recursive failures better. These improvements could benefit all sanitizers, but they don't. Deduplicate CheckFailed logic across sanitizers and let each sanitizer only print the current stack trace. I've tried to dedup stack printing as well, but this got me into cmake hell. So let's keep this part duplicated in each sanitizer for now. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D102221 | 5 年前 | |
[NFC][sanitizer] Return StackDepotStats by value Differential Revision: https://reviews.llvm.org/D110644 | 4 年前 | |
Revert r369472 and r369441 check-sanitizer does not work on Linux llvm-svn: 369495 | 6 年前 | |
Remove NOLINTs from compiler-rt llvm-svn: 371687 | 6 年前 | |
compiler-rt: Rename .cc file in lib/asan to .cpp Like r367463, but for asan. llvm-svn: 367558 | 6 年前 | |
[ASan] Fix TLS teardown. TLS teardown is currently broken, as we unpoison the shadow a little bit and to the right of the TLS section, rather than the full TLS section itself. This currently breaks at -O0, and breaks with some upcoming globals code that I have. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D120080 | 4 年前 | |
sanitizer_common: add simpler ThreadRegistry ctor Currently ThreadRegistry is overcomplicated because of tsan, it needs tid quarantine and reuse counters. Other sanitizers don't need that. It also seems that no other sanitizer now needs max number of threads. Asan used to need 2^24 limit, but it does not seem to be needed now. Other sanitizers blindly copy-pasted that without reasons. Lsan also uses quarantine, but I don't see why that may be potentially needed. Add a ThreadRegistry ctor that does not require any sizes and use it in all sanitizers except for tsan. In preparation for new tsan runtime, which won't need any of these parameters as well. Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D105713 | 4 年前 | |
[asan] Reset stack bounds of context ClearShadowMemoryForContextStack assumes that context contains the stack bounds. This is not true for a context from getcontext or oucp of swapcontext. Reviewed By: kstoimenov Differential Revision: https://reviews.llvm.org/D130218 | 3 年前 | |
[compiler-rt] Silence warnings when building with MSVC Differential Revision: https://reviews.llvm.org/D116872 | 4 年前 | |
Remove NOLINTs from compiler-rt llvm-svn: 371687 | 6 年前 | |
compiler-rt: Rename .cc file in lib/asan to .cpp Like r367463, but for asan. llvm-svn: 367558 | 6 年前 | |
Revert "Update and improve compiler-rt tests for -mllvm -asan_use_after_return=(never|[runtime]|always)." Windows is still broken. This reverts commit 927688a4cd9dcde92e8bf430e6ceefac6ab8c8a0. | 4 年前 |
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