llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
25.95k stars 10.58k forks source link

llvm/lib/DWP handling of debug_str_offsets with multiple contributions produces invalid output #90460

Open molar opened 2 weeks ago

molar commented 2 weeks ago

Hello

I encountered a crash in llvm-dwarfdump which i report here https://github.com/llvm/llvm-project/issues/85900 I have investigated a bit further and it appears that in DWARF5 the debug_str_offsets section can contain multiple contributions each with their own header. This is not accounted for in the current code that merges the sections.

molar commented 2 weeks ago

https://github.com/llvm/llvm-project/pull/90461 with an attempted fix

llvmbot commented 2 weeks ago

@llvm/issue-subscribers-debuginfo

Author: Morten larsen (molar)

Hello I encountered a crash in llvm-dwarfdump which i report here https://github.com/llvm/llvm-project/issues/85900 I have investigated a bit further and it appears that in DWARF5 the ``debug_str_offsets`` section can contain multiple contributions each with their own header. This is not accounted for in the current code that merges the sections.