Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: emmanuel.choquet@compaq.com (Emmanuel Choquet)
Subject: Re: "malloc" with checks on Tru64 4.0
Date: 31 Jan 2002 03:06:48 -0800	[thread overview]
Message-ID: <4618c6b9.0201310306.152ca1b7@posting.google.com> (raw)
In-Reply-To: 3C583DA5.3FD85EB1@sql.de

Joerg Bruehe <joerg@sql.de> wrote in message news:<3C583DA5.3FD85EB1@sql.de>...
> [Crossposted to "c.u.tru64" and "c.u.programmer" with "follow-up" set]
> 
> 
> Dear readers,
> 
> I am doing maintenance on a program and get SIGSEGV, 
> arising in "malloc()" (originally), 
> a stack backtrace can not be generated (using "gdb" 4.17).
> 
> I know that the "typical" reason for a crash in "malloc()" 
> is some code accessing more than the allocated area 
> (quite possible with that code mixture ;-)
> and that a version of malloc with builtin pointer checks 
> might help me (greatly ?) in localizing the error. 
> However, in the Tru64 docs I did not find a hint where to 
> get such a "malloc-with-checks" library.
> 
> Do you have any hints for a "malloc()" replacement with checks, 
> to run on Tru64 version 4.0 D  (yes - that old) ?
> 
> TIA, 
> Joerg Bruehe

I used electricfence on 4.0D in those old times. You'll easily find
sources - it is a linux rpm -

it substitutes his own malloc. you run it twice :

first, each time you malloc VM, it allocates memory at page start, and
creates a noaccess page before.
second pass, each time you malloc(), it allocates memory right at a
page end, and creates a no access page after.

Can be very VM (swap) consuming, but the memory violation trap is very
efficient.



'atom' which is now delivered with the OS can be helpfull as well. I
do not remember if it was present in 4.0D. Scan your OS cd kit to
check. if it is present, install it and man atom as an introduction.
There are malloc looging functions in there.

Cheers


  reply	other threads:[~2002-01-31 11:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-30 18:38 "malloc" with checks on Tru64 4.0 Joerg Bruehe
2002-01-31 11:06 ` Emmanuel Choquet [this message]
2002-02-01  0:34 ` Sanjay Kumar
2002-02-01 13:02   ` Tom Leitner
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