Re: Re: rt.jat instrumentation causes JVM crash

Guy Korland <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
Thanks I found it the hard way that java.lang.Thread and java.lang.Object
can't be instrumented.
Thanks,
Guy

On Mon, Oct 19, 2009 at 12:40 PM, Yao Qi <[email protected]> wrote:

> On Sat, Oct 17, 2009 at 2:09 PM, Guy Korland <[email protected]> wrote:
> > Hi,
> >
> > I'm trying to instrument the boot class loader classes, after some
> > long work I found out that adding new field to some of these classes
> > breaks the JVM.
> This topic is NOT related to asm, I think, :)
>
> What "core" classes do you instrument?  It is not supported for JVM
> for instrumented "core" classes, such as java.lang.Thread,
> java.lang.Object.
>
> My preferred approach is to instrument java "core" classes by ASM, and
> dump them in file system as new class files.  Use -Xbootclasspath
> option to replace your original "core" classes.
>
> > So after I removed those fields and left only adding new methods to
> > the boot classes I'm still getting the following error on JVM
> > initialization, any ideas?
> >
> > Error occurred during initialization of VM
> > java.lang.ExceptionInInitializerError
> > Caused by: java.lang.NullPointerException
> >       at java.lang.String.charAt(String.java:689)
> >       at java.security.BasicPermission.init(BasicPermission.java:93)
> >       at java.security.BasicPermission.<init>(BasicPermission.java:129)
> >       at java.lang.RuntimePermission.<init>(RuntimePermission.java:335)
> >       at java.lang.Thread.<clinit>(Thread.java:1493)
> >
> > Or if I don't instrument the java.lang.* classes.
> >
> > Error occurred during initialization of VM
> > java.lang.NullPointerException
> >       at java.util.Hashtable.put(Hashtable.java:394)
> >       at java.lang.System.initProperties(Native Method)
> >       at java.lang.System.initializeSystemClass(System.java:1072)
> >
> > Thanks,
> > Guy
> >
> >
> > --
> > You receive this message as a subscriber of the [email protected] mailing
> list.
> > To unsubscribe: mailto:[email protected]
> > For general help: mailto:[email protected]?subject=help
> > OW2 mailing lists service home page: http://www.ow2.org/wws
> >
> >
>
>
>
> --
> Yao
> GNU/Linux Developer
>
>
> --
> You receive this message as a subscriber of the [email protected] mailing list.
> To unsubscribe: mailto:[email protected]
> For general help: mailto:[email protected]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


-- 
Guy Korland
message-footer.txt (text/plain, 238 B)
-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.