Skip to content

ASan: Remove noexcept from __sanitizer_annotate_contiguous_container - #4150

Merged
Stephan T. Lavavej (StephanTLavavej) merged 1 commit into
microsoft:mainfrom
StephanTLavavej:except
Nov 7, 2023
Merged

ASan: Remove noexcept from __sanitizer_annotate_contiguous_container#4150
Stephan T. Lavavej (StephanTLavavej) merged 1 commit into
microsoft:mainfrom
StephanTLavavej:except

Conversation

@StephanTLavavej

Copy link
Copy Markdown
Member

#4106 marked __sanitizer_annotate_contiguous_container as noexcept because it's extern "C". However, it has to match ASan's primary declaration, so we can't mark it.

This PR reverts this declaration to its original form, and adds a comment for future maintainers.

@AlexGuteniev

Copy link
Copy Markdown
Contributor

If it throws, should be noexcept(false) to opt out of implicit noexcept, no?

@CaseyCarter

Casey Carter (CaseyCarter) commented Nov 6, 2023

Copy link
Copy Markdown
Contributor

If it throws, should be noexcept(false) to opt out of implicit noexcept, no?

I don't believe it does throw, I think it's simply unannotated. This is common for shared C/C++ headers: it's easy to stick a conditional extern "C" { ... } around everything to make a C header into a C++ header, but conditionally tacking noexcept onto function declarations takes more effort.

Ideally we would fix this upstream and then bring it back here.

@StephanTLavavej

Copy link
Copy Markdown
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ASan Address Sanitizer bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants