General

Profile

peterzhu2118 (Peter Zhu)

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

Issues

open closed Total
Assigned issues 1 32 33
Reported issues 1 80 81

Projects

Project Roles Registered on
Ruby Committer 03/24/2021

Activity

10/15/2026

03:45 AM Ruby Bug #22436 (Closed): Array#zip with a method_missing-based argument leaks a stale block handler (segfault when the next C-called method yields)
Applied in changeset commit:git|054385feb134d19b2130238a76004c204f96293b.
----------
Fix ifunc block handler leak from method_missing
[Bug #22436]
The check_funcall_exec function incorrectly restored the pending block
handler which ca...
peterzhu2118 (Peter Zhu)
03:44 AM Ruby Revision 054385fe (git): Fix ifunc block handler leak from method_missing
[Bug #22436]
The check_funcall_exec function incorrectly restored the pending block
handler which causes it to leak.
For example, the following code crashes:
o = Object.new
def o.method_missing(*) = nil # Array#zip calls o.e...
peterzhu2118 (Peter Zhu)

10/14/2026

11:01 AM Ruby Bug #22436: Array#zip with a method_missing-based argument leaks a stale block handler (segfault when the next C-called method yields)
Thank you for the bug report, I have a fix here: https://github.com/ruby/ruby/pull/19337 peterzhu2118 (Peter Zhu)

10/13/2026

11:27 AM Ruby Revision 47dddf78 (git): [ruby/mmtk] Directly call functions in C binding
This commit removes RubyUpcalls and instead directly calls functions in
the C binding from Rust. This also allows LTO to inline C calls from Rust.
https://github.com/ruby/mmtk/commit/0f5a049a2d
peterzhu2118 (Peter Zhu)
04:14 AM Ruby Revision 83fdd0da (git): [ruby/mmtk] Build with LTO when able
https://github.com/ruby/mmtk/commit/2dbb8005aa peterzhu2118 (Peter Zhu)

10/12/2026

09:45 AM Ruby Revision 9e8bf735 (git): [ruby/mmtk] Resize objects to optimal size when moving
https://github.com/ruby/mmtk/commit/6d83b67d9a peterzhu2118 (Peter Zhu)

10/10/2026

02:00 PM Ruby Revision 11f5412c (git): Fix crash in IO#close for uninitialized IO object
IO#reopen can make an uninitialized IO object look initialized, which can
trigger a crash when IO#close is called.
For example, the following code crashes:
io = IO.allocate
begin
io.reopen("")
rescue SystemCallError
...
peterzhu2118 (Peter Zhu)

10/09/2026

11:07 PM Ruby Revision 738b4971 (git): Fix buffer overflow in Array#values_at
Array#values_at can execute arbitrary code during execution which may
modify the source array. This can cause a buffer overflow if the new length
of the array has decreased. The following script crashes:
a = (0..100_000).to_a
ob...
peterzhu2118 (Peter Zhu)
11:06 PM Ruby Revision 117b6497 (git): Fix use-after-free in String#encode when string modified
[Bug #22330]
The following script demonstrates a use-afer-free where we see corruption:
s = "あ" * 10_000
s.encode("US-ASCII", fallback: proc { |c| s.clear; "?" })
Raises may different errors such as:
"\xCB" followed by "\...
peterzhu2118 (Peter Zhu)
11:06 PM Ruby Revision 8b1a1084 (git): [Bug #22336] Fix use-after-free in `IO::Buffer#get_string`. (#18919)
peterzhu2118 (Peter Zhu)

Also available in: Atom