www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/28/09:06:59

From: Hans-Bernhard Broeker <broeker AT acp3bf DOT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Check-Memory
Date: 28 Feb 2000 12:56:32 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 36
Message-ID: <89dra0$cpl$1@nets3.rz.RWTH-Aachen.DE>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000228085439 DOT 8833N-100000 AT is>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 951742592 13109 137.226.32.75 (28 Feb 2000 12:56:32 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 28 Feb 2000 12:56:32 GMT
User-Agent: tin/1.4-19991113 ("No Labels") (UNIX) (Linux/2.0.0 (i586))
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:

> On Sat, 26 Feb 2000 producao AT scordon DOT com DOT br wrote:

>> 	I found problem in my soft when I use memory alocation, and
>> reading the docs of gcc.2.95 I found the option -fcheck-memory-usage and
>> -fprefix-function-name. I compiled my project with this and the moment
>> the link, the gcc say: chkr_check_addr, chkr_set_right, chkr_copy_bitmap,
>> etc... not found.

> It seems you need a special library to use this option, the GCC docs
> mentions something called `Checker'.  I don't know where to find it,
> or indeed whether it supports DJGPP at all.

Checker-gcc originally was a special C library, and later a patch to
gcc to cause it to emit some special code was added. You had to build
a whole 'checkered' copy of the system libc, originally. The gcc patch
that has removed the need to do this, partly, has been made part of
the official distribution, some time during the 'egcs' phase of gcc's
development, and it's now activated by those options mentioned above.
With the checker patch in, gcc can now generate code that directly
check for buffer overruns and underruns, and call 'wrappers' for
existing function calls, to check their arguments.

I've used the system on Linux, and it really works rather nicely. It
catches more kinds of problems than YAMD could. E.g., it checks the
arguments of most system and library function calls, not just malloc()
and its friends. It's more like the Windows tool 'BoundsChecker'.

It'd be quite a huge bit of work to get Checker work on DJGPP, so I
second Eli's recommendation: use YAMD to fix your memory allocation
problems, instead.

-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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