https://sourceware.org/bugzilla/show_bug.cgi?id=33008
Bug ID: 33008 Summary: Segmentation Fault in elf_x86_64_finish_dynamic_symbol During Linking Product: binutils Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: xdcao.cs at gmail dot com Target Milestone: --- Summary Segmentation Fault in elf_x86_64_finish_dynamic_symbol During Linking Environment elfutils version: 0.192 OS: Ubuntu 22.04.5 LTS Steps to reproduce # export CFLAGS="-g -O0 -fno-inline -fno-lto -fsanitize=address" # export CXXFLAGS="-g -O0 -fno-inline -fno-lto -fsanitize=address" # ./configure --enable-maintainer-mode --disable-debuginfod # make -j64 & make install root@c6c01f72391e:# ./ld-new --gc-sections -z nosectionheader POC ./ld-new: warning: cannot find entry symbol _start; not setting start address AddressSanitizer:DEADLYSIGNAL ================================================================= ==895047==ERROR: AddressSanitizer: SEGV on unknown address 0x0000000000e0 (pc 0x000000c7f1ee bp 0x7fff70e7aea0 sp 0x7fff70e7ac40 T0) ==895047==The signal is caused by a READ memory access. ==895047==Hint: address points to the zero page. #0 0xc7f1ee in elf_x86_64_finish_dynamic_symbol /workspace/new-test/program/binutils-gdb/bfd/elf64-x86-64.c:5246:34 #1 0xc94c49 in elf_x86_64_finish_local_dynamic_symbol /workspace/new-test/program/binutils-gdb/bfd/elf64-x86-64.c:5540:10 #2 0x1def668 in htab_traverse_noresize /workspace/new-test/program/binutils-gdb/libiberty/./hashtab.c:775:7 #3 0xc83279 in elf_x86_64_output_arch_local_syms /workspace/new-test/program/binutils-gdb/bfd/elf64-x86-64.c:5742:3 #4 0xd7e47b in bfd_elf_final_link /workspace/new-test/program/binutils-gdb/bfd/elflink.c:13266:14 #5 0x544f29 in ldwrite /workspace/new-test/program/binutils-gdb/ld/ldwrite.c:548:8 #6 0x53b0b0 in main /workspace/new-test/program/binutils-gdb/ld/./ldmain.c:912:3 #7 0x7fe7bb858d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 #8 0x7fe7bb858e3f in __libc_start_main csu/../csu/libc-start.c:392:3 #9 0x4206f4 in _start (/workspace/new-test/fuzzdir/fz-ld/ld-new+0x4206f4) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /workspace/new-test/program/binutils-gdb/bfd/elf64-x86-64.c:5246:34 in elf_x86_64_finish_dynamic_symbol ==895047==ABORTING POC https://drive.google.com/file/d/1Bny7b-su4OXmpn7cQKLAMM7KCiJl4tVP/view?usp=sharing Credit Xiaoguo Li (CUPL) Xudong Cao (UCAS) -- You are receiving this mail because: You are on the CC list for the bug.