Closed atoomic closed 5 years ago
Hi @atoomic! Thanks for the patch.
I haven't really dug around the issue, but it sounds very reasonable. I wonder if we can create a test case where clone and ref are the same, to justify the change.
at first glance I do not think this is is possible to have ref = clone with the current code in the generic cases, but seems like IO is going to return the same object
clone = SvREFCNT_inc(ref) /* just return the ref */
so this should be possible with one IO to trigger that infinite loop
Unfortunately cannot prove that this is the source of the issue but have the feeling that the infinite loop I saw during a clone is probably coming from a lack of protection on CLONE_STORE.
If clone eq ref, its clear that this is going to loop forever.