Skip to content

Commit 851ffca

Browse files
committed
Add -fsanitize-minimal-runtime to UBSan description
Signed-off-by: Thomas Nyman <[email protected]>
1 parent 23bde78 commit 851ffca

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,9 +1304,10 @@ LSan cannot be used simultaneously with AddressSanitizer (ASan) or ThreadSanitiz
13041304
13051305
### UndefinedBehaviorSanitizer
13061306
1307-
| Compiler Flag | Supported since | Description |
1308-
|:---------------------- |:---------------------:|:--------------------------------------------------------------------------- |
1309-
| `-fsanitize=undefined`<br/>(requires `-O1` or higher) | GCC 4.9.0<br/>Clang 3.3.0 | Enables UndefinedBehaviorSanitizer to detect undefined behavior at run time |
1307+
| Compiler Flag | Supported since | Description |
1308+
|:------------------------------------------------------------------------- |:-------------------------:|:--------------------------------------------------------------------------------------------------------------------------------- |
1309+
| <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. |
1310+
| <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. |
13101311
13111312
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.
13121313

0 commit comments

Comments
 (0)