Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.8.0 Beta2
-
None
-
-
382c87333f06e034506624901fc2030dee5681ef
Description
In the function socketNotifierSourceDispatch, If we send an event here, we may enter a new event loop and then the new event loop will process the events including socket events. As a result, after exiting the new event loop, the activeNotifierPos is same as the src->pollfds.count() and activeNotifierPos will be added by one in the old event loop.
So there is a potential situation that activeNotifierPos will overflow if we have too many sockets and nested event loops.
Although this situation is almost impossible, we can improve the code by little effort. That's it.
By the way, I have open a PR on github: Eliminate a potential bug and upload the patch file as an attachment.