This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: strxfrm output stability

On 09/08/2015 11:18 PM, Roland McGrath wrote:
> The only thing that matters about strxfrm output is its strcmp ordering.
> If that changes, it's either a bug fix or a bug (either in the code or in
> the locale data).  If the string contents change but the ordering doesn't,
> then it's an implementation detail that is allowed to change.

Why do you think that?  I don't see this documented anywhere, and I
doubt it is something many readers of the C standard, the man page, or
the glibc manual would expect.

The manual suggests to store the strxfrm output and use it for sorting.
 I expect that some applications put it into on-disk database indexes as
a result.  This will lead to subtle breakage on glibc updates.

(The larger problem is that there are *definitely* databases out there
which use B-tree indexes in locale collation order, which break in even
more subtle ways if we make minor changes to the collation order.)

Florian Weimer / Red Hat Product Security

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]