[Soot-list] annotation bug ?
Eric Bodden
eric.bodden at mail.mcgill.ca
Sun Jun 15 23:04:32 EDT 2008
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
More information about the Soot-list
mailing list