OSDN Git Service

[CVSymbolVisitor] It's possible for an error to occur in begin()
authorDavid Majnemer <david.majnemer@gmail.com>
Sat, 28 May 2016 19:45:54 +0000 (19:45 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sat, 28 May 2016 19:45:54 +0000 (19:45 +0000)
If the begin iterator fails, we cannot dereference it's contents.
Instead, we must immediately stop processing symbols.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271141 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/DebugInfo/CodeView/StreamArray.h

index 23e475d..5ad7b1b 100644 (file)
@@ -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;