From owner-freebsd-current@FreeBSD.ORG Sun Mar 6 00:27:57 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3B86C16A4CE for ; Sun, 6 Mar 2005 00:27:57 +0000 (GMT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id E902943D2D for ; Sun, 6 Mar 2005 00:27:56 +0000 (GMT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id D927A5C900; Sat, 5 Mar 2005 16:27:56 -0800 (PST) Date: Sun, 6 Mar 2005 01:27:56 +0100 From: Maxime Henrion To: Sean McNeil Message-ID: <20050306002756.GV31320@elvis.mu.org> References: <1110060467.23311.5.camel@server.mcneil.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1110060467.23311.5.camel@server.mcneil.com> User-Agent: Mutt/1.4.2.1i cc: current@freebsd.org Subject: Re: /usr/src/lib/libc/string/strsignal.c:96 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Mar 2005 00:27:57 -0000 Sean McNeil wrote: > Hi folks, > > It looks like strsignal is busted. All I have to do is hit ctrl-c while > running gmake and I get this core: > > #0 strsignal (num=2) at /usr/src/lib/libc/string/strsignal.c:96 > ebuf = "Interrupt", '\0' > tmp = "2\000\000\000\000\000\000\000\002\000\000\000\000\000\000 > \000\000\000\000" > signum = 0 > n = 4326031 > t = 0x7fffffffd151 "" > p = 0x800d5b82f
> > This is because n is uninitialized when num > 0 && num < sys_nsig. Indeed. Can you confirm that this patch fixes the problem? %% --- strsignal.c.orig Tue Mar 1 20:28:14 2005 +++ strsignal.c Sun Mar 6 01:24:18 2005 @@ -64,7 +64,7 @@ #endif if (num > 0 && num < sys_nsig) { - strlcpy(ebuf, + n = strlcpy(ebuf, #if defined(NLS) catgets(catd, 2, num, sys_siglist[num]), #else %% Cheers, Maxime