[Soot-list] This operation requires resolving level BODIES but java.lang.Object is at resolving level SIGNATURES

Ondrej Lhotak olhotak at uwaterloo.ca
Wed Jul 26 08:58:20 EDT 2006


On Tue, Jul 25, 2006 at 05:28:16PM +1000, Nicholas Irving wrote:
> Exception in thread "main" java.lang.RuntimeException: This operation
> requires resolving level BODIES but java.lang.Object is at resolving
> level SIGNATURES

The problem is that the line:
SootClass sootClass = Scene.v().loadClassAndSupport(strClass);
comes before Soot is switched into whole-program mode. By default,
Soot uses the "fast" class resolver which was developed for abc.
However, this resolver fails to resolve classes needed for whole-program
analysis. Therefore, when you set Soot to do whole-program analysis
(using -w), it switches to a more complete resolver. This is done when
you call soot.Main with the -w option. However, the code in the e-mail
starts resolving before calling soot.Main, so some of the resolving
is done using the "fast" resolver, and only later (when soot.Main
is called) does Soot switch to the complete resolver. That's why
java.lang.Object is not being resolved.

In this case, a fix would be to not resolve before calling soot.Main.
Since the class is included on the command line, Soot will resolve
it itself.

Ondrej



More information about the Soot-list mailing list