From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 898853858418; Tue, 12 Dec 2023 11:40:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 898853858418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1702381241; bh=bUnn37YPSbVakzjqTaPv3hURr+js3Anu8nFSSgauGps=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bVBzVDb4vlzdWZV8DiXdSaWZrFzaEfOa5gAzpps3fWo7GrtZhnbPz3JgVeuLaZZll ydTDIP+aAbOM3vQBVM+jYXUtaY0t19HYqNbCdeNhYFSmtQsdn2axbo6PrJMrN8Tx57 HBVUkDmfuEbLBcrM8h7DF+dPi4UjeAgIsQjYP3N4= From: "fweimer at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/1890] strerror() unnecessarily non thread-safe Date: Tue, 12 Dec 2023 11:40:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.3.6 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fweimer at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: 2.32 X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D1890 --- Comment #10 from Florian Weimer --- (In reply to Bruno Haible from comment #9) > Note that this return convention (returning a pointer to a per-thread > buffer) has a pitfall: > If the returned pointer ever gets passed to a different thread, value > corruption will occur, that is hard to detect and to debug. (Because while > the second thread is storing, printing, or logging the value, the first > thread may write different contents into it.) This has been clarified in POSIX, and I believe C23. However, it only appli= es to the case where an unknown error code is used, so that's why I think a separate symbol version wasn't necessary. --=20 You are receiving this mail because: You are on the CC list for the bug.=