[Soot-list] A flexible no-bodies option?

Marc-Andre Laverdiere-Papineau marc-andre.laverdiere-papineau at polymtl.ca
Tue Jul 3 08:31:52 EDT 2012


Hello,

I migrated my code to use the Soot main and I am hitting the same kind 
of problem with the nightly build and 2.5.0

Exception in thread "main" java.lang.RuntimeException: This operation 
requires resolving level SIGNATURES but 
java.io.UnsupportedEncodingException is at resolving level HIERARCHY
If you are extending Soot, try to add the following call before calling 
soot.Main.main(..):
Scene.v().addBasicClass(java.io.UnsupportedEncodingException,SIGNATURES);
Otherwise, try whole-program mode (-w).
	at soot.SootClass.checkLevel(SootClass.java:125)
	at soot.SootClass.methodIterator(SootClass.java:393)
	at 
soot.jimple.spark.builder.ContextInsensitiveBuilder.handleClass(ContextInsensitiveBuilder.java:106)
	at 
soot.jimple.spark.builder.ContextInsensitiveBuilder.build(ContextInsensitiveBuilder.java:87)
	at 
soot.jimple.spark.SparkTransformer.internalTransform(SparkTransformer.java:84)
	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)
	at soot.PackManager.runWholeProgramPacks(PackManager.java:454)
	at soot.PackManager.runPacksNormally(PackManager.java:368)
	at soot.PackManager.runPacks(PackManager.java:334)
	at soot.Main.run(Main.java:198)
	at soot.Main.main(Main.java:141)

On 06/30/2012 07:26 AM, Eric Bodden wrote:
> Hi Marc-Andre.
>
> I believe you should be able to just create a few entry points, add
> them to the Scene and then nevertheless call Soot's main method. I
> think this would be the cleanest solution and should avoid any
> resolution errors.
>
> Eric
>
> On 28 June 2012 07:40, Marc-Andre Laverdiere-Papineau
> <marc-andre.laverdiere-papineau at polymtl.ca> wrote:
>> Good morning,
>>
>> I am running 2.5. I am not running soot from the Main because I need to
>> detect the entry points.
>>
>> I realize that there might be a better way to meet my requirement though.
>> Would you advise to make a patch for the code that finds the entry points
>> instead? Which classes would need a tweak?
>>
>> Because it is a longish code snippet, I've put it on Pastebin.
>> http://pastebin.com/Ym5ceESM
>>
>> Regards,
>>
>> --
>> Marc-André Laverdière-Papineau
>> Étudiant au doctorat - PhD Student
>>
>> On 06/28/2012 12:50 AM, Eric Bodden wrote:
>>>
>>> Hello.
>>>
>>>> I am using a whole program analysis with a lot of exclusions. Running
>>>> spark I get this error:
>>>>
>>>> Exception in thread "main" java.lang.RuntimeException: This operation
>>>> requires resolving level HIERARCHY but sun.misc.ClassFileTransformer is
>>>> at resolving level DANGLING
>>>> If you are extending Soot, try to add the following call before calling
>>>> soot.Main.main(..):
>>>> Scene.v().addBasicClass(sun.misc.ClassFileTransformer,HIERARCHY);
>>>>
>>>> I understand from previous mailing list messages that this would be due
>>>> to the fact that I am allowing no bodies for excluded.
>>>
>>>
>>> Even with that option enabled you should not see this error. That's
>>> the whole point of having that option.
>>>
>>> Are you using 2.5.0 or the build from the master branch? In the latter
>>> we indeed discovered a bug giving such behavior which we are currently
>>> fixing. If you are using 2.5.0, can you let us know how you invoke
>>> Soot?
>>>
>>> Cheers,
>>> Eric
>>>
>>
>>
>>
>>
>>
>
>
>


-- 
Marc-André Laverdière-Papineau
Étudiant au doctorat - PhD Student




More information about the Soot-list mailing list