[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep-2.6.2 -Ff hangs on files with empty lines
From: |
Jim Meyering |
Subject: |
Re: grep-2.6.2 -Ff hangs on files with empty lines |
Date: |
Wed, 31 Mar 2010 09:17:23 +0200 |
Allan McRae wrote:
> On 31/03/10 16:21, Jim Meyering wrote:
>> Allan McRae wrote:
>>> Grep-2.6.2 will hang on "grep -Ff foo bar" if foo contains an empty
>>> line. The bug is new to 2.6.2.
>>
>> Thanks for the report.
>> However, so far, I am unable to reproduce that.
>>
>> Please provide more details:
>> - type of CPU and OS you are using
>
> I am running Arch Linux and get the issue on both i686 and x86_64.
> Grep is configured with:
> ./configure --prefix=/usr --bindir=/bin --without-included-regex
>
>> - the contents of your "foo" and "bar" files
>
> I replicate using your example:
>
> printf 'a\n\nb\n' > foo
> seq 10 > bar
> grep -Ff foo bar
I don't have an Arch Linux system handy, so
I rebuilt --without-included-regex on F11, F12, F13-alpha, rawhide,
and a couple of debian and even a Centos 5.4 system.
On all of them, I saw this (and no hang):
$ printf 'a\n\nb\n' > foo; seq 10 > bar; src/grep -Ff foo bar
1
2
3
4
5
6
7
8
9
10
I suspect something about your system. The compiler?
Did grep's "make check" pass?
Please run it under gdb and send a backtrace showing where it's hanging.