[llvm-commits] [llvm] r172318 - /llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat Jan 12 07:34:31 PST 2013
Author: d0k
Date: Sat Jan 12 09:34:31 2013
New Revision: 172318
URL: http://llvm.org/viewvc/llvm-project?rev=172318&view=rev
Log:
GlobalOpt: Avoid jump on uninitialized value.
Found by valgrind.
Modified:
llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
Modified: llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp?rev=172318&r1=172317&r2=172318&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Sat Jan 12 09:34:31 2013
@@ -2828,7 +2828,7 @@
return false;
}
- Constant *RetVal;
+ Constant *RetVal = 0;
// Execute the call, if successful, use the return value.
ValueStack.push_back(new DenseMap<Value*, Constant*>);
if (!EvaluateFunction(Callee, RetVal, Formals)) {
More information about the llvm-commits
mailing list