[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-commits
Subject:    Re: [cfe-commits] r74407 - in /cfe/trunk/lib/Analysis:
From:       Ted Kremenek <kremenek () apple ! com>
Date:       2009-06-30 19:47:20
Message-ID: 680D460A-D568-4543-B9E1-363364CF0DAB () apple ! com
[Download RAW message or body]

Hi Zhongxing,

Do you have a test case to accompany this patch that can go in the  
test suite?  It's not 100% clear to me how this gets triggered.

Ted

On Jun 28, 2009, at 3:16 AM, Zhongxing Xu wrote:

> Author: zhongxingxu
> Date: Sun Jun 28 05:16:11 2009
> New Revision: 74407
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=74407&view=rev
> Log:
> Do not crash on binding concrete integer location.
> 
> Modified:
> cfe/trunk/lib/Analysis/BasicStore.cpp
> cfe/trunk/lib/Analysis/RegionStore.cpp
> 
> Modified: cfe/trunk/lib/Analysis/BasicStore.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BasicStore.cpp?rev=74407&r1=74406&r2=74407&view=diff
>  
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- cfe/trunk/lib/Analysis/BasicStore.cpp (original)
> +++ cfe/trunk/lib/Analysis/BasicStore.cpp Sun Jun 28 05:16:11 2009
> @@ -319,6 +319,9 @@
> }
> 
> Store BasicStoreManager::BindInternal(Store store, Loc loc, SVal V) {
> +  if (isa<loc::ConcreteInt>(loc))
> +    return store;
> +
> const MemRegion* R = cast<loc::MemRegionVal>(loc).getRegion();
> ASTContext &C = StateMgr.getContext();
> 
> 
> Modified: cfe/trunk/lib/Analysis/RegionStore.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=74407&r1=74406&r2=74407&view=diff
>  
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
> +++ cfe/trunk/lib/Analysis/RegionStore.cpp Sun Jun 28 05:16:11 2009
> @@ -1074,6 +1074,9 @@
> }
> 
> const GRState *RegionStoreManager::Bind(const GRState *state, Loc L,  
> SVal V) {
> +  if (isa<loc::ConcreteInt>(L))
> +    return state;
> +
> // If we get here, the location should be a region.
> const MemRegion* R = cast<loc::MemRegionVal>(L).getRegion();
> 
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits@cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

_______________________________________________
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