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

Doctest SEH handlers are called before __except handlers #324

Closed
jkriegshauser opened this issue Jan 14, 2020 · 2 comments
Closed

Doctest SEH handlers are called before __except handlers #324

jkriegshauser opened this issue Jan 14, 2020 · 2 comments

Comments

@jkriegshauser
Copy link
Contributor

Description

Doctest will report exceptions even if code exists that uses Windows __try/__except Structured-Exception Handlers.

Steps to reproduce

This test case will report a SIGSEGV even though the crash is handled by SEH:

#ifdef _MSC_VER
static void NoCrash()
{
    __try
    {
        int* p = 0;
        *p = 1;
    }
    __except (1)
    {
        // Caught!
    }
}

TEST_CASE("SEH Avoided Crash")
{
    NoCrash();
    CHECK(1);
}
#endif

Extra information

  • doctest version: v2.3.6
  • Operating System: Windows 10 x64
  • Compiler+version: MS Visual Studio 2017
onqtam pushed a commit that referenced this issue Jan 15, 2020
* Switch to catching unhandled exceptions on Windows
@TheQwertiest
Copy link

@onqtam , shouldn't be this issue closed, since #325 fixed it?

@onqtam
Copy link
Member

onqtam commented Feb 2, 2020

@TheQwertiest It's being kept open since it's still not pushed to master (only in dev)

@onqtam onqtam closed this as completed in 2f3fd5e Feb 24, 2020
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

No branches or pull requests

3 participants