[erlang-patches] fix erl_interface crash

Björn-Egil Dahlberg egil@REDACTED
Thu Dec 8 18:17:41 CET 2011


On 2011-10-26 12:05, Henrik Nord wrote:
> On 10/26/2011 10:14 AM, Wei Cao wrote:
>> Fix a crash in erl_interface.
>>
>> erl_interface use linux select() to get notified on socket events, 
>> which works when fd is less than 1024.
>>
>> however, when fd is larger than 1024, the fd_set structure on stack 
>> gets corrupted and the process crashes soon,
>>
>> this is possible when there are lots of connections kept or the 
>> process keeps creating new connect and closing it.
>>
>>
>> git fetch git://github.com/weicao/otp.git 
>> <http://github.com/weicao/otp.git> erl_interface_replace_select_
>> with_poll
>>
>>
>> https://github.com/weicao/otp/compare/erl_interface_replace_select_with_poll
>>
>> https://github.com/weicao/otp/compare/erl_interface_replace_select_with_poll.patch

Though poll would be nice here it isn't supported on all platforms. For 
this patch to be accepted a configure test needs to be done to determine 
if poll exists and have select as a fallback if doesn't.

// Björn-Egil

>>
>>
>> -- 
>>
>> Best,
>>
>> Wei Cao
>>
>>
>> _______________________________________________
>> erlang-patches mailing list
>> erlang-patches@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-patches
> Hi
> 1. The commit msg is not conforming to the guidelines on how to write 
> a proper commit msg.
> https://github.com/erlang/otp/wiki/Writing-good-commit-messages
>
> 2. could you add tests for this?
>
>
> Thank you for the contribution!
>
>
> -- 
> /Henrik Nord Erlang/OTP
>
>
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20111208/387103fd/attachment.htm>


More information about the erlang-patches mailing list