From owner-freebsd-bugs@FreeBSD.ORG Mon Dec 17 07:55:44 2007 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 366B416A417 for ; Mon, 17 Dec 2007 07:55:44 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (VARK.MIT.EDU [18.95.3.179]) by mx1.freebsd.org (Postfix) with ESMTP id 09EDE13C4F3 for ; Mon, 17 Dec 2007 07:55:43 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from VARK.MIT.EDU (localhost [127.0.0.1]) by VARK.MIT.EDU (8.14.2/8.14.1) with ESMTP id lBH7tOoj008842; Mon, 17 Dec 2007 02:55:24 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by VARK.MIT.EDU (8.14.2/8.14.1/Submit) id lBH7tMHt008841; Mon, 17 Dec 2007 02:55:22 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Mon, 17 Dec 2007 02:55:22 -0500 From: David Schultz To: Tsurutani Naoki Message-ID: <20071217075522.GA8703@VARK.MIT.EDU> Mail-Followup-To: Tsurutani Naoki , freebsd-bugs@FreeBSD.ORG Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: kern/102424: [libc] printf(3) prints ill result. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2007 07:55:44 -0000 Thanks for investigating this. It's interesting that the problem only happens with -fgcse, and then only on amd64 machines in 32-bit mode. Does this happen in a more recent version of FreeBSD? I don't have an amd64 machine available for testing, and the vendor's dtoa code is a little hard to read, especially if we're looking for a compiler bug here. Some ideas: - See whether contrib/gdtoa/dmisc.c or contrib/gdtoa/dtoa.c is the problem. (That is, compile only one of those with -O2 and see what happens.) - Compile libc with -g in your CFLAGS, then run the program with a breakpoint on the 'quorem' function. See what value it returns. It should never return more than 9.