[Soot-list] Incorrect entry in TamiFlex log file
Christophe.Foket at elis.UGent.be
Christophe.Foket at elis.UGent.be
Sat Apr 2 12:37:54 EDT 2011
Hello,
I've been trying to use TamiFlex' poa.jar to generate a reflection log
file for the following application:
A.java:
public enum A {
HELLO,
GOODBYE
}
Main.java:
import java.util.EnumSet;
public class Main {
public static void main(String[] args){
System.out.println(EnumSet.noneOf(A.class));
}
}
I used the following command:
-bash-3.2$ java
-javaagent:../../../libraries/tamixflex/poa-1.1.1.jar=out/ Main
[]
=============================================
TamiFlex Play-Out Agent Version 1.1.1
Found 1 new log entries.
Log file written to:
/home/cfoket/private/workspaces/workspace/SootTest/test/enum/src/out/refl.log
The refl.log file then contains a single entry:
Method.invoke;<A: A[]
values()>;java.lang.System$2.getEnumConstantsShared;1140;
However, closer inspection of the class System$2 reveals that there is
no Method.invoke instruction at address 1140. In fact, javap tells me
that getEnumConstantsShared only contains the following code:
public java.lang.Enum[] getEnumConstantsShared(java.lang.Class);
Code:
0: aload_1
1: invokevirtual #53; //Method
java/lang/Class.getEnumConstantsShared:()[Ljava/lang/Object;
4: checkcast #25; //class "[Ljava/lang/Enum;"
7: areturn
Following the call to Class.getEnumConstantsShared leads me to the
Method.invoke, call, which is at address 47
47: invokevirtual #899; //Method
java/lang/reflect/Method.invoke:(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
This means that the entry in the reflection log file should have been
Method.invoke;<A: A[]
values()>;java.lang.Class.getEnumConstantsShared;47; instead.
Any ideas on why TamiFlex generates the wrong output?
Kind regards,
Christophe
PS: I'm using java version 1.6.0_24.
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Soot-list
mailing list