Mail Archives: djgpp/2000/02/28/09:06:59
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 -