diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2023-08-09 11:03:13 -0400 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2023-08-09 14:06:58 -0400 |
| commit | 5bc8fceca8d47ed1ef9c603c6531a408de36b60c (patch) | |
| tree | e0369c5b3b2edbccc5c656241ca885b01e149109 /test/ruby | |
| parent | d3efce69eaabf1ff81bcdf3631350a87ac0dda28 (diff) | |
Fix memory leak in parser for incomplete tokens
[Bug #19835]
The parser does not free the `tbl` of the `struct vtable` when there are
leftover `lvtbl` in the parser. This causes a memory leak.
The following script reproduces this issue:
```
10.times do
100_000.times do
Ripper.parse("class Foo")
end
puts `ps -o rss= -p #{$$}`
end
```
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/8192
Diffstat (limited to 'test/ruby')
0 files changed, 0 insertions, 0 deletions
