zig/lib/std/Io
Ryan Liptak 21f9f378f1 Reader.defaultDiscard: Fix for use with an indirect reader
If a Reader implementation implements `stream` by ignoring the Writer, writing directly to its internal buffer, and returning 0, then `defaultDiscard` would not update `seek` and also return 0, which is incorrect and can cause `discardShort` to violate the contract of `VTable.discard` by calling into `vtable.discard` with a non-empty buffer.

This commit fixes the problem by advancing seek up to the limit after the stream call. This logic could likely be somewhat simplified in the future depending on how #25170 is resolved.
2025-11-21 22:34:55 -08:00
..
net std.Io.net: disable listen on a unix socket, send bytes, receive bytes on Windows 2025-11-19 21:51:57 +01:00
Reader Fix Reader.Limited end of stream conditions 2025-10-08 17:24:38 -07:00
Threaded std.Io.Threaded: slightly different semantics 2025-11-21 19:54:41 -08:00
Dir.zig std.Io: add dirMakePath and dirMakeOpenPath 2025-10-29 06:20:50 -07:00
File.zig Elf2: load archives 2025-10-29 18:07:12 -04:00
IoUring.zig std.Io: adjust concurrent error set 2025-10-29 06:20:51 -07:00
Kqueue.zig std.Io: fix Group.wait unsoundness 2025-10-29 06:20:52 -07:00
net.zig Io.net: set receive{,Timeout} message to init 2025-11-06 17:44:28 -08:00
Reader.zig Reader.defaultDiscard: Fix for use with an indirect reader 2025-11-21 22:34:55 -08:00
test.zig Io.Queue: fix empty and full states being indistinguishable. 2025-11-04 04:24:32 -05:00
Threaded.zig std.Io.Threaded: forward cancellation requests to awaited tasks 2025-11-21 19:54:41 -08:00
tty.zig std.Build: don't force all children to inherit color option 2025-11-14 21:50:24 +01:00
Writer.zig Merge pull request #25981 from mlugg/macos-fuzz-2 2025-11-20 17:48:35 +00:00