public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "bruno at clisp dot org" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug libc/1890] strerror() unnecessarily non thread-safe Date: Tue, 12 Dec 2023 12:21:18 +0000 [thread overview] Message-ID: <bug-1890-131-rs82Ti8zzg@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-1890-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=1890 --- Comment #11 from Bruno Haible <bruno at clisp dot org> --- (In reply to Florian Weimer from comment #10) > This has been clarified in POSIX, and I believe C23. True, both POSIX <https://pubs.opengroup.org/onlinepubs/9699919799/functions/strerror.html> and ISO C 23 § 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 would argue the opposite way: If it appears less frequently, there are less chances that it gets caught through a test suite and thus gets eliminated from an application. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2023-12-12 12:21 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-1890-131@http.sourceware.org/bugzilla/> 2020-12-21 2:43 ` jscott at posteo dot net 2023-06-15 9:48 ` fweimer at redhat dot com 2023-06-15 9:50 ` fweimer at redhat dot com 2023-10-26 23:20 ` gabravier at gmail dot com 2023-11-01 1:59 ` bruno at clisp dot org 2023-12-12 11:40 ` fweimer at redhat dot com 2023-12-12 12:21 ` bruno at clisp dot org [this message] 2023-12-13 9:39 ` fweimer at redhat dot com 2005-11-19 15:15 [Bug libc/1890] New: " stefan dot puiu at gmail dot com 2005-11-22 18:13 ` [Bug libc/1890] " drepper at redhat dot com 2005-11-23 7:35 ` stefan dot puiu at gmail dot com 2005-11-23 8:31 ` drepper at redhat dot com 2005-11-23 9:15 ` stefan dot puiu at gmail dot com 2005-11-23 9:26 ` stefan dot puiu at gmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-1890-131-rs82Ti8zzg@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=glibc-bugs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).