Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Phil LoCascio <locasciop@ornl.gov>
Subject: Re: SIGSEGV INSIDE malloc: HELP!!!
Date: 1999/04/05	[thread overview]
Message-ID: <3708F497.739DF516@ornl.gov> (raw)
In-Reply-To: 37052FF2.260A39D1@compaq.com

Craig Neth wrote:

> Phil LoCascio wrote:
> >
> >     Hi,
> >
> > using    OSF1 machine.name V4.0 878 alpha , I keep getting segmentation
> > faults INSIDE the systems malloc!!
> >
> > Anyone seen this or know a solution?
> >
>
> Well, it _might_ mean there is a bug in malloc, but it's unlikely.
>
> Much more likely is that your application has corrupted the heap.
> Malloc
> has control structures in the heap that it uses to keep track of your
> allocations; if you write off the 'end' of a block of memory that has
> been allocated to you then these structures will be trashed.
>
> You might find the 'third degree' tool useful - it helps find
> places in your application where you are 'scribbling' on memory
> that doesn't belong to you.  Do a 'man third' to learn more about
> this tool.
>
> --
> ----------------------------------------------------------------------------
> Craig Neth                         ! craig.neth@compaq.com
> Compaq Computer Corporation        !
> 110 Spit Brook Road ZKO3-2/W17     !
> Nashua, NH 03062                   ! Opinions expressed herein are my
> own.
> ============================================================================

    Hi,

Working on a hunch I used my malloc "wrappers" to catch strdup, and I have
discovered that forcing allocations to be >=32bytes seems to prevent SIGSEGV.
This might be a malloc bug, or a strdup one. Since I received identical errors
using ElectricFence, I am assuming that it might have been a strdup one
combined with some other. For now everyting seems to work ok;

    Thank You!!


    Cheers

    PHiL




  reply	other threads:[~1999-04-05  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-31  5:00 SIGSEGV INSIDE malloc: HELP!!! Phil LoCascio
1999-04-02  5:00 ` Craig Neth
1999-04-05  4:00   ` Phil LoCascio [this message]
1999-04-12  4:00 ` Aurel Balmosan
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox