| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[ASan] [HWASan] Add __sanitizer_ignore_free_hook() (#96749) This change adds a new weak API function which makes the sanitizer ignore the call to free(), and implements the functionality in ASan and HWAsan. The runtime that implements this hook can then call free() at a later point again on the same pointer (and making sure the hook returns zero so that the memory will actually be freed) when it's actually ready for the memory to be cleaned up. This is needed in order to implement an sanitizer-compatible version of Chrome's BackupRefPtr algorithm, since process-wide double-shimming of malloc/free does not work on some platforms. Requested and designed by @c01db33f (Mark) from Project Zero. --------- Co-authored-by: Mark Brand <markbrand@google.com> | 2 年前 | |
[sanitizers] Do not define __has_feature in sanitizer/common_interface_defs.h (#66628) Public headers intended for user code should not define __has_feature, because this can break preprocessor checks done later in user code, e.g. if they test #ifdef __has_feature to check for real support in the compiler. Replace the only use in the public header with a check for it being supported before trying to use it. Define the fallback definition in the internal headers, so that other internal sanitizer headers can continue to use it as preferred. This resolves a bug reported to GCC as https://gcc.gnu.org/PR109882 | 2 年前 | |
[ASan] Document define to disable container overflow checks at compile time. (#163468) Document a define to allow library developers to support disabling AddressSanitizer's container overflow detection in template code at compile time. The primary motivation is to reduce false positives in environments where libraries and frameworks that cannot be recompiled with sanitizers enabled are called from application code. This supports disabling checks when the runtime environment cannot be reliably controlled to use ASAN_OPTIONS. Key changes: - Use the define __SANITIZER_DISABLE_CONTAINER_OVERFLOW__ to disable instrumentation at compile time - Implemented redefining the container overflow APIs in common_interface_defs.h to use define to provide null implementation when define is present - Update documentation in AddressSanitizer.rst to suggest and illustrate use of the define - Add details of the define in PrintContainerOverflowHint() - Add test disable_container_overflow_checks to verify new hints on the error and fill the testing gap that ASAN_OPTIONS=detect_container_overflow=0 works - Add tests demonstrating the issue around closed source libraries and instrumented apps that both modify containers This requires no compiler changes and should be supportable cross compiler toolchains. An RFC has been opened to discuss: https://discourse.llvm.org/t/rfc-add-fsanitize-address-disable-container-overflow-flag-to-addresssanitizer/88349 | 8 个月前 | |
[ASan][Windows] Add __cdecl to public sanitizer functions (#69625) This is necessary for many projects which pass /Gz to their compiles, which makes their default calling convention __stdcall. (personal note, I _really_ wish there was a pragma for this) | 2 年前 | |
| 2 年前 | ||
[hwasan] Add __hwasan_get_tag_from_pointer (#75267) This simplifies handling tags by user code. Now code does not need to know bit size of tag and its position. | 2 年前 | |
[tsan] Add callbacks for futex syscalls and mark them as blocking on tsan (#86537) Fixes #83844. This PR adds callbacks to mark futex syscalls as blocking. Unfortunately we didn't have a mechanism before to mark syscalls as a blocking call, so I had to implement it, but it mostly reuses the BlockingCall implementation [here](https://github.com/llvm/llvm-project/blob/96819daa3d095cf9f662e0229dc82eaaa25480e8/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp#L362-L380). The issue includes some information but this issue was discovered because Rust uses futexes directly. So most likely we need to update Rust as well to use these callbacks. Also see the latest comments in #85188 for some context. I also sent another PR #84162 to mark pthread_*_lock calls as blocking. | 2 年前 | |
[ASan][Windows] Add __cdecl to public sanitizer functions (#69625) This is necessary for many projects which pass /Gz to their compiles, which makes their default calling convention __stdcall. (personal note, I _really_ wish there was a pragma for this) | 2 年前 | |
[memprof] Use -memprof-runtime-default-options to set options during compile time (#118874) Add the __memprof_default_options_str variable, initialized via the -memprof-runtime-default-options LLVM flag, to hold the default options string for memprof. This allows us to set these options during compile time in the clang invocation. Also update the docs to describe the various ways to set these options. | 1 年前 | |
| 2 年前 | ||
[compiler-rt] [netbsd] Regenerate syscall hooks Sync with NetBSD 9.99.72. | 5 年前 | |
[CompilerRT] Add support for numerical sanitizer (#94322) This diff contains the compiler-rt changes / preparations for nsan. Test plan: 1. cd build/runtimes/runtimes-bins && ninja check-nsan 2. ninja check-all | 2 年前 | |
[compiler-rt][rtsan] Introduce rtsan_interface.h and ScopedDisabler (#106736) | 1 年前 | |
[ASan][Windows] Add __cdecl to public sanitizer functions (#69625) This is necessary for many projects which pass /Gz to their compiles, which makes their default calling convention __stdcall. (personal note, I _really_ wish there was a pragma for this) | 2 年前 | |
[TSAN] Add __tsan_check_no_mutexes_held helper (#71568) This adds a new helper that can be called from application code to ensure that no mutexes are held on specific code paths. This is useful for multiple scenarios, including ensuring no locks are held: - at thread exit - in peformance-critical code - when a coroutine is suspended (can cause deadlocks) See this discourse thread for more discussion: https://discourse.llvm.org/t/add-threadsanitizer-check-to-prevent-coroutine-suspending-while-holding-a-lock-potential-deadlock/74051 This resubmits and fixes #69372 (was reverted because of build breakage). This also includes the followup change #71471 (to fix a land race). | 2 年前 | |
Reapply "[tsan] Don't use enum __tsan_memory_order in tsan interface"" (#115034) In C++ it's UB to use undeclared values as enum. And there is support __ATOMIC_HLE_ACQUIRE and __ATOMIC_HLE_RELEASE need such values. So use int in TSAN interface, and mask out irrelevant bits and cast to enum ASAP. ThreadSanitizer.cpp already declare morder parameterd in these functions as i32. This may looks like a slight change, as we previously didn't mask out additional bits for fmo, and NoTsanAtomic call. But from implementation it's clear that they are expecting exact enum. Reverts llvm/llvm-project#115032 Reapply llvm/llvm-project#114724 | 1 年前 | |
| 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 年前 | ||
| 2 年前 | ||
| 8 个月前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 5 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 2 年前 | ||
| 2 年前 | ||
| 1 年前 | ||
| 1 年前 |