Skip to content

Commit

Permalink
Fix a bug in the recursion depth check in store_lhash().
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nwc10 committed Aug 30, 2021
1 parent 28fa706 commit c3cbbb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dist/Storable/Storable.xs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c3cbbb2

Please sign in to comment.