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

Tom Rodriguez tom.rodriguez at
Thu Nov 3 16:51:42 PDT 2011
73 lines changed: 42 ins; 6 del; 25 mod; 14873 unchg

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

The code buffers on limits on sparc didn't properly account for space
required then the code cache and 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