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/25/2026

10:59 AM Ruby Revision 2c09f747 (git): Encode iseq node_id with LEB128
Node ids are small non-negative integers (-1 for synthetic instructions),
so a LEB128 stores them in 1-2 bytes instead of a 4-byte int.
On Shopify's monolith, this reduces the boot heap memsize by 40MB.
peterzhu2118 (Peter Zhu)
05:27 AM Ruby Bug #22467 (Closed): IO#readpartial can raise EFAULT during GC.compact in another thread
Applied in changeset commit:git|0b7838e23b8f9b01765dafd5e675da6113f5b566.
----------
Fix IO reading without GVL during GC compaction
[Bug #22467]
If we perform IO read without the GVL during GC compaction and the string
we are writing...
peterzhu2118 (Peter Zhu)
05:27 AM Ruby Revision 0b7838e2 (git): Fix IO reading without GVL during GC compaction
[Bug #22467]
If we perform IO read without the GVL during GC compaction and the string
we are writing to is embedded, then it can get mprotect'd by the read
barrier in the GC, which can cause the IO read operation to fail.
peterzhu2118 (Peter Zhu)
02:07 AM Ruby Revision 4cd0b82a (git): Store iseq node_id in a side array
The node id lived in each iseq_insn_info_entry, which prevented add_insn_info
from merging adjacent entries that only differ in node_id. Since most
neighboring instructions come from different AST nodes, this significantly
increases memo...
peterzhu2118 (Peter Zhu)

10/24/2026

11:27 AM Ruby Bug #22467: IO#readpartial can raise EFAULT during GC.compact in another thread
Thank you for the bug report, I have a fix here: https://github.com/ruby/ruby/pull/19515 peterzhu2118 (Peter Zhu)

10/19/2026

11:29 AM Ruby Revision 18ec10c7 (git): [ruby/mmtk] Increase LLVM inline-threshold to 5000
Compared to the default of 225, this gives noticeable performance
improvements.
For the following benchmark:
objs = []
2_000_000.times { objs << Object.new }
We can see this branch is about 10% faster:
Benchmark 1: branch...
peterzhu2118 (Peter Zhu)

10/18/2026

02:07 AM Ruby Revision af502c75 (git): [DOC] Fix indentation in packed_data.md
peterzhu2118 (Peter Zhu)

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)

Also available in: Atom