[clang] [compiler-rt] [ASan] Document define to disable container overflow checks at compile time. (PR #163468)
Paddy McDonald via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 15 15:03:08 PDT 2025
================
@@ -164,6 +164,23 @@ To summarize: ``-fsanitize-address-use-after-return=<mode>``
* ``always``: Enables detection of UAR errors in all cases. (reduces code
size, but not as much as ``never``).
+Container Overflow Detection
+----------------------------
+
+AddressSanitizer can detect overflows in containers with custom allocators
+(such as std::vector) where the Library developers have added calls into the
+AddressSanitizer runtime to indicate which memory is poisoned etc.
+
+In environments where not all the process binaries can be recompiled with
+AddressSanitizer enabled, these checks can cause false positives.
+
+These checks can be disabled at runtime using
+``ASAN_OPTIONS=detect_container_overflow=0``
+
+``-D__ASAN_DISABLE_CONTAINER_OVERFLOW__`` can be used at compile time to
+disable container overflow checks if the container library has added support
+for this define.
+
----------------
padriff wrote:
done
https://github.com/llvm/llvm-project/pull/163468
More information about the cfe-commits
mailing list