[comp.sources.bugs] Bug in dbug.c

duane@anasaz.UUCP (Duane Morse) (08/08/89)

The latest edition of dbug.c, the one with portable profiling, has
a bug which manifests itself as "segmentation violation, core dumped".
The bug was introduced with the profiling code.

In PushState, element prof_file (the FILE pointer for profiling) is
not initialized. It should be set to (FILE *)0.

In CloseFile (called when the state is pop-ed), a check for
   fp != (FILE *)0
should also be made to avoid using 0 as a FILE pointer.
-- 

Duane Morse	...{asuvax or mcdphx}!anasaz!duane
(602) 861-7609