From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B996A3858418; Tue, 12 Dec 2023 12:21:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B996A3858418 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1702383678; bh=oHT/TRzEk+ACcEq9xCHaV9tNxfdAKO1LJgK8zWEpSdo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=XDSDCv4pgFgUi3jOPECTYaps663RNHzbToFURH6BnoSGXzL8Z+nXW5g4iEMvCuWg+ kZvU7VO6e4nwB9mbkavT73TCB+Z2Ai9URcYtcIg+anSk3/8f5DsK9ApheacLptk5qT 5LnDTj3oPlNQ19uf9kx8IG6E40LIMDS3pg2jDELE= From: "bruno at clisp dot org" To: glibc-bugs@sourceware.org Subject: [Bug libc/1890] strerror() unnecessarily non thread-safe Date: Tue, 12 Dec 2023 12:21:18 +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: bruno at clisp dot org 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 #11 from Bruno Haible --- (In reply to Florian Weimer from comment #10) > This has been clarified in POSIX, and I believe C23. True, both POSIX = and ISO C 23 =C2=A7 7.26.6.3 contain wording that allows glibc's behaviour and = should alert the programmer. What I meant to state is that I would find it undesirable if glibc were to = use this return convention (returning a pointer to a per-thread buffer) in more= and more functions. Such value corruption cannot be detected by ASAN or valgrind (in the case of long-living threads); therefore the only possible help the programmer could get here is from static analysis tools. > However, it only applies to the case where an unknown error code is used Is a value corruption less severe because it appears less frequently? I wou= ld argue the opposite way: If it appears less frequently, there are less chanc= es that it gets caught through a test suite and thus gets eliminated from an application. --=20 You are receiving this mail because: You are on the CC list for the bug.=