[Bug stdio/21735] New: open_memstream is not fflushed with fflush(0)
nszabolcs at gmail dot com
sourceware-bugzilla@sourceware.org
Fri Jul 7 14:57:00 GMT 2017
https://sourceware.org/bugzilla/show_bug.cgi?id=21735
Bug ID: 21735
Summary: open_memstream is not fflushed with fflush(0)
Product: glibc
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: stdio
Assignee: unassigned at sourceware dot org
Reporter: nszabolcs at gmail dot com
Target Milestone: ---
open_memstream is not exempt from the rule that fflush(0)
should fflush all open streams.
posix specifies the state of the buffer and size after
fflush on a stream opened by open_memstream and glibc
is not conform to it, e.g the following test fails:
#include <stdio.h>
int main()
{
char *buf = 0;
size_t n = 0;
FILE *f = open_memstream(&buf, &n);
putc('x', f);
fflush(0);
return n != 1;
}
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Glibc-bugs
mailing list