From: Vincent Pit Date: Thu, 1 Oct 2015 13:09:17 +0000 (-0300) Subject: Execute magic callbacks into separate stacks X-Git-Tag: rt107294^0 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=d9d2fa9ce2900e97a1f4756bf51a0b6c9bd56c18;hp=d9d2fa9ce2900e97a1f4756bf51a0b6c9bd56c18;p=perl%2Fmodules%2FVariable-Magic.git Execute magic callbacks into separate stacks When magic triggered, stack corruption could occur since the magic callback arguments were passed on the same stack as the ambient one. This issue has long gone unnoticed because most ops first unpack their stack arguments before processing magic, but also because this module is mostly used in practice to capture magic outside of the usual program op structure were the argument stack is relevant. This was made visible with core change 6442877a (publicized in perl 5.22.0) which caused get magic on transliterations to happen on the same C argument list as a PUSHmortal. This resulted in an undefined behaviour which was usually resolved by the magic being processed first (for example by gcc), but cl.exe on win32 prefers to execute the PUSHmortal first, hence the stack was corrupted. This fixes RT #107294. ---