[Bug 296410] sprintf/vfprintf not thread safe on AArch64 due to localeconv_l using atomic_store_int, with relaxed semantics

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 01 Jul 2026 09:18:36 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296410

--- Comment #2 from Tomas Vondra <tomas@vondra.me> ---
(In reply to Konstantin Belousov from comment #1)

I'm not very familiar with how the locales work, but the way I understood
localeconv_l is that it rebuilds the cached fields after a change (or on first
access). And I thought maybe it's harmless if two threads rebuilt it
concurrently, or something like that.

But maybe you're right and after a locale change a thread could see a mix of
old and new values for a given locale? I guess that'd mean using atomics for
protecting other fields (as implemented here) is not quite sufficient.

-- 
You are receiving this mail because:
You are the assignee for the bug.