[Lldb-commits] [lldb] 706e875 - [lldb/crashlog] Skip images with empty path and 0 UUID from loading

Med Ismail Bennani via lldb-commits lldb-commits at lists.llvm.org
Sat Aug 12 00:00:23 PDT 2023


Author: Med Ismail Bennani
Date: 2023-08-11T23:59:42-07:00
New Revision: 706e875da3a21f2d6ba612ca991dbdbccb339327

URL: https://github.com/llvm/llvm-project/commit/706e875da3a21f2d6ba612ca991dbdbccb339327
DIFF: https://github.com/llvm/llvm-project/commit/706e875da3a21f2d6ba612ca991dbdbccb339327.diff

LOG: [lldb/crashlog] Skip images with empty path and 0 UUID from loading

This patch skips images with an empty path or a 0 UUID from loading as a
SymbolFileJSON.

rdar://112107986

Differential Revision: https://reviews.llvm.org/D157137

Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>

Added: 
    

Modified: 
    lldb/examples/python/symbolication.py

Removed: 
    


################################################################################
diff  --git a/lldb/examples/python/symbolication.py b/lldb/examples/python/symbolication.py
index 467675e1d98453..f6dcc8b9a79437 100755
--- a/lldb/examples/python/symbolication.py
+++ b/lldb/examples/python/symbolication.py
@@ -396,6 +396,9 @@ def load_module(self, target):
 
     def add_module(self, target, obj_dir=None):
         """Add the Image described in this object to "target" and load the sections if "load" is True."""
+        if not self.path and self.uuid == uuid.UUID(int=0):
+            return "error: invalid image"
+
         if target:
             # Try and find using UUID only first so that paths need not match
             # up


        


More information about the lldb-commits mailing list