From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: <5700548.4Uf9crWo2Z@krypton> <3072040.2Ns7VPtGUt@krypton> From: Fausto Saporito Date: Fri, 22 Nov 2013 17:42:03 +0100 Message-ID: To: erik quanstrom Content-Type: multipart/alternative; boundary=001a1133b05ee90a9404ebc6b25f Cc: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Subject: Re: [9fans] f2c issue Topicbox-Message-UUID: 8bdcd194-ead8-11e9-9d60-3106f5b1d025 --001a1133b05ee90a9404ebc6b25f Content-Type: text/plain; charset=ISO-8859-1 Hi Erik, yes, it's a FP stack overflow... :-) I also tried with 9front, and the error message is slightly different: ./arithchk #define IEEE_8087 #define Arith_Kind_ASL 1 arithchk 8523: suicide: sys: fp: invalid operation fppc=0x12ee status=0xb8b3 pc=0x000012f2 further checks reveal that the problem is this function: void get_nanbits(unsigned int *b, int k) { union { double d; unsigned int z[2]; } u, u1, u2; k = 2 - k; u1.z[k] = u2.z[k] = 0x7ff00000; u1.z[1-k] = u2.z[1-k] = 0; u.d = u1.d - u2.d; /* Infinity - Infinity */ <<<<<<<====== this is the FATAL ERROR. b[0] = u.z[0]; b[1] = u.z[1]; } called as getnanbits(nanbits,1) I'm sorry but I don't know how to generate the acid code. regards, Fausto 2013/11/22 erik quanstrom > > By the way I have always the same problem (suicide with stack overflow > > running arithchk). > > that's not a stack overflow, that's a x87 floating point stack overflow. > if you would post the code around the program counter in your error > message it would be helpful. asm(*PC) with acid would be even better. > > - erik > --001a1133b05ee90a9404ebc6b25f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Erik,

yes, it's a FP stack overf= low... :-)
I also tried with 9front, and the error message is sli= ghtly different:

./arithchk
#define IEEE= _8087
#define Arith_Kind_ASL 1
arithchk 8523: suicide: sys: fp: in= valid operation fppc=3D0x12ee status=3D0xb8b3 pc=3D0x000012f2
further checks reveal that the problem is this function:
<= div>
=A0void
get_nanbits(unsigned int *b, int k)
{
uni= on { double d; unsigned int z[2]; } u, u1, u2;

k =3D 2 - k;
u1.z[k] =3D u2.z[k]= =3D 0x7ff00000;
u1.z[1-k] =3D u2.z[1-k] =3D 0;
u.d =3D u1.d - u2.d; /* Infinity - Infinity */ <<<<<<<=3D= =3D=3D=3D=3D=3D =A0this is the FATAL ERROR.
b[0] =3D u.z[0];
b[1] =3D u.z[1];=
}
=

called as getnanbits(nanbits,1)

I'm sorry= but I don't know how to generate the acid code.

regards,
Fausto



2013/11/22 erik quanstrom <quanstro= @quanstro.net>
> By the way I have always the same problem (suicide w= ith stack overflow
> running arithchk).

that's not a stack overflow, that's a x87 floating point stac= k overflow.
if you would post the code around the program counter in your error
message it would be helpful. =A0asm(*PC) with acid would be even better.
- erik

--001a1133b05ee90a9404ebc6b25f--