From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Aug 4 10:10:12 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4764C16A4DF for ; Fri, 4 Aug 2006 10:10:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D90243D4C for ; Fri, 4 Aug 2006 10:10:11 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k74AAAUe093435 for ; Fri, 4 Aug 2006 10:10:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k74AAA63093434; Fri, 4 Aug 2006 10:10:10 GMT (envelope-from gnats) Resent-Date: Fri, 4 Aug 2006 10:10:10 GMT Resent-Message-Id: <200608041010.k74AAA63093434@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Simun Mikecin Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D140116A4DD; Fri, 4 Aug 2006 10:08:51 +0000 (UTC) (envelope-from sime@logos.hr) Received: from mail.logos.hr (gates.logos.hr [213.149.47.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6487943D45; Fri, 4 Aug 2006 10:08:50 +0000 (GMT) (envelope-from sime@logos.hr) Received: from localhost (localhost.logos.hr [127.0.0.1]) by mail.logos.hr (Postfix) with ESMTP id CAAA226D0FA; Fri, 4 Aug 2006 12:08:48 +0200 (CEST) Received: from mail.logos.hr ([127.0.0.1]) by localhost (mail.logos.hr [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 74368-05; Fri, 4 Aug 2006 12:08:38 +0200 (CEST) Received: by mail.logos.hr (Postfix, from userid 34062) id 4EC2B26D049; Fri, 4 Aug 2006 12:08:38 +0200 (CEST) Message-Id: <20060804100838.4EC2B26D049@mail.logos.hr> Date: Fri, 4 Aug 2006 12:08:38 +0200 (CEST) From: Simun Mikecin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: sem@ciam.ru, sem@FreeBSD.org Subject: ports/101352: [fix] FD_SETSIZE checking is wrong: some client apps dont work X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Simun Mikecin List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2006 10:10:12 -0000 >Number: 101352 >Category: ports >Synopsis: [fix] FD_SETSIZE checking is wrong: some client apps dont work >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 04 10:10:10 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Simun Mikecin >Release: FreeBSD 5.2.1-RELEASE-p9 i386 >Organization: >Environment: System: FreeBSD mail.logos.hr 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #1: Mon Jul 26 14:07:00 CEST 2004 root@mail.logos.hr:/usr/obj/usr/src.5.2.1-R/sys/MAIL i386 >Description: gsoap 2.7.8c has file descriptor checking like this: if ((int)soap->socket > FD_SETSIZE) return SOAP_FD_EXCEEDED; /* Hint: MUST increase FD_SETSIZE */ and on FreeBSD FD_SETSIZE is defined in /usr/include/sys/select.h like this: #define FD_SETSIZE 1024U unlike many other systems where it doesn't have 'U' suffix which makes it an "unsigned" type. Problem is that comparing: if ((int) -1 > 1024U) returns true, so the function call fails, but it shouldn't cause soap->socket initially has a value of -1. I already reported this bug on the gsoap project tracker. >How-To-Repeat: As a consequence of this bug, I have experienced that SOAP calls from client SOAP applications in some situations (like using HTTP keep-alive and one-way message parsing) return with SOAP_FD_EXCEEDED instead of SOAP_OK. >Fix: diff -urN gsoap.orig/Makefile gsoap/Makefile --- gsoap.orig/Makefile Sat Jul 22 13:33:18 2006 +++ gsoap/Makefile Fri Aug 4 11:36:41 2006 @@ -7,6 +7,7 @@ PORTNAME= gsoap PORTVERSION= 2.7.8c +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= gsoap2 @@ -21,5 +22,11 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-2.7 ONLY_FOR_ARCHS= i386 amd64 + +post-patch: + ${SED} 's/> FD_SETSIZE/> (int)FD_SETSIZE/g' ${WRKSRC}/soapcpp2/stdsoap2.c > ${WRKDIR}/stdsoap2.c + ${SED} 's/> FD_SETSIZE/> (int)FD_SETSIZE/g' ${WRKSRC}/soapcpp2/stdsoap2.cpp > ${WRKDIR}/stdsoap2.cpp + ${MV} ${WRKDIR}/stdsoap2.c ${WRKSRC}/soapcpp2/stdsoap2.c + ${MV} ${WRKDIR}/stdsoap2.cpp ${WRKSRC}/soapcpp2/stdsoap2.cpp .include >Release-Note: >Audit-Trail: >Unformatted: