[64-bit] egrep core dumps when it opens binary files

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Aug 12 17:41:00 GMT 2013


On Aug 12 14:49, Corinna Vinschen wrote:
> On Aug 11 15:07, Jim Burwell wrote:
> > 64 bit egrep gets a segfault and dumps core when it opens binary files:
> 
> Confirmed.  This isn't exactly about binary files, but rather grep
> stumbles over Cygwin/Newlib's UTF-16 surrogate pair handling here.
> 
> To trigger this problem, three circumstances must conincide:
> 
> - you have to use a UTF-8 locale like en_US.UTF-8,
> - you have to use grep's -i option,
> - and you have to hit a file with a UTF-8 sequence which translates to
>   a surrogate.
> 
> I'm looking into a patch to handle this uncommon situation and try to
> send it upstream.

I added UTF-16 surrogate handling to the -i option and uploaded a
grep-2.14-2 package to the 64 bit release.  Please give it a tests.
If it works for you, I'll send the patch upstream.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20130812/6ba97192/attachment.sig>


More information about the Cygwin mailing list