ThreadReference.forceEarlyReturn throws IndexOutOfBoundsException for just started thread

XMLWordPrintable

    • b16
    • generic, x86
    • generic, linux_redhat_5.0
    • Verified

        Attached test launches debuggee VM, debuggee VM is suspended on start. Debugger finds main thread in debuggee VM and calls 'forceEarlyReturn' for main thread. Since main thread has no frames yet 'InvalidStackFrameException' is expected but forceEarlyReturn throws 'java.lang.IndexOutOfBoundsException'.

        The same exception is thrown if enable ThreadStartEvents and call forceEarlyReturn for ThreadReference obtained from this events.

        Test output:

        Unexpected exception: java.lang.IndexOutOfBoundsException
        java.lang.IndexOutOfBoundsException
        at com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:41)
        at com.sun.tools.jdi.ThreadReferenceImpl.privateFrames(ThreadReferenceImpl.java:367)
        at com.sun.tools.jdi.ThreadReferenceImpl.frame(ThreadReferenceImpl.java:277)
        at com.sun.tools.jdi.ThreadReferenceImpl.forceEarlyReturn(ThreadReferenceImpl.java:506)
        at ForceEarlyReturnTest.main(ForceEarlyReturnTest.java:52)
        TEST FAIL

              Assignee:
              James Holmlund (Inactive)
              Reporter:
              Semen Boikov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: