Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix for [perl #41138] $_ leaks under threads
It's possible for an interpreter to get cloned with an SV copied that ends up only linked from @_. For example, local $x causes a link to the original $x SV to be added to the save stack, but when cloning a thread the save stack isn't copied. If the old $x was also in someone's @_, then it gets copied, but because @_'s elements aren't normally reference counted, old $x ends up with a refcount of zero, and you get a "leaked" warning when the thread exits. The workaround is to reify any reify-able AVs in the cloned interpreter during cloning. Also fixes [perl #70602], [perl #70974]
- Loading branch information