General

Profile

peterzhu2118 (Peter Zhu)

  • Login: peterzhu2118
  • Email: peter@peterzhu.ca
  • Registered on: 08/01/2020
  • Last sign in: 09/25/2026

Issues

open closed Total
Assigned issues 2 31 33
Reported issues 1 80 81

Projects

Project Roles Registered on
Ruby Committer 03/24/2021

Activity

Today

12:54 AM Ruby Revision 5299d8d1 (git): Dump Hash AR/ST status in ObjectSpace.dump
peterzhu2118 (Peter Zhu)

09/25/2026

08:54 AM Ruby Revision 413145a2 (git): Fix crash in Array#pack when format string modified
If the format string is modified during Array#pack (by conversion such
as to_str, to_int, etc.), it can cause an use-after-free since reading
p[-1] may be an use-after-free. We should read that byte before performing
the conversion.
The...
peterzhu2118 (Peter Zhu)
04:36 AM Ruby Bug #22382: IO#write of a shareable String from multiple Ractors causes use-after-free
Thank you for this bug report. I have a [fix here](https://github.com/ruby/ruby/pull/19023). peterzhu2118 (Peter Zhu)

09/24/2026

11:06 PM Ruby Revision 21017bde (git): Fix race condition crash in IO::Buffer#set_string
For strings larger than or equal to IO_BUFFER_BLOCKING_SIZE (which is 1KB),
IO::Buffer#set_string will perform the memmove without GVL. In this time,
another thread can resize the IO::Buffer object. In that case, the buffer
may be freed ...
peterzhu2118 (Peter Zhu)
08:46 AM Ruby Revision 7d4b5ed5 (git): Fix use-after-free in Marshal.dump
When the string buffer reaches BUFSIZ (8192 bytes), Marshal.dump will call
the write method on the IO object. This IO object can run arbitrary Ruby
code. If the object is a string, it writes the length of the string followed
by the bytes...
peterzhu2118 (Peter Zhu)

09/23/2026

10:00 AM Ruby Revision 4a71c493 (git): [ruby/mmtk] Bump to Rust 2024 edition
https://github.com/ruby/mmtk/commit/2801d95aa4 peterzhu2118 (Peter Zhu)
05:53 AM Ruby Revision 852b2434 (git): Fix use-after-free in String#unpack
If the source string is modified in the block of String#unpack, it can
cause an use-after-free. For example, the following script crashes:
fmt = "A" * 1_000_000
str = "C" * 1_000_000
str.unpack(fmt) { fmt.clear }
peterzhu2118 (Peter Zhu)
12:36 AM Ruby Revision bb382ae5 (git): Fix use-after-free in Time.new when string modified
The precision in Time.new calls to_int which can modify the string passed
into Time.new. This can cause an use-after-free. For example, the following
script crashes:
str = "2000-01-01 00:00:00" + "0" * 1_000_000
obj = Object.new...
peterzhu2118 (Peter Zhu)

09/22/2026

07:03 AM Ruby Revision d41370ae (git): Fix crash in Dir#each/each_child/scan when closed
If the Dir object is closed in the block of Dir#each/each_child/scan, then
it will crash because dirp->dir will be a NULL pointer. The following
script demonstrates the crash:
d = Dir.open("/")
d.each { d.close }
peterzhu2118 (Peter Zhu)
03:10 AM Ruby Revision 1007084e (git): Fix out-of-bounds in Array#permutation when array modified
Calling to_int on the count may run Ruby code that modifies the array.
This can cause an out-of-bounds in Array#permutation. For example, the
following code crashes:
ary = (1..1_000).to_a
obj = Object.new
obj.define_singleto...
peterzhu2118 (Peter Zhu)

Also available in: Atom