[Top][All Lists]

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

Re: About Debain Bug #532541

From: Paolo Bonzini
Subject: Re: About Debain Bug #532541
Date: Sun, 24 Oct 2010 10:51:42 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20100907 Fedora/3.1.3-1.fc13 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.3

On 10/23/2010 09:49 AM, Kai YU wrote:
Hi, recently I noticed the Debain Bug #532541(
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532541). The problem
reported still exists in grep-2.7. I debugged the program, and found it was
introduce by the change of grep-2.5.3(
The failure-inducing change is:

- if (only_matching)
+static void
+prline (char const *beg, char const *lim, int sep)
+ if (!only_matching)
+ print_line_head(beg, lim, sep);
+ else

Notice that the predicate if (only_matching) is changed to if

The patch is correct in adding the "!".  The code previously was doing

  static void prline(...)
     /* do something */
     if (only_matching)
       /* do something else */

now it is

  static void print_line_head(...)
     /* do something */

  static void prline(...)
     if (!only_matching)
       /* do something else */

So the condition for "/* do something else */" hasn't changed.

Still, I agree there is a bug there and I'm looking into it.


reply via email to

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