* [ruby-core:120120] [Ruby master Bug#20933] Unexpected IO::Buffer::MaskError in IO::Buffer#xor!
@ 2024-12-06 15:05 agitter (Alexander Gitter) via ruby-core
2024-12-06 20:11 ` [ruby-core:120123] " peterzhu2118 (Peter Zhu) via ruby-core
2024-12-07 8:47 ` [ruby-core:120127] " agitter (Alexander Gitter) via ruby-core
0 siblings, 2 replies; 3+ messages in thread
From: agitter (Alexander Gitter) via ruby-core @ 2024-12-06 15:05 UTC (permalink / raw)
To: ruby-core; +Cc: agitter (Alexander Gitter)
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:120123] [Ruby master Bug#20933] Unexpected IO::Buffer::MaskError in IO::Buffer#xor!
2024-12-06 15:05 [ruby-core:120120] [Ruby master Bug#20933] Unexpected IO::Buffer::MaskError in IO::Buffer#xor! agitter (Alexander Gitter) via ruby-core
@ 2024-12-06 20:11 ` peterzhu2118 (Peter Zhu) via ruby-core
2024-12-07 8:47 ` [ruby-core:120127] " agitter (Alexander Gitter) via ruby-core
1 sibling, 0 replies; 3+ messages in thread
From: peterzhu2118 (Peter Zhu) via ruby-core @ 2024-12-06 20:11 UTC (permalink / raw)
To: ruby-core; +Cc: peterzhu2118 (Peter Zhu)
Issue #20933 has been updated by peterzhu2118 (Peter Zhu).
Thank you for this bug report. I have a fix here: https://github.com/ruby/ruby/pull/12284
----------------------------------------
Bug #20933: Unexpected IO::Buffer::MaskError in IO::Buffer#xor!
https://bugs.ruby-lang.org/issues/20933#change-110874
* 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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [ruby-core:120127] [Ruby master Bug#20933] Unexpected IO::Buffer::MaskError in IO::Buffer#xor!
2024-12-06 15:05 [ruby-core:120120] [Ruby master Bug#20933] Unexpected IO::Buffer::MaskError in IO::Buffer#xor! agitter (Alexander Gitter) via ruby-core
2024-12-06 20:11 ` [ruby-core:120123] " peterzhu2118 (Peter Zhu) via ruby-core
@ 2024-12-07 8:47 ` agitter (Alexander Gitter) via ruby-core
1 sibling, 0 replies; 3+ messages in thread
From: agitter (Alexander Gitter) via ruby-core @ 2024-12-07 8:47 UTC (permalink / raw)
To: ruby-core; +Cc: agitter (Alexander Gitter)
Issue #20933 has been updated by agitter (Alexander Gitter).
I just gave your branch a quick test and can confirm it fixes this issue. Thank you!
----------------------------------------
Bug #20933: Unexpected IO::Buffer::MaskError in IO::Buffer#xor!
https://bugs.ruby-lang.org/issues/20933#change-110878
* 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/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-12-07 8:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-06 15:05 [ruby-core:120120] [Ruby master Bug#20933] Unexpected IO::Buffer::MaskError in IO::Buffer#xor! agitter (Alexander Gitter) via ruby-core
2024-12-06 20:11 ` [ruby-core:120123] " peterzhu2118 (Peter Zhu) via ruby-core
2024-12-07 8:47 ` [ruby-core:120127] " agitter (Alexander Gitter) via ruby-core
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).