Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Aug 1999 01:20:02 -0700 (PDT)
From:      Sheldon Hearn <sheldonh@uunet.co.za>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/13463: /bin/sh: malloc() recursive call: segv 
Message-ID:  <199908300820.BAA82232@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

The following reply was made to PR bin/13463; it has been noted by GNATS.

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: hoek@FreeBSD.ORG
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/13463: /bin/sh: malloc() recursive call: segv 
Date: Mon, 30 Aug 1999 10:06:32 +0200

 On Sun, 29 Aug 1999 21:00:58 MST, Tim Vanderhoek wrote:
 
 > $ while :; do echo -n ; done
 > sh in malloc(): warning: recursive call.
 > sh in malloc(): warning: recursive call.
 > Segmentation fault (core dumped)
 
 This looks weird.
 
 Program terminated with signal 11, Segmentation fault.
 #0  0x805d644 in yywrap ()
 (gdb) back
 #0  0x805d644 in yywrap ()
 #1  0x805d681 in yywrap ()
 #2  0x805db05 in history ()
 #3  0x8051e3d in preadbuffer () at /usr/src/bin/sh/input.c:296
 #4  0x8058765 in xxreadtoken () at /usr/src/bin/sh/parser.c:776
 #5  0x80585b7 in readtoken () at /usr/src/bin/sh/parser.c:693
 #6  0x805762d in parsecmd (interact=1) at /usr/src/bin/sh/parser.c:145
 #7  0x80545b5 in cmdloop (top=1) at /usr/src/bin/sh/main.c:240
 #8  0x805452f in main (argc=1, argv=0xbfbfd668) at
 /usr/src/bin/sh/main.c:203
 
 How on earth does yywrap recurse on itself like that?
 
 /usr/src/usr.bin/lex/lib/libyywrap.c:
 int yywrap()
 	{
 	return 1;
 	}
 
 By the way, I can't reproduce the problem if I compile with -DDEBUG=2.
 
 Ciao,
 Sheldon.
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908300820.BAA82232>