mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rob Landley <rob@landley.net>
To: musl@lists.openwall.com
Cc: musl@lists.openwall.com
Subject: Re: scanf requirements not met?
Date: Sun, 21 Apr 2013 22:17:51 -0500	[thread overview]
Message-ID: <1366600671.18069.140@driftwood> (raw)
In-Reply-To: <20130420165120.GK20323@brightrain.aerifal.cx> (from dalias@aerifal.cx on Sat Apr 20 11:51:20 2013)

On 04/20/2013 11:51:20 AM, Rich Felker wrote:
> On Thu, Apr 04, 2013 at 09:52:55PM -0400, Rich Felker wrote:
> > Hi all,
> >
> > In consideration of adding the 'm' modifier for scanf and looking at
> > how it's supposed to handle malloc failure, I believe the current
> > implementation may be getting some things wrong. Seeing that it
> > defined malloc failure as a "conversion error":
> >
> >     If there is insufficient memory to allocate a buffer, the  
> function
> >     shall set errno to [ENOMEM] and a conversion error shall result.
> >
> > I noticed that this was not either of the "failures" defined for
> > scanf: input or matching. The text "conversion error" does not occur
> > elsewhere, but the ERRORS section does specify:
> >
> >     If any error occurs, EOF shall be returned, and errno shall be  
> set
> >     to indicate the error.
> 
> Searching again, I can no longer find the text "if any error" in the
> specification for scanf. It looks like TC1 has been applied to the
> html version of POSIX, and the text I had cited above, which conflicts
> with the requirements of ISO C, has been corrected such that an error
> return only happens if the error occurs before the first conversion.

Stomping the existing web copy of posix, without an obvious changelog,  
really doesn't fill me with happy thoughts.

I'm glad I downloed it before they did that. I'm not quite to the point  
of changing my links to point to the archive.org copy, but I do NOT  
understand why a 5 year gap does not merit susv7. (Posix 2008 was not  
posix 2001, so why is posix 2013 considered still posix 2008?)

Rob

  reply	other threads:[~2013-04-22  3:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-05  1:52 Rich Felker
2013-04-20 16:51 ` Rich Felker
2013-04-22  3:17   ` Rob Landley [this message]
2013-04-22  5:36     ` Isaac Dunham
2013-04-22  5:54       ` Szabolcs Nagy
2013-04-22 11:42         ` LM

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=1366600671.18069.140@driftwood \
    --to=rob@landley.net \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).