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
