You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
addTimer() accepts values that it doesn't support, freezes StremSelectLoop::run() #168
When addTimer() receives a $interval parameter that's high enough, a float value is passed to usleep(). The function will reject the value, and return immediately, causing a busy loop.
StremSelectLoop currently does not support intervals higher than PHP_INT_MAX/1000000. This limitation itself is not harmful, however it freezes any program that accidentally sets an interval higher than this.
changed the title [-]addTimer() accepts values that it doesn't support, causes buzy loop in StremSelectLoop::run()[/-][+]addTimer() accepts values that it doesn't support, freezes StremSelectLoop::run()[/+]on Jun 24, 2018
Unfortunately, I'm currently unable to reproduce the problem you're seeing.
A similar issue has been fixed via #132 a while back and my tests confirm that this should be fixed (the PR also uses a timer interval of PHP_INT_MAX).
Is the problem you're seeing reproducible? Can you show a gist that highlights this issue?
I'm closing this for now as it hasn't received any new input and I believe this has been answered. Please come back with more details if this problem persists and we can reopen this 👍
Activity
[-]addTimer() accepts values that it doesn't support, causes buzy loop in StremSelectLoop::run()[/-][+]addTimer() accepts values that it doesn't support, freezes StremSelectLoop::run()[/+]clue commentedon Jun 25, 2018
@arnaud-lb Thank you for reporting!
Unfortunately, I'm currently unable to reproduce the problem you're seeing.
A similar issue has been fixed via #132 a while back and my tests confirm that this should be fixed (the PR also uses a timer interval of
PHP_INT_MAX).Is the problem you're seeing reproducible? Can you show a gist that highlights this issue?
clue commentedon Jun 28, 2018
I'm closing this for now as it hasn't received any new input and I believe this has been answered. Please come back with more details if this problem persists and we can reopen this 👍
arnaud-lb commentedon Jun 28, 2018
Thanks, I confirm that #132 fixed the problem.