Repository navigation
Conversation
We need to prevent integer overflow to eventually stop the iteration. A test case doesn't appear sensible for this, because even on 32bit architectures a respective test easily runs for a few minutes.
|
@goodevilgenius, would that solve the issue for you? If you're running a 64bit PHP, probably not, but I wouldn't know how we could address that. After all, you can't know whether an iterator is infinite or not. Adding some arbitrary limit (say, at most 1,000,000 elements) would be possible, but … arbitrary. Introducing some INI setting appears to be overkill for that edge case. Maybe the documentation should clarify? |
|
@cmb69 Sounds pretty reasonable, I suppose. On a 64-bit system, I imagine that would probably run an extremely long time before the overflow occurs. I imagine I posted the bug as a long shot that it could even reasonably be fixed, and this sounds like the best possible solution, in any case. |
|
Thanks for the feedback! Yeah, on 64bit systems the script would run for a very long time. Say the script would run for 1sec on 32bit, and all else being equal, the script would run on 64bit for several thousand years.
|
We need to prevent integer overflow to eventually stop the iteration.
A test case doesn't appear sensible for this, because even on 32bit
architectures a respective test easily runs for a few minutes.