Review request for 6529758: JVMTI Waiters demo crashes. Double free.

Alan Bateman Alan.Bateman at Sun.COM
Wed Sep 9 01:57:33 PDT 2009


This one is a fix to the JVM TI "waiters" demo. When the VM terminates, 
the agent frees the Monitors on its list but some may already have been 
freed by the ObjectFree callback. The fix changes the ObjectFree 
callback so that it removes the Monitor from the agent's list. I also 
eliminated the raw monitor used in Agent::get_monitor - it's not needed 
because the raw monitor used for handling VMDeath events prevents any 
concurrent execution of the agent's callbacks. A production variant of 
this demo would likely use RWL, in which case the agent's callback would 
need locking around access to the monitor list.

The webrev is here:
  http://cr.openjdk.java.net/~alanb/6529758/webrev.00/

Thanks,
Alan.


More information about the serviceability-dev mailing list