peterzhu2118 (Peter Zhu)
- Login: peterzhu2118
- Email: peter@peterzhu.ca
- Registered on: 08/01/2020
- Last sign in: 11/01/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
Today
-
02:47 PM Ruby Revision 390d77ba (git): Fix memory leak in String#encode when StringValue raises
- The following script leaks memory:
10.times do
100_000.times do
"\ufffd".encode(Encoding::US_ASCII, fallback: proc { Object.new })
rescue
end
puts `ps -o rss= -p #{$$}`
end
Before:
450244
...
10/31/2025
-
12:13 AM Ruby Revision a4c33615 (git): [ruby/mmtk] Bump mmtk-core
- https://github.com/ruby/mmtk/commit/9876d8f0a1
10/30/2025
-
12:18 AM Ruby Revision b8c82a99 (git): Fix memory leak in String#encode when fallback too big
- The following script leaks memory:
10.times do
100_000.times do
"\ufffd".encode(Encoding::US_ASCII, fallback: proc { "\uffee" })
rescue
end
puts `ps -o rss= -p #{$$}`
end
Before:
451196
...
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.
-
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.
10/26/2025
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...
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...
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... -
12:21 AM Ruby Revision f46ebed2 (git): Fix memory leak of darray in loaded_features_index