[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: transformation declares java.lang.Object as super of java.lang.Object



Eric Bodden wrote:

owner-soot-list@sable.mcgill.ca <> wrote:


$ java soot.Main -f jasmin java.lang.Object

I see:

.super java/lang/Object

and this super declaration is causing the class not to load
in SableVM.

Is it something I should be taking care of, or is it a bug in Soot?

As it turned out in an earlier posting below, it seems to be that Soot makes java.lang.Object and application class if it is found twice in the classpath (maybe your setup is slightly wrong?) which causes the effect you mention.

Hi Eric,


Thanks for the reply.

I was really careful with my classpath and it still didn't fix things.

With a new install of sablevm-classpath:

$ cd ~/lib/sablevm/classpath
$ java soot.Main -cp . -f jasmin java.lang.Object
Soot started on Mon Mar 08 17:47:00 EST 2004
Transforming java.lang.Object...
Writing to sootOutput/java.lang.Object.jasmin
Soot finished on Mon Mar 08 17:47:04 EST 2004
Soot has run for 0 min. 4 sec.
$ head -n 2 sootOutput/java.lang.Object.jasmin
.class public java/lang/Object
.super java/lang/Object

... what is strange is that this class loads fine (without soot modification) in SableVM. I also tried Sun's 1.4.1 rt.jar:

$ java soot.Main -cp $RT_JAR -f jasmin java.lang.Object
Soot started on Mon Mar 08 17:50:23 EST 2004
Transforming java.lang.Object...
Writing to sootOutput/java.lang.Object.jasmin
Soot finished on Mon Mar 08 17:50:28 EST 2004
Soot has run for 0 min. 5 sec.
$ head -n 2 sootOutput/java.lang.Object.jasmin
.class public java/lang/Object
.super java/lang/Object

Perhaps it's a jasmin bug? I also got the same result with D-Java. Furthermore, removing the '.super java/lang/Object' line causes a parse error with jasmin.

As a side note, it would be nice if I could stop 'java soot.Main -f jasmin' from rearranging the order of instructions in transformed classfiles (D-Java doesn't do this, neither does javap).

Cheers,
Chris