History log of /netbsd-src/tests/lib/libstdc++/t_sync_with_stdio.sh (Results 1 – 2 of 2)
Revision Date Author Comments
# c95d2b63 20-May-2024 riastradh <riastradh@NetBSD.org>

libstdc++: Don't try to fflush stdin.

It doesn't work. It's undefined behaviour. On NetBSD, it will fail
with EBADF, if fd 0 isn't open for write, or if fd 0 is open for
write, it will write heap

libstdc++: Don't try to fflush stdin.

It doesn't work. It's undefined behaviour. On NetBSD, it will fail
with EBADF, if fd 0 isn't open for write, or if fd 0 is open for
write, it will write heap garbage to fd 0.

If stream points to an output stream or an update stream in which
the most recent operation was not input, the fflush function causes
any unwritten data for that stream to be delivered to the host
environment to be written to the file; otherwise, the behavior is
undefined.

(ISO C11 and ISO C17, Sec. 7.21.5.2 `The fflush function')

PR lib/58206
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114879

show more ...


# 2a7fd239 28-Apr-2024 riastradh <riastradh@NetBSD.org>

libstdc++: Add test for PR lib/58206, sync_with_stdio busted.