[perl #70614] Seg. fault with eval/use/UNITCHECK/DESTROY/eval combination
authorFather Chrysostomos <sprout@cpan.org>
Thu, 23 Sep 2010 06:47:11 +0000 (23:47 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 23 Sep 2010 06:47:11 +0000 (23:47 -0700)
commit8ed49485fa2d8dfdc87e0a7a269aa210d3e6da83
tree70cac99691453f7a15305dea8f65a6fde679b037
parent3c5d942fb372701fbc63076211d0fa17b8c2b6a2
[perl #70614] Seg. fault with eval/use/UNITCHECK/DESTROY/eval combination

This case can be reduced to:
eval "UNITCHECK{ eval 0 }"

(eval 0 triggers the bug more reliably than eval ''.)

The inner eval clobbers PL_eval_start, so when the UNITCHECK finishes,
the outer eval tries to call the inner eval’s code, which has been
freed already.

This commit saves PL_eval_start and restores it after UNITCHECK.
pp_ctl.c
t/op/blocks.t