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

Exceptions thrown during upcalls should be handled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • repo-panama
    • tools

      Currently, if an exception is thrown one of several things can happen:

      - If the upcall is specialized, the VM crashes with a fatal error (though the exception is handled explicitly in native code)
      - If the upcall is interpreted, the exception will be handled when returning from a downcall earlier on the same thread (but any native code in between will be unaware of the exception)

      Neither of these are desirable. JNI can handle the latter case because native code can detect the exception and handle it appropriately, but in our case, the native code has no idea about exception.

      We think that the best way to handle exceptions thrown during upcalls is to do some error reporting, and then call System.exit, to avoid any trouble with unsuspecting native code we're about to return to.

            jvernee Jorn Vernee
            jvernee Jorn Vernee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: