public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "roman.zilka at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug stdio/29917] New: getdelim/getline() fail to set ferror on some errors, violate POSIX
Date: Sun, 18 Dec 2022 22:50:30 +0000	[thread overview]
Message-ID: <bug-29917-131@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=29917

            Bug ID: 29917
           Summary: getdelim/getline() fail to set ferror on some errors,
                    violate POSIX
           Product: glibc
           Version: 2.36
            Status: UNCONFIRMED
          Keywords: std-posix
          Severity: normal
          Priority: P2
         Component: stdio
          Assignee: unassigned at sourceware dot org
          Reporter: roman.zilka at gmail dot com
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu
             Build: x86_64-pc-linux-gnu

POSIX-2017 requires that getdelim/getline() set the stream error indicator upon
error. For some of them glibc won't do that: EINVAL, possibly also ENOMEM and
EOVERFLOW (judging by the sourcecode). The usage example given in POSIX is
unsupported and the hint about feof() and ferror() in Application Usage doesn't
hold.

This is on x86_64 on my distro's 2.36 with libio/ioget{line,delim}.c identical
to those in git.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2022-12-18 22:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-18 22:50 roman.zilka at gmail dot com [this message]
2022-12-22 11:33 ` [Bug stdio/29917] " roman.zilka at gmail dot com
2022-12-23 14:44 ` jscott at posteo dot net
2024-04-23 15:32 ` carlos at redhat 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-29917-131@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: 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).