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

Structured Exception Catcher missing around CreateJavaVM on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b64
    • CPU:
      x86
    • OS:
      windows

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                stuefe Thomas Stuefe
                Reporter:
                stuefe Thomas Stuefe
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: