The following code produces wrong output on the current master (720da57b): https://godbolt.org/z/x53n1KhcM. I tried g++-14, clang-16, clang-20. Linux current debian testing, glibc 2.40-3 (this happens on the current debian:testing docker image)
When the underlying FILE gets flushed, there's data from the existing buffer that gets printed again. E.g. the output is:
Hi
The following code produces wrong output on the current master (720da57b): https://godbolt.org/z/x53n1KhcM. I tried g++-14, clang-16, clang-20. Linux current debian testing, glibc 2.40-3 (this happens on the current debian:testing docker image)
When the underlying
FILE
gets flushed, there's data from the existing buffer that gets printed again. E.g. the output is:The problem disappears if I set
FMT_USE_FALLBACK_FILE
to 1.