Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Skip Montanaro
Wed, 08 Apr 1992 13:11
Make calls free during call to malloc
Author: Skip Montanaro
Date: Wed, 08 Apr 1992 13:11
Date: Wed, 08 Apr 1992 13:11
30 lines
1875 bytes
1875 bytes
In the course of trying to identify some problems I am having executing
parallel actions (Make's -jN flag) on Silicon Graphics machines, I took the
opportunity to try out Purify on the Sun-4 version of make. It noticed that
free() was being called during a call to malloc. This occurs when a job
completes and the data structures for the child process are freed. Here is
an example traceback:
Warning: calling free(1080696) while in a call
to malloc/free/memalign. Probably from a signal handler.
malloc/free/memalign are *not* reentrant and this may
cause a later segv.
This is occurring while in:
free_child (sun4_job.o; pc = 0x11a74)
child_handler (sun4_job.o; pc = 0x117e8)
_sigtramp (<shared library>; pc = 0xf7504c8c)
sbrk (purify.o; pc = 0x2b14)
ReAlLoC (<shared library>; pc = 0xf7507a94)
MaLlOc (<shared library>; pc = 0xf7507330)
The funny capitalization of malloc and realloc are Purify's doing. They are
the usual Sun versions of those functions. The sun4_job.o is also Purify's
work. It is really job.o.
I believe to correct this problem the best that can be done is to mark the
child's data structures as freeable and wait until later to free them.
I have no idea if this is the cause of my SGI problem, but I thought those
with the know-how and/or interest might want to look into this problem.
Skip (montanaro@crd.ge.com)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads