This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[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.