[llvm] 828fb0c - Fix a null dereference in the LLDB data formatters.

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 25 16:44:09 PST 2020


Author: Adrian Prantl
Date: 2020-02-25T16:43:55-08:00
New Revision: 828fb0c51ad63369c1ab6350a4e8e9f941f25831

URL: https://github.com/llvm/llvm-project/commit/828fb0c51ad63369c1ab6350a4e8e9f941f25831
DIFF: https://github.com/llvm/llvm-project/commit/828fb0c51ad63369c1ab6350a4e8e9f941f25831.diff

LOG: Fix a null dereference in the LLDB data formatters.

Added: 
    

Modified: 
    llvm/utils/lldbDataFormatters.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/lldbDataFormatters.py b/llvm/utils/lldbDataFormatters.py
index 74f3222eaa0e..98c909900bcc 100644
--- a/llvm/utils/lldbDataFormatters.py
+++ b/llvm/utils/lldbDataFormatters.py
@@ -118,7 +118,9 @@ def SmallStringSummaryProvider(valobj, internal_dict):
     num_elements = valobj.GetNumChildren()
     res = "\""
     for i in range(0, num_elements):
-      res += valobj.GetChildAtIndex(i).GetValue().strip("'")
+        c = valobj.GetChildAtIndex(i).GetValue()
+        if c:
+            res += c.strip("'")
     res += "\""
     return res
 


        


More information about the llvm-commits mailing list