bug-grep
[Top][All Lists]
Advanced

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

[patch #5115] grep [^[.a.]b] fails with input abc


From: Benno Schulenberg
Subject: [patch #5115] grep [^[.a.]b] fails with input abc
Date: Thu, 1 Jun 2006 15:56:55 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060530 Firefox/1.0.8

Follow-up Comment #3, patch #5115 (project grep):

After applying the patch:

$ echo abc | LC_ALL=C src/grep [^[.a.]b]
Segmentation fault
$ echo abc | LC_ALL=nl_NL src/grep [^[.a.]b]
Segmentation fault
$ echo abc | LC_ALL=nl_NL.utf8 src/grep [^[.a.]b]
abc


$ LC_ALL=C gdb src/grep
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run [^[.a.]b] abcfile
Starting program: /home/ben/Sources/grep/src/grep [^[.a.]b] abcfile

Program received signal SIGSEGV, Segmentation fault.
0x08050090 in setbit (b=12, c=0xbf917ce0) at dfa.c:277
277       c[b / INTBITS] |= 1 << b % INTBITS;
(gdb) back
#0  0x08050090 in setbit (b=12, c=0xbf917ce0) at dfa.c:277
#1  0x08051815 in lex () at dfa.c:1109
#2  0x08052cce in dfaparse (s=0x1000 <Address 0x1000 out of bounds>,
len=4096,
    d=0x805d3c0) at dfa.c:1487
#3  0x08056f9e in dfacomp (s=0x805e098 "[^[.a.]b]", len=9, d=0x805d3c0,
searchflag=1)
    at dfa.c:3085
#4  0x0804da44 in GEAcompile (pattern=0x805e098 "[^[.a.]b]", size=9,
syntax_bits=2822)
    at search.c:273
#5  0x0804dc41 in Gcompile (pattern=0x1000 <Address 0x1000 out of bounds>,
    size=3213982944) at search.c:283
#6  0x0804c6be in main (argc=6, argv=0x805e078) at grep.c:2222
(gdb) 

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?func=detailitem&item_id=5115>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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