[ruby-core:118067] [Ruby master Bug#20304] Memory leak when setting Encoding.default_internal
From:
"k0kubun (Takashi Kokubun) via ruby-core" <ruby-core@...>
Date:
2024-05-29 18:03:49 UTC
List:
ruby-core #118067
Issue #20304 has been updated by k0kubun (Takashi Kokubun).
Backport changed from 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: REQUIRED, 3.3: REQUIRED to 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: REQUIRED, 3.3: DONE
This seems to have been backported to ruby_3_3 at commit:a24802e8fd7.
----------------------------------------
Bug #20304: Memory leak when setting Encoding.default_internal
https://bugs.ruby-lang.org/issues/20304#change-108494
* Author: MaxLap (Maxime Lapointe)
* Status: Closed
* ruby -v: 3.3.0
* Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: REQUIRED, 3.3: DONE
----------------------------------------
Problem is present in Ruby 3.2.2, 3.2.3, 3.3.0. Didn't check before.
Put this in a file:
```
10.times do
100000.times do
Encoding.default_internal = nil
end
puts `ps -o rss= -p #{$$}`.to_i
end
```
Result:
```
$ ruby local.rb
27044
30212
33116
36284
39452
42620
45788
48956
51860
55028
```
--
https://bugs.ruby-lang.org/
______________________________________________
ruby-core mailing list -- ruby-core@ml.ruby-lang.org
To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org
ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/