Project

General

Profile

Actions

Bug #20304

closed

Memory leak when setting Encoding.default_internal

Added by MaxLap (Maxime Lapointe) 10 months ago. Updated 5 months ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:116950]

Description

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

Updated by peterzhu2118 (Peter Zhu) 10 months ago

  • Status changed from Open to Closed
  • Backport changed from 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN to 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: REQUIRED, 3.3: REQUIRED

Updated by MaxLap (Maxime Lapointe) 10 months ago

Ah, thank you! I would have expected that to be in 3.3-head too.

Updated by k0kubun (Takashi Kokubun) 7 months ago

  • 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 a24802e8fd7.

Updated by nagachika (Tomoyuki Chikanaga) 5 months ago

  • Backport changed from 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: REQUIRED, 3.3: DONE to 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: DONE, 3.3: DONE
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0