Only loc::MemRegionVal can be modified. This avoids crashing in RegionStore when a function pointer is used as an argument.

llvm-svn: 58233
This commit is contained in:
Zhongxing Xu 2008-10-27 09:00:08 +00:00
parent 8475d56794
commit d7c44059d4
1 changed files with 1 additions and 1 deletions

View File

@ -369,7 +369,7 @@ void GRSimpleVals::EvalCall(ExplodedNodeSet<GRState>& Dst,
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(),