Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8074860

Structured Exception Catcher missing around CreateJavaVM on Windows

XMLWordPrintable

    • b64
    • x86
    • windows

        When creating a VM on Windows, there is no __try/__except handler around CreateJavaVM.

        As a result, crashes in the VM initialization may not be caught and just terminate the VM without error log. A second effect is that SafeFetch32() does not work on 32bit Windows during initialization.

        Note that there still are protected areas of code, which explains why this error is seldom noticable:

        - test functions which may crash are called with "os::win32::call_test_func_with_wrapper()", which catches structured exceptions

        - on 64bit, dynamically generated code runs with SEH protection because we register SEH handlers for code areas: os::register_code_area(). This explains why SafeFetch32 on 64bit windows works and on 32bit windows crashes.

        Note that once this is fixed, some places which now use CALL_TEST_FUNC_WITH_WRAPPER_IF_NEEDED or os::win32::call_test_func_with_wrapper() can probably be simplified.

              stuefe Thomas Stuefe
              stuefe Thomas Stuefe
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: