From owner-freebsd-current@FreeBSD.ORG Sat Aug 21 17:56:47 2004 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 A56D316A4CE for ; Sat, 21 Aug 2004 17:56:47 +0000 (GMT) Received: from kientzle.com (h-66-166-149-50.snvacaid.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F92643D31 for ; Sat, 21 Aug 2004 17:56:47 +0000 (GMT) (envelope-from kientzle@freebsd.org) Received: from freebsd.org (p54.kientzle.com [66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id i7LHuK90005368; Sat, 21 Aug 2004 10:56:20 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <41278CC4.6020007@freebsd.org> Date: Sat, 21 Aug 2004 10:56:20 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Maxim Konovalov References: <1092777586.92327.9.camel@server.mcneil.com> <20040817213813.GE3827@gothmog.gr><4127841D.6050104@freebsd.org> <20040821213426.A36214@mp2.macomnet.net> In-Reply-To: <20040821213426.A36214@mp2.macomnet.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: Giorgos Keramidas cc: freebsd-current@freebsd.org cc: Sean McNeil Subject: Re: bsdtar core dumps 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: Sat, 21 Aug 2004 17:56:47 -0000 Maxim Konovalov wrote: > On Sat, 21 Aug 2004, 10:19-0700, Tim Kientzle wrote: > > [...] > >>The code you've pointed to above concerns >>me because of the part about: >>if (n == 0) { >>... >>n = 1; >> } >>That ain't right: If I told vsnprintf the buffer >>size was zero, it should treat it as such. If I >>meant "one", I would have said "one." > > That code was committed in rev. 1.21 vsnprintf.c, a workaround for a > memory leak, bin/36175. Ahh... I see now. Apparently, I've either had too much caffeine or not enough. I'll try to adjust that. ;-) But the code in vsnprintf.c is correct. The n=1 is the size of the stack-allocated temp buffer, not the user buffer. That makes Sean's idea of something Alpha-specific seem more likely. Sean, could you take a look at this bug report: http://www.freebsd.org/cgi/query-pr.cgi?pr=36175 Try running the program there under "How To Repeat" and tell us what happens. That should shed some light on the subject. In the meantime, do try the patch I sent you earlier. At the very least, I'd like to get bsdtar to stop dumping core on you. Tim Kientzle