bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Possible bug in grep -P


From: Michael Orr
Subject: Possible bug in grep -P
Date: Wed, 24 Nov 2004 17:30:36 -0000

I was doing some experimentation with regular expressions in the cygwin version 
of grep (GNU grep 2.5 on Windows 2000) and I came across the -P option (for 
PERL style regular expressions) buried in the manual (a formatting issue?)

I tried out the following regexp from the command-line (since it doesn't seem 
to work with regular grep):

    grep -P '\D'

I tried the following inputs from the command-line:

one
o
2

All three of these lines were echoed back (I thought \D would only match 
non-digits?) but after echoing the last line ('2'), there was a segmentation 
fault.  The terminal output is pasted below.


> grep -P '\D'
one
one
o
o
2
2

   2
e
ß☺   ,♥  ☺         ☺►        ↑☻☺►   X.◄a♦d e
ß☺   ,♥  ☺         ☺►        ↑☻☺► X.◄aFd♦  e

   2
Segmentation fault (core dumped)

>



The core dump produced looks like:

Exception: STATUS_ACCESS_VIOLATION at eip=610D2874
eax=0000000A ebx=000002EC ecx=EFFE6001 edx=00000000 esi=0022EE48 edi=1001A000
ebp=0022EDE0 esp=0022EDDC program=C:\cygwin\bin\grep.exe, pid 2672, thread main
cs=001B ds=0023 es=0023 fs=0038 gs=0000 ss=0023
Stack trace:
Frame     Function  Args
0022EDE0  610D2874  (10019AE2, 0000000A, EFFE651F, 10019770)
0022EE20  610EC0D7  (6111B310, 0022EE48, 0022F068, 7C57E597)
0022EE70  610E3781  (10011006, 00000001, EFFEEFFB, 6111B310)
0022EEC0  6108DF2F  (10011006, 00000001, 0000003A, 22180700)
0022EF10  0040210F  (10011006, 00000001, 00000000, 00000000)
0022EF50  0040216A  (10011006, 10011008, 00000004, 6105C355)
0022EFB0  0040244D  (00000000, 00000000, 00416010, 0022EFD8)
0022EFE0  0040277C  (00000000, 00416010, 0022F03C, 00404052)
0022F040  00404EC3  (00000003, 616D2CD8, 100100A8, 0022F098)
0022F080  61005F54  (0022F098, 7FFDF000, 00000000, 77F91409)
0022FF60  6100616B  (00000000, 00000000, 00000000, 00000000)
End of stack trace


Hope this is of some use to you.

Regards,

Michael Orr












Michael Orr
Kainos Software Ltd.
Main:   +44 (0) 28 9057 1100
Fax:     +44 (0) 28 9057 1101
E-mail:   address@hidden


This e-mail is confidential and is intended for the named recipient only. If
you receive it in error please destroy the message and all copies. Kainos
Software Ltd. does not accept liability for damage sustained as a result of
malicious software (e.g. viruses). Kainos does not accept liability for, or
permit, the creation of contracts on its behalf by e-mail, the publication of
any defamatory statement by its employees by e-mail, or changes subsequently
made to the original message. The Company's registered office is located at
4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland, Tel +44 28 9057 1100.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]