From owner-freebsd-bugs Fri Sep 19 03:30:07 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id DAA02002 for bugs-outgoing; Fri, 19 Sep 1997 03:30:07 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id DAA01952; Fri, 19 Sep 1997 03:29:56 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id UAA12065; Fri, 19 Sep 1997 20:24:02 +1000 Date: Fri, 19 Sep 1997 20:24:02 +1000 From: Bruce Evans Message-Id: <199709191024.UAA12065@godzilla.zeta.org.au> To: bde@zeta.org.au, phk@critter.freebsd.dk Subject: Re: Bug in malloc/free Cc: atrens@nortel.ca, freebsd-bugs@freebsd.org, gram@cdsec.com, grog@lemis.com, hackers@freebsd.org, peter@spinner.dialix.com.au Sender: owner-freebsd-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >>STDC only allows operations on auto variables and assignment to static >>variables of type sig_atomic_t. We aren't STDC conformant either. ^volatile >>Operations on auto floating point variables may corrupt the floating >>point state. This isn't a problem in practice, since nothing useful >>can be done using only auto floating point variables. > >You could calculate pi... :-) I was going to say that this is more useless than usual since there is no way to output the results. However, I think the following works: volatile sig_atomic_t encoded_results[MANY]; void handler(int s) { int i; for (i = 0; i < MANY; ++i) encoded_results[i] = bit_of_pi(i) == 0 ? 1 : 2; } There is no way to calculate only a few bits per call since there is no way to keep track of state. Bruce