Paolo Bonzini wrote:
> Hi all,
>
> this is a patch to fix the worst part of bug #30771 (the segfault).
> The segfault could also be reproduced by passing a zero-sized file or
> /dev/null as the input file, and I opted for the latter.
>
> I added a second test, which I marked as an expected failure, to test
> that grep fails when a directory is passed to "grep -f".
>
> The problem is that I could not make the test fail, because the segfault
> is strangely not seen if the "grep -Fif /dev/null" command is run from
> a script.
>
> Help completing the patch is thus welcome (together with reviews for the
> other patches that have been posted).

Hi Paolo,

Thanks for working on that.
I was surprised to find that I cannot reproduce
the problem at all.  I've tried using stock grep-2.6.3 both
manually on the command line using f13 on both i686 and x86_64.

    $ /bin/grep -Fif /dev/null < /dev/null
    [Exit 1]
    $

Is there some trick to reproducing it?

I also applied all of your patches, including
the test additions, but then backed out the

  search: fix "grep -Fif /dev/null"

changes, recompiled and ran "make check".
Surprisingly, no test failed.

puzzled...

Reply via email to