GNU bug report logs - #22655
grep-2.21 (and git master): --null-data and ranges work in an odd way (-P works fine)

Previous Next

Package: grep;

Reported by: Sergei Trofimovich <slyfox <at> gentoo.org>

Date: Sat, 13 Feb 2016 23:24:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#22655: closed (grep-2.21 (and git master): --null-data and
 ranges work in an odd way (-P works fine))
Date: Sun, 20 Nov 2016 08:04:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 20 Nov 2016 00:03:26 -0800
with message-id <eebb020e-22c7-3abe-c8eb-17fb4dc71caf <at> cs.ucla.edu>
and subject line Re: bug#22655: grep -Pz '^' now fails!
has caused the debbugs.gnu.org bug report #22655,
regarding grep-2.21 (and git master): --null-data and ranges work in an odd way (-P works fine)
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
22655: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22655
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Sergei Trofimovich <slyfox <at> gentoo.org>
To: bug-grep <at> gnu.org
Cc: Jim Meyering <meyering <at> fb.com>, skvadrik <at> gmail.com,
 Paul Eggert <eggert <at> cs.ucla.edu>, ulm <at> gentoo.org,
 Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Subject: grep-2.21 (and git master): --null-data and ranges work in an odd
 way (-P works fine)
Date: Sat, 13 Feb 2016 23:20:52 +0000
[Message part 3 (text/plain, inline)]
The issue is found by Ulrich Mueller:

It seems DFA engine does not understand --null-data:

~/dev/git/grep $ cat a-test.sh 
#!/bin/bash

printf '12\n34\0' | LC_ALL=en_US.utf-8 src/grep -z    '^[1234yz]*$'  | wc -c
printf '12\n34\0' | LC_ALL=en_US.utf-8 src/grep -P -z '^[1234yz]*$'  | wc -c
printf '12\n34\0' | LC_ALL=en_US.utf-8 src/grep -z    '^[1234y-z]*$' | wc -c
printf '12\n34\0' | LC_ALL=en_US.utf-8 src/grep -P -z '^[1234y-z]*$' | wc -c

~/dev/git/grep $ ./a-test.sh 
0
6
6
6

All 4 should return 6 but first is not correct.
It seems that 'y-z' range disables dfa.c code and works fine.

-- 

  Sergei
[signature.asc (application/pgp-signature, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Stephane Chazelas <stephane.chazelas <at> gmail.com>
Cc: 22655-done <at> debbugs.gnu.org
Subject: Re: bug#22655: grep -Pz '^' now fails!
Date: Sun, 20 Nov 2016 00:03:26 -0800
As all the bugs in this bug report appear to be fixed, I'm closing it now.


This bug report was last modified 8 years and 190 days ago.

Previous Next


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