bug-grep
[Top][All Lists]
Advanced

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

bug#15773: grep-2.15 bug report


From: Jim Meyering
Subject: bug#15773: grep-2.15 bug report
Date: Fri, 1 Nov 2013 08:15:08 -0700

On Fri, Nov 1, 2013 at 12:53 AM, Aharon Robbins <address@hidden> wrote:
> Hello All.
>
>> >>> After updating from 2.14 to 2.15 grep has started to fail to match 
>> >>> patterns
>> >>> that contain '\s*' or '\s\+'
>>
>> And here's a proper patch, including NEWS and test suite additions:
>
> FWIW, I can't reproduce this in gawk (gawk-4.1-stable branch).
>
> The program below correctly produces no output, with and without the fix
> in dfa.c:lex. (I have added the fix anyway.)
>
> Any ideas why?
>
> Thanks,
>
> Arnold
> ----------------------------------
> BEGIN {
>         pat["^\\s*$"] = pat["^\\s+$"] = pat["^\\s?$"] = pat["^\\s{1}$"] = 1
>         for (i in pat) {
>                 if (" " !~ i) {
>                         printf("pattern \"%s\" failed!\n", i) > "/dev/stderr"
>                         exit 1
>                 }
>         }
>         exit 0
> }

Thanks for the report.
With that, I realized that my new grep test case was inadequate:
it did not force the use of a multibyte locale, and thus did not fail
even without the fix.
I'm amending the patch (not yet pushed) with this:

Attachment: k.txt
Description: Text document


reply via email to

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