Closed
Description
Here is a MWE:
julia> b = pushfirst!([0x02], 0x01)
2-element Vector{UInt8}:
0x01
0x02
julia> take!(IOBuffer(b))
5-element Vector{UInt8}:
0x01
0x02
0x69
0x73
0x69
julia> versioninfo()
Julia Version 1.12.0-DEV.347
Commit c0611e8c49c (2024-04-15 17:22 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 16 × AMD Ryzen 7 7800X3D 8-Core Processor
WORD_SIZE: 64
LLVM: libLLVM-16.0.6 (ORCJIT, znver4)
Threads: 1 default, 0 interactive, 1 GC (on 16 virtual cores)
I think the issue is
Line 461 in d8b9810
using
StringVector(io.size)
instead of StringVector(nbytes)
.
The pushfirst!
causes the IOBuffer
to have a nonzero offset
field (added in #53192) which makes nbytes
and io.size
different.
Metadata
Metadata
Assignees
Labels
No labels