From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 18 Jan 2010 16:55:29 -0500 To: 9fans@9fans.net Message-ID: <70d68890ae6a19e708a0a3271df814ae@coraid.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] (no subject) Topicbox-Message-UUID: c08065e4-ead5-11e9-9d60-3106f5b1d025 Subject floating point puzzle i'm seeing a crash in in _v2d. unfortunately, i don't see how this is happening. 8.out 8535: suicide: sys: fp: stack underflow fppc=0x6397 status=0x81e1 pc=0x63a5 however, acid says that the Vlong passed in was all zeros. the code generating the call to _v2d is overflow = v > vmax*scale; where uvlong v, vmax; double scale; v = 0; vmax = 2000; scale =1.; acid: _v2d:x _3_ { _1_ { lo 0 hi 0 } _2_ { lols 0 loms 0 hils 0 hims 0 } } acid: stk() _v2d(x=0x0)+0x87 /sys/src/libc/386/vlrt.c:107 [etc] _main+0x31 /sys/src/libc/386/main9.s:16 acid: fpr() F0 0 F1 -Inf F2 0 F3 0 F4 0 F5 0 F6 0 F7 0 control 0x027f status 0x0161 tag 0xffff ip offset 0x00006397 cs selector 0x0023 opcode 0x1920 data operand offset 0x2d48 operand selector 0x001b acid: regs() PC 0x000063a5 _v2d+0x87 /sys/src/libc/386/vlrt.c:107 SP 0xdfffedc8 ECODE 0xf01006bd EFLAG 0x00010646 CS 0x00000023 DS 0x0000001b SS 0x0000001b GS 0xf010001b FS 0x0000001b ES 0x0000001b TRAP 0x00000010 math coprocessor error AX 0x00000000 BX 0x00000000 CX 0x00000000 DX 0x00027254 DI 0x00041920 SI 0x0004191c BP 0xdfffed94 - erik