-
Bug
-
Resolution: Fixed
-
P2
-
6u16, 7
-
b12
-
generic, x86
-
generic, linux
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2220626 | 8 | Bill Pittore | P2 | Closed | Fixed | b24 |
JDK-2220562 | 7u4 | Bill Pittore | P2 | Closed | Fixed | b10 |
When a program is suspended on a thrown exception and we pop some frames off the stack, subsequent stepping is not reliable.
Steps to reproduce:
1) Compile the attached program
2) In one terminal run:
java -Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:8888,server=y,suspend=y -classpath build/classes test.BadStepTest
3) In a second terminal run:
jdb -attach 8888
main[1] catch java.lang.NullPointerException
main[1] cont
the program is suspended on an exception: java.lang.NullPointerException
Then do:
main[1] pop
main[1] pop
main[1] step
main[1] next
main[1] next
> Step completed: "thread=main", test.BadStepTest.startTest(), line=24 bci=4
main[1] next
> Step completed: "thread=main", test.BadStepTest.startTest(), line=28 bci=49
Please note that instead of stepping to line 25, program stops at the finally block at line 28. This is unexpected, since user wants to be able to step to the point where the exception was thrown.
We have a real use-case that suffers from this bug at https://netbeans.org/bugzilla/show_bug.cgi?id=188962
Please note that stepping via "step" (Step Into) is possible. Via "next" (Step Over) it's not.
Steps to reproduce:
1) Compile the attached program
2) In one terminal run:
java -Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:8888,server=y,suspend=y -classpath build/classes test.BadStepTest
3) In a second terminal run:
jdb -attach 8888
main[1] catch java.lang.NullPointerException
main[1] cont
the program is suspended on an exception: java.lang.NullPointerException
Then do:
main[1] pop
main[1] pop
main[1] step
main[1] next
main[1] next
> Step completed: "thread=main", test.BadStepTest.startTest(), line=24 bci=4
main[1] next
> Step completed: "thread=main", test.BadStepTest.startTest(), line=28 bci=49
Please note that instead of stepping to line 25, program stops at the finally block at line 28. This is unexpected, since user wants to be able to step to the point where the exception was thrown.
We have a real use-case that suffers from this bug at https://netbeans.org/bugzilla/show_bug.cgi?id=188962
Please note that stepping via "step" (Step Into) is possible. Via "next" (Step Over) it's not.
- backported by
-
JDK-2220562 Step over not working after thrown exception and Pop
- Closed
-
JDK-2220626 Step over not working after thrown exception and Pop
- Closed
- relates to
-
JDK-6742507 Problem with stepping after class redefine
- Closed
-
JDK-8134434 JVM_DoPrivileged() fires assert(_exception_caught == false) failed: _exception_caught is out of phase
- Resolved
-
JDK-8165496 assert(_exception_caught == false) failed: _exception_caught is out of phase
- Closed