From: Xi Ruoyao <xry111@xry111.site>
To: Andreas Schwab <schwab@suse.de>, Jonny Grant <jg@jguk.org>
Cc: Paul Eggert <eggert@cs.ucla.edu>,
Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
GNU C Library <libc-alpha@sourceware.org>
Subject: Re: glibc misc/sys/cdefs.h nonull - typo in comment
Date: Mon, 30 Oct 2023 18:10:39 +0800 [thread overview]
Message-ID: <8eccb33c97d225c797cebf8d29f5370d7c5a8ae1.camel@xry111.site> (raw)
In-Reply-To: <mvmo7gg7a6k.fsf@suse.de>
On Mon, 2023-10-30 at 10:04 +0100, Andreas Schwab wrote:
> On Okt 29 2023, Jonny Grant wrote:
>
> > glibc does go beyond POSIX and set errno to EFAULT if a null pointer
> > constant is passed.
> > https://man7.org/linux/man-pages/man2/olduname.2.html
> >
> > Although I looked at glibc/posix/uname.c and it has EINVAL there,
> > couldn't spot where the EFAULT comes from, probably there is another
> > file.
>
> glibc never generates EFAULT on its own, it always comes from the
> kernel.
And POSIX is clear that people should not rely on EFAULT, at all:
[EFAULT]
Bad address. The system detected an invalid address in attempting to use
an argument of a call. The reliable detection of this error cannot be
guaranteed, and when not detected may result in the generation of a
signal, indicating an address violation, which is sent to the process.
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
next prev parent reply other threads:[~2023-10-30 10:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-11 9:09 Jonny Grant
2023-04-11 13:39 ` Adhemerval Zanella Netto
2023-04-12 15:56 ` Jonny Grant
2023-04-12 16:26 ` Xi Ruoyao
2023-04-12 16:31 ` Xi Ruoyao
2023-10-28 23:50 ` Jonny Grant
2023-10-29 5:24 ` Paul Eggert
2023-10-29 22:43 ` Jonny Grant
2023-10-30 9:04 ` Andreas Schwab
2023-10-30 10:10 ` Xi Ruoyao [this message]
2023-12-03 22:09 ` Jonny Grant
2023-11-01 7:38 ` Florian Weimer
2023-11-01 19:30 ` Paul Eggert
2023-11-01 19:52 ` Jonny Grant
2023-11-01 20:05 ` Florian Weimer
2023-11-01 20:16 ` Jonny Grant
2023-11-01 20:06 ` Florian Weimer
2023-04-12 17:28 ` Adhemerval Zanella Netto
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=8eccb33c97d225c797cebf8d29f5370d7c5a8ae1.camel@xry111.site \
--to=xry111@xry111.site \
--cc=adhemerval.zanella@linaro.org \
--cc=eggert@cs.ucla.edu \
--cc=jg@jguk.org \
--cc=libc-alpha@sourceware.org \
--cc=schwab@suse.de \
/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: link
Be 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).