This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pad.c: Fix GH Issue #19463, -DXv fails assert when dumping anonymous constant sub
authorYves Orton <demerphq@gmail.com>
Sun, 27 Feb 2022 02:20:42 +0000 (03:20 +0100)
committerKarl Williamson <khw@cpan.org>
Wed, 2 Mar 2022 15:46:28 +0000 (08:46 -0700)
commit277d63d68e5d13aa27dd5eaae7bfb37a7fe84b7a
treef8bde03d8a98bce052c235ddbec31567a463e601
parentba2557cc22570b32dcdc36c5ffd056559d5a4110
pad.c: Fix GH Issue #19463, -DXv fails assert when dumping anonymous constant sub

Anonymous constant subs were changed to be implemented internally as
XSUBs in 5.21.6, commit 1567c65ac069266bfe65959430c185babd476538.
This broke DEBUGGING perls running under -DXv which weren't taught
about the new implementation. In ed958fa3156084f3cf4d8c4768716d9e1a11ce91
strict.pm also was changed to use such subs, which then breaks many
uses of -DXv.

See t/run/switchDx.t for an example of code that would trigger this that
does not depend on strict.pm

This fixes the problem and adds a test for -Dx.
pad.c
t/run/switchDx.t