[cfe-commits] r58233 - /cfe/trunk/lib/Analysis/GRSimpleVals.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Mon Oct 27 02:00:08 PDT 2008
Author: zhongxingxu
Date: Mon Oct 27 04:00:08 2008
New Revision: 58233
URL: http://llvm.org/viewvc/llvm-project?rev=58233&view=rev
Log:
Only loc::MemRegionVal can be modified. This avoids crashing in RegionStore when a function pointer is used as an argument.
Modified:
cfe/trunk/lib/Analysis/GRSimpleVals.cpp
Modified: cfe/trunk/lib/Analysis/GRSimpleVals.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRSimpleVals.cpp?rev=58233&r1=58232&r2=58233&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/GRSimpleVals.cpp (original)
+++ cfe/trunk/lib/Analysis/GRSimpleVals.cpp Mon Oct 27 04:00:08 2008
@@ -369,7 +369,7 @@
SVal V = StateMgr.GetSVal(St, *I);
- if (isa<Loc>(V))
+ if (isa<loc::MemRegionVal>(V))
St = StateMgr.SetSVal(St, cast<Loc>(V), UnknownVal());
else if (isa<nonloc::LocAsInteger>(V))
St = StateMgr.SetSVal(St, cast<nonloc::LocAsInteger>(V).getLoc(),
More information about the cfe-commits
mailing list