Page MenuHomeFreeBSD

libc: use separate collate objects for C, POSIX, and C.UTF-8
ClosedPublic

Authored by yuripv on May 6 2021, 10:00 AM.
Tags
None
Referenced Files
F137767053: D30146.diff
Tue, Nov 25, 3:40 PM
Unknown Object (File)
Sat, Nov 8, 12:39 AM
Unknown Object (File)
Sat, Nov 1, 5:12 AM
Unknown Object (File)
Wed, Oct 29, 2:20 AM
Unknown Object (File)
Tue, Oct 28, 2:04 AM
Unknown Object (File)
Mon, Oct 27, 6:34 AM
Unknown Object (File)
Oct 19 2025, 12:14 AM
Unknown Object (File)
Oct 17 2025, 8:28 AM
Subscribers

Details

Summary

This fixes newlocale overwriting the locale name in collate object
when same instance was used for those locales, and querylocale
reporting unexpected value for LC_COLLATE_MASK.

PR: 255646, 269375

Test Plan

See added test case.

Run other libc tests.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

yuripv created this revision.
This revision is now accepted and ready to land.May 6 2021, 11:42 AM
markj added inline comments.
lib/libc/tests/locale/newlocale_test.c
3

This should have an SPDX identifier I think.

yuripv edited the summary of this revision. (Show Details)

update the test case to make it cover all switches between these locales
add the spdx identifier

This revision now requires review to proceed.Mar 28 2023, 2:53 PM

Sorry, I completely forgot about this review, and now another PR was filed for the same problem. Could you please take another look? (I have updated the test case a bit for more complete switch testing).

markj added inline comments.
lib/libc/tests/locale/newlocale_test.c
99

style(9) no longer requires these blank lines.

This revision is now accepted and ready to land.Mar 28 2023, 2:56 PM