[Soot-list] Incorrect entry in TamiFlex log file
Eric Bodden
bodden at st.informatik.tu-darmstadt.de
Tue Apr 5 09:15:51 EDT 2011
Hi Christophe.
This was indeed due to the filtering of stack traces, as I already
anticipated. I have committed a patch to our Mercurial repository.
Thanks for pointing out this problem to us!
Eric
On 2 April 2011 18:37, <Christophe.Foket at elis.ugent.be> wrote:
> 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.
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
--
Dr. Eric Bodden, http://bodden.de/
Principal Investigator in Secure Services at CASED
Coordinator of the CASED Advisory Board of Study Affairs
PostDoc at Software Technology Group, Technische Universität Darmstadt
Tel: +49 6151 16-5478 Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt
More information about the Soot-list
mailing list