[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PCRE-related segfault in grep 2.5.1
From: |
Michael Henry |
Subject: |
PCRE-related segfault in grep 2.5.1 |
Date: |
Sat, 07 May 2005 09:00:37 -0400 |
User-agent: |
Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324) |
Dear grep maintainers,
I believe I've found a bug in GNU grep 2.5.1 related to
Perl-compatible regular expressions.
Symptom
=================================
A segmentation fault is produced by GNU grep whenever
Perl-compatible regular expressions is turned on and a
negated character class is used that fails to match after
scanning a non-zero amount of text.
Reproducing the bug
=================================
address@hidden ~]$ echo "No bug" | grep -P '[^a]'
No bug
address@hidden ~]$ echo "a" | grep -P '[^a]'
Segmentation fault
Test environment
=================================
Tested using GNU grep 2.5.1 on my Fedora Core 2 and 3 boxes.
address@hidden ~]$ grep --version
grep (GNU grep) 2.5.1
Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
It appears to be a problem only with the Perl-compatible regular
expression mode (enabled by the -P option).
Thanks,
Michael Henry
- PCRE-related segfault in grep 2.5.1,
Michael Henry <=