public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug stdio/18757] New: fmemopen fails to set errno on failure
@ 2015-08-01 18:29 msebor at redhat dot com
2015-08-02 19:44 ` [Bug stdio/18757] " ppluzhnikov at google dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: msebor at redhat dot com @ 2015-08-01 18:29 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18757
Bug ID: 18757
Summary: fmemopen fails to set errno on failure
Product: glibc
Version: 2.21
Status: NEW
Severity: normal
Priority: P2
Component: stdio
Assignee: unassigned at sourceware dot org
Reporter: msebor at redhat dot com
Target Milestone: ---
POSIX specifies that on failure, "fmemopen() shall return a null pointer and
errno shall be set to indicate the error." When linked against the top of
trunk, the following program abort indicating that the glibc implementation
fails to conform to this requirement (the function fails when passed an invalid
open mode but doesn't set errno).
#include <assert.h>
#include <errno.h>
#include <stdio.h>
int main (void)
{
char c = 0;
FILE *f = fmemopen (&c, 1, "?");
printf ("%p, errno = %m\n", f);
assert (f == 0 && errno == EINVAL);
return 0;
}
(nil), errno = Success
a.out: /build/tmp/t.c:10: main: Assertion `f == 0 && (*__errno_location ()) ==
22' failed.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug stdio/18757] fmemopen fails to set errno on failure
2015-08-01 18:29 [Bug stdio/18757] New: fmemopen fails to set errno on failure msebor at redhat dot com
@ 2015-08-02 19:44 ` ppluzhnikov at google dot com
2015-09-01 15:49 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: ppluzhnikov at google dot com @ 2015-08-02 19:44 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18757
Paul Pluzhnikov <ppluzhnikov at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppluzhnikov at google dot com
Assignee|unassigned at sourceware dot org |ppluzhnikov at google dot com
--- Comment #1 from Paul Pluzhnikov <ppluzhnikov at google dot com> ---
Confirmed. This one has been broken since at least glibc-2.3.6
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug stdio/18757] fmemopen fails to set errno on failure
2015-08-01 18:29 [Bug stdio/18757] New: fmemopen fails to set errno on failure msebor at redhat dot com
2015-08-02 19:44 ` [Bug stdio/18757] " ppluzhnikov at google dot com
@ 2015-09-01 15:49 ` cvs-commit at gcc dot gnu.org
2015-09-01 15:50 ` ppluzhnikov at google dot com
2015-10-29 16:39 ` jsm28 at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2015-09-01 15:49 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18757
--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 2d8e36e691f460aeeb3362fd44c71cafc7bb5852 (commit)
from 74589f738efd72e07f759a4aabd2e32613aaefb8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2d8e36e691f460aeeb3362fd44c71cafc7bb5852
commit 2d8e36e691f460aeeb3362fd44c71cafc7bb5852
Author: Paul Pluzhnikov <ppluzhnikov@google.com>
Date: Tue Sep 1 08:48:15 2015 -0700
Fix BZ #18757.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
NEWS | 5 +++--
libio/iofopncook.c | 1 +
libio/test-fmemopen.c | 21 +++++++++++++++++++++
4 files changed, 32 insertions(+), 2 deletions(-)
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug stdio/18757] fmemopen fails to set errno on failure
2015-08-01 18:29 [Bug stdio/18757] New: fmemopen fails to set errno on failure msebor at redhat dot com
2015-08-02 19:44 ` [Bug stdio/18757] " ppluzhnikov at google dot com
2015-09-01 15:49 ` cvs-commit at gcc dot gnu.org
@ 2015-09-01 15:50 ` ppluzhnikov at google dot com
2015-10-29 16:39 ` jsm28 at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: ppluzhnikov at google dot com @ 2015-09-01 15:50 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18757
Paul Pluzhnikov <ppluzhnikov at google dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Paul Pluzhnikov <ppluzhnikov at google dot com> ---
Fixed on trunk.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug stdio/18757] fmemopen fails to set errno on failure
2015-08-01 18:29 [Bug stdio/18757] New: fmemopen fails to set errno on failure msebor at redhat dot com
` (2 preceding siblings ...)
2015-09-01 15:50 ` ppluzhnikov at google dot com
@ 2015-10-29 16:39 ` jsm28 at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2015-10-29 16:39 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=18757
Joseph Myers <jsm28 at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |2.23
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-10-29 16:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-01 18:29 [Bug stdio/18757] New: fmemopen fails to set errno on failure msebor at redhat dot com
2015-08-02 19:44 ` [Bug stdio/18757] " ppluzhnikov at google dot com
2015-09-01 15:49 ` cvs-commit at gcc dot gnu.org
2015-09-01 15:50 ` ppluzhnikov at google dot com
2015-10-29 16:39 ` jsm28 at gcc dot gnu.org
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).