Review Request: 6908267: Zero fails to unlock synchronized native	methods on exception
    David Holmes - Sun Microsystems 
    David.Holmes at Sun.COM
       
    Tue Dec  8 15:43:06 PST 2009
    
    
  
Hi Gary,
Gary Benson said the following on 12/09/09 00:58:
> Hi all,
> 
> If a synchronized native method throws an exception, Zero does not
> unlock it.  This leaves the receiver/mirror locked, with a stale
> monitor, which can cause the VM will crash at some unspecified time
> in the future.  This webrev fixes it.
> 
>   http://cr.openjdk.java.net/~gbenson/zero-fix-6908267/
Your original code indicates that it emulated the template interpreter 
by not unlocking upon an exception. Have you determined why this was 
wrong? The comments in the sparc and x86 interpreter have me concerned eg:
  // With c++ interpreter we just leave it pending caller will do the 
correct thing. However...
// Like x86 we ignore the result of the native call and leave the method 
locked. This
     // seems wrong to leave things locked.
Though an earlier comment states the exception handling will handle 
unlocking.
Just curious ...
David Holmes
    
    
More information about the hotspot-dev
mailing list