Subject: bug#16499: GNU grep-2.16-1.mga4 , grep-2.16 from sources and grep from git master HEAD get stuck during an LC_ALL=en_US.UTF-8 search inside a short binary file

From: Paolo Bonzini <[email-masked]>
Date: Mon, 20 Jan 2014 11:35:21 +0100

Il 20/01/2014 02:55, Jim Meyering ha scritto:
> Thanks for the report.  I am unable to reproduce that on debian
> unstable using the latest grep:
> 
>   $ env LC_ALL=en_US.UTF-8 time -f %e grep -iP '^S' < /t/1.dat
>   Command exited with non-zero status 1
>   0.00
>   [Exit 1]
> 
> A good way for you to diagnose it is to run under strace or, better,
> via gdb and find out precisely what code it running when it is making
> no progress.

I reproduced it with Fedora 20.

$ rpm -q grep pcre
grep-2.16-1.fc20.x86_64
pcre-8.33-2.fc20.1.x86_64

Paolo