bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/30828] New: Segfault in gas/symbols.c


From: piannetta at kalrayinc dot com
Subject: [Bug gas/30828] New: Segfault in gas/symbols.c
Date: Wed, 06 Sep 2023 20:02:16 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=30828

            Bug ID: 30828
           Summary: Segfault in gas/symbols.c
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gas
          Assignee: unassigned at sourceware dot org
          Reporter: piannetta at kalrayinc dot com
  Target Milestone: ---

Created attachment 15101
  --> https://sourceware.org/bugzilla/attachment.cgi?id=15101&action=edit
Test case

Steps to reproduce:
git checkout master
mkdir build && cd build
../binutils/configure --target=i386-linux-gnu --disable-gdb
gas/as-new debug.s

Note: I have been able to reproduce it with other targets as well.

Behavior:
../../binutils/gas/symbols.c:2497:17: runtime error: member access within null
pointer of type 'struct asymbol'
ASAN:DEADLYSIGNAL
=================================================================
==6413==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000020 (pc
0x55e7d860278d bp 0x7fff6320f610 sp 0x7fff6320f5f0 T0)
==6413==The signal is caused by a READ memory access.
==6413==Hint: address points to the zero page.
    #0 0x55e7d860278c in S_GET_SEGMENT ../../binutils/gas/symbols.c:2497
    #1 0x55e7d85fba97 in resolve_symbol_value ../../binutils/gas/symbols.c:1333
    #2 0x55e7d860e5d9 in adjust_reloc_syms ../../binutils/gas/write.c:807
    #3 0x55e7d86d9d50 in bfd_map_over_sections
../../binutils/bfd/section.c:1384
    #4 0x55e7d861a92d in write_object_file ../../binutils/gas/write.c:2339
    #5 0x55e7d85682a8 in main ../../binutils/gas/as.c:1453
    #6 0x7f14c7ce6c86 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
    #7 0x55e7d855d7f9 in _start (/upstream/build-binutils/gas/as-new+0x7c57f9)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV ../../binutils/gas/symbols.c:2497 in
S_GET_SEGMENT
==6413==ABORTING

The offending commit is likely: df345f6011f (2023-08-31) -- gas
init_stab_section and get_stab_string_offset

The assembly file comes from compiling
"gcc/gcc/testsuite/g++.dg/debug/debug4.C" (from the gcc tree) with "-gstabs+1"

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]