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:49:59 +0200	[thread overview]
Message-ID: <20040824214959.GC25368@schiele.dyndns.org> (raw)
In-Reply-To: <412BB233.3020400@nec-labs.com>

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

On Tue, Aug 24, 2004 at 05:25:07PM -0400, Lei Yang wrote:
> Do you mean that something 'free' needs has been destroyed?

Free memory has is managed by the heap data structure. If you free an address
twice or free an adress that was never allocated, the data structure will get
corrupted. Often this does occur silently, but in a later state a malloc or
free call with this corrupted data structure might crash your application.

> Why this wouldn't happen with small files?

I don't know your application and thus I am not even sure that this is the
source of your problem. This was just a wild guess as it is a typical error in
such situations.

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:49 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
2004-08-24 21:25   ` Lei Yang
2004-08-24 21:49     ` Robert Schiele [this message]
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=20040824214959.GC25368@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).