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

Bug#358761: libmudflap0: libmudflapth doesn't report simple bounds violations, libmudflap does.



Package: libmudflap0
Version: 4.0.3-1
Severity: important


Simple threaded or non-threaded C++ programs with bound violation
are caught (if not threaded) by -fmudflap, but not by -fmudflapth.
mudflapth is not functioning.

Example with a simple non-threaded program:

  $ cat test.cpp
	int main()
	{
	  char x[10];
	  x[11] = 'a';
	}

  $ c++ test.cpp -o test -fmudflap -lmudflap
  $ ./test
	*******
	mudflap violation 1 (check/write): time=1143196648.431873 ptr=0xbfd1ba46 size=12
	pc=0xb7e16478 location=`test.cpp:4 (main)'
	      /usr/lib/libmudflap.so.0(__mf_check+0x48) [0xb7e16478]
	      ./test(main+0xac) [0x80487f0]
	      /usr/lib/libmudflap.so.0(__wrap_main+0x1e4) [0xb7e17214]
	Nearby object 1: checked region begins 0B into and ends 2B after
	mudflap object 0x80cb248: name=`test.cpp:3 (main) char x [10]'
	bounds=[0xbfd1ba46,0xbfd1ba4f] size=10 area=stack check=0r/3w liveness=3
	alloc time=1143196648.431854 pc=0xb7e16fb8
	number of nearby objects: 1

  $ c++ test.cpp -o test -fmudflapth -lmudflapth -lpthread
	/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/libmudflapth.so: warning: the use of 
	`pthread_attr_setstackaddr' is deprecated, use `pthread_attr_setstack'
	/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../lib/libmudflapth.so: warning: the use of 
	`pthread_attr_getstackaddr' is deprecated, use `pthread_attr_getstack'

  $ ./test

Same behaviour for threaded examples.
	Filippo Basso

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-phy
Locale: LANG=it_IT, LC_CTYPE=it_IT (charmap=ISO-8859-1)

Versions of packages libmudflap0 depends on:
ii  gcc-4.0-base                  4.0.3-1    The GNU Compiler Collection (base 
ii  libc6                         2.3.6-3    GNU C Library: Shared libraries an

libmudflap0 recommends no packages.

-- no debconf information



Reply to: