General

Profile

peterzhu2118 (Peter Zhu)

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

Issues

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

Projects

Project Roles Registered on
Ruby Committer 03/24/2021

Activity

Today

04:42 AM Ruby Revision de413a17 (git): Fix stale cvar cache after remove_class_variable
remove_class_variable does not increment the ruby_vm_global_cvar_state
which can cause a stale cvar cache. The following code crashes:
class C
@@a = 1
def a = @@a
end
C.new.a # warm cache
C.remove_class_varia...
peterzhu2118 (Peter Zhu)

11/23/2026

12:17 PM Ruby Revision 11d985f1 (git): Check frozen in Set#initialize and Set#initialize_copy
Set#initialize and Set#initialize_copy does not check the frozen status
of the set which can modify a frozen set.
peterzhu2118 (Peter Zhu)
05:18 AM Ruby Revision 87e70777 (git): Fix memory leak in String#each_grapheme_cluster
If the block raises or breaks in String#each_grapheme_cluster, then the
compiled regexp can leak memory because it is never freed.
For example, the following code leaks memory:
s = "abc".encode("UTF-16LE")
10.times do
10_...
peterzhu2118 (Peter Zhu)
12:52 AM Ruby Revision a76ddf54 (git): Check if orig modified in rb_str_tmp_frozen_release
The string orig could have been modified by the time rb_str_tmp_frozen_release
is called which would incorrectly modify orig. This can cause crashes.
Each of the tests in this commit demonstrates a crash from users of
rb_str_tmp_frozen_r...
peterzhu2118 (Peter Zhu)

11/22/2026

12:54 PM Ruby Bug #21203 (Closed): TestGc#test_gc_parameter_init_slots is flaky results
peterzhu2118 (Peter Zhu)
01:08 AM Ruby Revision 297f4b25 (git): Fix use-after-free in Array#sort! when tmp shared
Array#sort! makes ary shared and tmp the shared root. The assumption is
that tmp is never referred to by any object other than ary. However, if
ary is sliced, than another array would also refer to tmp. This can cause
an use-after-free w...
peterzhu2118 (Peter Zhu)

11/20/2026

03:45 AM Ruby Revision 88e0be34 (git): Fix missing write-barrier in Array#sort!
Since ary takes over tmp's buffer in Array#sort!, it ary needs to be remembered
otherwise if ary is old and tmp is young, then the objects in tmp can get
garbage collected in the next GC cycle.
The following script reproduces the issue:...
peterzhu2118 (Peter Zhu)
12:39 AM Ruby Revision 966eaa89 (git): Fix negative character length in String#tr
If the receiving string is modified during the to_str call on the hash keys
and values, then it could cache stale encoding and coderange, which could
give negative character lengths.
For example, the following code reproduces the issue:...
peterzhu2118 (Peter Zhu)

11/19/2026

11:57 PM Ruby Revision df9e4249 (git): Consistently use unsigned int for param and local size
iseq param_size and local_size are all unsigned ints, so we should use
unsigned int consistently.
peterzhu2118 (Peter Zhu)
01:09 PM Ruby Revision 1e71e987 (git): Add TEST_BUNDLED_GEMS_ALLOW_FAILURES for Windows CI
Also skips failing test repl_type_completor like in 2979ed4. peterzhu2118 (Peter Zhu)

Also available in: Atom