Subject: | debugperl "panic: pad_sv po" |
When running on 5.20.3 -DDEBUGGING, even when using the fixed newSVOP_CUSTOM() from hax/perl-additions.c.inc, every unit test still fails with:
t/01method.t .................... 1/? panic: pad_sv po at lib/Object/Pad.xs line 597.
This puts it somewhere within the generated INITSLOTS method.
By using gdb + `break Perl_vcroak` (thanks ilmari for the hint), I get:
Breakpoint 1, Perl_vcroak (pat=0x55555576e538 "panic: pad_sv po", args=args@entry=0x7fffffffdd58) at util.c:1639
1639 SV *ex = with_queued_errors(pat ? vmess(pat, args) : mess_sv(ERRSV, 0));
(gdb) bt
#0 Perl_vcroak (pat=0x55555576e538 "panic: pad_sv po", args=args@entry=0x7fffffffdd58) at util.c:1639
#1 0x000055555562f7bc in Perl_croak (pat=pat@entry=0x55555576e538 "panic: pad_sv po") at util.c:1686
#2 0x00005555555f01e4 in Perl_pad_sv (po=0) at pad.c:1444
#3 0x00005555556adef0 in Perl_pp_push () at pp.c:5199
#4 0x000055555562db0a in Perl_runops_debug () at dump.c:2426
#5 0x00005555555a35dd in Perl_call_sv (sv=0x5555560464e8, flags=<optimized out>) at perl.c:2760
#6 0x00005555555a408c in Perl_call_method (methname=methname@entry=0x7ffff76112e8 "INITSLOTS", flags=flags@entry=1) at perl.c:2675
#7 0x00007ffff76077a8 in injected_constructor (cv=<optimized out>) at lib/Object/Pad.xs:880
#8 0x0000555555660ab4 in Perl_pp_entersub () at pp_hot.c:2794
#9 0x000055555562db0a in Perl_runops_debug () at dump.c:2426
#10 0x00005555555ace67 in S_run_body (oldscope=1) at perl.c:2460
#11 perl_run (my_perl=<optimized out>) at perl.c:2376
#12 0x0000555555581ff2 in main (argc=<optimized out>, argv=<optimized out>, env=<optimized out>) at perlmain.c:114
--
Paul Evans