JVM crashes when adding more than 2 methods to java.lang.Object
tom.rodriguez at oracle.com
Wed Apr 28 11:09:22 PDT 2010
I didn't think we supporting redefining Object and adding public methods after JVM bootstrap. Adding methods to classes which are already loaded with subclasses means that you have to generate new vtables for all subclasses and as far as I know we don't do that. You might get more answer over on serviceability-dev.
On Apr 24, 2010, at 1:30 PM, Guillaume Pothier wrote:
> First of all I hope it is appropriate to ask this kind of question in
> this list, otherwise what would be the correct forum?
> Here is my problem: I'm adding public, non-native methods to the
> Object class through instrumentation, and it seems that adding more
> than 2 such 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).
> 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 hotspot-dev