GNU bug report logs - #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

Previous Next

Package: grep;

Reported by: Shlomi Fish <shlomif <at> shlomifish.org>

Date: Sun, 19 Jan 2014 18:47:03 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 16499 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Shlomi Fish <shlomif <at> shlomifish.org>, 16499 <at> debbugs.gnu.org
Cc: shlomif <shlomif <at> gmail.com>, Paolo Bonzini <bonzini <at> gnu.org>,
 Tony Abou-Assaleh <taa <at> acm.org>
Subject: Re: 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
Date: Sun, 19 Jan 2014 17:55:18 -0800
[resending also to the correct bug address]
> Subject: 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
> Hi all,
>
> after I save the attached file as 1.dat , I see that grep -iP on '^Subject:'
> or on '^S' gets stuck in the en_US.UTF-8 locale. It is fine in pcregrep and in
> ack.
>
> [SHELL]
> shlomif <at> telaviv1:~$ time LC_ALL=en_US.UTF-8
> ~/apps/TEST-grep-from-git-TO-
DEL/bin/grep -iP '^Subject:' < 1.dat ^C
>
> real    0m4.199s
> user    0m4.195s
> sys     0m0.003s

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.




This bug report was last modified 11 years and 118 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.