On Nov 15, 2010, at 4:26 PM, Marcin Świderski wrote:

> W dniu 16 listopada 2010 01:14 użytkownik Ted Kremenek <[email protected]> 
> napisał:
> 
> On Nov 15, 2010, at 3:52 PM, Marcin Świderski wrote:
> 
>> W dniu 16 listopada 2010 00:44 użytkownik Ted Kremenek <[email protected]> 
>> napisał:
>> Hi Marcin,
>> 
>> What is this memory region used for?  There are no comments above the 
>> declaration of this class, so I'm having difficulty interpreting its 
>> intended use.
>> 
>> On Nov 15, 2010, at 3:42 PM, Marcin Świderski wrote:
>> 
>> > Patch adds new MemRegion subclass CXXDummyThisObjectRegion, which is used 
>> > to initialize CXXThisRegion value for initial stack frame.
>> >
>> > Please aprove for commit.
>> >
>> > -Marcin
>> > <gr-eng-cxx-dummy-this-obj.patch>
>> 
>> Hi Ted
>>  
>> In general it's used for identifing object pointed with 'this' in analyzed 
>> method. I use it for checking in ctor/dtor if method is called on 'this'. I 
>> can write some comment for it before commiting.
> 
> Why not use a symbolic region for the value of 'this'?  Why do we need a new 
> type of memory region?  We can just have RegionStore::Retrieve() map from 
> 'this' to a SymbolicRegion (or one wrapped with an ElementRegion that adds 
> the typing information).
> 
> I couldn't think of any other solution that wouldn't involve tricks.

Understood.  Memory regions is one of those parts of the API I'd like to keep 
as thin as possible and well thought out.  We should only extend it when we are 
lacking some sort of reasoning power that cannot be expressed by the current 
regions.

> But creating ElementRegion could do just fine. Will it be fine to create it 
> directly in UnknownSpaceRegion?

Yeah, works for me.


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to