General

Profile

hanazuki (Kasumi Hanazuki)

  • Login: hanazuki
  • Registered on: 11/21/2017
  • Last sign in: 02/16/2026

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 3 13 16

Activity

02/20/2026

01:57 AM Ruby Bug #21882 (Closed): IO::Buffer#locked leaves the buffer locked when the block raises
Applied in changeset commit:git|b5ccab2093c9bb19ae8564a935e6fd72ec7354cc.
----------
IO::Buffer#locked: Release lock even when the block raises (#16180)
IO::Buffer#locked: Release lock even when the block raises/breaks
Previously, `IO...
hanazuki (Kasumi Hanazuki)
01:56 AM Ruby Revision b5ccab20 (git): IO::Buffer#locked: Release lock even when the block raises (#16180)
IO::Buffer#locked: Release lock even when the block raises/breaks
Previously, `IO::Buffer#locked` leaks the lock when the block raises
an exception, or breaks.
Fixes: [Bug #21882]
hanazuki (Kasumi Hanazuki)

02/16/2026

06:07 AM Ruby Bug #21883 (Open): IO::Buffer can be unlocked and freed by another thread during syscall
```ruby
# Assume this file is on a very slow device such as NFS.
io = File.open('/mnt/slowfs/slow')
buf = IO::Buffer.new(100)
t1 = Thread.new do
buf.locked do
sleep 0.5
end
buf.free
end
t2 = Thread.new do
b...
hanazuki (Kasumi Hanazuki)
04:24 AM Ruby Bug #21882: IO::Buffer#locked leaves the buffer locked when the block raises
Thank you for your review, nobu. I added test cases for break and throw. hanazuki (Kasumi Hanazuki)

02/15/2026

04:44 PM Ruby Bug #21882: IO::Buffer#locked leaves the buffer locked when the block raises
Patch: https://github.com/ruby/ruby/pull/16180 hanazuki (Kasumi Hanazuki)
04:39 PM Ruby Bug #21882 (Closed): IO::Buffer#locked leaves the buffer locked when the block raises
`IO::Buffer#locked` should unlock the buffer even after the block raises an exception.
```ruby
buf = IO::Buffer.new(100)
buf.locked { fail } rescue nil
buf.locked { p :ok } # expected to print :ok, but actually raises a LockedErro...
hanazuki (Kasumi Hanazuki)

06/18/2025

06:39 AM Ruby Bug #21210: IO::Buffer gets invalidated on GC compaction
I think @alanwu means the mutable buffer path (IO::Buffer.for w/ block) uses rb_str_locktmp to pin the String's malloc'ed content memory (not RString), while the immutable buffer path (IO::Buffer.for w/o block) utilizes CoW to obtain a f... hanazuki (Kasumi Hanazuki)

06/17/2025

05:57 AM Ruby Bug #21210 (Closed): IO::Buffer gets invalidated on GC compaction
Applied in changeset commit:git|8aac19d5987150cf5c45fee73c7a949ca472f488.
----------
io_buffer: Reimplement dcompact for IO::Buffer
The `source` field in IO::Buffer can have a String or an IO::Buffer
object, if not nil.
- When the `so...
hanazuki (Kasumi Hanazuki)
05:57 AM Ruby Revision 4cc58c3a (git): Revert "Mark rb_io_buffer_type references declaratively"
This reverts commit 6012145299cfa4ab561360c78710c7f2941a7e9d. hanazuki (Kasumi Hanazuki)
05:57 AM Ruby Revision 8aac19d5 (git): io_buffer: Reimplement dcompact for IO::Buffer
The `source` field in IO::Buffer can have a String or an IO::Buffer
object, if not nil.
- When the `source` is a String object. The `base` field points to the
memory location of the String content, which can be embedded in
RSTRING, ...
hanazuki (Kasumi Hanazuki)

Also available in: Atom