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

missing default exception handler in calls to rethrow_Stub

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 9, 10
    • Fix Version/s: 10
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b21
    • Verification:
      Verified

      Description

      While running a program that has some StackOverflows we started getting this error.

      MISSING EXCEPTION HANDLER for pc 0x00007f0d5d455220 and handler bci -1
         Exception:
      java.lang.StackOverflowError
       - klass: 'java/lang/StackOverflowError'

      The catch table looks like this:

      catch_pco = 4800 (2 entries)
        bci 583 at scope depth 0 -> pco 5393
        bci 588 at scope depth 0 -> pco 5413

      The call site itself is from a call to the rethrow_Stub in Parse::catch_call_exceptions. Basically we overflow the stack while performing resolution of the exception type and start the lookup over again with a handler_bci of -1. From SharedRuntime::compute_compiled_exc_handler

              recursive_exception_occurred = true;
              exception = Handle(THREAD, PENDING_EXCEPTION);
              CLEAR_PENDING_EXCEPTION;
              if (handler_bci >= 0) {
                bci = handler_bci;
                handler_bci = -1;
                skip_scope_increment = true;
              }

      For C2 the catch tables always have to explicitly include the handler for -1 but they seem to be left out on this path.

        Attachments

        1. default_handler_new.patch
          0.9 kB
        2. default_handler.patch
          0.9 kB
        3. failure.txt
          109 kB
        4. failure.txt
          109 kB
        5. hs_err_pid3034.log
          1.29 MB
        6. hs_err_pid3034.log
          1.29 MB

          Activity

            People

            • Assignee:
              never Tom Rodriguez
              Reporter:
              never Tom Rodriguez
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: