Bug 65820

Summary: /bin/sh coredumps
Product: Base System Reporter: Maxim Maximov <mcsi>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.2-CURRENT   
Hardware: Any   
OS: Any   

Description Maxim Maximov 2004-04-20 18:00:41 UTC
	/bin/sh dumps core when in 'while' loop after Ctrl-C been hit.

Fix: 

Unknown.
How-To-Repeat: 	

Execute following script under /bin/sh:

csh# /bin/sh
$ while true
> do
> done

Let script run a minute. One minute is enough at least for my hardware (AthlonXP 2100+). Then hit Ctrl-C:

^C
sh in free(): error: recursive call
á×ÁÒÉÊÎÏÅ ÚÁ×ÅÒÛÅÎÉÅ (core dumped)
Exit 134

gdb backtrace:
> gdb -c sh.core -se /bin/sh
GNU gdb 5.2.1 (FreeBSD)
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 "i386-undermydesk-freebsd"...(no debugging symbols found)...
Core was generated by `sh'.
Program terminated with signal 6, Aborted.
Reading symbols from /lib/libedit.so.4...(no debugging symbols found)...done.
Loaded symbols for /lib/libedit.so.4
Reading symbols from /lib/libncurses.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /lib/libc.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.5
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x2813490f in kill () from /lib/libc.so.5
(gdb) bt
#0  0x2813490f in kill () from /lib/libc.so.5
#1  0x281299a8 in raise () from /lib/libc.so.5
#2  0x281a0ea3 in abort () from /lib/libc.so.5
#3  0x281408ce in ldexp () from /lib/libc.so.5
#4  0x28140918 in ldexp () from /lib/libc.so.5
#5  0x281413c0 in ldexp () from /lib/libc.so.5
#6  0x281415b1 in free () from /lib/libc.so.5
#7  0x0805567b in sigprocmask ()
#8  0x08054ed3 in sigprocmask ()
#9  0x08049c79 in sigprocmask ()
(gdb)
Comment 1 Maxim Konovalov freebsd_committer freebsd_triage 2004-04-20 18:30:32 UTC
State Changed
From-To: open->closed

Duplicate of bin/45478.