From owner-freebsd-ports-bugs@FreeBSD.ORG Sun May 4 02:30:00 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C399E306 for ; Sun, 4 May 2014 02:30:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A8B611077 for ; Sun, 4 May 2014 02:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s442U0So027218 for ; Sun, 4 May 2014 02:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s442U0Y8027208; Sun, 4 May 2014 02:30:00 GMT (envelope-from gnats) Resent-Date: Sun, 4 May 2014 02:30:00 GMT Resent-Message-Id: <201405040230.s442U0Y8027208@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, Ashish SHUKLA Received: from chateau.d.if (localhost [IPv6:::1]) by hub.freebsd.org (Postfix) with ESMTP id 2A06A224; Sun, 4 May 2014 02:28:04 +0000 (UTC) Received: from localhost (1001@localhost [local]); by localhost (OpenSMTPD) with ESMTPA id d3e2bae7; Sun, 4 May 2014 07:58:03 +0530 (IST) Message-Id: <15248783939851027084.enqueue@chateau.d.if> Date: Sun, 4 May 2014 07:58:03 +0530 (IST) From: Ashish SHUKLA To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: ports/189326: [PATCH] net/mtr segfaults with ncurses installed from ports Cc: sunpoet@FreeBSD.org X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Ashish SHUKLA List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2014 02:30:00 -0000 >Number: 189326 >Category: ports >Synopsis: [PATCH] net/mtr segfaults with ncurses installed from ports >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun May 04 02:30:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Ashish SHUKLA >Release: FreeBSD 9.2-RELEASE-p4 amd64 >Organization: The FreeBSD Project >Environment: System: FreeBSD chateau.d.if 9.2-RELEASE-p4 FreeBSD 9.2-RELEASE-p4 #1: Wed Apr 9 06:41:45 IST 2014 root@chateau.d.if:/usr/obj/usr/src/sys/CHATEAU amd64 λ make -C /usr/ports/net/mtr-nox11 showconfig ===> The following configuration options are available for mtr-nox11-0.85_1: GLIB=on: Build with glib library IPV6=on: IPv6 protocol support ===> Use 'make config' to modify these settings >Description: λ sudo gdb $(which mtr ) GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... (gdb) run google.com Starting program: /usr/local/sbin/mtr google.com [New LWP 101095] [New Thread 802007400 (LWP 101095/mtr)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 802007400 (LWP 101095/mtr)] 0x0000000800f6ed40 in _nc_init_acs () from /usr/local/lib/libtinfo.so.5.9 (gdb) bt #0 0x0000000800f6ed40 in _nc_init_acs () from /usr/local/lib/libtinfo.so.5.9 #1 0x00000008011b9c5f in _nc_setupscreen () from /lib/libncurses.so.8 #2 0x00000008011aa5db in newterm () from /lib/libncurses.so.8 #3 0x00000008011a79a9 in initscr () from /lib/libncurses.so.8 #4 0x00000000004047c9 in mtr_curses_open () at curses.c:677 #5 0x000000000040b292 in display_open () at display.c:99 #6 0x0000000000405668 in main (argc=2, argv=0x7fffffffdb38) at mtr.c:679 λ ldd $(which mtr) /usr/local/sbin/mtr: libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0x80082b000) libintl.so.9 => /usr/local/lib/libintl.so.9 (0x800b33000) libm.so.5 => /lib/libm.so.5 (0x800d3d000) libtinfo.so.5.9 => /usr/local/lib/libtinfo.so.5.9 (0x800f5e000) libncurses.so.8 => /lib/libncurses.so.8 (0x801190000) libc.so.7 => /lib/libc.so.7 (0x8013de000) libpcre.so.3 => /usr/local/lib/libpcre.so.3 (0x801739000) libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x80199d000) libthr.so.3 => /lib/libthr.so.3 (0x801c96000) After applying the fix: λ ldd $(which mtr) /usr/local/sbin/mtr: libncurses.so.5.9 => /usr/local/lib/libncurses.so.5.9 (0x80082b000) libtinfo.so.5.9 => /usr/local/lib/libtinfo.so.5.9 (0x800a48000) libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0x800c7a000) libintl.so.9 => /usr/local/lib/libintl.so.9 (0x800f82000) libm.so.5 => /lib/libm.so.5 (0x80118c000) libncurses.so.8 => /lib/libncurses.so.8 (0x8013ad000) libc.so.7 => /lib/libc.so.7 (0x8015fb000) libpcre.so.3 => /usr/local/lib/libpcre.so.3 (0x801956000) libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x801bba000) libthr.so.3 => /lib/libthr.so.3 (0x801eb3000) >How-To-Repeat: 1. Install devel/ncurses port. 2. Install net/mtr-nox11 port. 3. Execute: mtr some-host-name >Fix: Index: Makefile =================================================================== --- Makefile (revision 352935) +++ Makefile (working copy) @@ -19,7 +19,7 @@ X11_DESC= Build X11-enabled mtr GNU_CONFIGURE= yes -USES= pkgconfig +USES= pkgconfig ncurses PLIST_FILES= man/man8/mtr.8.gz \ sbin/mtr @@ -30,6 +30,7 @@ IPV6_CONFIGURE_ENABLE= ipv6 X11_CONFIGURE_WITH= gtk X11_USE= GNOME=gtk20 +LDFLAGS+= -lncurses .include >Release-Note: >Audit-Trail: >Unformatted: