pp_hot.c:pp_aassign: mortalise variable only if we have to
authorFather Chrysostomos <sprout@cpan.org>
Mon, 10 Dec 2012 13:43:41 +0000 (05:43 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 11 Dec 2012 16:59:42 +0000 (08:59 -0800)
commit632b9d6f6a19a87ee168ebb81494b7df13c2eeb0
tree3e38ee3efe01d8efd0a51d300aea8deb646ed1f3
parent88e2091baeacd9a40eab4dac8601e88b3797e385
pp_hot.c:pp_aassign: mortalise variable only if we have to

This affects the hash-assignment path.

Don’t mortalise the value to protect it from a magical key making the
hv_store_ent call die, as that could unduly extend the mortals stack.

Instead, copy the key if it is magical.

Based on a patch by Ruslan Zakirov.
pp_hot.c