6.2-STABLE / grep / Segmentation fault

Stan Behrens s.behrens at kon.de
Mon Apr 2 16:22:54 UTC 2007


Hi,

With some help of a friend, the problem was reduced to:

 > cat >test.txt
a .b
a .c
 > grep -m 1 -A 99 '^a .b$' test.txt
a .b
Segmentation fault (core dumped)


Backtrace is:

(gdb) bt
#0  0x0804de4d in dfaexec (d=0x8059a40, begin=0x8062005 "a .c\n",
     size=4160348156, backref=0xbfbfe680) at dfa.c:2854
#1  0x08053a1e in EGexecute (buf=0x8062005 "a .c\n", size=4, match_size=0x1,
     exact=0) at search.c:430
#2  0x0804f8f0 in prpending (lim=0x806200a "") at grep.c:672
#3  0x08050366 in grepfile (file=0xbfbfea71 "test.txt", stats=0x8059680)
     at grep.c:887
#4  0x080514d7 in main (argc=7, argv=0xbfbfe944) at grep.c:1850


He also told me that this crash happens on Linux too, so I will open a bugreport at gnu.org

Bye.


More information about the freebsd-bugs mailing list