From: Axel Naumann Date: Thu, 18 Sep 2014 21:22:02 +0000 (+0200) Subject: Fix mem corruption: iterator might be invalidated by insertion. X-Git-Tag: v6-02-00-rc1~58 X-Git-Url: https://root.cern.ch/gitweb?p=root.git;a=commitdiff_plain;h=a67ad149e188c4c65ad2424772246b40702bed98 Fix mem corruption: iterator might be invalidated by insertion. --- diff --git a/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp b/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp index 269368e..d87ea2f 100644 --- a/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp +++ b/interpreter/cling/lib/Interpreter/ForwardDeclPrinter.cpp @@ -119,13 +119,13 @@ namespace cling { } if (shouldSkip(D)) { skipCurrentDecl(true); - Insert.first->second = false; + m_Visited[getCanonicalOrNamespace(D)] = false; } else { clang::DeclVisitor::Visit(D); if (m_SkipFlag) { // D was not good, flag it. skipCurrentDecl(true); - Insert.first->second = false; + m_Visited[getCanonicalOrNamespace(D)] = false; } } }