[Bug 278556] strerror-related race condition and standards violation in printf and friends

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 23 Apr 2024 19:45:27 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278556

--- Comment #5 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=f887667694632c829b0599b54ff86a072e93df87

commit f887667694632c829b0599b54ff86a072e93df87
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-04-23 17:10:30 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-04-23 19:43:01 +0000

    __vprintf(): switch from strerror() to strerror_rl()

    This eliminates the use of non-thread-safe function in printf*() family,
    and make the call locale-aware.  Also, it stops obliterating the
    strerror() static buffer, which aligns with the POSIX requirement that
    implementations must behave as if no standard-mandated functions call
    strerror().

    PR:     278556
    Reported by:    Jonathan Gruber <jonathan.gruber.jg@gmail.com>
    Reviewed by:    imp
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D44916

 lib/libc/stdio/vfprintf.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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