* "malloc" with checks on Tru64 4.0
@ 2002-01-30 18:38 Joerg Bruehe
2002-01-31 11:06 ` Emmanuel Choquet
2002-02-01 0:34 ` Sanjay Kumar
0 siblings, 2 replies; 4+ messages in thread
From: Joerg Bruehe @ 2002-01-30 18:38 UTC (permalink / raw)
[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
--
Joerg Bruehe, SQL Datenbanksysteme GmbH, Berlin, Germany
(speaking only for himself)
mailto: joerg@sql.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "malloc" with checks on Tru64 4.0
2002-01-30 18:38 "malloc" with checks on Tru64 4.0 Joerg Bruehe
@ 2002-01-31 11:06 ` Emmanuel Choquet
2002-02-01 0:34 ` Sanjay Kumar
1 sibling, 0 replies; 4+ messages in thread
From: Emmanuel Choquet @ 2002-01-31 11:06 UTC (permalink / raw)
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "malloc" with checks on Tru64 4.0
2002-01-30 18:38 "malloc" with checks on Tru64 4.0 Joerg Bruehe
2002-01-31 11:06 ` Emmanuel Choquet
@ 2002-02-01 0:34 ` Sanjay Kumar
2002-02-01 13:02 ` Tom Leitner
1 sibling, 1 reply; 4+ messages in thread
From: Sanjay Kumar @ 2002-02-01 0:34 UTC (permalink / raw)
trying using atom with the malloc option
It may work
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: "malloc" with checks on Tru64 4.0
2002-02-01 0:34 ` Sanjay Kumar
@ 2002-02-01 13:02 ` Tom Leitner
0 siblings, 0 replies; 4+ messages in thread
From: Tom Leitner @ 2002-02-01 13:02 UTC (permalink / raw)
As an aside: Rational Purify, the standard commercial product for this
sort of problems is currently being ported to Tru64 Unix. I think it's
almost finished now. Check www.rational.com for a beta.
Tom
In comp.unix.tru64 Sanjay Kumar <nd81@hotmail.com> wrote:
> trying using atom with the malloc option
> It may work
> 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
--
Dr. Tom Leitner Dept. of Communications, Graz Univ. of Technology,
tom@radar.tu-graz.ac.at Inffeldgasse 12, A-8010 Graz / Austria / Europe
PGP public key @ http://www.radar.tugraz.at/people/tom.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-02-01 13:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-30 18:38 "malloc" with checks on Tru64 4.0 Joerg Bruehe
2002-01-31 11:06 ` Emmanuel Choquet
2002-02-01 0:34 ` Sanjay Kumar
2002-02-01 13:02 ` Tom Leitner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox