You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
grep - matching lines before a NUL byte are printed; GNU suppresses them when the NUL is in the same input block #210
When a file contains a NUL byte GNU grep treats it as binary. In the observed behaviour of GNU
grep 3.12 the decision covers the whole block of input it is processing: in a small file
with a NUL anywhere, no matching line is printed at all, only binary file matches. Only lines
in blocks that come before the NUL (hundreds of KiB earlier) are printed. uu_grep checks for
NUL line by line (and, on the literal fast path, only up to the current match), so every
matching line that precedes the NUL is printed before the notice.
Exposed by the GNU test null-byte (a ~400 KB file xxx, 100000 x yyy, z, then a NUL: grep -E 'xxx|z' must print only xxx; uu_grep also prints z, which sits in the same
block as the NUL).
Activity