[cfe-commits] r51551 - /cfe/trunk/lib/AST/Stmt.cpp
Eli Friedman
eli.friedman at gmail.com
Sat May 24 21:34:58 PDT 2008
Author: efriedma
Date: Sat May 24 23:34:57 2008
New Revision: 51551
URL: http://llvm.org/viewvc/llvm-project?rev=51551&view=rev
Log:
Always initialize NEXT_CATCH; fixes a Valgrind uninitialized read error
(originally reported in PR1682).
Modified:
cfe/trunk/lib/AST/Stmt.cpp
Modified: cfe/trunk/lib/AST/Stmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Stmt.cpp?rev=51551&r1=51550&r2=51551&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Stmt.cpp (original)
+++ cfe/trunk/lib/AST/Stmt.cpp Sat May 24 23:34:57 2008
@@ -170,9 +170,8 @@
: Stmt(ObjCAtCatchStmtClass) {
SubExprs[SELECTOR] = catchVarStmtDecl;
SubExprs[BODY] = atCatchStmt;
- if (!atCatchList)
- SubExprs[NEXT_CATCH] = NULL;
- else {
+ SubExprs[NEXT_CATCH] = NULL;
+ if (atCatchList) {
ObjCAtCatchStmt *AtCatchList = static_cast<ObjCAtCatchStmt*>(atCatchList);
while (ObjCAtCatchStmt* NextCatch = AtCatchList->getNextCatchStmt())
More information about the cfe-commits
mailing list