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

V2.x. Back-port PR #2334 to the v2.x branch #2581

Open
wants to merge 6 commits into
base: v2.x
Choose a base branch
from

Conversation

ScottHutchinson
Copy link
Contributor

This PR back-ports the PR #2334 to the v2.x branch, enabling v2.x to be used with the Address Sanitizer on Windows.

@codecov
Copy link

codecov bot commented Nov 25, 2022

Codecov Report

Merging #2581 (845c353) into v2.x (20ace55) will decrease coverage by 0.10%.
The diff coverage is 60.00%.

❗ Current head 845c353 differs from pull request most recent head ed3bcd3. Consider uploading reports for the commit ed3bcd3 to get more accurate results

@@            Coverage Diff             @@
##             v2.x    #2581      +/-   ##
==========================================
- Coverage   90.08%   89.98%   -0.10%     
==========================================
  Files         113      113              
  Lines        5040     5038       -2     
==========================================
- Hits         4540     4533       -7     
- Misses        500      505       +5     

@@ -491,3 +492,34 @@ TEMPLATE_TEST_CASE_SIG("#1954 - 7 arg template test case sig compiles", "[regres
}

}} // namespace MiscTests

#if defined(CATCH_PLATFORM_WINDOWS)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test in v3 only checks with MSVC. Why the change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I certainly didn't mean to change it.

}

void FatalConditionHandler::disengage_platform() {
if (!RemoveVectoredExceptionHandler(exceptionHandlerHandle)) {
CATCH_RUNTIME_ERROR("Could not unregister vectored exception handler");
if (SetUnhandledExceptionFilter(reinterpret_cast<LPTOP_LEVEL_EXCEPTION_FILTER>(previousTopLevelExceptionFilter)) != topLevelExceptionFilter) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar question: the code in v3 does not need the wild reinterpret cast. Why is it needed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought sure I just copied the code from v3. I'll look at it no later than Monday. Thanks.

@horenmar
Copy link
Member

otherwise lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants