when a core dump occurs ?

Joe Beckenbach beckenba at cit-vax.Caltech.Edu
Sun Jun 26 15:43:32 AEST 1988


	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 at csvax.caltech.edu	Caltech 1-58, Pasadena CA 91125
	! ! you're dead.



More information about the Comp.lang.c mailing list