Date: Wed, 29 Oct 2003 22:46:58 +0100 (CET) From: Marius Strobl <marius@alchemy.franken.de> To: FreeBSD-gnats-submit@FreeBSD.org Cc: alexander@leidinger.net Subject: ports/58698: security/nmap: make compile on FreeBSD/sparc64 Message-ID: <200310292146.h9TLkw0g021152@alchemy.franken.de> Resent-Message-ID: <200310292150.h9TLoH1C082004@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 58698 >Category: ports >Synopsis: security/nmap: make compile on FreeBSD/sparc64 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 29 13:50:16 PST 2003 >Closed-Date: >Last-Modified: >Originator: Marius Strobl >Release: FreeBSD 5.1-CURRENT sparc64 >Organization: >Environment: System: FreeBSD alchemy.franken.de 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Mon Oct 27 23:11:52 CET 2003 root@alchemy.franken.de:/tmp/obj/usr/src/sys/alchemy sparc64 >Description: The security/nmap port (currently at 3.48, but previous versions also had this problem) triggers a bug in GCC 3.3.1 on FreeBSD/sparc64 which causes the compilation of the port to fail, see: http://bento.freebsd.org/errorlogs/sparc64-5-latest/nmap-3.48_1.log Below is a patch that works around the GCC bug and that the maintainer requested to be sent as PR, see: http://lists.freebsd.org/pipermail/freebsd-sparc64/2003-October/000791.html The GCC bug itself is know and AFAIK Thomas Moestl (tmm@freebsd.org) tried to get a fix for it in upstream GCC. However, I didn't see an entry in the release notes of GCC 3.3.2 that would suggest that it has been fixed there. Another port that has a workaround for this particular GCC bug is e.g. x11/XFree86-4-libraries (files/patch-XRes.c). >How-To-Repeat: >Fix: Apply the patch below in security/nmap (adds new file files/patch-nsock::src::nsock_event.c). Index: files/patch-nsock::src::nsock_event.c =================================================================== RCS file: files/patch-nsock::src::nsock_event.c diff -N files/patch-nsock::src::nsock_event.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-nsock::src::nsock_event.c 3 Oct 2003 13:34:22 -0000 @@ -0,0 +1,13 @@ +--- nsock/src/nsock_event.c.orig Fri Oct 3 15:33:05 2003 ++++ nsock/src/nsock_event.c Fri Oct 3 15:32:31 2003 +@@ -242,8 +242,9 @@ + int type_code = (int) type; + unsigned long serial = ms->next_event_serial++; + unsigned long max_serial_allowed; +- int shiftbits = sizeof(nsock_event_id) * 8 - TYPE_CODE_NUM_BITS; ++ int shiftbits; + assert(type <= 3); ++ shiftbits = sizeof(nsock_event_id) * 8 - TYPE_CODE_NUM_BITS; + + max_serial_allowed = ( 1 << shiftbits ) - 1; + if (serial == max_serial_allowed ) { >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310292146.h9TLkw0g021152>