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
We have a test that handles reading values across 'seam's in the default 4k buffer size. We should add a more specific/explicit test that uses a custom buffer size.
Under the covers we create a bufio.Reader with a default (4096-byte) internal buffer. After reading 4 bytes of BVM and 511 x 8 byte integer values, there are 4 bytes remaining in that buffer, plus another 4 in the underlying stream. Pre-fix, we’d do a partial read of those four bytes as a (corrupt) 512th integer, then try to read the remaining four bytes as another value.
(Might be worth trying to add a more specific test with a custom Reader so it’s more obvious what’s going on, if the bufio.Reader doesn’t get in the way? This is the code I wrote to debug the issue and figured I might as well include :))
We have a test that handles reading values across 'seam's in the default 4k buffer size. We should add a more specific/explicit test that uses a custom buffer size.
The text was updated successfully, but these errors were encountered: