Skip to content

Commit 9b0f592

Browse files
Add the disable macro for string annotations (#4555)
in ASan container-overflow. Co-authored-by: Nicole Mazzuca <[email protected]>
1 parent 95b672e commit 9b0f592

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

docs/sanitizers/error-container-overflow.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ In Visual Studio 2022 version 17.2 and later, the MSVC standard library (STL) is
1515
| Standard container type | Disable annotations macro | Supported in version |
1616
|--|--|--|
1717
| `std::vector` | `_DISABLE_VECTOR_ANNOTATION` | Visual Studio 2022 17.2 |
18+
| `std::string` | `_DISABLE_STRING_ANNOTATION` | Visual Studio 2022 17.6 |
1819

1920
When a standard type has annotations enabled, to avoid one-definition-rule (ODR) violations, each static library and object used to link the binary must also enable those annotations. Effectively, you must build those static libraries and objects with AddressSanitizer enabled. Mixing code with different annotation settings causes an error:
2021

0 commit comments

Comments
 (0)