RFR (S) 8042660: vm/mlvm/anonloader/stress/byteMutation failed with: assert(index >=0 && index < _length) failed: symbol index overflow
harold seigel
harold.seigel at oracle.com
Mon Dec 21 18:35:59 UTC 2015
Hi,
Please review this small change to fix bug 8042660
<https://bugs.openjdk.java.net/browse/JDK-8042660>.
The code in ClassFileParser::parse_constant_pool() that handles
CONSTANT_NameAndType and CONSTANT_*Ref assumes that the constant pool
strings they reference are valid names and signatures because they are
valid Utf8 strings. But, "" is a valid Utf8 string but not a valid name
or signature. Assuming that the strings were of non-zero length caused
crashes when test byteMutation specified zero length strings. This fix
adds checks for strings of zero length and throws ClassFormatError
exceptions, preventing the JVM crashes.
Open webrev: http://cr.openjdk.java.net/~hseigel/bug_8042660/
JBS Bug: https://bugs.openjdk.java.net/browse/JDK-8042660
The fix was tested with JCK Lang, VM, and API java_lang tests, the UTE
quick and split verifier tests, and the hotspot, JDK vm, java/io,
java/lang, and java/util JTreg tests, and the tests included in this RFR.
Thanks, Harold
More information about the hotspot-runtime-dev
mailing list