GNU bug report logs - #38503
Locale can cause incorrect number parsing in binary files

Previous Next

Package: grep;

Reported by: jan h <jharald.j <at> gmail.com>

Date: Thu, 5 Dec 2019 20:02:01 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eric Blake <eblake <at> redhat.com>
To: jan h <jharald.j <at> gmail.com>, 38503-done <at> debbugs.gnu.org
Subject: bug#38503: Locale can cause incorrect number parsing in binary files
Date: Thu, 5 Dec 2019 14:40:42 -0600
On 12/5/19 2:29 PM, Eric Blake wrote:
> tag 38503 notabug
> thanks
> 
> On 12/5/19 12:30 PM, jan h wrote:
>> grep 3.3
>>

> 
> Note that the Rational Range Interpretation of ranges claims that [0-9] 
> should have the expansion [012345689] in ALL locales; and more and more 
> versions of GNU utilities are starting to move to RRI (even newer glibc 
> is trying to move towards RRI for more regex operations).  If this 
> example is run where RRI is in force, then it should not match non-ASCII 
> Unicode digits.  But you didn't mention which version of grep you are 
> using, let alone which version of libc is providing your locale 
> definitions, to make that determination; and POSIX does not require RRI.

Sorry, I missed that you did mention grep 3.3.  And the NEWS for grep 
does not mention 'RRI' or 'Rational Range Interpretation' (compare that 
to bash 4.2 introducing globasciiranges, or gawk introducing RRI in 
4.0.1).  So I'm not sure of the current state of whether grep tries to 
use RRI on all systems or only on systems where it relies on gnulib's 
regcomp instead of libc.  So we may still need to reopen this if we 
decide grep needs more RRI fixes.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org





This bug report was last modified 5 years and 230 days ago.

Previous Next


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