glibc/locale
Hanataka Shinya 82292c99b2 LC_COLLATE: Fix last character ellipsis handling (Bug 22668)
During ellipsis processing the collation cursor was not correctly
moved to the end of the ellipsis after processing.

The code inserted the new entry after the cursor, but before the
real end of the ellipsis:
                                [cursor]
... element_t <-> element_t <-> element_t <-> element_t
                  "<U0000>"     "<U0001>"     "<U007F>"
                  startp                      endp

At the end of the function we have:

                  [cursor]
... element_t <-> element_t <-> element_t
                  "<U007E>"     "<U007F>"
                                endp

The cursor should be pointing at endp, the last element in the
doubly-linked list, otherwise when execution returns to the
caller we will start inserting the next line after <U007E>.

Subsequent operations end up unlinking the ellipsis end entry or
just leaving it in the list dangling from the end.  This kind of
dangling is immediately visible in C.UTF-8 with the following
sorting from strcoll:
<U0010FFFF>
<U0000FFFF>
<U000007FF>
<U0000007F>

With the cursor correctly adjusted the end entry is correctly given
the right location and thus the right weight.

Retested and no regressions on x86_64 and i686.

Co-authored-by: Carlos O'Donell <carlos@redhat.com>
2021-04-26 08:03:32 -04:00
..
bits Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
programs LC_COLLATE: Fix last character ellipsis handling (Bug 22668) 2021-04-26 08:03:32 -04:00
tst-localedef-path-norm.root localedef: Add verbose messages for failure paths. 2020-04-26 13:55:58 -04:00
broken_cur_max.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
C_name.c
C-address.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
C-collate.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
C-ctype.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
C-identification.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
C-measurement.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
C-messages.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
C-monetary.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
C-name.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
C-numeric.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
C-paper.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
C-telephone.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
C-time.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
C-translit.h.in Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
categories.def Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
coll-lookup.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
coll-lookup.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
duplocale.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
elem-hash.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
findlocale.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
freelocale.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
gen-translit.py Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
global-locale.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
hashval.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
indigits.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
indigitswc.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
iso-639.def Add mnw language code [BZ #25139] 2019-11-06 08:15:16 +01:00
iso-3166.def Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
iso-4217.def Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
langinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-address.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-collate.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-ctype.c locale: Use compat_symbol_reference in _nl_postload_ctype 2021-03-25 11:06:58 +01:00
lc-identification.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-measurement.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-messages.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-monetary.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-name.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-numeric.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-paper.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-telephone.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
lc-time.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
loadarchive.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
loadlocale.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
locale.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
localeconv.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
localeinfo.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
localename.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
locarchive.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Makefile Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
mb_cur_max.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
newlocale.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nl_langinfo_l.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
nl_langinfo.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
outdigits.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
outdigitswc.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
setlocale.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
strlen-hash.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
SYS_libc.c
tst-C-locale.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-duplocale.c Add missing test files. 2009-11-17 16:23:57 -08:00
tst-locale-locpath.sh Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-localedef-path-norm.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
tst-locname.c Add missing test files. 2009-11-17 16:23:57 -08:00
uselocale.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
Versions
weight.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
weightwc.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
xlocale.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00