aboutsummaryrefslogtreecommitdiff
path: root/clang/docs
diff options
context:
space:
mode:
Diffstat (limited to 'clang/docs')
-rw-r--r--clang/docs/ClangCommandLineReference.rst6
-rw-r--r--clang/docs/UsersManual.rst8
2 files changed, 8 insertions, 6 deletions
diff --git a/clang/docs/ClangCommandLineReference.rst b/clang/docs/ClangCommandLineReference.rst
index 8c2a382cb9fa..f1b865b7eb27 100644
--- a/clang/docs/ClangCommandLineReference.rst
+++ b/clang/docs/ClangCommandLineReference.rst
@@ -800,9 +800,11 @@ Level of field padding for AddressSanitizer
Enable linker dead stripping of globals in AddressSanitizer
-.. option:: -fsanitize-address-poison-class-member-array-new-cookie, -fno-sanitize-address-poison-class-member-array-new-cookie
+.. option:: -fsanitize-address-poison-custom-array-cookie, -fno-sanitize-address-poison-custom-array-cookie
-Enable poisoning array cookies when using class member operator new\[\] in AddressSanitizer
+Enable "poisoning" array cookies when allocating arrays with a custom operator new\[\] in Address Sanitizer, preventing accesses to the cookies from user code. An array cookie is a small implementation-defined header added to certain array allocations to record metadata such as the length of the array. Accesses to array cookies from user code are technically allowed by the standard but are more likely to be the result of an out-of-bounds array access.
+
+An operator new\[\] is "custom" if it is not one of the allocation functions provided by the C++ standard library. Array cookies from non-custom allocation functions are always poisoned.
.. option:: -fsanitize-address-use-after-scope, -fno-sanitize-address-use-after-scope
diff --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst
index 2b83a0d5d5f5..b6ad37ea15ac 100644
--- a/clang/docs/UsersManual.rst
+++ b/clang/docs/UsersManual.rst
@@ -3000,8 +3000,8 @@ Execute ``clang-cl /?`` to see a list of supported options:
-fno-debug-macro Do not emit macro debug information
-fno-delayed-template-parsing
Disable delayed template parsing
- -fno-sanitize-address-poison-class-member-array-new-cookie
- Disable poisoning array cookies when using class member operator new[] in AddressSanitizer
+ -fno-sanitize-address-poison-custom-array-cookie
+ Disable poisoning array cookies when using custom operator new[] in AddressSanitizer
-fno-sanitize-address-use-after-scope
Disable use-after-scope detection in AddressSanitizer
-fno-sanitize-blacklist Don't use blacklist file for sanitizers
@@ -3037,8 +3037,8 @@ Execute ``clang-cl /?`` to see a list of supported options:
Level of field padding for AddressSanitizer
-fsanitize-address-globals-dead-stripping
Enable linker dead stripping of globals in AddressSanitizer
- -fsanitize-address-poison-class-member-array-new-cookie
- Enable poisoning array cookies when using class member operator new[] in AddressSanitizer
+ -fsanitize-address-poison-custom-array-cookie
+ Enable poisoning array cookies when using custom operator new[] in AddressSanitizer
-fsanitize-address-use-after-scope
Enable use-after-scope detection in AddressSanitizer
-fsanitize-blacklist=<value>