Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 02 May 2017 02:32:44 +0000
From:      bugzilla-noreply@freebsd.org
To:        x11@FreeBSD.org
Subject:   [Bug 218811] graphics/libglapi: fails to build with bsdgrep
Message-ID:  <bug-218811-7141-CobMPU7V4c@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-218811-7141@https.bugs.freebsd.org/bugzilla/>
References:  <bug-218811-7141@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D218811

--- Comment #10 from commit-hook@freebsd.org ---
A commit references this bug:

Author: emaste
Date: Tue May  2 02:32:10 UTC 2017
New revision: 317665
URL: https://svnweb.freebsd.org/changeset/base/317665

Log:
  bsdgrep: fix -w -v matching improperly with certain patterns

  -w and -v flag matching was mostly functional but had some minor
  problems:

  1. -w flag processing only allowed one iteration through pattern
     matching on a line. This was problematic if one pattern could match
     more than once, or if there were multiple patterns and the earliest/
     longest match was not the most ideal, and

  2. Previous work "fixed" things to not further process a line if the
     first iteration through patterns produced no matches. This is clearly
     wrong if we're dealing with the more restrictive -w matching.

  #2 breakage could have also occurred before recent broad rewrites, but
  it would be more arbitrary based on input patterns as to whether or not
  it actually affected things.

  Fix both of these by forcing a retry of the patterns after advancing
  just past the start of the first match if we're doing more restrictive
  -w matching and we didn't get any hits to start with. Also move -v flag
  processing outside of the loop so that we have a greater change to match
  in the more restrictive cases. This wasn't strictly wrong, but it could
  be a little more error prone.

  While here, introduce some regressions tests for this behavior and fix
  some excessive wrapping nearby that hindered readability. GNU grep
  passes these new tests.

  PR:           218467, 218811
  Submitted by: Kyle Evans <kevans91 at ksu.edu>
  Reviewed by:  cem, ngie
  Differential Revision:        https://reviews.freebsd.org/D10329

Changes:
  head/contrib/netbsd-tests/usr.bin/grep/t_grep.sh
  head/usr.bin/grep/util.c

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-218811-7141-CobMPU7V4c>