[cfe-commits] r46793 - /cfe/trunk/Analysis/ValueState.cpp
Ted Kremenek
kremenek at apple.com
Tue Feb 5 18:45:20 PST 2008
Author: kremenek
Date: Tue Feb 5 20:45:20 2008
New Revision: 46793
URL: http://llvm.org/viewvc/llvm-project?rev=46793&view=rev
Log:
Fixed bug when allocating a ValueStateImpl object in getPersistentState()
using the bump-pointer allocator and a placed new; we accidentally allocated
a ValueStateImpl* instead, causing an overrun when we did a placed new().
Modified:
cfe/trunk/Analysis/ValueState.cpp
Modified: cfe/trunk/Analysis/ValueState.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Analysis/ValueState.cpp?rev=46793&r1=46792&r2=46793&view=diff
==============================================================================
--- cfe/trunk/Analysis/ValueState.cpp (original)
+++ cfe/trunk/Analysis/ValueState.cpp Tue Feb 5 20:45:20 2008
@@ -227,7 +227,7 @@
if (ValueStateImpl* I = StateSet.FindNodeOrInsertPos(ID, InsertPos))
return I;
- ValueStateImpl* I = (ValueStateImpl*) Alloc.Allocate<ValueState>();
+ ValueStateImpl* I = (ValueStateImpl*) Alloc.Allocate<ValueStateImpl>();
new (I) ValueStateImpl(State);
StateSet.InsertNode(I, InsertPos);
return I;
More information about the cfe-commits
mailing list