Problem: Looping over a tuple with ":for" copies each item with copy_tv() but never clears the copy, leaking the value on every iteration (26MB over 100k iterations of a two-string tuple). Container items keep an extra reference forever, also defeating garbage collection.
Solution: Clear the copied typval on both return paths, like the string branch of next_for_item() already does.
Disclosure: Claude Fable 5 was used to assist with finding this bug. I reviewed this, but I am new to this codebase so forgive me if I am wrong about this problem. This fix was also verified with tests.
https://github.com/vim/vim/pull/20914
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Looking at other builds, that test appears to be flaky. Let me know if you think it is this PR causing it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()