
Issue #20521 has been updated by k0kubun (Takashi Kokubun). Backport changed from 3.1: DONTNEED, 3.2: DONTNEED, 3.3: REQUIRED to 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONE ruby_3_3 commit:23f4b78ad8844ec81cb02fad25a6247a2d498582 merged revision(s) 27321290. ---------------------------------------- Bug #20521: Memory leak in Ripper parsing https://bugs.ruby-lang.org/issues/20521#change-108802 * Author: kddnewton (Kevin Newton) * Status: Closed * Backport: 3.1: DONTNEED, 3.2: DONTNEED, 3.3: DONE ---------------------------------------- Currently, this code is leaking: ```ruby require "ripper" source = <<~'RUBY' <<-A; %w[j\ i A j] RUBY 10.times do 100_000.times do Ripper.sexp_raw(source) end puts `ps -o rss= -p #{$$}` end ``` This results in: ``` 31584 36304 41504 47008 51712 56384 61088 65792 70480 75200 ``` I haven't managed to track it down, but I can see that 3.2.2 does not leak but 3.3.0 does leak. -- https://bugs.ruby-lang.org/