On Tue, 31 Jul 2007, Jarkko Hietaniemi wrote:
> Apparently gcc (4) has gained a new interesting flag, -fmudflap, which
> causes gcc to instrument memory operations, so that in runtime memory
> access errors can be caught (a la valgrind, a la Purify, a la etc.)
>
> Something like this should work:
>
> cat > mud.c
> int main() {
> char buf[100];
> buf[100] = 0;
> }
> ^D
> gcc -o mud -fmudflap mud.c -lmudflap
> ./mud
> ***KABOOM***
Nice!
> I'm saying "apparently" and "should work" because none of the gccs
> I have available have this feature installed even though the gcc man
> page knows about this feature. What happens for me is this:
>
> cc1: error: mf-runtime.h: No such file or directory
>
> If someone feels like looking into this (starting from what the heck
> needs to be installed), a patch for Makefile.SH and t/TEST and
> pod/perlhack.pod a la valgrind etc. would be cool.
On Debian/etch, mf-runtime.h is part of the libmudflap0-dev package.
Perhaps you have just the runtime libmudflap0 package installed?
--
Andy Dougherty doughera@lafayette.edu
Thread Previous