[WIPv5] Expected behaviour for a-z, A-Z, and 0-9 (Bug 23393).

Florian Weimer fweimer@redhat.com
Mon Jul 30 17:40:00 GMT 2018


On 07/28/2018 03:12 AM, Carlos O'Donell wrote:
> On 07/26/2018 10:50 AM, Florian Weimer wrote:
>> shs_CA: U+0000E6 matches /[a-z]/ unexpectedly
>> shs_CA: U+0000C6 matches /[A-Z]/ unexpectedly
>> shs_CA.utf8: U+0000E6 matches /[a-z]/ unexpectedly
>> shs_CA.utf8: U+0000C6 matches /[A-Z]/ unexpectedly

> This is a WIP, because the number of tests now is too big
> to simply add them to tst-fnmatch.input, and so I'm writing
> a new tester tst-rational-ranges.c. I'm parsing SUPPORTED,
> expecting all of the locales to be built for testing, and
> then running through all the rational ranges to test
> inclusion of the required datums.

Let me repeat my suggestion that we should initially fix the locales 
with the common collation order, where glibc 2.28 regresses.

> How slow is your tester? Should I do what you do to test
> for the inclusion of characters that shouldn't be in the
> range? Or will that take too long?
> 
> v5
> - Add ~30k+ tests to tst-fnmatch.input.
> - Fix broken locales:
> - Fix shs_CA to not reorder-after for no reason.
> 
> Could you run this through the tester please?

It fails installation for me:

$ make localedata/install-locales DESTDIR=/tmp/locales
sl_SI.UTF-8...locales/sl_SI:1230: order for `U00000061' already defined 
at locales/sl_SI:998
locales/sl_SI:1231: [error] symbol `S0062' not defined
locales/sl_SI:1231: [error] symbol `BASE' not defined
/bin/sh: line 17:  4148 Segmentation fault      (core dumped) I18NPATH=. 
GCONV_PATH=/home/fweimer/src/gnu/glibc/build/iconvdata LC_ALL=C 
/home/fweimer/src/gnu/glibc/build/elf/ld-linux-x86-64.so.2 
--library-path 
/home/fweimer/src/gnu/glibc/build:/home/fweimer/src/gnu/glibc/build/math:/home/fweimer/src/gnu/glibc/build/elf:/home/fweimer/src/gnu/glibc/build/dlfcn:/home/fweimer/src/gnu/glibc/build/nss:/home/fweimer/src/gnu/glibc/build/nis:/home/fweimer/src/gnu/glibc/build/rt:/home/fweimer/src/gnu/glibc/build/resolv:/home/fweimer/src/gnu/glibc/build/mathvec:/home/fweimer/src/gnu/glibc/build/support:/home/fweimer/src/gnu/glibc/build/crypt:/home/fweimer/src/gnu/glibc/build/nptl 
/home/fweimer/src/gnu/glibc/build/locale/localedef $flags 
--alias-file=../intl/locale.alias -i locales/$input -f charmaps/$charset 
--prefix=/tmp/locales $locale

GDB says this:

Core was generated by 
`/home/fweimer/src/gnu/glibc/build/elf/ld-linux-x86-64.so.2 
--library-path /home'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000419234 in output_weight (pool=pool@entry=0x7ffdf1550ce0, 
collate=collate@entry=0x7fd5a8a03240,
     elem=elem@entry=0x7fd5a8a9b300) at programs/ld-collate.c:1912
1912              len += utf8_encode (&buf[len],
(gdb) bt
#0  0x0000000000419234 in output_weight (pool=pool@entry=0x7ffdf1550ce0, 
collate=collate@entry=0x7fd5a8a03240,
     elem=elem@entry=0x7fd5a8a9b300) at programs/ld-collate.c:1912
#1  0x000000000041dc4a in collate_output () at programs/ld-collate.c:2180
#2  0x000000000042709f in write_all_categories 
(definitions=0x7ffdf15513c0, charmap=charmap@entry=0x7fd5a71786a0,
     locname=0x7ffdf1552e33 "sl_SI.UTF-8", 
output_path=output_path@entry=0x7fd5a7178310 
"/tmp/locales/usr/lib64/locale/sl_SI.utf8/")
     at programs/locfile.c:337
#3  0x0000000000402f69 in main (argc=<optimized out>, 
argv=0x7ffdf1551630) at programs/localedef.c:300
(gdb) l
1907          int i;
1908
1909          for (i = 0; i < elem->weights[cnt].cnt; ++i)
1910            /* Encode the weight value.  We do nothing for IGNORE 
entries.  */
1911            if (elem->weights[cnt].w[i] != NULL)
1912              len += utf8_encode (&buf[len],
1913 
elem->weights[cnt].w[i]->mborder[cnt]);
1914
1915          /* And add the buffer content.  */
1916          obstack_1grow (pool, len);
(gdb) print elem->weights[cnt].w[i]->mborder[cnt]
Cannot access memory at address 0x0
(gdb) print elem->weights[cnt].w[i]->mborder
$3 = (int *) 0x0
(gdb)

Any idea what is going on?

Thanks,
Florian



More information about the Libc-alpha mailing list