[cfe-commits] r60422 - /cfe/trunk/lib/Analysis/RegionStore.cpp
Sebastian Redl
sebastian.redl at getdesigned.at
Tue Dec 2 08:47:51 PST 2008
Author: cornedbee
Date: Tue Dec 2 10:47:35 2008
New Revision: 60422
URL: http://llvm.org/viewvc/llvm-project?rev=60422&view=rev
Log:
Make RegionStoreManager::InitializeArray safe against array sizes that don't have pointer width.
This may be the case on 64-bit systems. Whether that fact is a bug is a different question, but it's easy to cure the symptom.
Modified:
cfe/trunk/lib/Analysis/RegionStore.cpp
Modified: cfe/trunk/lib/Analysis/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=60422&r1=60421&r2=60422&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
+++ cfe/trunk/lib/Analysis/RegionStore.cpp Tue Dec 2 10:47:35 2008
@@ -639,7 +639,8 @@
llvm::APSInt Size(CAT->getSize(), false);
- llvm::APSInt i = getBasicVals().getZeroWithPtrWidth(false);
+ llvm::APSInt i = getBasicVals().getValue(0, Size.getBitWidth(),
+ Size.isUnsigned());
// Check if the init expr is a StringLiteral.
if (isa<loc::MemRegionVal>(Init)) {
More information about the cfe-commits
mailing list