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

JNI Specification for DetachCurrentThread needs modification in relation to pending exceptions

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b126

      Description

      Currently the JNI specification indicates that, unless listed otherwise, no JNI method should be called with a pending exception. DetachCurrentThread is not listed as allowing a pending exception, but the implementation of DetachCurrentThread in hotspot implements the "uncaught exception handling" that is expected in Java threads - via Thread->exit() call which invokes JavaThread::exit

      The uncaught exception handling is highly desirable so we do not want to change the behaviour of the VM.

      But it is probably too strong to mandate that DetachCurrentThread must do uncaught exception handling.

      So at a minimum we need to add DetachCurrentThread to the set of methods that can be called safely with a pending exception.

        Attachments

          Issue Links

          There are no Sub-Tasks for this issue.

            Activity

              People

              Assignee:
              dholmes David Holmes
              Reporter:
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: