Actions
Bug #21383
closedPrism leaks memory with invalid yield
Bug #21383:
Prism leaks memory with invalid yield
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
Description
Fix: https://github.com/ruby/ruby/pull/13464
The following script leaks memory:
10.times do
20_000.times do
eval("class C; yield; end")
rescue SyntaxError
end
puts `ps -o rss= -p #{$$}`
end
Before:
After:
Updated by peterzhu2118 (Peter Zhu) about 1 year ago
- Status changed from Open to Closed
Applied in changeset git|9f91f3617bab2ee220d298ddb874ef73b10dac23.
Fix memory leak with invalid yield in prism
[Bug #21383]
The following script leaks memory:
10.times do
20_000.times do
eval("class C; yield; end")
rescue SyntaxError
end
puts `ps -o rss= -p #{$$}`
end
Before:
After:
Updated by k0kubun (Takashi Kokubun) about 1 year ago
- Backport changed from 3.2: DONTNEED, 3.3: DONTNEED, 3.4: REQUIRED to 3.2: DONTNEED, 3.3: DONTNEED, 3.4: DONE
ruby_3_4 cdb039d3e4f76ee01744814e5f08395835fa8e63 merged revision(s) 9f91f3617bab2ee220d298ddb874ef73b10dac23.
Actions