glibc/locale/programs
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
..
3level.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
charmap-dir.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
charmap-dir.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
charmap-kw.gperf Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
charmap-kw.h Update automatically-generated copyright dates 2021-01-02 12:17:34 -08:00
charmap.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
charmap.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
config.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ld-address.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ld-collate.c LC_COLLATE: Fix last character ellipsis handling (Bug 22668) 2021-04-26 08:03:32 -04:00
ld-ctype.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ld-identification.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ld-measurement.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ld-messages.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ld-monetary.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ld-name.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ld-numeric.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ld-paper.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ld-telephone.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
ld-time.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
linereader.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
linereader.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
locale-spec.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
locale.c Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
localedef.c Update copyright dates not handled by scripts/update-copyrights. 2021-01-02 12:17:34 -08:00
localedef.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
locarchive.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
locfile-kw.gperf Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
locfile-kw.h Update automatically-generated copyright dates 2021-01-02 12:17:34 -08:00
locfile-token.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
locfile.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
locfile.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
record-status.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
record-status.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
repertoire.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
repertoire.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
simple-hash.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
simple-hash.h Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
xasprintf.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
xmalloc.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
xstrdup.c Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00