[Soot-list] CallGraph generating incorrect results

Graziella Galea gra.galea at gmail.com
Fri May 2 08:51:16 EDT 2014


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> 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> 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> 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
>>> > 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
>>
>
>
>
> --
> Graziella Galea
>



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


More information about the Soot-list mailing list