Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "Attempt to free unreferenced scalar during global destruction"
Arguments to Perl 6 methods or callables are passed as array reference. We created the array, and created a reference to this array to pass it on to Perl 6 code. After the call we decreased the refcount of the array instead of this reference. The reference then got leaked and would be collected by perl during global deconstruction. The reference's dtor would then try to decrease the refcount of the array it was referencing which already was destroyed. This is what Perl was detecting and the source of the error. Fixed by decreasing the refcount of the reference instead of the array.
- Loading branch information