public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "joseph at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/113082] builtin transforms do not honor errno Date: Tue, 19 Dec 2023 19:22:59 +0000 [thread overview] Message-ID: <bug-113082-4-xVKQGdCbAH@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113082-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113082 --- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- I think it would be reasonable for glibc to require that audit modules don't change errno, at least when acting for libc function calls where glibc guarantees not changing errno. I think user-provided IFUNC resolvers are only relevant for user-provided functions and so shouldn't be relevant to this issue (if a user declares their own function with a noerrno attribute, and also has an IFUNC resolver for that function, they need to make sure the IFUNC resolver behaves consistently with the attribute). It would also seem reasonable for glibc to guarantee that most string and memory functions (maybe excluding a few that involve the locale or other external state, such as strcoll or strerror, and definitely excluding those such as strdup that involve memory allocation) don't change errno. We may need to be careful about what "obviously" shouldn't affect errno (consider e.g. the ongoing discussions around qsort - where avoiding memory allocation should as a side effect also avoid affecting errno, but it's unclear how we might simultaneously avoid memory allocation, keep a stable sort, achieve O(n log(n)) worst case performance, and keep good performance for typical inputs).
prev parent reply other threads:[~2023-12-19 19:23 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-12-19 8:05 [Bug middle-end/113082] New: " rguenth at gcc dot gnu.org 2023-12-19 8:08 ` [Bug middle-end/113082] " rguenth at gcc dot gnu.org 2023-12-19 8:13 ` fw at gcc dot gnu.org 2023-12-19 8:34 ` rguenther at suse dot de 2023-12-19 15:00 ` amonakov at gcc dot gnu.org 2023-12-19 19:22 ` joseph at codesourcery dot com [this message]
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-113082-4-xVKQGdCbAH@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.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).