Description of problem: If the -F and -w options are supplied to grep, and one of the files to be read is binary, any files read subsequently will be searched as if the -w option had not been specified. Version-Release number of selected component (if applicable): grep-2.5.3-5.fc12.i686 How reproducible: Always Steps to Reproduce: 1. /bin/grep -Fw hi /bin/ls <(echo hit) Actual results: Binary file /bin/ls matches /proc/self/fd/63:hit Expected results: Binary file /bin/ls matches Additional info: A self-compiled binary of upstream grep 2.5.3 does not exhibit this bug, so this is very likely a bug in a Fedora modification to grep.
This bug seems to only happen when the binary file contains a match.
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle. Changing version to '12'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This bug is not present in F13, in grep-2.5.4-1.fc13.i686. However, it is still present in F12, in grep-2.5.3-6.fc12.i686
I cannot reproduce it with F12 on x86_64: LC_ALL=C grep -Fw GNU /bin/ls <(echo GNUisance) Binary file /bin/ls matches (There's no "hi" in the 64-bit /bin/ls)
Strange - the bug occurs for 2-character words, but not for a longer word I tried. I suggest you use strings -a -2 to find a 2-character word, or copy the /bin/ls from a 32-bit system and use that.
Nada: $ grep -Fw hX /bin/ls <(echo hXX) Binary file /bin/ls matches $ LC_ALL=C grep -Fw hX /bin/ls <(echo hXX) Binary file /bin/ls matches $
Maybe the bug only occurs on i686 then? Or only on 32-bit platforms?
Robin, do you try with latest grep-2.6.3-1.fc12 (recently pushed to stable)? https://admin.fedoraproject.org/updates/grep-2.6.3-1.fc12
(In reply to comment #8) > Robin, do you try with latest grep-2.6.3-1.fc12 (recently pushed to stable)? Just tried it - bug does not occur with that. Thanks!