Aucbvax.3008 fa.unix-wizards utzoo!decvax!ucbvax!unix-wizards Tue Sep 8 11:12:02 1981 sanity for floating exceptions >From ucsfcgl!tef@Berkeley Tue Sep 8 11:07:27 1981 Standard version 7 DOES store the floating exception code (FEC) register in the u. area (but not the exception address pointer); thus the reason for a floating exception is adequately saved in the resulting core image file. A C program for printing the particular exception in terse english is enclosed. Note that there are many other problems associated with floating point exceptions that v7 does not adequately address. If your programs always core dumps on a floating exception you will probably get by ok as is, but if you catch floating exceptions via signal(2) you definitely need some kernel changes. Jim Reeds from UC Berkeley presented an excellent paper at the Jan '81 USENIX meeting in San Francsico discussing these problems. Interested parites should try to dig up a copy of same from someone who was there. --- pfe.c --- #include #include #include #include char *msg[] = { "No error.", "Floating op code error", "Floating divide by zero", "Integer conversion error", "Floating overflow", "Floating underflow", "Floating undefined", "Floating maintenance trap" }; main(ac,av) char **av; { int fd, stat; char *corfil; struct user user; if (ac>1) corfil = *++av; else corfil = "core"; if ((fd=open(corfil, 0)) >1]); } ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.