strxfrm output stability

Paul Eggert eggert@cs.ucla.edu
Tue Sep 8 21:35:00 GMT 2015


Florian Weimer wrote:
> I don't see this documented anywhere

Exactly.  Because the behavior is undocumented, applications cannot rely on 
strxfrm calls being stable from one process to the next.

> 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.

I'll go out on a limb and say that no sane application uses strxfrm, either on 
disk or off.  As far as I can tell, strxfrm is an invention of the C 
standardization committee and is useless in real-world applications.  So as a 
practical matter it is not a big deal as to how stable it is.



More information about the Libc-alpha mailing list