[Soot-list] Missing edges in call graph generated by Spark

Eric Bodden bodden at st.informatik.tu-darmstadt.de
Mon Feb 8 03:38:47 EST 2010


Hi Cheng.

>From your description it sounds like the method "render" is actually
not executed through your main class. The fact that there are no "blue
nodes" for "parser" means that no object is ever assigned to this
variable, at least not when executing the particular main class with
respect to which Soot analyzes the program.

Eric

--
Eric Bodden
Software Technology Group, Technische Universität Darmstadt, Germany
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt



On 8 February 2010 05:00, Cheng Zhang <cheng.zhang.stap at gmail.com> wrote:
> Hi,
> I am trying to use Spark (without VTA or RTA enabled) to generate a static
> call graph for fop-0.20.5 from DaCapo-2006-10-MR2.
> But I find that some edges are missing in the generated call graph. The
> caller is method render (in class org.apache.fop.apps.Driver) whose source
> code is shown as below:
>     public synchronized void render(XMLReader parser, InputSource source)
> throws FOPException {
>         parser.setContentHandler(getContentHandler());
>         try {
>             parser.parse(source);
>         } catch (SAXException e) {
>             if (e.getException() instanceof FOPException) {
>                 throw (FOPException)e.getException();
>             } else {
>                 throw new FOPException(e);
>             }
>         }
>         catch (IOException e) {
>             throw new FOPException(e);
>         }
>     }
> The call graph contains all the possible method calls except for
> "parser.parse(source)" and "parser.setContentHandler(getContentHandler())".
> By exploring the dumped pag.jar, I found that there are no "reaching blue
> nodes" for the corresponding variables.
> Here is the command line I use (I also tried -include-all):
> -keep-line-number -w -p cg
> safe-forname:true,safe-newinstance:true,verbose:true -p cg.spark
> enabled:true,verbose:true,dump-html:true -pp -cp
> /home/chengzhang/dacapo-2006-10-MR2/for_Soot/fop/:/home/chengzhang/dacapo-2006-10-MR2/for_Soot/fop-deps.jar
> -i org. -process-dir /home/chengzhang/dacapo-2006-10-MR2/for_Soot/fop/
> -main-class dacapo.fop.Main
> Since I am new to Spark, I can't quite understand all the cg.spark options.
> Shall I try some other options? Does anyone have some similar experience?
> Any comments or hints will be highly appreciated.
> Thank you.
> Cheng
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
>


More information about the Soot-list mailing list