Actions
Bug #20933
closedUnexpected IO::Buffer::MaskError in IO::Buffer#xor!
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.4.0dev (2024-12-06T12:47:35Z master 78614ee900) +PRISM [x86_64-linux]
Description
The following script raises Mask overlaps source buffer! (IO::Buffer::MaskError)
most of the time when running it on my Ubuntu 24.04 machine.
"Most of the time" means this sometimes (20% - 30%) works without issue.
a = IO::Buffer.new(1024 * 1024)
b = IO::Buffer.new(1024 * 1024)
a = IO::Buffer.new(1024 * 1024) # Removing this line makes this work much more reliably
a.xor!(b)
I'm guessing this is somehow related to these being MAPPED
buffers - reducing the sizes to 1024 bytes also fixes the problem.
Actions
Like0
Like0Like0Like0