Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.1
-
None
-
Mac Os X 10.6.1 (Snow Leopard)
-
Patch Available
Description
The non-blocking stress test gets SIGABORT if more than 2 clients try to connect.
The reason for this is in TNonblockingServer::handleEvent(). It sets addrLen once, before the loop that calls accept(), but accept() writes the size of the stored address into the addrLen pointer argument. Running on OS X 10.6.x, the returned value is 28, where it was originally 16. The second call to accept() overwrites the stack canary data and __stack_chk_fail gets called and we're toast.
The fix is to reinitialize addrLen at the end of the loop before we call accept() again.
I will attach a patch.