JDK-7047428 : jdb reenter command reports NPE on solaris-sparc
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris
  • CPU: sparc
  • Submitted: 2011-05-23
  • Updated: 2023-12-14
  • Resolved: 2011-05-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Duplicate :  
Description
In jdk7 b142 the following sequence of commands:

"stop in <somewhere>
run 
<jdb stops when breakpoint hit>
step
where
up 3
where
reenter"

reports:

Exception occurred: java.lang.NullPointerException (uncaught)"thread=MyThread", <...>.MyThread.func1(), line=67 bci=13

And the line 67 is:

    67          return func2(intParam);

After failed reenter, "where" command reports:

MyThread[1] where
  [1] nsk.jdb.reenter.reenter001.MyThread.func1 (reenter001a.java:67)
  [2] nsk.jdb.reenter.reenter001.MyThread.run (reenter001a.java:59)



> stop in  nsk.jdb.reenter.reenter001.reenter001a.main
Deferring breakpoint nsk.jdb.reenter.reenter001.reenter001a.main.
It will be set after the class is loaded.
> run
run nsk.jdb.reenter.reenter001.reenter001a
Set uncaught java.lang.Throwable
Set deferred uncaught java.lang.Throwable
> 
VM Started: Set deferred breakpoint nsk.jdb.reenter.reenter001.reenter001a.main

Breakpoint hit: "thread=main", nsk.jdb.reenter.reenter001.reenter001a.main(), line=24 bci=0

main[1] stop in  nsk.jdb.reenter.reenter001.reenter001a.lastBreak
Set breakpoint nsk.jdb.reenter.reenter001.reenter001a.lastBreak
main[1] cont
> 
Breakpoint hit: "thread=MyThread", nsk.jdb.reenter.reenter001.reenter001a.lastBreak(), line=27 bci=0

MyThread[1] threads
Group system:
  (java.lang.ref.Reference$ReferenceHandler)0x140 Reference Handler cond. waiting
  (java.lang.ref.Finalizer$FinalizerThread)0x13f  Finalizer         cond. waiting
  (java.lang.Thread)0x13e                         Signal Dispatcher running
  (java.lang.Thread)0x13d                         Attach Listener   running
Group main:
  (java.lang.Thread)0x1                           main              cond. waiting
  (nsk.jdb.reenter.reenter001.MyThread)0x198      MyThread          running (at breakpoint)
MyThread[1] thread 0x198
MyThread[1] step
> 
Step completed: "thread=MyThread", nsk.jdb.reenter.reenter001.MyThread.func5(), line=96 bci=14

MyThread[1] where
  [1] nsk.jdb.reenter.reenter001.MyThread.func5 (reenter001a.java:96)
  [2] nsk.jdb.reenter.reenter001.MyThread.func4 (reenter001a.java:88)
  [3] nsk.jdb.reenter.reenter001.MyThread.func3 (reenter001a.java:81)
  [4] nsk.jdb.reenter.reenter001.MyThread.func2 (reenter001a.java:74)
  [5] nsk.jdb.reenter.reenter001.MyThread.func1 (reenter001a.java:67)
  [6] nsk.jdb.reenter.reenter001.MyThread.run (reenter001a.java:59)
MyThread[1] up 3
MyThread[4] where
  [4] nsk.jdb.reenter.reenter001.MyThread.func2 (reenter001a.java:74)
  [5] nsk.jdb.reenter.reenter001.MyThread.func1 (reenter001a.java:67)
  [6] nsk.jdb.reenter.reenter001.MyThread.run (reenter001a.java:59)
MyThread[4] reenter
> 
Exception occurred: java.lang.NullPointerException (uncaught)"thread=MyThread", nsk.jdb.reenter.reenter001.MyThread.func1(), line=67 bci=13

MyThread[1] where
  [1] nsk.jdb.reenter.reenter001.MyThread.func1 (reenter001a.java:67)
  [2] nsk.jdb.reenter.reenter001.MyThread.run (reenter001a.java:59)
MyThread[1]

Comments
EVALUATION I suspect that this bug is a duplicate of the following: 7043461 2/3 VM crashes in void LinkResolver::runtime_resolve_virtual_method which is integrated in HSX-21-B13/JDK7-B143. 7043461 was used to fix a problem introduced by the following bug fix: 7009361 2/3 JSR 292 Invalid value on stack on solaris-sparc with -Xcomp which is integrated in HSX-21-B12/JDK7-B142. The problem introduced by 7009361 is specific to Solaris SPARC and can result in both crashes and incorrect results.
24-05-2011