bug-gnu-utils
[Top][All Lists]
Advanced

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

gas alpha-linux segfault with .prologue outside .ent


From: Luke Deller
Subject: gas alpha-linux segfault with .prologue outside .ent
Date: Fri, 15 Nov 2002 12:13:08 +1100 (EST)

Hi,

The GNU assembler (from binutils-2.13.1) for an alpha-linux target produces
a segmentation fault for the following input:

    # begin gasbug.s
    foo:
            .prologue 0
            nop
    # end gasbug.s

The segmentation fault can be avoided by placing the above function inside
a .ent/.end pair, ie:

    # begin gasworks.s
    .ent foo
    foo:
            .prologue 0
            nop
    .end foo
    # end gasworks.s

The problem appears to be a missing error check in the function
s_alpha_prologue in gas/config/tc-alpha.c ... here is the full back trace
from gdb:

$ gdb alpha-linux-as
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) set args -o /dev/null gasbug.s
(gdb) run
Starting program: /usr/local/crossdev/bin/alpha-linux-as -o /dev/null gasbug.s

Program received signal SIGSEGV, Segmentation fault.
0x0806a0d9 in symbol_get_bfdsym (s=0x0) at symbols.c:2242
2242      if (LOCAL_SYMBOL_CHECK (s))
(gdb) bt
#0  0x0806a0d9 in symbol_get_bfdsym (s=0x0) at symbols.c:2242
#1  0x08074582 in s_alpha_prologue (ignore=0) at config/tc-alpha.c:4535
#2  0x0805fa33 in read_a_source_file (name=0xbffff83c "gasbug.s") at
read.c:818
#3  0x0804c1f4 in perform_an_assembly_pass (argc=0, argv=0x8125204)
    at as.c:1074
#4  0x0804be7c in main (argc=2, argv=0x8125200) at as.c:885
#5  0x4003d106 in __libc_start_main () from /lib/libc.so.6
(gdb)


PS: I built binutils on Gentoo linux(x86) with gcc-3.2, configured with:
    ./configure --enable-64-bit-bfd --target=alpha-linux \
    --prefix=/usr/local/crossdev







reply via email to

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