Page MenuHomeFreeBSD

isctype: use per-thread-locale's __mb_sb_limit
Needs ReviewPublic

Authored by yuripv on Sep 26 2023, 4:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jan 12, 1:31 PM
Unknown Object (File)
Sat, Jan 11, 8:52 AM
Unknown Object (File)
Oct 29 2024, 9:21 PM
Unknown Object (File)
Oct 3 2024, 12:06 PM
Unknown Object (File)
Oct 3 2024, 1:01 AM
Unknown Object (File)
Sep 21 2024, 1:19 PM
Unknown Object (File)
Aug 6 2024, 1:03 AM
Unknown Object (File)
Jul 10 2024, 9:51 AM
Subscribers

Details

Summary

Re-use xlocale's __runes_for_locale() for isctype functions adding
new magic value (-2) to get current thread's (or global if per-thread
one is not set) locale.

PR: 265950

I think this is a better way to address the issue without adding new public symbols to libc. The only downside is that application built against new _ctype.h *and* using old libc will dump core (but that's not supported, correct?).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Well, this is indeed not supported, but also very hostile to our users. Normally, we ensure that ABI incompatibility manifests itself as some explained refusal to run the binary. E.g., we might report missed symbol, or like.

Silently causing SIGSEGV, which can only be explained by developer with debugger, is IMO not acceptable way to fix things. If you can somehow ensure that new solution would breaks early with understandable message.

Hmm, could you bump symver for __runes_for_locale() and call it a solution?