From owner-cvs-all@FreeBSD.ORG Sun Jan 18 13:03:59 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 924B216A4CF; Sun, 18 Jan 2004 13:03:59 -0800 (PST) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id BAC4143D49; Sun, 18 Jan 2004 13:03:57 -0800 (PST) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.10/8.12.10) with ESMTP id i0IL3vOE057318; Sun, 18 Jan 2004 13:03:57 -0800 (PST) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) i0IL3vga083032; Sun, 18 Jan 2004 13:03:57 -0800 (PST) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.10/8.12.10/Submit) id i0IL3uTb083031; Sun, 18 Jan 2004 13:03:56 -0800 (PST) (envelope-from marcel) Date: Sun, 18 Jan 2004 13:03:56 -0800 From: Marcel Moolenaar To: src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG Message-ID: <20040118210356.GA82925@dhcp01.pn.xcllnt.net> References: <200401181032.i0IAWoMh012953@repoman.freebsd.org> <20040118103340.GA44149@VARK.homeunix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040118103340.GA44149@VARK.homeunix.com> User-Agent: Mutt/1.5.5.1i Subject: Re: cvs commit: src/lib/libc/gdtoa Makefile.inc _hdtoa.c src/lib/libc/stdio vfprintf.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2004 21:03:59 -0000 On Sun, Jan 18, 2004 at 02:33:40AM -0800, David Schultz wrote: > Any suggestions or bug reports involving this code are welcome, but > please note the following caveats: > > - strtod() has some bugs involving parsing hexadecimal > floating-point numbers, which should be fixed in the > next gdtoa import (to come shortly). Until then, be > aware that numbers parsed with strtod() may not be > output as expected because they were not parsed correctly > in the first place. In particular, don't specify too > many digits in the significand for subnormals, and > don't expect underflow to zero to work correctly. Currently stdtod() is causing a SIGFPE on ia64 for a kernel build. This started when obrien@ added the following code to kern.post.mk: +emu10k1-alsa%diked.h: $S/gnu/dev/sound/pci/emu10k1-alsa.h + grep -v '#include' ${.OODATE} | ${CC} -E -D__KERNEL__ -dM - \ + | awk -F"[ (]" '/define/ \ + { print "#ifndef " $$2 ; print ; print "#endif" }' \ + >${.TARGET} +.if !exists(${.OBJDIR}/.depend) +_kernel-depend: emu10k1-alsa%diked.h +.endif The problem is that awk(1) gets a SIGFPE unconditionally. I haven't spent too much time on it yet, but I get the following in the gdb(1): Program received signal SIGFPE, Arithmetic exception. 0x40000000000553d2 in strtod (s00=0x600000000001c02d "e-324", se=0x9fffffffffffe6f0) at gdtoa_strtod.c:938 938 dval(rv) *= dval(rv0); (gdb) 0x40000000000553d0 : [MFB] nop.m 0x0 0x40000000000553d1 : fmpy.d.s0 f6=f7,f6 0x40000000000553d2 : nop.b 0x0;; (gdb) info reg f6 f7 f6 8.8817841970012523233890533447265625e-16 (raw 0x000000000000fbcd8000000000000000) f7 4.0083367200179455559922161027003241e-292 (raw 0x000000000000fc378000000000000000) (gdb) Erroneous arithmetic operation. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Very suspicious gdb(1) error. Don't trust the register values. If you're interested in analyzing this, I have the above trigger case in ~marcel/strtod on @FreeBSD.org. The awk(1) executable in that directory has full debugging information (including libc). Run as: ./awk -F"[ (]" '/define/ { print "#ifndef " $2 ; print ; print "#endif" }' < awk.in FYI, -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net