Dec 152017
 
Checker version 0.2 for LINUX is a powerful tool for diagnosing memory access and malloc problems. It is similar to Purify & dbmalloc.

Full Description of File


Checker version 0.2 for LINUX is a powerful
tool for diagnosing memory access and malloc
problems. It is similar to Purify & dbmalloc


File MCHECKR2.ZIP from The Programmer’s Corner in
Category Linux Files
Checker version 0.2 for LINUX is a powerful tool for diagnosing memory access and malloc problems. It is similar to Purify & dbmalloc.
File Name File Size Zip Size Zip Type
CHECKER2.TGZ 1000858 995633 deflated
FILE_ID.DIZ 137 117 deflated
INTRO 4739 1777 deflated
MANIFEST 8916 1603 deflated
README 4690 2149 deflated

Download File MCHECKR2.ZIP Here

Contents of the README file


Checker version 0.2 for LINUX is a powerful
tool for diagnosing memory access and malloc
problems. It is similar to Purify & dbmalloc
Checker V0.2 (c) 1993 Tristan Gingold
Checker will be a free and GNU implementation of Purify(tm).

If you don't know what Checker is, see INTRO.

How to compile it?
Look at config.h and type:
make
It will make libchecker.o, and three simple programs:
try_checker, try_detector and try_maccess
Try them, and look at their source.
Makefile.lib is the old makefile.

What is the patches dir?
It contains changed files from other packages. See patches/README file.
If you don't want to build a new GAS, only specs is interesting for you.
The specs file is read by gcc, to know your configuration.
Replace your old specs by this one. specs is usually in:
/usr/lib/gcc-lib/MACHINE/VERSION/specs
MACHINE should be i486-linux and VERSION 2.4.5
Try gcc -v to see that.

When I link Checker with my program, I get a link error:
"Undefined symbol chkr_?_?_?_?_chkr referenced from text segment", where
'?' are numbers. Is it a bug?
Not really. An address extractor function has not been defined. The changes
are rather easy: just a line to add in addrextract.S. Mail me, please.

When I kill a program linked with Checker, some files appear in /tmp.
This temp file contains the symbol table from your binary. Checker usually
deletes it, but sometimes it can't. So, remove them.

When I compile Checker, gcc fails on find_exec.c
Compile find_exec.c without the -O option.

What is 'export' ?
The binary (./export) controls which symbols are exported. This is used by
libchecker.o, so that defined symbols such as strcmp, will not be used by
your program.

What are the differences between GAS v2.1.1 and GAS v1.38 ?
GAS v2.1.1 works perfectly (kernel, libc have been compiled with it).
The only (little) incompatibility is the '//' comment: GAS v2.1.1 doesn't
allow it. You can change it by '#'.

What are the new options of GAS?
-checker : insert code
-nochecker : normal mode
-checker-verbose : insert code and tell where
-checker-nostack: do not insert code on stack instructions.

Checker detects memory access error in a libc.a function. Does it means the
libc.a library is buggy ?
Perhaps, but you must be sur that you don't call a function of libc.a with
a bad pointer.
At that time, I already found one bug, which is not important if you use
the normal libc.a

What is CHECKEROPTS? How can I give options to a checkered program, at run
time?
There is a parameter, CHECKEROPTS, which give options to a running program.
To set it, use (csh): setenv CHECKEROPTS "..."
(sh) : CHECKEROPTS="..."
export CHECKEROPTS
Options are:
-s --silent Do not print the welcome message.
-a --abort Stop immediately.
-h --help Print this message.
-n --nosymtab Do not use symbol table.
-o=file --output=file Redirect the output error of Checker to 'file'.

If you want to port it:
there are 3 machine dependent files: symtab.c and sysdep.c
They are symbolic links to files located in sysdep/
symtab.c is OS dependent. It depends on the format of the executable file.
At this time, only (GNU) a.out is recognized (sysdep/gnu.a.out.c)
sysdep.c is OS and CPU dependent. It depends on the memory organisation,
the stack organisation...
At this time, only Linux is recognized (sysdep/linux.c)
codecheck.S is CPU dependent. It is called by the code inserted, computes
the address and calls chkr_check_addr().

Changes against Checker V0.1e-7:
* Implementation of bitmaps and code insertion
* Bug in the garbage collector fixed (Thanks to [email protected])
* chkr_save_stack is more robust. It should never make dump core (Thanks
to Warner Losh [email protected] for his patch)

Changes against Checker V0.1:
* implementation of bitmaps on stack segment
* bug of movsbl, movswl, ... is fixed
* forgotten chkr_?_?_?_?_chkr added (multiple thanks)
* realloc & calloc bugs fixed (Thanks to [email protected])
* a better way to use the libraries is implemented: all Checkered
libraries must have .chkra suffix, and 'ld' is modified to read them
when -checker option is used
* check of syscall is made inside checker rather than inside libc.a
* Checker is initialized by chkrcrt0.o
* bug of S-i-b addressing mode without base is fixed
* 'or' & 'and' instructions now check only for writting. This allow bit
accesses
* morecore.c is merged with macess.c
* valloc & memalign protect lost memory
* At the end of 'free', chkr_set_right was called, even if there was
an error. This bug is fixed.
* options at running time by CHECKEROPTS var.


 December 15, 2017  Add comments

Leave a Reply