You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I may have hit this bug when I attempted to use a Reader.Limited instance and then stream to a writer using streamRemaining. I ran it through a debugger and found that it just kept returning zero instead of error.EndOfStream, so it stayed in an endless loop attempting to stream more bytes and just reporting that it streamed zero bites every time after it had streamed up to its limit.
Here is what I did to work around it for the time being: skip using a Reader.Limited instance altogether and just use the streamExact function on the original reader instead. This may not work for all circumstances, but it was acceptable for mine.
Activity
eestrada commentedon Sep 5, 2025
I think I may have hit this bug when I attempted to use a
Reader.Limitedinstance and then stream to a writer usingstreamRemaining. I ran it through a debugger and found that it just kept returning zero instead oferror.EndOfStream, so it stayed in an endless loop attempting to stream more bytes and just reporting that it streamed zero bites every time after it had streamed up to its limit.Here is what I did to work around it for the time being: skip using a
Reader.Limitedinstance altogether and just use thestreamExactfunction on the original reader instead. This may not work for all circumstances, but it was acceptable for mine.This was for zig stable version 0.15.1
Revert "Fix infinite loop in Reader.Limited"
andrewrk commentedon Oct 7, 2025
Fix reverted in b824ca8
whatisaphone commentedon Oct 9, 2025
I ran OP's code after #25512 (on 529aa9f) and it no longer hangs. This can be closed!
andrewrk commentedon Oct 9, 2025
Thanks for checking!