summaryrefslogtreecommitdiff
path: root/yjit/bindgen/src
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2024-04-29 13:07:14 -0400
committerPeter Zhu <[email protected]>2024-04-29 14:04:42 -0400
commite3bfd25bd2202a172d7709e9a2f7b65b523a132d (patch)
treeaf815cf7fe81d749d4ed30c615bd594adeea3581 /yjit/bindgen/src
parent95d036aaf07892f5b97ce744a42e8d541cad91ec (diff)
Fix memory leak of rb_ast_t in parser
ast_alloc uses TypedData_Make_Struct, which allocates a rb_ast_t. But it is overwritten when we set the DATA_PTR so the original memory is leaked. For example: 10.times do 100_000.times do eval("") end puts `ps -o rss= -p #{$$}` end Before: 17328 20752 23664 28400 30656 34224 37424 40784 43328 46656 After: 14320 14320 14320 14320 14320 14320 14320 14336 14336 14336
Diffstat (limited to 'yjit/bindgen/src')
0 files changed, 0 insertions, 0 deletions