This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #132683) don't try to convert PL_sv_placeholder into a CV
authorTony Cook <tony@develop-help.com>
Wed, 21 Feb 2018 05:24:08 +0000 (16:24 +1100)
committerTony Cook <tony@develop-help.com>
Thu, 30 Aug 2018 05:28:08 +0000 (15:28 +1000)
commit2460a4968c375f226973ba7e7e5fe6cf5a997ddb
tree5f0424d087348c4435062c9a03df83190f97bba5
parent0fe04e1dc741a43190e79a985fb0cec0493ebfe9
(perl #132683) don't try to convert PL_sv_placeholder into a CV

Constant folding sets PL_warnhook to PERL_WARNHOOK_FATAL, which is
&PL_sv_placeholder, an undef SV.

If warn() is called while constant folding, invoke_exception_hook()
attempts to use the value of a non-NULL PL_warnhook as a CV, which
caused an undefined value warning.

invoke_exception_hook() now treats a PL_warnhook of PERL_WARNHOOK_FATAL
the same as NULL, falling back to the normal warning handling which
throws an exception to abort constant folding.
t/lib/warnings/util
util.c