Issue Information
-
#003967
-
3 - Medium
-
Done
Issue Confirmations
-
Yes (0)No (0)
Originally posted by theultramage
http://www.eathena.w...er&showbug=3967
If a timer function specifies a timeout of 0ms and calls itself, you will get an infinite loop. The timer code will forever keep processing this timer function, making the server freeze. Should we add some sort of safeguard/failsafe to let the server continue operating in such a case?
Additionally, if the timer function A pushes some other timer function B onto the timer heap before pushing a copy of itself, the timer heap will behave like a stack, processing the newest entry. This produces an ever-growing array of B timer entries. The infinite loop will go on until the process runs out of allocable memory.
http://www.eathena.w...er&showbug=3967
If a timer function specifies a timeout of 0ms and calls itself, you will get an infinite loop. The timer code will forever keep processing this timer function, making the server freeze. Should we add some sort of safeguard/failsafe to let the server continue operating in such a case?
Additionally, if the timer function A pushes some other timer function B onto the timer heap before pushing a copy of itself, the timer heap will behave like a stack, processing the newest entry. This produces an ever-growing array of B timer entries. The infinite loop will go on until the process runs out of allocable memory.