From owner-freebsd-ports@FreeBSD.ORG Sun Nov 8 05:29:20 2009 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E35A1065692 for ; Sun, 8 Nov 2009 05:29:20 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [92.53.104.116]) by mx1.freebsd.org (Postfix) with ESMTP id F00338FC12 for ; Sun, 8 Nov 2009 05:29:19 +0000 (UTC) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1N70Kc-0002ax-GY; Sun, 08 Nov 2009 08:28:54 +0300 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 0F224B860; Sun, 8 Nov 2009 08:29:18 +0300 (MSK) Received: by hades.panopticon (Postfix, from userid 1000) id 09507B829; Sun, 8 Nov 2009 08:29:18 +0300 (MSK) Date: Sun, 8 Nov 2009 08:29:18 +0300 From: Dmitry Marakasov To: Eitan Adler Message-ID: <20091108052918.GE54527@hades.panopticon> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-ports@freebsd.org Subject: Re: trouble porting dash shell (make errors) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Nov 2009 05:29:20 -0000 * Eitan Adler (eitanadlerlist@gmail.com) wrote: > I tried the dash mailing list with no reply. > mksignames.c is attached. > > Here is the output from ./configure && gmake You should've use gdb to get a line where it dies: -- % gdb ./mksignames ... (gdb) run Starting program: /tmp/dash/dash-0.5.5.1/src/mksignames Assertion failed: (arena->magic == ARENA_MAGIC), function arena_malloc, file /usr/src/lib/libc/stdlib/malloc.c, line 3348. Program received signal SIGABRT, Aborted. 0x2816f7e7 in kill () from /lib/libc.so.7 (gdb) bt #0 0x2816f7e7 in kill () from /lib/libc.so.7 #1 0x2816f746 in raise () from /lib/libc.so.7 #2 0x2816e4d4 in abort () from /lib/libc.so.7 #3 0x281553f6 in __assert () from /lib/libc.so.7 #4 0x280f512e in malloc_usable_size () from /lib/libc.so.7 #5 0x280f8b26 in malloc () from /lib/libc.so.7 #6 0x0804861d in initialize_signames () at mksignames.c:112 #7 0x08048a98 in main (argc=1, argv=0xbfbfea24) at mksignames.c:414 (gdb) frame 6 #6 0x0804861d in initialize_signames () at mksignames.c:112 112 signal_names[rtmax-i] = (char *)malloc(RTLEN); (gdb) print sizeof(signal_names)/sizeof(signal_names[0]) $1 = 67 (gdb) print rtmax-i $2 = 124 -- Obviously the array is accessed out of bounds. Size of signal_names is 2*NSIG+3, and given that NSIG (sys/signal.h) is 32, that is really not enough for signals up to SIGRTMAX (126). The easiest way to fix it is to add -DUNUSABLE_RT_SIGNALS to compiler flags. This way it'll ignore realtime signals and only list standart 32 ones. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru