summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2024-02-06 10:20:55 -0500
committerPeter Zhu <peter@peterzhu.ca>2024-02-07 12:15:33 -0500
commitb2392c6be418703e8941226ac80b359188bf3c5d (patch)
tree5a986a29bb26732572f999c686e67b419f5659c5 /lib
parentf741b05d1f06a1d82e9cc6ccd722a06bb42c3347 (diff)
Fix memory leak when parsing invalid pattern matching
If the pattern matching is invalid, then the pvtbl would get leaked. For example: 10.times do 100_000.times do eval(<<~RUBY) case {a: 1} in {"a" => 1} end RUBY rescue SyntaxError end puts `ps -o rss= -p #{$$}` end Before: 28096 44768 61472 78512 94992 111504 128096 144528 161008 177472 After: 14096 14112 14112 14176 14208 14240 14240 14240 14240 14240
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions