General

Profile

peterzhu2118 (Peter Zhu)

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

Issues

open closed Total
Assigned issues 1 30 31
Reported issues 3 76 79

Projects

Project Roles Registered on
Ruby Committer 03/24/2021

Activity

10/28/2025

11:40 PM Ruby Revision 4925bec6 (git): Fix TestString#test_encode_fallback_raise_memory_leak
The method and aref cases need to accept a parameter. peterzhu2118 (Peter Zhu)
11:40 PM Ruby Revision 9f4a76ff (git): Add a custom error class to TestString#test_encode_fallback_raise_memory_leak
This prevents a generic RuntimeError from being raised so we can ensure
that the correct error is being rescued.
peterzhu2118 (Peter Zhu)

10/26/2025

07:27 PM Ruby Revision b66fbd59 (git): Make rb_vm_ccs_invalidate_and_free static
peterzhu2118 (Peter Zhu)

10/24/2025

10:34 PM Ruby Revision cb302881 (git): Fix memory leak of transcoding when fallback raises
When the fallback function in transcode_loop raises, it will leak the memory
in rb_econv_t. The following script reproduces the leak:
10.times do
100_000.times do
"\ufffd".encode(Encoding::US_ASCII, fallback: proc { ra...
peterzhu2118 (Peter Zhu)

10/23/2025

04:54 PM Ruby Revision b3fb91f4 (git): Make Namespace::Root TypedData inherit from Namespace::Entry
The two types of TypedData objects should be treated the same except for
the free function. Since Namespace::Root did not inherit from Namespace::Entry,
all the TypedData_Get_Struct calls for Namespace::Root would raise
"wrong argument t...
peterzhu2118 (Peter Zhu)

10/22/2025

11:36 PM Ruby Revision da4bd3b3 (git): Fix memory leak when RUBYOPT is invalid
When RUBYOPT is invalid, it raises an error which causes moreswitches
to leak memory. It can be seen when building with LSAN enabled:
$ RUBY_FREE_AT_EXIT=1 RUBYOPT=f ruby
ruby: invalid option -f (-h will show valid options) (Ru...
peterzhu2118 (Peter Zhu)
12:21 AM Ruby Revision f46ebed2 (git): Fix memory leak of darray in loaded_features_index
peterzhu2118 (Peter Zhu)

10/21/2025

10:42 PM Ruby Revision cd42096f (git): Move rb_class_classext_free to class.c
peterzhu2118 (Peter Zhu)
10:42 PM Ruby Revision 4a23b6a8 (git): Fix memory leak in RCLASS_SET_NAMESPACE_CLASSEXT
The st_insert in RCLASS_SET_NAMESPACE_CLASSEXT may overwrite an existing
rb_classext_t, causing it to leak memory. This commit changes it to use
st_update to free the existing one before overwriting it.
peterzhu2118 (Peter Zhu)

10/20/2025

11:39 PM Ruby Misc #21646: Propose Luke Gruber as a Ruby committer
+1 Luke has been doing great work and is really knowledgeable in Ractors peterzhu2118 (Peter Zhu)

Also available in: Atom