Skip to content

Commit a2f8bdf

Browse files
ziyao233PeterJohnson
authored andcommitted
dwarf2: Correctly initialize dwarf2_line_info.errwarns
Forgetting to this causes unexpected control flow transfers and even misoptimizations. When building with LLVM 20.1.4 and LTO enabled, misoptimizations will ultimately lead to segfaults in dwarf2_gen64_test.sh. Signed-off-by: Yao Zi <ziyao@disroot.org>
1 parent b9c3fe6 commit a2f8bdf

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

modules/dbgfmts/dwarf2/dwarf2-line.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,6 +709,7 @@ yasm_dwarf2__generate_line(yasm_object *object, yasm_linemap *linemap,
709709
info.dbgfmt_dwarf2 = dbgfmt_dwarf2;
710710
info.debug_line = yasm_object_get_general(object, ".debug_line", 1, 0, 0,
711711
&new, 0);
712+
info.errwarns = errwarns;
712713

713714
/* header */
714715
head = yasm_dwarf2__add_head(dbgfmt_dwarf2, info.debug_line, NULL, 0, 0);

0 commit comments

Comments
 (0)