[Soot-list] Class loading in Soot

Marc-André Laverdière-Papineau marc-andre.laverdiere-papineau at polymtl.ca
Tue Jul 2 08:12:57 EDT 2013


Personnaly, I'm the kind of guy who really really doesn't like how Soot
keeps on throwing exceptions instead of fail-safing (my pet peeve is the
way I need to check if a method has an active body and then retrieve it,
instead of just getting an empty body).

So I would be fine with a dandling class.

But I understand the other points of view, and I think that Saswat's
suggestion makes sense: Exception in normal mode, dandling when phantoms
are allowed.

Marc-André Laverdière-Papineau
Doctorant - PhD Candidate

On 01/07/13 01:50 PM, Saswat Anand wrote:
> Isnt the "-allow-phantom" option designed to answer this question?
> With -allow-phantom, I would expect Soot to not throw exception at
> all, and without that option, Soot should always throw an exception.
> 
> Saswat
> 
> On Mon, Jul 1, 2013 at 9:45 AM, Patrick Meredith <pmeredit at gmail.com> wrote:
>> Personally, I would prefer an Exception.  Anytime this has ever
>> happened to me it was because I made some sort of typo.
>>
>> -Patrick
>>
>> On Mon, Jul 1, 2013 at 11:42 AM, Bodden, Eric
>> <eric.bodden at sit.fraunhofer.de> wrote:
>>> There's an open bug regarding class loading in Soot:
>>>
>>> https://github.com/Sable/soot/issues/88
>>>
>>> When using loadClassAndSupport for loading a non-existing class, Soot throws an exception but as a side effect inserts a class reference into the Scene that is "dangling". As a result, if doing the same call again no exception will be thrown and the reference is returned instead. I think we should consistently do either or, i.e., either never throw or always throw. Does anyone have a preference for one over the other?
>>>
>>> Eric
>>>
>>> --
>>> Prof. Eric Bodden, Ph.D., http://sse.ec-spride.de/ http://bodden.de/
>>> Head of Secure Software Engineering  at Fraunhofer SIT, TU Darmstadt and EC SPRIDE
>>> Tel: +49 6151 16-75422    Fax: +49 6151 16-72051
>>> Room 3.2.14, Mornewegstr. 30, 64293 Darmstadt
>>>
>>> _______________________________________________
>>> Soot-list mailing list
>>> Soot-list at sable.mcgill.ca
>>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>
>>
>>
>> --
>> -Patrick
>> _______________________________________________
>> Soot-list mailing list
>> Soot-list at sable.mcgill.ca
>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
> _______________________________________________
> 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