[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with 'fclose' function on GNU/Linux system
From: |
Michael Vance |
Subject: |
Re: Problem with 'fclose' function on GNU/Linux system |
Date: |
Tue, 7 Nov 2000 08:34:05 -0800 |
On Tue, Nov 07, 2000 at 02:13:46PM -0200, André E. Gabriel da Silva wrote:
> cases, when it is closing the temporary files (with 'fclose'), it receives a
> signal of "segmentation fault" and do a core dump.
>
> Well, gdb says the error occurred inside the function "malloc"
> (chunk_free), file "malloc.c", line 3020. But the program didn't called
> malloc! It called 'fclose'! As I said, the program uses 2*nh files, and it
Which may free resources, thus call free() (note the 'chunk_free'),
which is defined in malloc.c.
You have memory corruption somewhere. You didn't include a required
header or the data file, so we can't even compile the program.
Get yourself a copy of a debug malloc library like dmalloc
(http://www.dmalloc.com), or use the internal debug malloc goodies
(export MALLOC_CHECK_=2, etc.).
m.
--
Programmer "Ha ha." "Ha ha." "What are you laughing at?"
Loki Software "Just the horror of being alive."
http://lokigames.com/~briareos/ - Tony Millionaire