[Soot-list] Stack overflow when generating call graph

Eric Bodden eric.bodden at mail.mcgill.ca
Fri Jul 11 22:14:37 EDT 2008


Hi Marc.

> 1. Is there any way to config cg so that it doesn't create edges/nodes for
> non-application program elements (e.g., system libraries)?  Based on a
> previous post, my guess is no, since doing whole program analysis always
> pulls in the world for completenes.  The problem is that the world is fairly
> large.

No, as far as I know there isn't because that would be highly unsound:
library code can call back into application classes.

> 2. Is there any other way/flag/setting/option to config cg to optimize
> memory usage?

It's usually highly optimized as it is. You may want to try paddle,
though. It uses a BDD representation instead of the explicit graph
representation that spark has. That makes it more memory-efficient.

> 3. Otherwise, can a Soot developer give me some suggestions on how I can
> modify the cg code?  For example, if we call into a system library but there
> is never a call back into the application classes, we could prune the system
> library dag.

I am sure that's possible somehow but I am not the right person to
answer that one.

However, first you should try something else: -Xms and -Xmx increase
the heap size, not the stack size, so setting these will not help you
avoiding a stack overflow. -Xss is what you want.

1.5GB heap is also not a lot for the kind of analysis you want to do.
It might be enough with manual fine-tuning of the callgraph but maybe
not without. Depends on the benchmark, really.

Eric



-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


More information about the Soot-list mailing list