review for 7104960: JSR 292: +VerifyMethodHandles in product JVM can overflow buffer

Christian Thalinger christian.thalinger at oracle.com
Fri Nov 4 02:16:23 PDT 2011


Looks good.  -- Chris

On Nov 4, 2011, at 12:51 AM, Tom Rodriguez wrote:

> http://cr.openjdk.java.net/~never/7104960
> 73 lines changed: 42 ins; 6 del; 25 mod; 14873 unchg
> 
> 7104960: JSR 292: +VerifyMethodHandles in product JVM can overflow buffer
> Reviewed-by:
> 
> The code buffers on limits on sparc didn't properly account for space
> required then the code cache and libjvm.so were farther apart than an
> int so it would slightly overflow it's buffer.  It would crash because
> the CodeCache became corrupted instead of reporting that it
> overflowed.  I modified the overflow detection logic to work even in
> product.  It doesn't check on every operation as it does in debug
> mode, it just vierifies at the end that it hasn't overflowed.  I also
> extended the ForceUnreachable logic to work on sparc and turned it
> into a diagnostic so it can be tested in product.  I added logging
> code to report buffer usage and reset the values on sparc and x86.  If
> left about 4k of buffer in product mode and 20k in debug mode.
> 



More information about the hotspot-compiler-dev mailing list