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

[TESTBUG] [windows] gtests cannot test functionality relying on signal handling (e.g. SafeFetch)

    XMLWordPrintable

Details

    • windows

    Description

      On Windows, for "signal handling" to work, we need to set up __try/__except clauses in a frame above the code triggering signals. Those clauses then should redirect to the hotspot signal handler function.

      In the hotspot, that is done at every entry point and at the start of a thread. This is missing in gtest. Therefore simple functions like "os::is_readable_pointer()" will cause instead the generic gtest crash handler to execute and mark the test as failed.

      This can be reproduced easily on 32bit windows in gtests by calling os::is_readable_pointer() with an unmapped pointer. However, weirdly enough it works for 64bit windows. It is not clear why. One possibility is that a VectoredException handler is installed somewhere. Needs investigating.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: