Subject: | Bug since 5.19.x due to stack moving changes. |
Date: | Tue, 6 Oct 2015 16:28:15 -0500 |
To: | bug-sub-attribute [...] rt.cpan.org |
From: | Michael Schout <mschout [...] gkg.net> |
Hi.
I have been hit by a bug in Sub::Attribute that started on the 5.19
branch due to the stack moving when it is reallocated. There is a
lengthy discussion of this issue here:
https://rt.perl.org/Public/Bug/Display.html?id=126145
The short summary though is that Sub::Attribute has this line in
Attribute.xs:
PL_stack_sp -= call_sv(method, G_VOID | G_EVAL);
The problem is that its possible that the stack gets grown or
reallocated during the call_sv() function, which causes PL_stat_sp to
get overwritten based on the OLD stack value, not the new/reallocated one.
The attached patch fixes this problem.
Thanks!
Regards,
Michael Schout
Message body is not shown because sender requested not to inline it.