From 03712da7eb875b18879662079279241cd4fee2d0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 1 Feb 2021 05:42:42 +0000 Subject: [PATCH 1/2] sv.c: run Perl_op_dump before failing assertion The debugperl(1) binary packaged by Debian alerted me to an assertion in Perl_sv_clear failing at: assert(SvTYPE(sv) != (svtype)SVTYPEMASK); To get more information about what Perl code is executing, we can run Perl_op_dump on PL_op before triggering the assertion. --- sv.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sv.c b/sv.c index 07865bb..2c950e0 100644 --- a/sv.c +++ b/sv.c @@ -6510,6 +6510,9 @@ Perl_sv_clear(pTHX_ SV *const orig_sv) type = SvTYPE(sv); assert(SvREFCNT(sv) == 0); + if ((SvTYPE(sv) == (svtype)SVTYPEMASK)) { + Perl_op_dump(aTHX_ PL_op); + } assert(SvTYPE(sv) != (svtype)SVTYPEMASK); if (type <= SVt_IV) {