[cfe-commits] [PATCH] GRExprEngine dummy this object region

Marcin Świderski marcin.sfider at gmail.com
Tue Nov 16 00:21:51 PST 2010


W dniu 16 listopada 2010 09:04 użytkownik Marcin Świderski <
marcin.sfider at gmail.com> napisał:

>
>
> 2010/11/16 Zhongxing Xu <xuzhongxing at gmail.com>
>
>
>>
>> 2010/11/16 Ted Kremenek <kremenek at apple.com>
>>
>>
>>> On Nov 15, 2010, at 4:26 PM, Marcin Świderski wrote:
>>>
>>> W dniu 16 listopada 2010 01:14 użytkownik Ted Kremenek <
>>> kremenek at apple.com> napisał:
>>>
>>>>
>>>> On Nov 15, 2010, at 3:52 PM, Marcin Świderski wrote:
>>>>
>>>> W dniu 16 listopada 2010 00:44 użytkownik Ted Kremenek <
>>>> kremenek at apple.com> 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.
>>>
>>> The current implementation of RegionStore::Retrieve() maps from 'this' to
>> a SymbolicRegion. Is it sufficient?
>>
>> I didn't grasp the SymbolicRegion and SymbolRegionValue until now. Using
> SymbolicRegion will be probably the best solution. Thanks Zhongxing.


New patch. Added mapping from 'this' to it's SymbolicRegion in
BasicStoreManager::getInitialStore.

Please approve for commit.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101116/bd70bb22/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gr-eng-cxx-dummy-this-obj.patch
Type: application/octet-stream
Size: 720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101116/bd70bb22/attachment.obj>


More information about the cfe-commits mailing list