From: Nicholas Clark Date: Thu, 1 Mar 2007 17:46:49 +0000 (+0000) Subject: The bug fixed by change 29610 would have been avoided with this X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bf11fd37daadd699e7214d2f9150186bcfa8441f;p=p5sagit%2Fp5-mst-13.2.git The bug fixed by change 29610 would have been avoided with this assertion - ensure that the hek argument to Perl_unshare_hek() is not NULL, because if it is, then S_unshare_hek_or_pvn() will merrily unshare the string "" instead. p4raw-id: //depot/perl@30440 --- diff --git a/hv.c b/hv.c index cb4eda9..4831ccd 100644 --- a/hv.c +++ b/hv.c @@ -2289,6 +2289,7 @@ Perl_unsharepvn(pTHX_ const char *str, I32 len, U32 hash) void Perl_unshare_hek(pTHX_ HEK *hek) { + assert(hek); unshare_hek_or_pvn(hek, NULL, 0, 0); }