diff options
author | Tanzinul Islam <t_17_7@hotmail.com> | 2017-06-19 01:33:58 +0100 |
---|---|---|
committer | Tanzinul Islam <t_17_7@hotmail.com> | 2017-06-19 03:12:42 +0100 |
commit | e49429051272141a91ce898caa176f4366c5209e (patch) | |
tree | a6c06c78441027a1b961d8b36159c867e9628ea9 | |
parent | c2d90bddc6a2a562ee7750c14351e9ca16a6a37a (diff) | |
download | googletest-e49429051272141a91ce898caa176f4366c5209e.tar.gz googletest-e49429051272141a91ce898caa176f4366c5209e.tar.bz2 googletest-e49429051272141a91ce898caa176f4366c5209e.zip |
Allow death test child to bypass WER under MinGW
The mechanics of suppressing debugger trapping and Windows Error Reporting for the crashed child process in a death test are currently guarded under the `GTEST_HAS_SEH` macro. This seems unnecessary, as the logic does not call any APIs related to Structured Error Handling.
Replace the guarding macro with the more permissive `GTEST_OS_WINDOWS`, so that Windows toolchains without SEH support (e.g. MinGW) can benefit from it.
Fixes: #1116
-rw-r--r-- | googletest/src/gtest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 3a18f25d..dc5f54d8 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -4214,7 +4214,7 @@ int UnitTest::Run() { // used for the duration of the program. impl()->set_catch_exceptions(GTEST_FLAG(catch_exceptions)); -#if GTEST_HAS_SEH +#if GTEST_OS_WINDOWS // Either the user wants Google Test to catch exceptions thrown by the // tests or this is executing in the context of death test child // process. In either case the user does not want to see pop-up dialogs @@ -4251,7 +4251,7 @@ int UnitTest::Run() { _WRITE_ABORT_MSG | _CALL_REPORTFAULT); // pop-up window, core dump. # endif } -#endif // GTEST_HAS_SEH +#endif // GTEST_OS_WINDOWS return internal::HandleExceptionsInMethodIfSupported( impl(), |