From: Nicholas Clark Date: Sun, 1 May 2005 22:16:16 +0000 (+0000) Subject: Explode if anyone attempts to sv_upgrade PL_mess_sv. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0ec50a73a7a3c090cf7ebd194989882969e47823;p=p5sagit%2Fp5-mst-13.2.git Explode if anyone attempts to sv_upgrade PL_mess_sv. Should this be a panic: ? p4raw-id: //depot/perl@24357 --- diff --git a/sv.c b/sv.c index 2c598f7..f9858e8 100644 --- a/sv.c +++ b/sv.c @@ -1849,6 +1849,10 @@ Perl_sv_upgrade(pTHX_ register SV *sv, U32 mt) del_XPVNV(SvANY(sv)); break; case SVt_PVMG: + /* Because the XPVMG of PL_mess_sv isn't allocated from the arena, + there's no way that it can be safely upgraded, because perl.c + expects to Safefree(SvANY(PL_mess_sv)) */ + assert(sv != PL_mess_sv); pv = SvPVX(sv); cur = SvCUR(sv); len = SvLEN(sv);