https://sourceware.org/bugzilla/show_bug.cgi?id=33029
Bug ID: 33029 Summary: Internal error (segfault) in dwarf2_finish with --gdwarf-5 Product: binutils Version: 2.44 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: rsworktech at outlook dot com Target Milestone: --- Host: x86_64-linux-gnu Target: riscv64-linux-gnu Created attachment 16108 --> https://sourceware.org/bugzilla/attachment.cgi?id=16108&action=edit Reproducer When assembling the attached assembly file, gas crashed with a segmentation fault. This is reproducible natively on riscv64 and also reproducible with riscv64-linux-gnu-as on x86_64 linux. $ riscv64-linux-gnu-as --gdwarf-5 $'-march=rv64gc' $'-mabi=lp64d' $'-misa-spec=20191213' -o push_registers_asm.o push_registers_asm.s push_registers_asm.s: Assembler messages: push_registers_asm.s: Internal error (Segmentation fault). Please report this bug. The relevant CLI flag is --gdwarf-5, removing that flag could workaround this bug. GDB: Program received signal SIGSEGV, Segmentation fault. 0x0000003ff7ac530e in strlen () from /usr/lib/libc.so.6 (gdb) bt #0 0x0000003ff7ac530e in strlen () from /usr/lib/libc.so.6 #1 0x0000002aaaadb5ee in out_debug_str (str_seg=0x2aaab27a70, name_sym=<synthetic pointer>, comp_dir_sym=<synthetic pointer>, producer_sym=<synthetic pointer>) at /usr/src/debug/binutils/binutils-gdb/gas/dwarf2dbg.c:3055 #2 dwarf2_finish () at /usr/src/debug/binutils/binutils-gdb/gas/dwarf2dbg.c:3270 #3 0x0000002aaaad53aa in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/binutils/binutils-gdb/gas/as.c:1461 (gdb) bt full #0 0x0000003ff7ac530e in strlen () from /usr/lib/libc.so.6 No symbol table info available. #1 0x0000002aaaadb5ee in out_debug_str (str_seg=0x2aaab27a70, name_sym=<synthetic pointer>, comp_dir_sym=<synthetic pointer>, producer_sym=<synthetic pointer>) at /usr/src/debug/binutils/binutils-gdb/gas/dwarf2dbg.c:3055 producer = "\032ī\252*\000\000\000\"\000\000\000\000\000\000\000\360k\341\367?\000\000\000\260嵪*\000\000\000`\000\000\000\000\000\000\000 \360\377\377?\000\000\000\356=\326\367?\000\000\000@\360\377\377?\000\000\0000\263\260\25 2*\000\000\000\005", '\000' <repeats 15 times>, "\250֫\252*\000\000\0000\263\260\252*", '\000' <repeats 12 times>, "\t\266\252*\000\000\000p\360\377\377?\000\000" len = <optimized out> p = <optimized out> first_file = <optimized out> comp_dir = <optimized out> producer = <optimized out> p = <optimized out> len = <optimized out> first_file = <optimized out> __PRETTY_FUNCTION__ = <optimized out> comp_dir = <optimized out> dirname = <optimized out> #2 dwarf2_finish () at /usr/src/debug/binutils/binutils-gdb/gas/dwarf2dbg.c:3270 abbrev_seg = 0x2aaab28130 aranges_seg = <optimized out> str_seg = 0x2aaab27a70 producer_sym = <optimized out> ranges_sym = 0x0 func_form = 0 '\000' name_sym = 0x2aaab6b0d0 comp_dir_sym = <optimized out> line_seg = 0x2aaab27948 s = <optimized out> info_seg = 0x2aaab28008 emit_other_sections = <optimized out> empty_debug_line = <optimized out> __PRETTY_FUNCTION__ = "dwarf2_finish" #3 0x0000002aaaad53aa in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/binutils/binutils-gdb/gas/as.c:1461 argv_orig = <optimized out> sob = {st_dev = 66307, st_ino = 2103156, st_mode = 33188, st_nlink = 1, st_uid = 1010, st_gid = 1010, st_rdev = 0, __pad1 = 0, st_size = 0, st_blksize = 4096, __pad2 = 0, st_blocks = 0, st_atim = {tv_sec = 1748349201, tv_nsec = 648024486}, st_mtim = {tv_sec = 1748349201, tv_nsec = 648024486}, st_ctim = {tv_sec = 1748349201, tv_nsec = 648024486}, __glibc_reserved = {0, 0}} -- You are receiving this mail because: You are on the CC list for the bug.