Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!pasteur!ucbvax!bloom-beacon!oberon!cit-vax!beckenba From: beckenba@cit-vax.Caltech.Edu (Joe Beckenbach) Newsgroups: comp.lang.c Subject: Re: when a core dump occurs ? Message-ID: <7084@cit-vax.Caltech.Edu> Date: 26 Jun 88 05:43:32 GMT References: <835@suvax0.shizuoka.JUNET> <623@goofy.megatest.UUCP> <915@td2cad.intel.com> Reply-To: beckenba@cit-vax.UUCP (Joe Beckenbach) Organization: California Institute of Technology Lines: 21 Pointers are a good place to start looking. My horror story in this regard: I was in the middle of writing a routine (in C) to interface with a graphics package (in Fortran). When I had debug comments in, the first debug statement would have some garbage appended; the program worked like a charm. I take out all the debug statements, and it hangs dead. After about three hours I woke up, stopped thinking Pascal and Basic and brought myself back to C: I took that pointer which I was copying a string into, and malloc'ed it some area of its own. This kept it from overwriting into fixed string areas (such as for printf text strings) and into area which seems to have been necessary for the program to tell itself where it was in the code.... I swear, one of these days I'll get all these subtle misconceptions of mine about C out of the way. And then I'll be told to start learning Fortran 66. :-) -- Joe Beckenbach beckenba@csvax.caltech.edu Caltech 1-58, Pasadena CA 91125 ! ! you're dead.