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

potential naked oop issue with Set/ClearBreakpoints

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 6
    • hotspot
    • None
    • b37
    • generic
    • generic


      A JvmtiBreakpoint holds a reference to a methodOop. When setting or clearing a breakpoint there is code like this:

      JvmtiBreakpoint bp(method, ...);
      :
      jvmti_breakpoints.set(bp);

      which ends enqueuing a VM_ChangeBreakpoint operation to the VMThread. As VMThread::execute will block and some other VM operation can execute it means that the methodOop held by the breakpoint can move.

      The right thing is for the breakpoint to keep a handle to the methodOop but this require changes to the breakpoint cache. The breakpoint due is due an overhaul (4655140) at some point so an alternative solution is to add an oops_do implementation to VM_ChangeBreakpoint and have it call the oops_do of any breakpoints that it holds.

      ###@###.### 2005-05-03 17:38:14 GMT

            alanb Alan Bateman
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: