This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libmudflap/48485] mudflap don't discover mistake - negative one index on static array i.e. a[-1]=b;


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48485

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-04-07 10:50:10 UTC ---
It works for me.

/tmp> /space/rguenther/install/gcc-4.5.2/bin/gcc -fmudflap t.c -lmudflap -o t
/tmp> ./t
*******
mudflap violation 1 (check/write): time=1302173318.008878 ptr=0x7fffffffde10
size=18446744073709551396
pc=0x7ffff7a3dcb1 location=`t.c:5:8 (main)'
      /usr/lib64/libmudflap.so.0(__mf_check+0x41) [0x7ffff7a3dcb1]
      ./t(main+0xa0) [0x400a64]
      /lib64/libc.so.6(__libc_start_main+0xe6) [0x7ffff76f9586]
Nearby object 1: checked region begins 0B into and ends 8678B after
mudflap object 0x706960: name=`t.c:2:6 (main) a'
bounds=[0x7fffffffde10,0x7fffffffde19] size=10 area=stack check=0r/3w
liveness=3
alloc time=1302173318.008431 pc=0x7ffff7a3d3f1
Nearby object 2: checked region begins 264B before and ends 8408B after
mudflap object 0x702370: name=`argv[]'
bounds=[0x7fffffffdf18,0x7fffffffdf27] size=16 area=static check=0r/3w
liveness=3
alloc time=1302173318.008116 pc=0x7ffff7a3d3f1
Nearby object 3: checked region begins 280B before and ends 7712B after
mudflap object 0x706570: name=`environ[]'
bounds=[0x7fffffffdf28,0x7fffffffe1df] size=696 area=static check=0r/3w
liveness=3
alloc time=1302173318.008412 pc=0x7ffff7a3d3f1
number of nearby objects: 90

Note that openSUSE has libmudflap disabled, so I wonder how it even compiles
and links for you ;)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]