[Soot-list] Method without CodeAttribute

Eric Bodden eric.bodden at ec-spride.de
Thu Jan 3 10:10:22 EST 2013


Hi Bernhard.

Thanks for reporting this. Given that "java" deems the class invalid,
I think we should rather not "fix" this, though.

Eric

On 3 January 2013 08:26, Bernhard Berger <berber at tzi.de> wrote:
> Hi, folks!
>
> Today I came across a class file that soot was not able to load (some dependencies of my project). It is the class javax.servlet.GenericServlet that can be found here [1]. The class contains a class initializer <clinit> without a code attribute which leads to a NullPointerException. In particular, coffi loads the method in soot.coffi.ClassFile.parseMethod. The parsing process stops if the code attribute cannot be found without assigning a value to the instruction field of m. Later on, soot.coffi.CFG.<init> dereferences the field without checking for null. I took a look at the source but I've no idea how to fix this "bug". I am even unsure whether the class file is correct (On the one hand, javap accepts the class file. On the other hand, java throws a java.lang.ClassFormatError)
>
> I think I can find another library containing a proper version of this class to circumvent the problem but I wanted to report the behavior for other users of soot.
>
> Bernhard
>
> [1] http://download.java.net/maven/2/javaee/javaee-api/5/javaee-api-5.jar
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list



-- 
Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
Head of Secure Software Engineering Group at EC SPRIDE
Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt


More information about the Soot-list mailing list