[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22655: grep-2.21 (and git master): --null-data and ranges work in an
From: |
Sergei Trofimovich |
Subject: |
bug#22655: 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 |
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
Description: PGP signature
- bug#22655: grep-2.21 (and git master): --null-data and ranges work in an odd way (-P works fine),
Sergei Trofimovich <=