[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: safe-forname option



On Tue, Mar 30, 2004 at 10:31:04PM -0800, Manu Sridharan wrote:
> Hi,
> 
> I have a question about the safe-forname option for the cg phase.  From 
> reading the spec, it seems that with this option set to true, a call to 
> forName() should conservatively lead to call edges to all possible 
> static initializers.  However, looking at the code, it seems that only 
> classes already known by the Scene are considered.  So, if forName() is 
> passed the name of a class that isn't mentioned elsewhere in the code 
> and is not specified as a dynamic class, the safe-forname option will 
> not be conservative in adding call edges for that call.  In other words, 
> safe-forname only yields a conservative result when all possible dynamic 
> classes that are not mentioned explicitly in the code are specified at 
> the command-line.  Is my understanding correct?  If so, perhaps the 
> documentation for this option (and for safe-newinstance I guess) should 
> be clarified.

Soot has no way of knowing about the existence dynamic classes unless
they are specified as such. So, if you need them to be considered, you
need to specify them. We will update the documentation according to your
suggestion.

Ondrej

> 
> Thanks,
> Manu