Details
-
Bug
-
Resolution: Fixed
-
P4
-
9, 15
-
b02
-
x86
-
windows
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8267436 | 11.0.12 | Thomas Stuefe | P4 | Resolved | Fixed | b04 |
Description
When running gtests on Windows, there is no __try/__except handler around the test execution. As a result, SafeFetch32/SafeFetchN does not work properly on 32bit Windows during gtest execution. There might be other error handling related issues as well, but it was SafeFetch not working that uncovered the problem.
This problem is very similar toJDK-8074860. Some of the infrastructure mentioned there (os::win32::call_test_func_with_wrapper() and such) was removed by that change. Since the tests in question were run during VM initialization, and that change made VM initialization properly protected, that infrastructure was no longer needed. But with gtest we've moved a bunch of those tests out of the VM initialization context, and they are no longer protected.
I think conditionally wrapping the call to RUN_ALL_TESTS() in gtestMain.cpp with a __try/__except block using topLevelExceptionFilter will address this problem. For the conditionalization, I suggest using the existing GTEST_HAS_SEH macro.
This problem is very similar to
I think conditionally wrapping the call to RUN_ALL_TESTS() in gtestMain.cpp with a __try/__except block using topLevelExceptionFilter will address this problem. For the conditionalization, I suggest using the existing GTEST_HAS_SEH macro.
Attachments
Issue Links
- backported by
-
JDK-8267436 [Windows] Structured Exception Catcher missing around gtest execution
- Resolved
- duplicates
-
JDK-8220220 [TESTBUG] [windows] gtests cannot test functionality relying on signal handling (e.g. SafeFetch)
- Resolved
- relates to
-
JDK-8074860 Structured Exception Catcher missing around CreateJavaVM on Windows
- Resolved
-
JDK-8257828 SafeFetch may crash if invoked in non-JavaThreads
- Resolved
-
JDK-8264408 test_oopStorage no longer needs to disable some tests on WIN32
- Resolved
-
JDK-8267138 Stray suffix when starting gtests via GTestWrapper.java
- Resolved
(1 relates to, 2 links to)