[Soot-list] RuntimeException when using Spark with -no-bodies-for-excluded

Eric Bodden eric.bodden at ec-spride.de
Tue Mar 5 11:06:49 EST 2013


Hi Michael.

2.5.0 is outdated. You could try the nightly build....

Eric

On 5 March 2013 15:57, Michael Faes <rolve at trick17.ch> wrote:
> Hi everyone,
>
> I'm trying to switch from CHA to Spark and getting the following exception:
>
> Exception in thread "main" java.lang.RuntimeException: This operation
> requires resolving level HIERARCHY but
> javax.security.auth.callback.Callback is at resolving level DANGLING
> If you are extending Soot, try to add the following call before calling
> soot.Main.main(..):
> Scene.v().addBasicClass(javax.security.auth.callback.Callback,HIERARCHY);
> Otherwise, try whole-program mode (-w).
>    at soot.SootClass.checkLevel(SootClass.java:125)
>    at soot.FastHierarchy.canStoreClass(FastHierarchy.java:280)
>    at soot.FastHierarchy.canStoreType(FastHierarchy.java:215)
>    at soot.FastHierarchy.canStoreType(FastHierarchy.java:261)
>    at
> soot.jimple.spark.internal.TypeManager.castNeverFails(TypeManager.java:113)
>    at
> soot.jimple.spark.internal.TypeManager.makeTypeMask(TypeManager.java:92)
>    at
> soot.jimple.spark.SparkTransformer.internalTransform(SparkTransformer.java:91)
>    at soot.SceneTransformer.transform(SceneTransformer.java:39)
>    at soot.Transform.apply(Transform.java:89)
>    at soot.RadioScenePack.internalApply(RadioScenePack.java:57)
>    at
> soot.jimple.toolkits.callgraph.CallGraphPack.internalApply(CallGraphPack.java:49)
>    at soot.Pack.apply(Pack.java:114)
>    ...
>
> I'm using custom entry points and therefore setting up Soot in a custom way:
>
> ----
> final soot.options.Options opts = soot.options.Options.v();
> opts.set_output_format(soot.options.Options.output_format_none);
> opts.set_via_shimple(true);
> opts.set_whole_program(true);
> opts.set_whole_shimple(true);
> opts.set_omit_excepting_unit_edges(true);
> opts.set_allow_phantom_refs(true);
> opts.set_no_bodies_for_excluded(true);
> opts.set_include_all(true);
> opts.set_exclude(myOptions.excludedPackages());
> final List<String> included = new ArrayList<String>(myOptions
>          .includedPackages());
> included.add("java.util.concurrent.locks.");
> opts.set_include(included);
> opts.setPhaseOption("cg", "verbose:true");
> opts.setPhaseOption("cg.cha", "enabled:false");
> opts.setPhaseOption("cg.spark", "enabled:true");
> opts.parse(myOptions.classes().toArray(new String[0]));
>
> final Scene scene = Scene.v();
> for(final String name : myOptions.classes())
>      scene.forceResolve(name, SootClass.BODIES);
> scene.loadNecessaryClasses();
> scene.setEntryPoints(SootUtils.allLibraryMethods());
>
> ...
>
> PackManager.v().runPacks();
> ----
>
> Does anyone have an idea what the problem here could be? I'm using
> soot-2.5.0. Many thanks in advance.
>
> Best regards,
> Michael
> _______________________________________________
> 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