public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug stdio/29917] New: getdelim/getline() fail to set ferror on some errors, violate POSIX
@ 2022-12-18 22:50 roman.zilka at gmail dot com
  2022-12-22 11:33 ` [Bug stdio/29917] " roman.zilka at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: roman.zilka at gmail dot com @ 2022-12-18 22:50 UTC (permalink / raw)
  To: glibc-bugs

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug stdio/29917] getdelim/getline() fail to set ferror on some errors, violate POSIX
  2022-12-18 22:50 [Bug stdio/29917] New: getdelim/getline() fail to set ferror on some errors, violate POSIX roman.zilka at gmail dot com
@ 2022-12-22 11:33 ` 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
  2 siblings, 0 replies; 4+ messages in thread
From: roman.zilka at gmail dot com @ 2022-12-22 11:33 UTC (permalink / raw)
  To: glibc-bugs

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

Roman Žilka <roman.zilka at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://austingroupbugs.net
                   |                            |/view.php?id=1624

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug stdio/29917] getdelim/getline() fail to set ferror on some errors, violate POSIX
  2022-12-18 22:50 [Bug stdio/29917] New: getdelim/getline() fail to set ferror on some errors, violate POSIX roman.zilka at gmail dot com
  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
  2 siblings, 0 replies; 4+ messages in thread
From: jscott at posteo dot net @ 2022-12-23 14:44 UTC (permalink / raw)
  To: glibc-bugs

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

John Scott <jscott at posteo dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jscott at posteo dot net

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug stdio/29917] getdelim/getline() fail to set ferror on some errors, violate POSIX
  2022-12-18 22:50 [Bug stdio/29917] New: getdelim/getline() fail to set ferror on some errors, violate POSIX roman.zilka at gmail dot com
  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
  2 siblings, 0 replies; 4+ messages in thread
From: carlos at redhat dot com @ 2024-04-23 15:32 UTC (permalink / raw)
  To: glibc-bugs

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

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.37
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
                 CC|                            |carlos at redhat dot com

--- Comment #1 from Carlos O'Donell <carlos at redhat dot com> ---
Fixed by this commit:

commit a09183aed7bb8ace211e042b2e6e982bcc004957
Author: Andreas Schwab <schwab@suse.de>
Date:   Mon Dec 19 12:40:45 2022 +0100

    getdelim: ensure error indicator is set on error (bug 29917)

    POSIX requires that getdelim and getline set the error indicator on the
    stream when an error occured, in addition to setting errno.

This is fixed in glibc 2.37.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-04-23 15:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-18 22:50 [Bug stdio/29917] New: getdelim/getline() fail to set ferror on some errors, violate POSIX roman.zilka at gmail dot com
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

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).