public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Xi Ruoyao <xry111@xry111.site>
To: Alex Colomar <alx.manpages@gmail.com>, libc-alpha@sourceware.org
Cc: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>,
	Carlos O'Donell <carlos@redhat.com>
Subject: Re: [PATCH] libio: Add nonnull attribute for most FILE * arguments in stdio.h
Date: Fri, 19 May 2023 13:21:47 +0800	[thread overview]
Message-ID: <728611bb98d6a6fc868ba54609c140b9d280c76a.camel@xry111.site> (raw)
In-Reply-To: <528cf363cd06bc0055a4275eda4010ce67c4a4fa.camel@xry111.site>

On Fri, 2023-05-19 at 12:13 +0800, Xi Ruoyao wrote:
> On Thu, 2023-05-18 at 20:29 +0200, Alex Colomar wrote:
> > On 5/18/23 20:06, Alex Colomar wrote:
> > > Hi Xi!
> > > 
> > > On 5/18/23 19:25, Xi Ruoyao via Libc-alpha wrote:
> > > > During the review of a GCC analyzer test case, we found most stdio
> > > > functions accepting a FILE * argument expect it to be nonnull and
> > > > just
> > > > segfault when the argument is NULL.  Add nonnull attribute for
> > > > them.
> > > > 
> > > > setbuf is well defined when __stream is NULL so it's not touched.
> > 
> > Is this true?  I couldn't find anything about it in either setbuf(3),
> > setbuf(3POSIX), or info libc.
> > 
> > The buffer can be NULL, but the stream?
> 
> I guess when I took the note on the paper I misspelled "fflush" as
> "setbuf" for some reason (maybe lack of coffee :( ).
> 
> I'll retest all the changes in one hour or two hours.

I've sent v2 with the mistakes in fflush, fflush_unlocked, and setbuf
fixed.  Thanks for pointing out my mistake!

I guess I need to avoid creating a patch at 0100 AM in the future :).

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

  reply	other threads:[~2023-05-19  5:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-18 17:25 Xi Ruoyao
2023-05-18 18:06 ` Alex Colomar
2023-05-18 18:29   ` Alex Colomar
2023-05-19  4:13     ` Xi Ruoyao
2023-05-19  5:21       ` Xi Ruoyao [this message]
2023-05-19 12:40         ` Alejandro Colomar
2023-05-19 13:03           ` Xi Ruoyao
2023-05-19 13:07             ` Alejandro Colomar
2023-05-18 18:56   ` Alejandro Colomar

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=728611bb98d6a6fc868ba54609c140b9d280c76a.camel@xry111.site \
    --to=xry111@xry111.site \
    --cc=adhemerval.zanella@linaro.org \
    --cc=alx.manpages@gmail.com \
    --cc=carlos@redhat.com \
    --cc=libc-alpha@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: 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).