[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

problems checkerg++



Hello,

I upgraded to libc6 to try the alledgedly highly improved checker
package, version 0.8-19.  However, the simplest `hello world' program in
C++ dumps core on me when compiled with checkerg++.  This is a list of
what I think are the relevant packages I have installed:

libc6:         2.0.5c-0.1
libc6-dev:     2.05c-0.1
libg++272:     2.7.2.8-0.1
libg++272-dev: 2.7.2.8-0.1
gcc:           2.7.2.3-3
binutils:      2.8.1-2
checker:       0.8-19

My C++ application is contained in one file, looking thus:
hw.cc:
------------------------------------------------------------------------
#include <iostream.h>

int main() {
  cout << "Hello world!" << endl;

  return 0;
}
------------------------------------------------------------------------

This is the output of 'checkerg++ -o hw -v hw.cc':
------------------------------------------------------------------------
 gcc -b i486-linuxchecker -V 2.7.2.3 -o hw -v hw.cc -lg++ -lstdc++ -lm
Reading specs from /usr/i486-linuxchecker/lib/specs
gcc version 2.7.2.3
 /usr/lib/gcc-lib/i486-linuxchecker/2.7.2.3/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=7 -D__ELF__ -Dunix -Di386 -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux -Asystem(unix) -Asystem(posix) -Acpu(i386) -Amachine(i386) -D__i486__ -D__CHECKER__ -DMALLOC_0_RETURNS_NULL -I/usr/include hw.cc /tmp/cca00442.ii
GNU CPP version 2.7.2.3 (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/include
 /usr/include/g++
 /usr/local/include
 /usr/i486-linux/include
 /usr/lib/gcc-lib/i486-linux/2.7.2.3/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i486-linuxchecker/2.7.2.3/cc1plus /tmp/cca00442.ii -g -g -quiet -dumpbase hw.cc -version -o /tmp/cca00442.s
GNU C++ version 2.7.2.3 (i386 Linux/ELF) compiled by GNU C version 2.7.2.3.
 /usr/i486-linuxchecker/bin/as -checker -V -Qy -o /tmp/cca004421.o /tmp/cca00442.s
GNU assembler version 2.8.1 (i686-pc-linux-gnu), using BFD version 2.8.1
 /usr/i486-linuxchecker/bin/ld -m elf_i386 -T /usr/i486-linuxchecker/lib/elf_i386.x /usr/i486-linuxchecker/lib/libchecker.o -dynamic-linker /lib/ld-linux.so.2 -o hw /usr/i486-linuxchecker/lib/crt1.o /usr/i486-linuxchecker/lib/crti.o /usr/i486-linuxchecker/lib/crtbegin.o -L/usr/lib/gcc-lib/i486-linuxchecker/2.7.2.3 -L/usr/i486-linuxchecker/lib /tmp/cca004421.o -lg++ -lstdc++ -lm -lgcc -lc -rpath /usr/i486-linuxchecker/lib -lgcc /usr/i486-linuxchecker/lib/crtend.o /usr/i486-linuxchecker/lib/crtn.o
------------------------------------------------------------------------

And this is the output of 'hw':
------------------------------------------------------------------------
Checker 0.8 (i486-linux) Copyright (C) 1996 Tristan Gingold.
This program has been compiled with `checkergcc' or `checkerg++'.
Checker is a memory access detector.
Checker is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
General Public License for more details.
For more information, set CHECKEROPTS to `--help'
>From Checker (pid:00448): `hw' is running (Thu Nov 20 20:11:08 1997)

>From Checker (pid:00448): (rus) read uninitialized byte(s) in the stack.
When Reading 4 byte(s) at address 0xbffffbcc, inside the stack.
Stack frames are:
	pc=0x08067e86 in _IO_file_doallocate() at filedoalloc.c:71
	pc=0x0805b2d7 in __ls__7ostreamPCc() at iostream.cc:726
	pc=0x08059066 in main() at hw.cc:4
	pc=0x08058f6f in checker_text_end() at ./end.c:9
>From Checker (pid:00448): (rus) read uninitialized byte(s) in the stack.
When Reading 4 byte(s) at address 0xbffffbd4, inside the stack.
Stack frames are:
	pc=0x0806a751 in __overflow() at genops.c:161
	pc=0x0805b6ab in endl__FR7ostream() at streambuf.h:386
	pc=0x0805942c in __ls__7ostreamPFR7ostream_R7ostream() at iostream.h:104
	pc=0x0805907b in main() at hw.cc:4
	pc=0x08058f6f in checker_text_end() at ./end.c:9
>From Checker (pid:00448): (rus) read uninitialized byte(s) in the stack.
When Reading 4 byte(s) at address 0xbffffbd8, inside the stack.
Stack frames are:
	pc=0x0806a75d in __overflow() at genops.c:161
	pc=0x0805b6ab in endl__FR7ostream() at streambuf.h:386
	pc=0x0805942c in __ls__7ostreamPFR7ostream_R7ostream() at iostream.h:104
	pc=0x0805907b in main() at hw.cc:4
	pc=0x08058f6f in checker_text_end() at ./end.c:9
>From Checker (pid:00448): (sig) signal.
Receive signal 11 (SEGV): (default action: terminate core ).
------------------------------------------------------------------------

This is the output of hw compiled with g++:
------------------------------------------------------------------------
Hello world!
------------------------------------------------------------------------

Is there anything I can do to improve this situation, or is checkerg++
not ready for prime time yet?  I really think it will be a great tool
when it works.

Comments greatly appreciated,

Eric Meijer

-- 
 E.L. Meijer (tgakem@chem.tue.nl)          | tel. office +31 40 2472189
 Eindhoven Univ. of Technology             | tel. lab.   +31 40 2475032
 Lab. for Catalysis and Inorg. Chem. (TAK) | tel. fax    +31 40 2455054


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: