During a deprecation fix, we noticed that our loop detection might be fragile for long-running processes that trigger many requests: #254 (comment)
spl_object_id (and spl_object_hash) rely on the pointer of the object. those pointers can be reused when an object is freed. if $first is a string or array, we create an object on the fly that is immediately discarded, so the risk of reusing is higher.
we should find a solution that resets the list of visited URLs when the request is completely finished. besides avoiding false positives, this will also avoid leaking memory for no longer used history.
During a deprecation fix, we noticed that our loop detection might be fragile for long-running processes that trigger many requests: #254 (comment)
spl_object_id (and spl_object_hash) rely on the pointer of the object. those pointers can be reused when an object is freed. if $first is a string or array, we create an object on the fly that is immediately discarded, so the risk of reusing is higher.
we should find a solution that resets the list of visited URLs when the request is completely finished. besides avoiding false positives, this will also avoid leaking memory for no longer used history.