GNU bug report logs - #17095
[PATCH] grep: proceed the `beg' pointer after exact matched in KWSet

Previous Next

Package: grep;

Reported by: Norihiro Tanaka <noritnk <at> kcn.ne.jp>

Date: Tue, 25 Mar 2014 22:40:04 UTC

Severity: normal

Tags: patch

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17095 in the body.
You can then email your comments to 17095 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#17095; Package grep. (Tue, 25 Mar 2014 22:40:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Norihiro Tanaka <noritnk <at> kcn.ne.jp>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Tue, 25 Mar 2014 22:40:08 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: submit <at> debbugs.gnu.org
Subject: [PATCH] grep: proceed the `beg' pointer after exact matched in KWSet
Date: Wed, 26 Mar 2014 07:39:21 +0900
[Message part 1 (text/plain, inline)]
Package: grep
Tags: patch

When fail in checking multibyte characters after exact matched in KWSet,
I think that we can proceed the `beg' pointer before running DFA, because
then will never match at the former position than the failed in text.

Norihiro
[patch.txt (text/plain, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#17095; Package grep. (Tue, 25 Mar 2014 22:46:01 GMT) Full text and rfc822 format available.

Message #8 received at 17095 <at> debbugs.gnu.org (full text, mbox):

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: 17095 <at> debbugs.gnu.org
Subject: Re: bug#17095: [PATCH] grep: proceed the `beg' pointer after exact
 matched in KWSet
Date: Wed, 26 Mar 2014 07:45:20 +0900
[Message part 1 (text/plain, inline)]
Sorry, I failed in attachment of the patch. I re-send it.
[patch.txt (text/plain, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#17095; Package grep. (Wed, 26 Mar 2014 12:40:03 GMT) Full text and rfc822 format available.

Message #11 received at 17095 <at> debbugs.gnu.org (full text, mbox):

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: 17095 <at> debbugs.gnu.org
Subject: bug#17095: [PATCH] grep: proceed the `beg' pointer after exact
 matched in KWSet
Date: Wed, 26 Mar 2014 21:38:55 +0900
[Message part 1 (text/plain, inline)]
The patch that sent previously had the bug.  It's necessary to run DFA
in more narrow range without moving the `beg' pointer.  The bug is fixed
in this patch.
[patch.txt (text/plain, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#17095; Package grep. (Wed, 26 Mar 2014 12:46:03 GMT) Full text and rfc822 format available.

Message #14 received at 17095 <at> debbugs.gnu.org (full text, mbox):

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: 17095 <at> debbugs.gnu.org
Subject: bug#17095: [PATCH] grep: proceed the `beg' pointer after exact
 matched in KWSet
Date: Wed, 26 Mar 2014 21:45:09 +0900
[Message part 1 (text/plain, inline)]
Sorry for the repeated failure.
I re-send it.
[patch.txt (text/plain, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#17095; Package grep. (Wed, 26 Mar 2014 12:47:02 GMT) Full text and rfc822 format available.

Message #17 received at 17095 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>, 17095 <at> debbugs.gnu.org
Subject: Re: bug#17095: [PATCH] grep: proceed the `beg' pointer after exact
 matched in KWSet
Date: Wed, 26 Mar 2014 06:46:12 -0600
[Message part 1 (text/plain, inline)]
On 03/26/2014 06:38 AM, Norihiro Tanaka wrote:
> The patch that sent previously had the bug.  It's necessary to run DFA
> in more narrow range without moving the `beg' pointer.  The bug is fixed
> in this patch.
> 
> patch.txt
> 
> RnJvbSA3MTE1OGIyZmE3OTkzNzliZGNkYjZmNWFjMWI5M2Y3ODU2NmZiZDQ0IE1vbiBTZXAgMTcg
> MDA6MDA6MDAgMjAwMQpGcm9tOiBOb3JpaGlybyBUYW5ha2EgPG5vcml0bmtAa2NuLm5lLmpwPgpE

Your patch is once again illegible.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#17095; Package grep. (Wed, 26 Mar 2014 14:51:01 GMT) Full text and rfc822 format available.

Message #20 received at 17095 <at> debbugs.gnu.org (full text, mbox):

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: Eric Blake <eblake <at> redhat.com>
Cc: 17095 <at> debbugs.gnu.org
Subject: Re: bug#17095: [PATCH] grep: proceed the `beg' pointer after exact
 matched in KWSet
Date: Wed, 26 Mar 2014 23:50:03 +0900
Eric Blake <eblake <at> redhat.com> wrote:
> Your patch is once again illegible.

Sorry, I resent it.

Norihiro





Information forwarded to bug-grep <at> gnu.org:
bug#17095; Package grep. (Wed, 26 Mar 2014 16:07:02 GMT) Full text and rfc822 format available.

Message #23 received at 17095 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Cc: Eric Blake <eblake <at> redhat.com>, 17095 <at> debbugs.gnu.org
Subject: Re: bug#17095: [PATCH] grep: proceed the `beg' pointer after exact
 matched in KWSet
Date: Wed, 26 Mar 2014 09:05:52 -0700
[Message part 1 (text/plain, inline)]
Norihiro,

Thank you for the patch.  It looks correct, but induces what looks like
unnecessary duplication.  Did you consider the attached variant?

Also, the affected code path seems not to be covered by any test.
Can you construct a test case that exercises this change?
[k.txt (text/plain, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#17095; Package grep. (Thu, 27 Mar 2014 12:55:02 GMT) Full text and rfc822 format available.

Message #26 received at 17095 <at> debbugs.gnu.org (full text, mbox):

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: Jim Meyering <jim <at> meyering.net>
Cc: Eric Blake <eblake <at> redhat.com>, 17095 <at> debbugs.gnu.org
Subject: Re: bug#17095: [PATCH] grep: proceed the `beg' pointer after exact
 matched in KWSet
Date: Thu, 27 Mar 2014 21:54:19 +0900
[Message part 1 (text/plain, inline)]
Jim,

Thanks, I have added the comments to the patch and have slightly
modified the comment you wrote.

Norihiro
[patch.txt (text/plain, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#17095; Package grep. (Thu, 27 Mar 2014 19:07:02 GMT) Full text and rfc822 format available.

Message #29 received at 17095 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Cc: Eric Blake <eblake <at> redhat.com>, 17095 <17095 <at> debbugs.gnu.org>
Subject: Re: bug#17095: [PATCH] grep: proceed the `beg' pointer after exact
 matched in KWSet
Date: Thu, 27 Mar 2014 12:05:48 -0700
On Thu, Mar 27, 2014 at 5:54 AM, Norihiro Tanaka <noritnk <at> kcn.ne.jp> wrote:
> Jim,
>
> Thanks, I have added the comments to the patch and have slightly
> modified the comment you wrote.

Norihiro,

I see you also added a test case.  Thanks for that.  I've amended that
commit log message with a corresponding ChangeLog entry.

You're right that "beg" must not be advanced, so I have adjusted the
patch to factor out the call to dfaexec without changing "beg".  I've also
augmented the first test to require an exact match of the sole input line,
and changed the other test to require not just a nonzero exit, but $? = 1.




Information forwarded to bug-grep <at> gnu.org:
bug#17095; Package grep. (Thu, 27 Mar 2014 19:07:03 GMT) Full text and rfc822 format available.

Message #32 received at 17095 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Cc: Eric Blake <eblake <at> redhat.com>, 17095 <17095 <at> debbugs.gnu.org>
Subject: Re: bug#17095: [PATCH] grep: proceed the `beg' pointer after exact
 matched in KWSet
Date: Thu, 27 Mar 2014 12:06:36 -0700
[Message part 1 (text/plain, inline)]
On Thu, Mar 27, 2014 at 12:05 PM, Jim Meyering <jim <at> meyering.net> wrote:
> On Thu, Mar 27, 2014 at 5:54 AM, Norihiro Tanaka <noritnk <at> kcn.ne.jp> wrote:
>> Jim,
>>
>> Thanks, I have added the comments to the patch and have slightly
>> modified the comment you wrote.
>
> Norihiro,
>
> I see you also added a test case.  Thanks for that.  I've amended that
> commit log message with a corresponding ChangeLog entry.
>
> You're right that "beg" must not be advanced, so I have adjusted the
> patch to factor out the call to dfaexec without changing "beg".  I've also
> augmented the first test to require an exact match of the sole input line,
> and changed the other test to require not just a nonzero exit, but $? = 1.

And here's the patch:
[k.txt (text/plain, attachment)]

Information forwarded to bug-grep <at> gnu.org:
bug#17095; Package grep. (Fri, 28 Mar 2014 14:59:01 GMT) Full text and rfc822 format available.

Message #35 received at 17095 <at> debbugs.gnu.org (full text, mbox):

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: Jim Meyering <jim <at> meyering.net>
Cc: Eric Blake <eblake <at> redhat.com>, 17095 <17095 <at> debbugs.gnu.org>
Subject: Re: bug#17095: [PATCH] grep: proceed the `beg' pointer after exact
 matched in KWSet
Date: Fri, 28 Mar 2014 23:58:27 +0900
Jim,

Thanks, I checked that it acts as expected. 

Norihiro





Reply sent to Jim Meyering <jim <at> meyering.net>:
You have taken responsibility. (Fri, 28 Mar 2014 15:30:03 GMT) Full text and rfc822 format available.

Notification sent to Norihiro Tanaka <noritnk <at> kcn.ne.jp>:
bug acknowledged by developer. (Fri, 28 Mar 2014 15:30:06 GMT) Full text and rfc822 format available.

Message #40 received at 17095-done <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Cc: Eric Blake <eblake <at> redhat.com>, 17095-done <at> debbugs.gnu.org
Subject: Re: bug#17095: [PATCH] grep: proceed the `beg' pointer after exact
 matched in KWSet
Date: Fri, 28 Mar 2014 08:29:05 -0700
On Fri, Mar 28, 2014 at 7:58 AM, Norihiro Tanaka <noritnk <at> kcn.ne.jp> wrote:
> Thanks, I checked that it acts as expected.

Thanks. Pushed.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 26 Apr 2014 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 19 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.