[llvm] [BOLT][DWARF] Skip processing DWO files with ID 0 (PR #154749)

Alexander Yermolovich via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 8 10:53:51 PDT 2025


================
@@ -0,0 +1,737 @@
+## This test checks that broken DWARF—having 
+## a DWOId but missing a DWOName—is correctly detected.
+# RUN: rm -rf %t && mkdir -p %t
+# RUN: %clang -O3 -g -gdwarf-5 -gsplit-dwarf -Wl,-q %s -o %t/main.exe
+# RUN: llvm-bolt %t/main.exe -o %t/main.exe.bolt -update-debug-sections -comp-dir-override="%t" 2>&1 | FileCheck %s
+
+# CHECK: BOLT-ERROR: broken DWARF found in CU at offset 0x47 (DWOId=0x0, missing DW_AT_dwo_name / DW_AT_GNU_dwo_name).
+# CHECK: BOLT-ERROR: broken DWARF found in CU at offset 0x70 (DWOId=0x0, missing DW_AT_dwo_name / DW_AT_GNU_dwo_name).
+# CHECK-NOT: Assertion `RangeListsWritersByCU.count(*DWOId) == 0 && "RangeLists writer for DWO unit already exists."'
----------------
ayermolo wrote:

Can you separate DWO_name missing and DWO ID is the same into two different diffs?
The latter can happen without the first.

https://github.com/llvm/llvm-project/pull/154749


More information about the llvm-commits mailing list