<vector>: Add ASan annotations. - #2071
Merged
Stephan T. Lavavej (StephanTLavavej) merged 68 commits intoDec 11, 2021
Merged
Conversation
Co-authored-by: Michael Schellenberger Costa <mschellenbergercosta@gmail.com>
Co-authored-by: Michael Schellenberger Costa <mschellenbergercosta@gmail.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Stephan T. Lavavej (StephanTLavavej)
marked this pull request as ready for review
July 28, 2021 21:23
Stephan T. Lavavej (StephanTLavavej)
requested a review
from a team
as a code owner
July 28, 2021 21:23
Casey Carter (CaseyCarter)
suggested changes
Jul 29, 2021
Stephan T. Lavavej (StephanTLavavej)
approved these changes
Nov 23, 2021
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
FYI, internal MSVC-PR-356165 needs to be merged before this can be merged internally. |
Co-authored-by: Michael Schellenberger Costa <mschellenbergercosta@googlemail.com>
This comment has been minimized.
This comment has been minimized.
Member
✔️ MSVC-PR mirroring note:As this PR adds new source files and a new lib, we'll need to update setup - done in MSVC-PR-368993. |
Stephan T. Lavavej (StephanTLavavej)
requested changes
Dec 10, 2021
Casey Carter (CaseyCarter)
approved these changes
Dec 10, 2021
Casey Carter (CaseyCarter)
approved these changes
Dec 10, 2021
Stephan T. Lavavej (StephanTLavavej)
approved these changes
Dec 10, 2021
| #pragma comment(linker, \ | ||
| "/alternatename:___sanitizer_annotate_contiguous_container=___sanitizer_annotate_contiguous_container_default") | ||
| #pragma comment(linker, "/alternatename:__Asan_vector_should_annotate=__Asan_vector_should_annotate_default") | ||
| #elif defined(_M_X64) || defined(_M_ARM) || defined(_M_ARM64) |
There was a problem hiding this comment.
I observe that there may be interesting ARM64EC (or CHPE) interactions with name mangling, but I can't point to specific issues, so no change requested.
Stephan T. Lavavej (StephanTLavavej)
requested changes
Dec 10, 2021
Stephan T. Lavavej (StephanTLavavej)
approved these changes
Dec 10, 2021
Casey Carter (CaseyCarter)
approved these changes
Dec 10, 2021
Member
|
Thanks for this major improvement to the STL's most important data structure! 🚀 ✔️ 🎉 😻 |
Contributor
Author
|
Good luck with string! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add ASan container annotations to vector. This should allow ASan to catch additional errors when using vector.
Specifically this will catch accesses from [
v.data() + v.size(),v.data() + v.capacity()) which would otherwise be missed as they are legal memory addresses.Closes #2030