[Soot-list] CallGraph generating incorrect results

Graziella Galea gra.galea at gmail.com
Sat May 3 05:26:00 EDT 2014


Hi Marc-André Laverdière,

It finally worked.  It had nothing to do with the code or Soot.  The build
of the project being analysed was incorrect and messed up everything.

Thanks a lot for your help anyway :)


On 2 May 2014 15:57, Marc-André Laverdière <
marc-andre.laverdiere-papineau at polymtl.ca> wrote:

> Hi Gabriella,
>
> I normally use edgesOutOf, but I'd expect them to be coherent.
> The target method is static, isn't it? In that case, there is no room
> for uncertainty in the call graph.
>
> I have the feeling that this could be to a combination of wrong
> classpath/process path and phantom references.
>
> Just to make sure we're not going crazy, would you please dump your call
> graph using ProBe and verify that it matches what you're extracting?
>
> http://plg.uwaterloo.ca/~olhotak/probe/
>
> P.S. I'd encourage you to visit the #soot channel on Freenode. I have
> the feeling that interactive troubleshooting will help here :)
>
> Marc-André Laverdière-Papineau
> Doctorant - PhD Candidate
>
> On 05/02/2014 08:51 AM, Graziella Galea wrote:
> > Sorry to reply again but I've checked whether the class which contains
> > the needed call site is in the scene and in fact it is. As I said in the
> > previous email the method edgesInto() is not returning any call sites
> > but in fact there is.
> >
> > This is the target method: *unmodifiableBoundedCollection(final
> > BoundedCollection<? extends E> coll)*
> >
> > This is the call site:
> > *final BoundedCollection<E> coll = FixedSizeList.<E>fixedSizeList(new
> > ArrayList<E>());*
> > *return
> UnmodifiableBoundedCollection.unmodifiableBoundedCollection(coll);*
> >
> > *BoundedCollection *is an interface and in the call site it is
> > initialised by the class *FixedSizeList *which implements the
> > *BoundedCollection*.
> >
> > Could it be that Soot does not handle this?
> >
> >
> > On 2 May 2014 13:41, Graziella Galea <gra.galea at gmail.com
> > <mailto:gra.galea at gmail.com>> wrote:
> >
> >     I think the graph is incomplete because for certain targets no call
> >     sites are being returned by edgesInto().  This is the code for
> >     getting the call sites:
> >
> >     Iterator<MethodOrMethodContext> sources = new
> >     Sources(cg.edgesInto(target));
> >     while (sources.hasNext()){
> >     SootMethod src = (SootMethod)sources.next();
> >     }
> >
> >
> >     On 2 May 2014 13:41, Graziella Galea <gra.galea at gmail.com
> >     <mailto:gra.galea at gmail.com>> wrote:
> >
> >         I think the graph is incomplete because for certain targets no
> >         call sites are being returned by edgesInto().  This is the code
> >         for getting the call sites:
> >
> >         Iterator<MethodOrMethodContext> sources = new
> >         Sources(cg.edgesInto(target));
> >         while (sources.hasNext()){
> >         SootMethod src = (SootMethod)sources.next();
> >         }
> >
> >
> >         On 24 April 2014 23:47, Marc-André Laverdière
> >         <marc-andre.laverdiere-papineau at polymtl.ca
> >         <mailto:marc-andre.laverdiere-papineau at polymtl.ca>> wrote:
> >
> >             Hi Graziella,
> >
> >             I am not sure what is the problem... you are telling that
> >             the call sites
> >             returned by edgesInto() are wrong? Or is the problem with
> >             some custom
> >             code you wrote?
> >
> >             Also, is there a possibility that the call sites returned
> >             are using a
> >             superclass of the target you are looking at? It could be
> >             that Spark
> >             defaulted to CHA at that specific spot...
> >
> >             Marc-André Laverdière-Papineau
> >             Doctorant - PhD Candidate
> >
> >             On 04/24/2014 01:04 PM, Graziella Galea wrote:
> >             > Hello everyone,
> >             >
> >             > I am using the Soot API so as to be able to generate call
> >             graphs through
> >             > my program.  I have generated graphs for two different
> >             Java programs so
> >             > far and the call graph seems to be returning correct
> results.
> >             >  Unfortunately, I have recently tried to generate a call
> >             graph for yet
> >             > another project but the call graph must be incorrect.
> >             >
> >             > This is because I am using the graph so that the program
> >             will identify
> >             > the caller methods of particular methods.  When I checked,
> >             the methods
> >             > returned by Soot do not call the methods I give Soot.
> >             >
> >             > I do not think that the problem is in the code since if it
> >             was then the
> >             > program would not have worked for the other projects
> >             >
> >             > Does anyone know what the problem might be please?
> >             >
> >             > Kind Regards,
> >             >
> >             > Graziella
> >             >
> >             >
> >             > _______________________________________________
> >             > Soot-list mailing list
> >             > Soot-list at CS.McGill.CA <mailto:Soot-list at CS.McGill.CA>
> >             > https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
> >             >
> >             _______________________________________________
> >             Soot-list mailing list
> >             Soot-list at CS.McGill.CA <mailto:Soot-list at CS.McGill.CA>
> >             https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
> >
> >
> >
> >
> >         --
> >         Graziella Galea
> >
> >
> >
> >
> >     --
> >     Graziella Galea
> >
> >
> >
> >
> > --
> > Graziella Galea
> >
> >
> > _______________________________________________
> > Soot-list mailing list
> > Soot-list at CS.McGill.CA
> > https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
> >
> _______________________________________________
> Soot-list mailing list
> Soot-list at CS.McGill.CA
> https://mailman.CS.McGill.CA/mailman/listinfo/soot-list
>



-- 
Graziella Galea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20140503/f0c9a2d1/attachment.html 


More information about the Soot-list mailing list