www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/24/04:27:48

Sender: crough45 AT amc DOT de
Date: Thu, 24 Apr 1997 09:14:31 +0100
From: Chris Croughton <crough45 AT amc DOT de>
Mime-Version: 1.0
To: cziwkga AT ulcc DOT ac DOT uk
Cc: djgpp AT delorie DOT com
Subject: Re: ARGH! how can I sigsev inside Malloc?!
Message-Id: <97Apr24.101315gmt+0100.21907@internet01.amc.de>

Kevin Ashley wrote:

> Usually by corrupting one of the blocks you have malloced (writing off
> the end of it, or writing before the beginning) or, less likely, by 
> corrupting malloc's internal tables. 

My usual way of doing it is in fact to corrupt the internal tables.
The usual way is to call free with the same pointer twice, or with
something which isn't a malloc'd block (like a static buffer).  The
standard free in the library does very little (if any) sanity checking.

Chris

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019