This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mess_sv(): access only if PL_curcop is non-null
authorDavid Mitchell <davem@iabyn.com>
Mon, 23 Jan 2017 13:37:21 +0000 (13:37 +0000)
committerDavid Mitchell <davem@iabyn.com>
Mon, 23 Jan 2017 13:52:36 +0000 (13:52 +0000)
commitf4c617746504f38fcb281a2b1c1da9426d8eab01
tree687bbb30caee414fa281d3c0d247e4e882312126
parentb1a69a65ecd83426da7ca1af26b757fe0da58007
mess_sv(): access only if PL_curcop is non-null

RT #130621

In Perl_mess_sv(), don't try to add an "at foo line NN" to the error
message if PL_curcop is null.

In the ticket above, the reason that PL_curcop is null is the less
than optimal way that evals free their optree: ideally the optree should
be attached to the eval CV and freed when the CV is; instead a separate
SAVEFREEOP() is done. But that fix is for another time; regardless,
mess_sv() should have a PL_curcop != NULL guard anyway.
util.c