https://sourceware.org/bugzilla/show_bug.cgi?id=29720
Bug ID: 29720 Summary: objdump -S crashes if build-id is missing Product: binutils Version: 2.40 (HEAD) Status: NEW Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: mliska at suse dot cz CC: amerey at redhat dot com Target Milestone: --- As a consequence of the implement PR29075, I see the following crash: $ gcc a.c -Wl,--build-id=none $ ./binutils/objdump -S ~/Programming/testcases/a.out /home/marxin/Programming/testcases/a.out: file format elf64-x86-64 Disassembly of section .init: 0000000000401000 <_init>: Segmentation fault (core dumped) $ Program received signal SIGSEGV, Segmentation fault. __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:76 76 VPCMPEQ (%rdi), %ymm0, %ymm1 (gdb) bt #0 __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:76 #1 0x00007ffff7edbd18 in debuginfod_query_server (c=c@entry=0x6930a0, build_id=build_id@entry=0x0, build_id_len=build_id_len@entry=0, type=type@entry=0x7ffff7ede3f8 "source", filename=filename@entry=0x688780 "/home/abuild/rpmbuild/BUILD/glibc-2.36/csu/../sysdeps/x86_64/crti.S", path=path@entry=0x0) at /usr/src/debug/elfutils-debuginfod-0.187-6.1.x86_64/debuginfod/debuginfod-client.c:644 #2 0x00007ffff7edd212 in debuginfod_find_source (client=client@entry=0x6930a0, build_id=build_id@entry=0x0, build_id_len=build_id_len@entry=0, filename=filename@entry=0x688780 "/home/abuild/rpmbuild/BUILD/glibc-2.36/csu/../sysdeps/x86_64/crti.S", path=path@entry=0x0) at /usr/src/debug/elfutils-debuginfod-0.187-6.1.x86_64/debuginfod/debuginfod-client.c:1582 #3 0x000000000040b475 in slurp_file (abfd=0x6930a0, fst_return=0x7fffffffd070, size_return=0x689730, fn=0x688780 "/home/abuild/rpmbuild/BUILD/glibc-2.36/csu/../sysdeps/x86_64/crti.S") at ../../binutils/objdump.c:1890 #4 try_print_file_open (origname=origname@entry=0x688780 "/home/abuild/rpmbuild/BUILD/glibc-2.36/csu/../sysdeps/x86_64/crti.S", modname=modname@entry=0x688780 "/home/abuild/rpmbuild/BUILD/glibc-2.36/csu/../sysdeps/x86_64/crti.S", fst_return=fst_return@entry=0x7fffffffd070, abfd=abfd@entry=0x666180) at ../../binutils/objdump.c:1998 #5 0x000000000040da71 in update_source_path (abfd=0x666180, filename=<optimized out>) at ../../binutils/objdump.c:2028 #6 show_line (addr_offset=0, section=0x669118, abfd=0x666180) at ../../binutils/objdump.c:2273 #7 disassemble_bytes (relppend=0x0, relppp=<synthetic pointer>, rel_offset=0, stop_offset=27, start_offset=<optimized out>, data=0x67ccd0 "\363\017\036\372H\203\354\bH\213\005\341/", insns=<optimized out>, disassemble_fn=0x44b6f0 <print_insn_i386>, inf=<optimized out>) at ../../binutils/objdump.c:3315 #8 disassemble_section (abfd=0x666180, section=<optimized out>, inf=<optimized out>) at ../../binutils/objdump.c:4008 #9 0x000000000047316f in bfd_map_over_sections (abfd=abfd@entry=0x666180, operation=operation@entry=0x40ba70 <disassemble_section>, user_storage=user_storage@entry=0x7fffffffd230) at ../../bfd/section.c:1373 #10 0x00000000004087c5 in disassemble_data (abfd=abfd@entry=0x666180) at ../../binutils/objdump.c:4152 #11 0x00000000004097dd in dump_bfd (abfd=abfd@entry=0x666180, is_mainfile=is_mainfile@entry=true) at ../../binutils/objdump.c:5564 #12 0x000000000040a7ed in display_object_bfd (abfd=0x666180) at ../../binutils/objdump.c:5627 #13 display_any_bfd (file=0x666180, level=0) at ../../binutils/objdump.c:5713 #14 0x000000000040a944 in display_file (filename=0x7fffffffdbba "/home/marxin/Programming/testcases/a.out", target=<optimized out>, last_file=<optimized out>) at ../../binutils/objdump.c:5734 #15 0x000000000040533d in main (argc=<optimized out>, argv=<optimized out>) at ../../binutils/objdump.c:6130 (gdb) p build_id $1 = (const unsigned char *) 0x0 -- You are receiving this mail because: You are on the CC list for the bug.