Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!vaxine!wjh12!genrad!decvax!harpo!seismo!hao!hplabs!zehntel!varian!david From: david@varian.UUCP Newsgroups: net.wanted,net.unix Subject: Re: C program error messages Message-ID: <203@varian.UUCP> Date: Thu, 12-Apr-84 14:13:08 EST Article-I.D.: varian.203 Posted: Thu Apr 12 14:13:08 1984 Date-Received: Sat, 14-Apr-84 09:21:32 EST References: homxa.153 Lines: 113 ho95b!wcs (Bill Stewart) asked if this list, which was posted last year by Dave Curry, could be reposted or sent to him. I think that it is useful enough to be reposted. Thanks to Dave Curry for posting it the first time. David Brown (415) 945-2199 Varian Instruments 2700 Mitchell Dr. Walnut Creek, Ca. 94598 {zehntel,amd70,fortune}!varian!david ========================= >From zehntel!teklabs!ucbcad!ucbvax:decvax!harpo!npoiv!npois!houxm!ihnp4!ihldt!ll1!otuxa!nwuxc!inuxc!pur-ee!davy Mon Dec 6 18:28:04 1982 Subject: Coredump Message Meanings - Summary - (nf) Newsgroups: net.lang.c #N:pur-ee:15500007:000:3266 pur-ee!davy Dec 6 11:05:00 1982 This is the information which I have received in response to my query about the meanings of the various core dump messages given by the shell. I have summarized much of the information in order to keep this article reasonably short (well, 100 lines is shorter than 300....). ------------------ Bus Error - Types of arguments and parameters don't match. - I/O problems - reading past EOF, reading a closed file, bad file pointers, etc. [This refers to stdio only, I think.... --Dave] - Arrays improperly dimensioned. Eg., attempting to access a word starting at an odd address. - Referencing a non-existent bus device. - NULL or unitialized pointer, subscript out of range. Memory Fault - Subscripting arrays past the memory allocation for your program. - NULL or unitialized pointer, subscript out of range. - Attempts to reference data outside valid address space - Parity errors in address space - Recursion (try making your own routines "read" and "write" and then call "scanf" or "printf" and watch what happens). IOT Trap - Execution of IOT (I/O Trap) instruction; also used by the "abort" routine (PDP-11's only). EMT Trap - Emulator Trap Instruction (PDP-11's). Trace/BPT Trap - Execution of the BPT instruction (PDP-11's) - Trace bit set in Processor Status (long)Word - Trying to tell the program to go to an address that doesn't exist. - "Wanton destruction caused execution of data or trashing of instructions." Floating Exception - Invalid floating point operation: - overflow - underflow - divide by zero - log of negative number - float-to-int conversion overflow Segmentation Fault - Subscript out of range. - Handing "printf", etc. a string which is not NULL terminated. Illegal Instruction - Attempt to execute a priviledged instruction, such as "halt". - Execution of nonsense insstruction (e.g., jump to a register). - Forgot -f flag to cc on PDP-11 without floating point hardware. ----- Special Note: John Bruner (pur-ee!bruner) also had this to say about Illegal Instruction: "On the VAXes the 'abort' routine executes a 'halt' and blows away the program with an illegal instruction. Note that SIGTRAP (trace trap) and SIGILL (illegal instruction trap) are not reset when caught. Thus, a generalized trap handler such as sig(s) int s; { fprintf(stderr, "Fatal signal %d\n", sig); abort(); } will (on the VAX) recursively call 'abort' which will attempt to execute a 'halt' [illegal] and trap to 'sig' which will call 'abort'... until you either kill it with a signal it doesn't catch (e.g. SIGKILL=9) or it runs out of stack space (a LONG time on the VAX)." ------------------ In all, I got 5 responses with information about the messages, and three responses asking for a copy of the summary (to those of you who asked, I have sent you each a copy via mail). Thanks go to all who responded: John Bruner (pur-ee!bruner), arizona!tom, ihuxw!thor, Bob Van Valzah (tpdcvax!bobvan), Geoff Collyer (utcsstat!geoff). --Dave Curry pur-ee!davy