[Soot-list] annotation bug ?

Eric Bodden eric.bodden at mail.mcgill.ca
Sun Jun 15 23:10:21 EDT 2008


This here seems to be the official draft of the spec:
http://java.sun.com/docs/books/jvms/second_edition/ClassFileFormat-Java5.pdf
(pages 153+)

I am surprised that there's still no 3rd edition of the JVM spec. Java
5 has been around for quite a while now.

Eric

2008/6/15 Eric Bodden <eric.bodden at mail.mcgill.ca>:
> I had a further look at this. ASM has a specification here...
> http://asm.objectweb.org/asm153/javadoc/user/org/objectweb/asm/attrs/RuntimeVisibleParameterAnnotations.html
> ... but I cannot really find anything wrong.
>
> The relevant methods in question are these here:
>
> https://svn.sable.mcgill.ca/wsvn/soot/jasmin/trunk/lib/jas/src/jas/Method.java?op=file
> https://svn.sable.mcgill.ca/wsvn/soot/jasmin/trunk/lib/jas/src/jas/ParameterVisibilityAnnotationAttr.java?op=file
>
> The only thing I found that might be wrong is that...
>        if (list == null){
>            out.writeShort(0);
>        }
>        else {
>            out.writeShort(list.size());
>            //System.out.println("num params: "+list.size());
>        }
> ..in ParameterVisibilityAnnotationAttr.java may have to be replaced by...
>        if (list == null){
>            out.writeByte(0);
>        }
>        else {
>            out.writeByte(list.size());
>            //System.out.println("num params: "+list.size());
>        }
> ... because according to the ASM docs num_parameters is a byte (u1)
> value. This does not seem to fix the problem, though. Matteo would you
> mind browsing through the Jasmin code a bit and see if you can see
> something else that's not compliant with the specs? If you do find
> something please let me know and I'll attempt a fix. The following
> tool might also help to further track this down:
> http://www.classfileinspector.com/
>
> Eric
>
> --
> Eric Bodden
> Sable Research Group
> McGill University, Montréal, Canada
>



-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


More information about the Soot-list mailing list