Subject: bin/13109: fortune core dumps with regular expression pattern
To: None <>
From: None <>
List: netbsd-bugs
Date: 06/04/2001 23:40:58
>Number:         13109
>Category:       bin
>Synopsis:       fortune core dumps with regular expression pattern
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 04 13:26:00 PDT 2001
>Originator:     Petri Koistinen
>Release:        -current 4th June 2001
System: NetBSD legoland 1.5V NetBSD 1.5V (HELTER-SKELTER) #1: Sun Jun 3 23:52:55 GMT 2001 thoron@legoland:/usr/src/sys/arch/amiga/compile/HELTER-SKELTER amiga

	Fortune programs dumps core with usual regualar expression pattern.
bash-2.05$ ls *foofile*
ls: *foofile*: No such file or directory
bash-2.05$ touch foofile1     
bash-2.05$ fortune -m *foofile*
bash-2.05$ rm foofile1 
bash-2.05$ fortune -m *foofile*
fortune: *foofile*

Segmentation fault (core dumped)
bash-2.05$ gdb /usr/games/fortune fortune.core 
GNU gdb 4.17
Copyright 1998 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
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "m68k--netbsd"...(no debugging symbols found)...
Core was generated by ortune'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/libexec/ debugging symbols
Reading symbols from /usr/lib/ debugging symbols
#0  0x802b52a in regexec ()
(gdb) where
#0  0x802b52a in regexec ()
#1  0x3cfc in matches_in_list ()
#2  0x3c1a in find_matches ()
#3  0x2808 in main ()
#4  0x20e0 in __start ()
(gdb) quit