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)
Thu, Sep 25, 9:36 PM
Unknown Object (File)
Aug 28 2025, 11:11 AM
Unknown Object (File)
Aug 28 2025, 8:00 AM
Unknown Object (File)
Aug 28 2025, 3:28 AM
Unknown Object (File)
Aug 28 2025, 2:07 AM
Unknown Object (File)
Aug 28 2025, 1:27 AM
Unknown Object (File)
Aug 28 2025, 1:27 AM
Unknown Object (File)
Aug 26 2025, 3:51 PM
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?