Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't violate preconditions in tr1/regex3 #3990

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

CaseyCarter
Copy link
Member

This test constructs a regex_iterator and a regex_token_iterator with invalid character ranges. The first occurrence is benign - the test never directs the library to examine the bogus part of the range - but the second case ventures into the land of pure undefined behavior. Caught by ASan.

Fixes VSO-1854241 / AB#1854241

This test constructs a `regex_iterator` and a `regex_token_iterator` with invalid character ranges. The first occurrence is benign - the test never directs the library to examine the bogus part of the range - but the second case ventures into the land of pure undefined behavior. Caught by ASan.

Fixes VSO-1854241 / AB#1854241
@CaseyCarter CaseyCarter added test Related to test code ASan Address Sanitizer labels Aug 23, 2023
@CaseyCarter CaseyCarter requested a review from a team as a code owner August 23, 2023 21:54
@StephanTLavavej
Copy link
Member

I have no idea what this code was thinking - great catch.

@CaseyCarter CaseyCarter self-assigned this Aug 29, 2023
@CaseyCarter
Copy link
Member Author

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@CaseyCarter CaseyCarter merged commit 6c69a73 into microsoft:main Aug 31, 2023
37 checks passed
@CaseyCarter CaseyCarter deleted the tr1_regex3 branch August 31, 2023 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASan Address Sanitizer test Related to test code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants