You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Sergey Dmitriev (JIRA)" <ji...@apache.org> on 2007/06/17 14:08:27 UTC

[jira] Commented: (HARMONY-4077) [classlib][portlib] socket related functions incorrectly work in socket > FD_SETSIZE

    [ https://issues.apache.org/jira/browse/HARMONY-4077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12505590 ] 

Sergey Dmitriev commented on HARMONY-4077:
------------------------------------------

Alexei, thanks for taking time and handling this issue. As I see that was not a straightforward one.
As for this issue I want to confirm that it looks like select() has been replaced with poll().


> [classlib][portlib] socket related functions incorrectly work in socket > FD_SETSIZE
> ------------------------------------------------------------------------------------
>
>                 Key: HARMONY-4077
>                 URL: https://issues.apache.org/jira/browse/HARMONY-4077
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: linux only
>            Reporter: Sergey Dmitriev
>            Assignee: Alexei Zakharov
>         Attachments: 4077.patch
>
>
> Socket related functions incorrectly work with sockets if socket no > FD_SETSIZE. On "SUSE LINUX Enterprise Server 9" FD_SETSIZE is 1024.
> The following functions:
>  Java_org_apache_harmony_luni_platform_OSNetworkSystem_isReachableByICMPImpl
>  Java_org_apache_harmony_luni_platform_OSNetworkSystem_selectImpl
>  hysock_select_read
>  getNextNetlinkMsg
>  hysock_connect_with_timeout
>  
> use system select() to wait for event on only one file descriptor (socket). In case socket number is greater than maximum fdset_t size (FD_SETSIZE) we can have SIGSEGV. Satellite functins FD_SET, FD_ISSET, FD_CLR can cause SIGSEGV as well.
> One of possible solutions here can be to use poll() instead of select() since we're talking about wait for event on the single file descriptor.

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