[prev in list] [next in list] [prev in thread] [next in thread]
List: cfe-commits
Subject: Re: [cfe-commits] r74525 - in
From: Ted Kremenek <kremenek () apple ! com>
Date: 2009-06-30 23:59:27
Message-ID: 9E83BE4B-0D22-49B6-8C7C-F530CF5FCCB1 () apple ! com
[Download RAW message or body]
Hi Zhongxing,
I thought about this a little more. I'm trying to understand why this
should be in Environment.cpp. Doesn't RegionStoreManager scan the
super regions of all regions::RemoveDeadBindings in DRoots? I'm not
certain, but I'm wondering if the issue (and the right fix) is there
instead of in Environment::RemoveDeadBindings?
On Jun 30, 2009, at 12:31 PM, Ted Kremenek <kremenek@apple.com> wrote:
>> if (isa<loc::MemRegionVal>(X))
>> - DRoots.push_back(cast<loc::MemRegionVal>(X).getRegion());
>> + if (isa<loc::MemRegionVal>(X)) {
>> + const MemRegion* R = cast<loc::MemRegionVal>(X).getRegion();
>> + DRoots.push_back(R);
>> + // Mark the super region of the RX as live.
>> + // e.g.: int x; char *y = (char*) &x; if (*y) ...
>> + // 'y' => element region. 'x' is its super region.
>> + // We only add one level super region for now.
>
> Is there a reason we only add one level of super region? If we need
> to add the entire region hierarchy, I'd rather do it now before we
> forget about it. A recursive function should do the trick. At the
> very least there should be a FIXME comment if this is something that
> needs to be fixed.
>
>> + if (const SubRegion *SR = dyn_cast<SubRegion>(R)) {
>> + DRoots.push_back(SR->getSuperRegion());
>> + }
>> + }
_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic