This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix $DB::sub in DB::goto for lexical subs
authorFather Chrysostomos <sprout@cpan.org>
Tue, 16 Sep 2014 21:49:03 +0000 (14:49 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 16 Sep 2014 22:51:05 +0000 (15:51 -0700)
commite0a18850467d4ef5eb9a7d577ae2474bbd348e46
treeccea5ec63cfc2c1aba436ded1705cffebce89fcc
parent53bf589c2bebd53656b4421b1347b21f130e6802
Fix $DB::sub in DB::goto for lexical subs

$ PERL5DB='sub DB::DB{}' ./perl -Ilib -XMfeature=:all -de '
    state sub f{};
    sub DB::goto { warn $DB::sub }
    $^P|=0x80;
    sub {goto &f}->()'
main::f at -e line 1.

There should not be a package name.  Lexical subs should be treated
like anonymous subs here; $DB::sub should contain a reference.

This bug was introduced recently, in ae77754ae.  Before that the
output was:

CODE(0x7fdbf102de58) at -e line 1.

Though before 9d8e4b9b3 it was:

Segmentation fault: 11
t/op/lexsub.t
util.c