Mail Archives: djgpp/2001/09/28/17:34:07
Antonijs Kipans wrote:
> As I stumbled over this myself, there is one unexpected possibility - you
> trie to fprintf() into UNOPEN file!
My program had opened and closed the same file for appending several times
before the bomb occurred, and the file contents were plausible, so I doubt
that was the problem here.
The debugging tools were not of much help because the side effects of the bug
disappeared as soon as I enabled the debugging code. (Specifically,
whenever I increased malloc_debug to 1 or higher to detect the bug, the
program executed normally and malloc_verify() returned 1 -- how
frustrating!) By inspection, I eventually did find some errors in my code,
and after I fixed them the program didn't bomb anymore. Thanks to all who
offered their help.
-Eric
> "Eric Rudd" <rudd AT cyberoptics DOT com> wrote in message
> news:3BA1292B DOT C593DFD8 AT cyberoptics DOT com...
> > I have a DJGPP program that is bombing with a SIGSEGV error. I have
> > reason to believe that the program has an array overflow that is
> > corrupting the structure of the heap. (The program actually bombs in a
> > malloc call inside fprintf, but at this point I have no convincing
> > reason to believe that a system function bug is to blame.)
- Raw text -