This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/394] wierd I/O-error handling in libio
- From: "peak at argo dot troja dot mff dot cuni dot cz" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 7 Oct 2004 21:07:45 -0000
- Subject: [Bug libc/394] wierd I/O-error handling in libio
- References: <20040920221040.394.peak@argo.troja.mff.cuni.cz>
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
------- Additional Comments From peak at argo dot troja dot mff dot cuni dot cz 2004-10-07 21:07 -------
Created an attachment (id=223)
--> (http://sources.redhat.com/bugzilla/attachment.cgi?id=223&action=view)
fmemopen() testcase
This programs creates a memory stream with a buffer 10 chars long and checks
what happens when too much data are written to it.
Case 1: 100 successful putc's, fflush after putc #100 fails, ferror not set
$ ./ts
fflush #100 failed: no err
final status: no err
INCORRECT (error detected by fflush but ferror not set)
Case 2: 100 successful putc's, no fflush, ferror not set, fclose fails
$ ./ts 100 100
final status: no err
fclose failed
CORRECT (error detected during implicit fflush in fclose)
Case 3: lots of putc's, no fflush, putc #8193 fails, ferror not set--WRONG
$ ./ts 100000 100000
putc #8193 failed: no err
final status: no err
INCORRECT (error detected by putc #8193 but ferror not set)
Any stream implemented using fopencookie() and using the documented way
(libc.info: Hook Functions) to report errors from cookie functions (return -1)
would exhibit similar errors.
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=394
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.