[llvm] [BOLT] Fix null pointer dereference in DWP processing with split DWARF (PR #191474)

Rafael Auler via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 17:11:52 PDT 2026


rafaelauler wrote:

If the assembly part is just a copy of bolt/test/X86/dwarf4-dwp-x86.s, we can perhaps write the test in a way that it just reuses dwarf4-dwp-x86.s contents?

e.g.:

```
  # RUN: rm -rf %t && mkdir -p %t && cd %t
  # RUN: split-file %p/dwarf4-dwp-x86.s %t
  # RUN: %clangxx %cxxflags -g -gdwarf-4 -gsplit-dwarf %t/main.s %t/callee.s -o %t/main.exe
  # RUN: llvm-dwp -e %t/main.exe -o %t/main.exe.dwp
  # RUN: printf '\x00' > %t/line.bin
  # RUN: llvm-objcopy --add-section=.debug_line.dwo=%t/line.bin %t/main.exe.dwp
  # RUN: llvm-bolt %t/main.exe -o %t/main.exe.bolt -update-debug-sections
```

It should be enough to repro the crash, and easier to read/understand.

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


More information about the llvm-commits mailing list