This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
avoid adding two OP_HINTSEVAL ops
authorDavid Mitchell <davem@iabyn.com>
Tue, 1 Jul 2014 14:42:42 +0000 (15:42 +0100)
committerDavid Mitchell <davem@iabyn.com>
Tue, 8 Jul 2014 15:40:03 +0000 (16:40 +0100)
commit4b7846e40038113c0b72a90c67720dccf4f01ce2
treef6fc48890bd005e4056deb94ed4dad8a78292903
parent8ae26bff38c4139f5a2ef5b783a3e73d2419f177
avoid adding two OP_HINTSEVAL ops

Under argless eval (i.e. defaults to $_) in the presence of hints,
the perl core was recursively calling ck_eval, which had the side-effect
of attempting to append an OP_HINTSEVAL op twice. Formerly due to the way
the appending was done, the first OP_HINTSEVAL op was silently discarded;
after doing things "properly" with op_sibling_splice(), both ops ended up
being appended, and at run-time, the hints hash would be interpreted as
the SV to eval.

This wasn't tested in the core tests, and just ended up sometimes failing
warnings.t or Digest-SHA tests (but never on my system!)
op.c
t/op/eval.t