[llvm] r271141 - [CVSymbolVisitor] It's possible for an error to occur in begin()

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Sat May 28 12:45:54 PDT 2016


Author: majnemer
Date: Sat May 28 14:45:54 2016
New Revision: 271141

URL: http://llvm.org/viewvc/llvm-project?rev=271141&view=rev
Log:
[CVSymbolVisitor] It's possible for an error to occur in begin()

If the begin iterator fails, we cannot dereference it's contents.
Instead, we must immediately stop processing symbols.

Modified:
    llvm/trunk/include/llvm/DebugInfo/CodeView/StreamArray.h

Modified: llvm/trunk/include/llvm/DebugInfo/CodeView/StreamArray.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/CodeView/StreamArray.h?rev=271141&r1=271140&r2=271141&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/CodeView/StreamArray.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/CodeView/StreamArray.h Sat May 28 14:45:54 2016
@@ -77,6 +77,7 @@ public:
     auto EC = Extract(IterRef, ThisLen, ThisValue);
     if (EC) {
       consumeError(std::move(EC));
+      this->Array = nullptr;
       HasError = true;
       if (HadError)
         *HadError = true;




More information about the llvm-commits mailing list