diff options
author | Nicholas Clark <nick@ccl4.org> | 2021-07-19 07:41:46 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2021-08-30 07:40:21 +0000 |
commit | c3cbbb2661957f51a90ec21f9b18dc6257f433fa (patch) | |
tree | fd5d1a2ff3b8b38cb8468856a8a12113af522909 /dist | |
parent | 28fa70671c9cb3bac12111a501950533fbb2ff35 (diff) | |
download | perl-c3cbbb2661957f51a90ec21f9b18dc6257f433fa.tar.gz |
Fix a bug in the recursion depth check in store_lhash().
The recursion depth check was not being cleaned up correctly, causing an
assertion failure in testing. This suggests that this routine likely wasn't
well tested.
Diffstat (limited to 'dist')
-rw-r--r-- | dist/Storable/Storable.xs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs index 101ee9407d..87846a4e4c 100644 --- a/dist/Storable/Storable.xs +++ b/dist/Storable/Storable.xs @@ -3178,7 +3178,7 @@ static int store_lhash(pTHX_ stcxt_t *cxt, HV *hv, unsigned char hash_flags) entry = HeNEXT(entry); } } - if (recur_sv == (SV*)hv && cxt->max_recur_depth_hash != -1 && cxt->recur_depth > 0) { + if (recur_sv != (SV*)hv && cxt->max_recur_depth_hash != -1 && cxt->recur_depth > 0) { TRACEME(("recur_depth --%" IVdf, cxt->recur_depth)); --cxt->recur_depth; } |