linux-gcc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Schiele <rschiele@uni-mannheim.de>
To: Lei Yang <leiyang@nec-labs.com>
Cc: linux-c-programming@vger.kernel.org, linux-gcc@vger.kernel.org
Subject: Re: Segmentation fault from free()
Date: Tue, 24 Aug 2004 23:12:36 +0200	[thread overview]
Message-ID: <20040824211236.GB25368@schiele.dyndns.org> (raw)
In-Reply-To: <412BA650.6050305@nec-labs.com>

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

On Tue, Aug 24, 2004 at 04:34:24PM -0400, Lei Yang wrote:
> Could anyone please point me out what could possibly be the reason?

Cannot say something definitely with incomplete source code.

The bug is not necessarily in the malloc/free pair of this construct.  Likely
you destroyed the heap structure in earlier memory allocation/deallocation
operations (e.g. during list processing).  You may want to check your program
with a memory debugger, e.g. valgrind for i386 platform.

Robert

-- 
Robert Schiele			Tel.: +49-621-181-2517
Dipl.-Wirtsch.informatiker	mailto:rschiele@uni-mannheim.de

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-08-24 21:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-24 20:34 Segmentation fault from free() Lei Yang
2004-08-24 21:12 ` Robert Schiele [this message]
2004-08-24 21:25   ` Lei Yang
2004-08-24 21:49     ` Robert Schiele
2004-08-25  3:05 ` joy
2004-08-27 20:26 ` Mariano Moreyra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040824211236.GB25368@schiele.dyndns.org \
    --to=rschiele@uni-mannheim.de \
    --cc=leiyang@nec-labs.com \
    --cc=linux-c-programming@vger.kernel.org \
    --cc=linux-gcc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).