Bug: gas crashes on invalid input with .offset pseudo op

Johannes Stezenbach js@convergence.de
Fri Aug 9 09:36:00 GMT 2002


Hi,

Bug confirmed for binutils 2.12.90.0.15 on i386-linux and
2.12.90.0.14 on mips-linux.

I tried to assemble some third party code which contains something
like:
	.offset 0x20
	.ascii "foobar"

A source file containing just those two lines makes gas crash without
any useful error message.

$ gdb --args as bug.S
...
Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x40094fb9 in _obstack_newchunk () from /lib/libc.so.6
#2  0x08055bbc in frag_alloc (ob=0x811661c) at ../../binutils-2.12.90.0.14/gas/frags.c:53
#3  0x08055dec in frag_new (old_frags_var_max_size=0) at ../../binutils-2.12.90.0.14/gas/frags.c:131
#4  0x080561a4 in frag_append_1_char (datum=102) at ../../binutils-2.12.90.0.14/gas/frags.c:382
#5  0x0805ed9a in stringer (append_zero=0) at ../../binutils-2.12.90.0.14/gas/read.c:4577
#6  0x0805b015 in read_a_source_file (name=0xbffff9c1 "bug.S") at ../../binutils-2.12.90.0.14/gas/read.c:818
#7  0x0804bf12 in perform_an_assembly_pass (argc=2, argv=0x8118af8) at ../../binutils-2.12.90.0.14/gas/as.c:1074
#8  0x0804bbd9 in main (argc=2, argv=0x8118af8) at ../../binutils-2.12.90.0.14/gas/as.c:885


Regards,
Johannes



More information about the Binutils mailing list