diff options
| author | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-27 09:00:08 +0000 |
|---|---|---|
| committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2008-10-27 09:00:08 +0000 |
| commit | d7c44059d489c8ac0d897024487b0d0b575f0d7f (patch) | |
| tree | c2d0601a5347c49eda198bf92c1afd0235ef27a7 | |
| parent | 8475d567949f850173e0852319b75a0af75141f1 (diff) | |
| download | bcm5719-llvm-d7c44059d489c8ac0d897024487b0d0b575f0d7f.tar.gz bcm5719-llvm-d7c44059d489c8ac0d897024487b0d0b575f0d7f.zip | |
Only loc::MemRegionVal can be modified. This avoids crashing in RegionStore when a function pointer is used as an argument.
llvm-svn: 58233
| -rw-r--r-- | clang/lib/Analysis/GRSimpleVals.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Analysis/GRSimpleVals.cpp b/clang/lib/Analysis/GRSimpleVals.cpp index a2a59f3e929..48b25a71f9d 100644 --- a/clang/lib/Analysis/GRSimpleVals.cpp +++ b/clang/lib/Analysis/GRSimpleVals.cpp @@ -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(), |

