[all-commits] [llvm/llvm-project] 36f9d5: [ASan] Document define to disable container overfl...
Paddy McDonald via All-commits
all-commits at lists.llvm.org
Wed Nov 19 11:20:32 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 36f9d5a41f0eff44e65f09240c7ca454c47b35cd
https://github.com/llvm/llvm-project/commit/36f9d5a41f0eff44e65f09240c7ca454c47b35cd
Author: Paddy McDonald <padriff at hotmail.com>
Date: 2025-11-19 (Wed, 19 Nov 2025)
Changed paths:
M clang/docs/AddressSanitizer.rst
M compiler-rt/include/sanitizer/common_interface_defs.h
M compiler-rt/lib/asan/asan_errors.cpp
A compiler-rt/test/asan/TestCases/disable_container_overflow_checks.cpp
A compiler-rt/test/asan/TestCases/stack_container_dynamic_lib.cpp
Log Message:
-----------
[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
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list