[Soot-list] Exception in abc-ja

Eric Bodden eric.bodden at mail.mcgill.ca
Sun Feb 22 18:30:23 EST 2009


Hello Hossein.

-dava tries to decompile the woven code into Java source code. While
doing so, dava makes several assumptions about the code, which can
sometimes fail. But to generate Jimple, you can just use another set
of flags:

+soot -f J -soot

This should work just fine.

Eric


2009/2/22  <shmohtasham at gmail.com>:
> Hi,
> I'm trying to compile a very simple example with abc-ja 1.3.0 compiler and
> with -dava flag, but I get the following exception:
>
> Exception in thread "main" polyglot.util.InternalCompilerError: unhandled
> exception during weaving/optimisation
>      [java] at
> abc.main.CompileSequence.runSequence(CompileSequence.java:142)
>      [java] at abc.main.Main.run(Main.java:406)
>      [java] at abc.main.Main.main(Main.java:144)
>      [java] Caused by: java.util.NoSuchElementException
>      [java] at soot.util.HashChain.getFirst(HashChain.java:306)
>      [java] at
> soot.dava.toolkits.base.finders.CycleFinder.find(CycleFinder.java:87)
>      [java] at soot.dava.DavaBody.<init>(DavaBody.java:323)
>      [java] at soot.dava.Dava.newBody(Dava.java:84)
>      [java] at soot.PackManager.runBodyPacks(PackManager.java:813)
>      [java] at soot.PackManager.runBodyPacks(PackManager.java:454)
>      [java] at soot.PackManager.runBodyPacks(PackManager.java:373)
>      [java] at abc.main.CompileSequence.optimize(CompileSequence.java:263)
>      [java] at
> abc.main.CompileSequence.runSequence(CompileSequence.java:129)
>      [java] ... 2 more
>      [java] Java Result: 1
> There is no exception when I don't use -dava. Here is the example:
> public class Example{
>
> public void print(String str) throws IOException
> {
> PrintWriter pr = null;
>
> pr = new PrintWriter("out.txt");
> pr.println(str);
> pr.close();
>
> }
> public static void main(String[] args)
> {
> try
> {
> new Example().print("test");
> }
> catch(Exception e)
> {
>
> }
> }
> }
>
> I want to see the generated Jimple code; that's why I use -dava. I
> appreciate your help.
> --Hossein
>
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>



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


More information about the Soot-list mailing list