emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#21670: closed (surprising bug in grep -e with anch


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#21670: closed (surprising bug in grep -e with anchors)
Date: Mon, 12 Oct 2015 04:35:02 +0000

Your message dated Sun, 11 Oct 2015 21:34:05 -0700
with message-id <address@hidden>
and subject line Re: bug#21670: surprising bug in grep -e with anchors
has caused the debbugs.gnu.org bug report #21670,
regarding surprising bug in grep -e with anchors
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
21670: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21670
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: surprising bug in grep -e with anchors Date: Sun, 11 Oct 2015 14:01:07 -0700
This bug appears in GNU grep version 2.20. It is not present in the older version I have installed on a home system (2.6.3.)

test case (single line)
abchelloabc

grep does not find the line with grep -e '^hello'  nor with grep -e 'hello$'
however, the line is output with
grep -e '^hello' -e 'hello$'

I downloaded, built and tested the bug on GNU grep 2.21 and it still appears.

weird.

(this was found by an introductory Linux student. )

--
Instructor, Computer Science
http://fog.ccsf.edu/~gboyd


--- End Message ---
--- Begin Message --- Subject: Re: bug#21670: surprising bug in grep -e with anchors Date: Sun, 11 Oct 2015 21:34:05 -0700 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
greg boyd wrote:
test case (single line)
abchelloabc

grep does not find the line with grep -e '^hello'  nor with grep -e 'hello$'
however, the line is output with
grep -e '^hello' -e 'hello$'

Oooo, that's a good one. Give your student extra credit! As it happens, the bug was recently fixed by this patch by Norihiro Tanaka:

http://git.savannah.gnu.org/cgit/grep.git/commit/?id=256a4b494fe1c48083ba73b4f62607234e4fefd5

and the fix should appear in the next grep release. However, since the patch was supposed to affect only performance, it appears that the bug fix was due to luck, and I'm taking the liberty of adding your student's test case by installing the attached further patch, to help prevent this bug from coming back in a future version.

Attachment: 0001-tests-add-test-case-for-Bug-21670.patch
Description: Text document


--- End Message ---

reply via email to

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