summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-05-03 17:10:46 +0100
committerDavid Mitchell <davem@iabyn.com>2011-05-19 14:49:43 +0100
commitef60ac00626a1b26275244b3fa3ce49a3223baba (patch)
tree42e80eaa3562f90d39036d7852c5c9cd7ee55f64 /sv.c
parent922090f40453dfe5bae918350f2513dc53fa3aba (diff)
downloadperl-ef60ac00626a1b26275244b3fa3ce49a3223baba.tar.gz
assert that HvARRAY is NULL when freeing an HV
The code path that leads to HvAUX being empty and thus HvARRAY being freed, is non-obvious: so put in an assert against any future failure.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index 7ce4b6d40d..534638c5fe 100644
--- a/sv.c
+++ b/sv.c
@@ -6102,6 +6102,7 @@ Perl_sv_clear(pTHX_ SV *const orig_sv)
PL_last_swash_hv = NULL;
}
Perl_hv_undef_flags(aTHX_ MUTABLE_HV(sv), HV_NAME_SETALL);
+ assert(!HvARRAY((HV*)sv));
break;
case SVt_PVAV:
{