Mail Archives: djgpp/1995/06/13/21:35:01
>>>>> "Raphael" == Raphael Quinet <Raphael DOT Quinet AT eed DOT ericsson DOT se> writes:
Raphael> It's a pity that good software such as Purify is not
Raphael> freeware, because this provides an invaluable help when
Raphael> debugging that kind of errors. I had exactly the same
Raphael> problem today in a large program and I found the error in
Raphael> two minutes with Pufiry 3.0. I know I would have spent
Raphael> several hours if I didn't have that tool. Does anybody
Raphael> know if there is a freeware program (or malloc library)
Raphael> offering the same features as Purify?
A similar free package exists for Linux; it's called "Checker".
The basic idea is this:
Each byte in the program's address space has associated with it a read
permission bit and a write permission bit. Checker replaces gas (the
assembler) with a modified version that wraps each memory-referencing
asm instruction with a call to a small stub that verifies that the
memory has the appropriate read, write, or read/write permissions, and
modifies those permissions. Checker also provides a special
"Checker-aware" malloc library.
We (ARDI) started playing with Checker a few weeks ago to help us
track down bugs in Executor, our commercial Macintosh emulator for
DOS, Linux, and NEXTSTEP. Checker was a good idea, but it doesn't
seem to have been extensively tested or optimized. We found many bugs
in Checker and it was so slow as to be unusable (for our particular
needs).
cottons AT ardi DOT com (with a little help from me) has fixed the bugs and
sped up Checker enormously. We've already found some really sneaky
bugs in Executor, and we expect to find more once we make Executor's
internal memory-management system use Checker facilities aggressively.
Once we are confident our version is stable, we'll send the new
sources to Checker's original author and hopefully he will make them
the latest official release.
Of course, Checker only works for Linux (right now), but many djgpp
developers also have access to Linux systems. It could in principle
be ported to djgpp, but there are some tricky issues involving segment
overrides and such which don't crop up under Linux.
-Mat
- Raw text -