Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 86144 invoked from network); 19 Jun 2007 13:48:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Jun 2007 13:48:48 -0000 Received: (qmail 57288 invoked by uid 500); 19 Jun 2007 13:48:51 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 57270 invoked by uid 500); 19 Jun 2007 13:48:51 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 57261 invoked by uid 99); 19 Jun 2007 13:48:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2007 06:48:51 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jun 2007 06:48:47 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 87B387141FE for ; Tue, 19 Jun 2007 06:48:26 -0700 (PDT) Message-ID: <9168899.1182260906553.JavaMail.jira@brutus> Date: Tue, 19 Jun 2007 06:48:26 -0700 (PDT) From: "Alexei Zakharov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Resolved: (HARMONY-4077) [classlib][portlib] socket related functions incorrectly work in socket > FD_SETSIZE In-Reply-To: <4438088.1181141906357.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-4077?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexei Zakharov resolved HARMONY-4077. -------------------------------------- Resolution: Fixed Yeah, thanks Sergey. I've missed that negative values are possible in selectRead. Slightly modified version of your new patch applied at the revision 548725. Please check. > [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, 4077_2.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.