Path: utzoo!utgpu!watmath!att!pacbell!ames!ncar!asuvax!anasaz!duane From: duane@anasaz.UUCP (Duane Morse) Newsgroups: comp.sources.bugs Subject: Bug in dbug.c (Fred Fish's debug package) Message-ID: <579@anasaz.UUCP> Date: 7 Aug 89 18:49:24 GMT Organization: Anasazi Inc., Phoenix AZ Lines: 14 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