JVM crashes when adding more than 2 methods to java.lang.Object
Guillaume Pothier
gpothier at gmail.com
Wed Apr 28 12:23:25 PDT 2010
Hi,
I'm observing a JVM crash when adding public, non-static, non-native
methods to the Object class through instrumentation (either using
JVMTI's ClassFileLoadHook or providing the modified Object class to
the JVM using the -Xbootclasspath/p parameter). Adding one or two
methods causes no problems, but adding more than 2 methods causes the
JVM to crash. I get different kinds of crashes depending on the number
of methods I add. With 3 and 4 methods I get a SIGSEGV; with more
methods I get an NPE during VM initialization (in String.charAt). For
testing purposes, all added
methods take no arguments and return void, and have an empty body
(only the RETURN bytecode).
This occurs with Sun's JDK 1.6_18 and the OpenJDK 1.6_18.
Is that expected behavior? Is there something I can do about it?
Kind regards,
Guillaume Pothier
PhD student, University of Chile
More information about the serviceability-dev
mailing list