GNU bug report logs - #18266
grep -P and invalid exits with error

Previous Next

Package: grep;

Reported by: Santiago <santiago <at> debian.org>

Date: Thu, 14 Aug 2014 15:43:02 UTC

Severity: wishlist

Merged with 18455

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


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

From: Santiago <santiago <at> debian.org>
To: Paul Eggert <eggert <at> cs.ucla.edu>, 758105 <at> bugs.debian.org
Cc: 18266 <at> debbugs.gnu.org, Vincent Lefevre <vincent <at> vinc17.net>
Subject: Re: grep -P and invalid exits with error
Date: Thu, 28 Aug 2014 22:47:54 -0700
[Message part 1 (text/plain, inline)]
El 16/08/14 a las 11:36, Paul Eggert escribió:
> Santiago wrote:
> >Another solution would be to don't check if binary files are valid
> >(passing PCRE_NO_UTF8_CHECK to pcre_exec), but I don't know if that'd
> >avoid security holes
> 
> It wouldn't.  (We already tried it.)
> 

Another try. This patch is by far more efficient.
With the previous patch #1:

 % time grep -P faz /usr/bin/*                                            
 ...
 grep: /usr/bin/X11: Es un directorio
 grep -P faz /usr/bin/*  519,78s user 0,32s system 99% cpu 8:41,19 total

 With this one:

  % time src/grep -P faz /usr/bin/*
  src/grep -P faz /usr/bin/*  7,36s user 0,33s system 99% cpu 7,695 total

Cheers,

Santiago
[grep-pcresearch-clean-utf8-2.patch (text/x-diff, attachment)]
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 10 years and 249 days ago.

Previous Next


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