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

STD: NullPointerExceptions while backtracking the stack in Agent.java

XMLWordPrintable

    • 1.2
    • sparc
    • solaris_2.5.1
    • Not verified

      It is possible to get NullPointerExceptions while backtracking through the
      stack frames in Agent.java.

      ---------------------------------------------------------------------------
      I finally got some feedback on this :

      > Essentially, when a stack trace is asked for (case CMD_GET_STACK_TRACE), you
      > can get a StackFrame sf where sf.className is null. The code then tries to
      > out.writeUTF(sf.className), which causes a null ptr exception. I added very
      > little code to check for this condition.
      >
      > Now I can't remember if you could force this condition w/ JDB alone. I KNOW
      > we could reproduce it easily w/ ICAT when DosDebug was being used
      > because the JVM is halted more frequently (dll loads), and ICAT always unwinds
      > the current thread's stack. If the information that I've given you above is
      > insufficient to sway JavaSoft, I'll either recreate this *$#@! problem w/ JDB
      > OR I'll dig deeper into the code to show them why the null check is a good idea.

      Hope this helps,
      mick.fleming@Ireland 1998-04-29

            ghirschsunw Gordon Hirsch (Inactive)
            miflemi Mick Fleming
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: