projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73968c7
)
assert that what is passed into the hash functions is really an HV.
author
Nicholas Clark
<nick@ccl4.org>
Thu, 20 Sep 2007 10:20:47 +0000
(10:20 +0000)
committer
Nicholas Clark
<nick@ccl4.org>
Thu, 20 Sep 2007 10:20:47 +0000
(10:20 +0000)
(MRO code is calling hash functions during global destruction, hence
the check on SVTYPEMASK.)
p4raw-id: //depot/perl@31922
hv.c
patch
|
blob
|
history
diff --git
a/hv.c
b/hv.c
index
f1b3c90
..
a8c4875
100644
(file)
--- a/
hv.c
+++ b/
hv.c
@@
-422,6
+422,10
@@
Perl_hv_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
if (!hv)
return NULL;
+ if (SvTYPE(hv) == SVTYPEMASK)
+ return NULL;
+
+ assert(SvTYPE(hv) == SVt_PVHV);
if (SvSMAGICAL(hv) && SvGMAGICAL(hv) && !(action & HV_DISABLE_UVAR_XKEY)) {
MAGIC* mg;