[lld] [lld][ELF] Fix crash when relaxation pass encounters synthetic sections (PR #184758)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 5 21:19:27 PST 2026
https://github.com/MaskRay commented:
Thx for catching this. I've thought about an alternative: if we allocate relaxAux for synthetic sections but skip relocDeltas/relocTypes allocation (since sec->relocs() would return an empty array for synthetic sections
However, in relax(): relocs is empty. std::fill_n(nullptr, 0, ...) — technically UB per the standard.
https://github.com/llvm/llvm-project/pull/184758
More information about the llvm-commits
mailing list