Skip to content

Commit 195f115

Browse files
committed
Add -fsanitize-trap=undefined to UBSan description
Signed-off-by: Thomas Nyman <[email protected]>
1 parent 851ffca commit 195f115

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C++.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,6 +1308,7 @@ LSan cannot be used simultaneously with AddressSanitizer (ASan) or ThreadSanitiz
13081308
|:------------------------------------------------------------------------- |:-------------------------:|:--------------------------------------------------------------------------------------------------------------------------------- |
13091309
| <span id="-fsanitize=undefined">`-fsanitize=undefined`</span> | GCC 4.9.0<br/>Clang 3.3.0 | Enables UndefinedBehaviorSanitizer to detect undefined behavior at run time. Requires `-O1` or higher. |
13101310
| <span id="-fsanitize-minimal-runtime">`-fsanitize-minimal-runtime`</span> | Clang 6.0.0 | Enables minimal UBSan runtime rather than Clang's usual libubsan library for using UBSan in production code. |
1311+
| <span id="-fsanitize-trap=undefined">`-fsanitize-trap=undefined`</span> | GCC 13.1.0 | Enables UBSan with reporting through `__builtin_trap` rather than GCC's usual libubsan runtime library. Requires `-O1` or higher. |
13111312
13121313
UndefinedBehaviorSanitizer (UBSan) is a detector of non-portable or erroneous program constructs which cause behavior which is not clearly defined in the ISO C standard. UBSan provides a large number of sub-options to enable / disable individual checks for different classes of undefined behavior. Consult the GCC[^gcc-instrumentation] and Clang[^clang-ubsan] documentation respectively for up-to-date information on supported sub-options.
13131314

0 commit comments

Comments
 (0)