[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38503: Locale can cause incorrect number parsing in binary files

From: Eric Blake
Subject: bug#38503: Locale can cause incorrect number parsing in binary files
Date: Thu, 5 Dec 2019 14:40:42 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

On 12/5/19 2:29 PM, Eric Blake wrote:
tag 38503 notabug

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]