From: "agitter (Alexander Gitter) via ruby-core" Date: 2024-12-06T15:05:28+00:00 Subject: [ruby-core:120120] [Ruby master Bug#20933] Unexpected IO::Buffer::MaskError in IO::Buffer#xor! Issue #20933 has been reported by agitter (Alexander Gitter). ---------------------------------------- Bug #20933: Unexpected IO::Buffer::MaskError in IO::Buffer#xor! https://bugs.ruby-lang.org/issues/20933 * Author: agitter (Alexander Gitter) * Status: Open * ruby -v: ruby 3.4.0dev (2024-12-06T12:47:35Z master 78614ee900) +PRISM [x86_64-linux] * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- 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. ```ruby 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. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/