[ruby-core:114379] [Ruby master Bug#19836] Parser leaks memory for incomplete lambdas

Issue #19836 has been reported by peterzhu2118 (Peter Zhu). ---------------------------------------- Bug #19836: Parser leaks memory for incomplete lambdas https://bugs.ruby-lang.org/issues/19836 * Author: peterzhu2118 (Peter Zhu) * Status: Open * Priority: Normal * Backport: 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED ---------------------------------------- GitHub Pull Request: https://github.com/ruby/ruby/pull/8192 The parser does not free the chain of `struct vtable`, which causes memory leaks. The following script reproduces this issue: ```ruby 10.times do 100_000.times do Ripper.parse("-> {") end puts `ps -o rss= -p #{$$}` end ``` -- https://bugs.ruby-lang.org/

Issue #19836 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED to 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONE ruby_3_2 0c908fa681271f13750aa64420203f1a58fa03fe merged revision(s) 0b8f15575a440f85ac686f5b0eae8f8b7c2b72e7. ---------------------------------------- Bug #19836: Parser leaks memory for incomplete lambdas https://bugs.ruby-lang.org/issues/19836#change-104135 * Author: peterzhu2118 (Peter Zhu) * Status: Closed * Priority: Normal * Backport: 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONE ---------------------------------------- GitHub Pull Request: https://github.com/ruby/ruby/pull/8192 The parser does not free the chain of `struct vtable`, which causes memory leaks. The following script reproduces this issue: ```ruby 10.times do 100_000.times do Ripper.parse("-> {") end puts `ps -o rss= -p #{$$}` end ``` -- https://bugs.ruby-lang.org/
participants (2)
-
nagachika (Tomoyuki Chikanaga)
-
peterzhu2118 (Peter Zhu)