[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange bug related to soot.Scene
On Fri, Feb 21, 2003 at 10:29:35AM -0000, Eric Bodden wrote:
> Hello again.
>
> > java.lang.Runtime exec() does essentially the same thing as the
> > exec() in the C standard library. It causes the operating system to
> > start the specified process. In particular, it can be used to start
> > a Java VM, running Soot, for example.
>
> Ok, first I have to say that this "solution" really sounds very strange
> for me since such code tweaking should be abandoned. So I would really
Agreed. It is a workaround, not a solution. The classloader thing might
be a better workaround. The real solution is to get rid of global
variables in Soot. This is not necessarily hard, but requires touching
all the code in Soot. For us to do it, it means that all development
must stop, and all of our development branches have to be merged
together first. This is why I cannot just do it tomorrow. We are
planning to do it as soon as feasible. You could do it on your
own version of Soot. My plan was to use Eclipse's refactoring tools to
move all static fields to a single class, then make them non-static
fields, then recreate this class for each time you want to run Soot.
> appreceate a better / real solution here. I mean: Things like
> SootClass.setApplicationClass() are really not hard to implement and so
> I really don't understand how this can cause any sideeffects (which are
> apparently there - otherwise it would work). Maybe the tradeoff between
> efficiency and system safety should be moved a little bit further
> towards safety here...
This has little to do with efficiency or safety. Soot was originally
written to run once as a standalone app. Having global variables works
in that scenario, so it was written that way. It doesn't fit the
scenario in which some of you are using it, and it should therefore be
fixed, and it will be, just not overnight.
> The bad thing for me is that my application is for a (to be marked)
> university project and submission is in two weeks :-/.
>
> Second: I still do not quite understand how I should use Runtime.exec()
> here. I understand this invokes a commandline expression in a new
> process. So do you want me to pass something like "java
> ClassWhich(Re)StartsAnalysis" to this commandline???
Runtime.exec( "java soot.Main foo" );
Or use your own main class that calls soot.Main.
Ondrej
>
> Thanks again,
> Eric
>