[Soot-list] Heros question
Bodden, Eric
eric.bodden at sit.fraunhofer.de
Wed Apr 10 01:41:09 EDT 2013
On 09.04.2013, at 22:49, Henddher Pedroza <hpedro2 at uic.edu> wrote:
> Never mind. I found the problem on my end.
Great. For the record, would you let us know what the problem was?
Eric
>
> On Apr 9, 2013 11:22 AM, "Henddher Pedroza" <hpedro2 at uic.edu> wrote:
> Hello all,
>
> I am trying to use Heros but I am having difficulties.
>
> I have a simple Java stand-alone app composed of 2 classes, DummyMain and ClassC:
>
> public class DummyMain {
>
> public static void main(String[] args) {
> Thread ttt = new Thread(new Runnable() {
> public void run() {
> ClassC c = new ClassC();
> c.doSomething(); // Statement Sx
> }
> });
> ttt.start();
> }
> }
>
> public class ClassC {
> public void doSomething() {
> System.out.println(this + " doSomething");
> }
> }
>
> I am using IFDSUninitializedVariables but I think it does not matter in this case since I am not looking at the solution produced by the Solver.
>
> The issue I am observing is the following:
>
> I added "System.out.println" to each callback method in FlowFunctions of IFDSUninitializedVariables. Basically, I want to see how/when these are called by the framework.
>
> However, I NEVER see any callback for the "c.doSomething()" invocation inside the "run" method of my dummy Thread t (statement Sx).
>
> How is this possible?
>
> I think "c.doSomething()" is reachable from "DummyMain.main(String[])". Am I flat-out wrong?
>
> Why is it that none of the FlowFunctions callbacks is ever invoked for the unit corresponding to statement Sx?
>
> The initialSeeds I am "feeding" into the framework are each of the start units of each of the default entry points. IOW, this:
>
> protected void internalTransform(String phaseName, @SuppressWarnings("rawtypes") Map options) {
>
> this.cg = new JimpleBasedInterproceduralCFG();
>
> for (SootMethod sm : Scene.v().getEntryPoints()) {
> if (!sm.isConcrete()) {
> System.out.println("WARN: found no callers of entrypoint method " + sm.getSignature());
> continue;
> }
> Set<Unit> unitEntryPoints = cg.getStartPointsOf(sm);
> assert unitEntryPoints != null;
> if (unitEntryPoints.isEmpty()) {
> System.out.println("WARN: found no callers of entrypoint method " + sm.getSignature());
> }
> else {
> initialSeeds.addAll(unitEntryPoints);
> }
> }
>
> ....
>
> IFDSTabulationProblem<Unit,Pair<Local, BitSet>,SootMethod,InterproceduralCFG<Unit,SootMethod>> problem
> = new ...
> ...
> IFDSSolver<Unit,Pair<Local, BitSet>,SootMethod,InterproceduralCFG<Unit,SootMethod>> solver
> = new IFDSSolver<Unit,Pair<Local, BitSet>,SootMethod,InterproceduralCFG<Unit,SootMethod>>(problem);
>
> solver.solve();
> }
>
> Also, my running settings are as follow:
> -cp ../Dummy/bin/ -process-dir ../Dummy/bin/ -pp -w -no-bodies-for-excluded -allow-phantom-refs
> -Xmx4000m -ea
>
> I am also following the example Main.java located at soot/soot/jimple/toolkits/ide
>
> Any help is appreciated.
>
> Thanks in advance.
>
> - Henddher
>
> _______________________________________________
> 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