pad.c: Ensure SvTYPE(cvbody) == SVt_PVCV during destruction to keep asserts happy

This commit is contained in:
Paul "LeoNerd" Evans 2024-07-22 23:27:39 +01:00 committed by Paul Evans
parent 6483534c5e
commit 8e916e2da4

3
pad.c
View File

@ -306,6 +306,9 @@ Perl_cv_undef_flags(pTHX_ CV *cv, U32 flags)
CV cvbody;/*CV body will never be realloced inside this func,
so don't read it more than once, use fake CV so existing macros
will work, the indirection and CV head struct optimized away*/
#ifdef DEBUGGING
SvFLAGS(&cvbody) = SVt_PVCV;
#endif
SvANY(&cvbody) = SvANY(cv);
PERL_ARGS_ASSERT_CV_UNDEF_FLAGS;