[Soot-list] patch to allow adding methods during BodyTransformer

Eric Bodden eric.bodden at ec-spride.de
Thu Apr 19 07:00:51 EDT 2012


Hi all.

I now fixed this by changing JasminClass in the following way:
When it finds a method that has a JimpleBody, instead of complaining
it creates a BafBody out of this, applies the appropriate Baf packs to
the body and then continues with that body.

I hope this fixes the problem in a minimaly invasive manner.

Eric

On 18 April 2012 17:56, Phil Pratt-Szeliga <pcpratts at syr.edu> wrote:
> Hi Eric,
>
> Here is a minimal test case that causes an exception to be thrown. The
> exception is shown below. What is happening is that the method is not
> included in the list of methods to be converted from Jimple/Shimple to
> Baf.
>
> Exception in thread "main" java.lang.RuntimeException: method:
> gpuMethodnew has an invalid active body!
>        at soot.baf.JasminClass.emitMethodBody(JasminClass.java:112)
>        at soot.AbstractJasminClass.emitMethod(AbstractJasminClass.java:697)
>        at soot.AbstractJasminClass.<init>(AbstractJasminClass.java:576)
>        at soot.baf.JasminClass.<init>(JasminClass.java:92)
>        at soot.PackManager.writeClass(PackManager.java:871)
>        at soot.PackManager.writeOutput(PackManager.java:475)
>        at soot.PackManager.writeOutput(PackManager.java:400)
>        at soot.Main.run(Main.java:199)
>        at soot.Main.main(Main.java:141)
>        at edu.syr.pcpratts.useproto.analyzer.NewMethodExample.run(NewMethodExample.java:41)
>        at edu.syr.pcpratts.useproto.analyzer.NewMethodExample.main(NewMethodExample.java:46)
>
> Phil
>
> On Tue, Apr 17, 2012 at 7:39 AM, Eric Bodden <eric.bodden at ec-spride.de> wrote:
>> Phil, can you send me a minimal test case, i.e., a minimal extension
>> to Soot that triggers the problem you mention? I can then try to
>> assist you in finding a minimal patch.
>>
>> Cheers,
>> Eric



-- 
Eric Bodden, Ph.D., http://bodden.de/
Head of Secure Software Engineering Group at EC SPRIDE
Principal Investigator in Secure Services at CASED
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