public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* ld segfaults with long link lines
@ 2003-03-08 14:47 Stefan Jones
  2003-03-09  8:51 ` Elias Athanasopoulos
  2003-03-09 18:49 ` Stefan Jones
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Jones @ 2003-03-08 14:47 UTC (permalink / raw)
  To: binutils

Hello all,

I have come across this problem with binutils-2.13.90.0.18 on
glibc-2.3.2.

If you call ld with a very long link command it crashes.

This may be a silly case but see

http://bugs.gentoo.org/show_bug.cgi?id=16577

for it in action.

Any ideas?

Details:


Script started on Sat Mar  8 14:44:15 2003
$ gdb ld
GNU gdb 5.3
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 -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpth \rread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm - \rlpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread - \rlm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthre \rad -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lp \rthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm \r -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread \r -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpth \rread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm - \rlpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread - \rlm -lpthread
(gdb) run
Starting program: /usr/bin/ld -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread -lm -lpthread

Program received signal SIGSEGV, Segmentation fault.
0x08051570 in new_statement (type=lang_group_statement_enum, size=16, 
    list=0xbffff1c8) at ldlang.c:525
525	ldlang.c: No such file or directory.
	in ldlang.c
(gdb) bt
#0  0x08051570 in new_statement (type=lang_group_statement_enum, size=16, 
    list=0xbffff1c8) at ldlang.c:525
#1  0x08057f08 in lang_enter_group () at ldlang.c:4868
#2  0x0804b3fa in yyparse () at ldgram.y:338
#3  0x08052cf0 in load_symbols (entry=0x80a8ac8, place=0xbffff1c8)
    at ldlang.c:1630
#4  0x08053750 in open_input_bfds (s=0x80a8ac8, force=0) at ldlang.c:2097
#5  0x080575fb in lang_process () at ldlang.c:4387
#6  0x0805a75d in main (argc=115, argv=0xbffff2b4) at ldmain.c:438
#7  0x4915749e in __libc_start_main () from /lib/libc.so.6
(gdb) p new
$1 = (lang_statement_union_type *) 0x7
(gdb) p *new
Cannot access memory at address 0x7
(gdb) quit
The program is running.  Exit anyway? (y or n) y
$ exit

Script done on Sat Mar  8 14:45:09 2003




-- 
Stefan Jones <cretin@gentoo.org>
Gentoo Linux
	

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ld segfaults with long link lines
  2003-03-08 14:47 ld segfaults with long link lines Stefan Jones
@ 2003-03-09  8:51 ` Elias Athanasopoulos
  2003-03-09 11:06   ` Stefan Jones
  2003-03-09 18:49 ` Stefan Jones
  1 sibling, 1 reply; 4+ messages in thread
From: Elias Athanasopoulos @ 2003-03-09  8:51 UTC (permalink / raw)
  To: Stefan Jones; +Cc: binutils

On Sat, Mar 08, 2003 at 02:45:38PM +0000, Stefan Jones wrote:
> I have come across this problem with binutils-2.13.90.0.18 on
> glibc-2.3.2.
> 
> If you call ld with a very long link command it crashes.

I can't reproduce that with current cvs in a Red Hat 7.2 system.

Elias

-- 
University of Athens			I bet the human brain 
Physics Department				is a kludge --Marvin Minsky 

	

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ld segfaults with long link lines
  2003-03-09  8:51 ` Elias Athanasopoulos
@ 2003-03-09 11:06   ` Stefan Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Jones @ 2003-03-09 11:06 UTC (permalink / raw)
  To: Elias Athanasopoulos; +Cc: binutils

On Sun, 2003-03-09 at 08:34, Elias Athanasopoulos wrote:
> On Sat, Mar 08, 2003 at 02:45:38PM +0000, Stefan Jones wrote:
> > I have come across this problem with binutils-2.13.90.0.18 on
> > glibc-2.3.2.
> > 
> > If you call ld with a very long link command it crashes.
> 
> I can't reproduce that with current cvs in a Red Hat 7.2 system.
> 
> Elias

I have just compiled and tested binutils-030309.

I get the exact same error and backtrace as before, down to the last
detail.

I think maybe glibc or gcc is at fault. I used CFLAGS="-g" ./configure
for binutils.

I am using gcc-3.2.2 with the redhat patches from rawhide and
glibc-2.3.2. What versions are you using? Can anyone with the same gcc
and glibc confirm this bug?

Stefan

-- 
Stefan Jones <cretin@gentoo.org>
Gentoo Linux

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ld segfaults with long link lines
  2003-03-08 14:47 ld segfaults with long link lines Stefan Jones
  2003-03-09  8:51 ` Elias Athanasopoulos
@ 2003-03-09 18:49 ` Stefan Jones
  1 sibling, 0 replies; 4+ messages in thread
From: Stefan Jones @ 2003-03-09 18:49 UTC (permalink / raw)
  To: binutils; +Cc: libc-alpha

update:

After extensive testing of about 10 system I have narrowed down the
problem (not by much) to the glibc-2.3.1 to glibc-2.3.2 upgrade.

This affects gentoo and redhat phoebe 3.

Using gcc-3.2.2 with redhat patches (or without) and rpm gcc-3.2.1-7
binutils-2.13.90.0.18 from source and rpm binutils-2.13.90.0.18-6

And the package sparking the problem:

with glibc-2.3.1 from source ld works fine.

glibc-2.3.2 from source and glibc-2.3.1-46 from redhat phoebe 3 causes
ld to segfault as described before.

redhat phoebe 3 and my gentoo systems both produce the same gdb stack
trace on segfault.

Any more information needed?

Hope this helps.

Stefan


On Sat, 2003-03-08 at 14:45, Stefan Jones wrote: 
> Hello all,
> 
> I have come across this problem with binutils-2.13.90.0.18 on
> glibc-2.3.2.
> 
> If you call ld with a very long link command it crashes.
> 
> This may be a silly case but see
> 
> http://bugs.gentoo.org/show_bug.cgi?id=16577
> 
> for it in action.
> 
> Any ideas?



-- 

Stefan Jones <cretin@gentoo.org>

Gentoo Linux

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-03-09 18:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-08 14:47 ld segfaults with long link lines Stefan Jones
2003-03-09  8:51 ` Elias Athanasopoulos
2003-03-09 11:06   ` Stefan Jones
2003-03-09 18:49 ` Stefan Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).