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

Tim Bell Tim.Bell at Sun.COM
Sat Sep 12 10:50:11 PDT 2009


Alan Bateman wrote:
> 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.

Looks good to me - approved!

Tim

> 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