iostreams
iostreams copied to clipboard
file_descriptor_impl::write() fails silently on Windows for writes of lengths that don't fit in a DWORD
https://github.com/boostorg/iostreams/blob/29a831798ec6337848d1f2e8595b59e5503e4f21/src/file_descriptor.cpp#L301
that static cast overflows when n doesn't fit in a DWORD, but then the un-overflowed value is returned. pass it 5GB to write and it'll write 1GB and cheerfully tell the caller it wrote the whole 5GB.
If you write a test for it, I'll fix it. ;-)
throw_system_failure("failed writing");
Well, he wrote the test... :)