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

Avoid triggering ASan bug in Dev09_056375_locale_cleanup #4652

Merged
merged 1 commit into from
May 20, 2024

Conversation

CaseyCarter
Copy link
Member

@CaseyCarter CaseyCarter commented May 3, 2024

Avoid triggering VSO-2046190 in Dev09_056375_locale_cleanup by leaving the DLL loaded in ASan instrumented statically-linked configs.

This test is failing with 17.10p5 and current dev compilers, I suspect due to a change in the ASan runtime's interception of memcpy. Recall that memcpy is part of VCRuntime, so statically-linked configs of this test have a copy of memcpy linked to the program and another copy of memcpy linked into the DLL. When the program unloads the DLL, I believe the ASan runtime's "pointer to actual memcpy" is left pointing into unallocated space where the DLL's copy used to be.

I'm going to disable unloading the DLL for this case to avoid the problem until we can implement and ship a fix.

... in `Dev09_056375_locale_cleanup` by leaving the DLL loaded in ASan instrumented statically-linked configs.
@CaseyCarter CaseyCarter added test Related to test code ASan Address Sanitizer labels May 3, 2024
@CaseyCarter CaseyCarter requested a review from a team as a code owner May 3, 2024 17:17
@CaseyCarter

This comment was marked as resolved.

This comment was marked as resolved.

@CaseyCarter
Copy link
Member Author

CaseyCarter commented May 3, 2024

STL-ASan-CI passed (after rerunning a sporadic x86 failure that I recorded in #4324).

@StephanTLavavej StephanTLavavej changed the title Avoid triggering VSO-2046190 Avoid triggering ASan bug in Dev09_056375_locale_cleanup May 7, 2024
@StephanTLavavej
Copy link
Member

Thanks! 😻 I updated the PR title to be more meaningful when scanning git history.

@StephanTLavavej StephanTLavavej self-assigned this May 17, 2024
@StephanTLavavej
Copy link
Member

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

@StephanTLavavej StephanTLavavej merged commit 0cb718b into microsoft:main May 20, 2024
39 checks passed
@StephanTLavavej
Copy link
Member

Thanks for scouting ahead and fixing this test for ASan before the next toolset update encountered it! 🎉 😻 🪄

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
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants