General

Profile

peterzhu2118 (Peter Zhu)

  • Login: peterzhu2118
  • Email: peter@peterzhu.ca
  • Registered on: 08/01/2020
  • Last sign in: 11/18/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

11/18/2026

10:02 PM Ruby Revision a4beace1 (git): Fix buffer overflow in Thread with certain symbol procs
Passing send symbol proc into a Thread will cause a buffer overflow where
it will read past the VM stack.
For example, the following script crashes in ASAN:
p Thread.new(1, :to_s, &:send).value
Crashes with:
ERROR: AddressSan...
peterzhu2118 (Peter Zhu)
01:07 PM Ruby Revision 333e489b (git): Fix buffer overflow in Proc#== when no env
If an ifunc Proc doesn't have an env, then it can have a buffer overflow
read in Proc#==.
For example, the following script crashes under ASAN:
c = proc { |a, b| }.curry
p(c == c)
Crashes with:
ERROR: AddressSanitizer: he...
peterzhu2118 (Peter Zhu)
09:19 AM Ruby Revision ed3e747a (git): Fix TOCTOU in Array#pop when array frozen in to_int
If to_int is called in Array#pop and it freezes the array itself, then it
can cause a TOCTOU bug where the array gets modified after it has already
been frozen.
It can be reproduced with assertions enabled using the following code:
...
peterzhu2118 (Peter Zhu)

11/17/2026

02:28 AM Ruby Revision cd5a4468 (git): Fix overlapping memcpy in String#<< when chilled string modified
If the source string is modified in the chilled string warning in String#<<,
it's possible for overlapping memcpy to happen.
For example, the following script triggers an ASAN error:
Warning[:deprecated] = true
module Warning
...
peterzhu2118 (Peter Zhu)

11/16/2026

09:32 AM Ruby Revision 0507bf98 (git): Fix out-of-bounds for modified chilled string in String#append_as_bytes
If the source string is modified in the chilled string warning in
String#append_as_bytes, there could be an out-of-bounds access because
the length is never updated.
For example, the following code crashes:
Warning[:deprecated] = t...
peterzhu2118 (Peter Zhu)
02:16 AM Ruby Revision 0b60b0e4 (git): Fix buffer overflow in chilled string warning in String#setbyte
If the source string is modified in the chilled string warning in String#setbyte,
it will cause a buffer overflow because the string length is read before
the warning.
For example, the following code will output an error in ASAN:
W...
peterzhu2118 (Peter Zhu)
12:12 AM Ruby Revision 9b6ee561 (git): Fix use-after-free when string modified in warning
When the string is modified in the chilled string warning in rb_str_drop_bytes,
the old pointer and length may be invalid and can cause an use-after-free.
For example, the following script will print corrupted bytes:
Warning[:depre...
peterzhu2118 (Peter Zhu)

11/12/2026

06:58 PM Ruby Revision 84da5393 (git): Fix race condition in rb_str_tmp_frozen_no_embed_acquire
[Bug #22382]
rb_str_tmp_frozen_no_embed_acquire is not Ractor safe for the non-embedded
case because it modifies the orig string. This can cause a race condition
if multiple Ractors are executing the same code path for the same string.
...
peterzhu2118 (Peter Zhu)
06:58 PM Ruby Revision 7748f680 (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)
06:58 PM Ruby Revision c26506e8 (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.
(cherry pick...
peterzhu2118 (Peter Zhu)

Also available in: Atom