[ 
https://issues.apache.org/jira/browse/THRIFT-587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rush Manbert updated THRIFT-587:
--------------------------------

    Attachment: Jira587Patch.txt

Patch.

> TNonblockingServer connect code fails on 64-bit OS
> --------------------------------------------------
>
>                 Key: THRIFT-587
>                 URL: https://issues.apache.org/jira/browse/THRIFT-587
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (C++)
>    Affects Versions: 0.1
>         Environment: Mac Os X 10.6.1 (Snow Leopard)
>            Reporter: Rush Manbert
>             Fix For: 0.1
>
>         Attachments: Jira587Patch.txt
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to