Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I wish to demonstrate mudflap working on this program,

int
main()
{
  int tab[10];
  int i;
  for (i = 1; i <= 10; i++)
    tab[i] = 0;
  return 0;
}

but I get an error,

$ gcc -fmudflap -lmudflap bounds-violation.c 
In file included from <command-line>:0:0:
/usr/include/stdc-predef.h:59:1: fatal error: mf-runtime.h: No such file or directory
 #endif
 ^
compilation terminated.

So I need the mudflap libraries. But there doesn't appear to exist an appropriate library for my x86_64 platform:

$ uname -a
Linux orca 3.13.0-29-generic #53-Ubuntu SMP Wed Jun 4 21:00:20 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
$ apt-cache search mudflap
lib64mudflap0-dbg-powerpc-cross - GCC mudflap shared support libraries (64 bit debug symbols)
lib64mudflap0-powerpc-cross - GCC mudflap shared support libraries (64bit)
libhfmudflap0-armel-cross - GCC mudflap shared support libraries (hard float)
libhfmudflap0-dbg-armel-cross - GCC mudflap shared support libraries (hard float debug symbols)
libmudflap0-4.7-dev-armel-cross - GCC mudflap support libraries (development files)
libmudflap0-4.7-dev-armhf-cross - GCC mudflap support libraries (development files)
libmudflap0-4.8-dev-armhf-cross - GCC mudflap support libraries (development files)
libmudflap0-4.8-dev-powerpc-cross - GCC mudflap support libraries (development files)
libmudflap0-armel-cross - GCC mudflap shared support libraries
libmudflap0-armhf-cross - GCC mudflap shared support libraries
libmudflap0-dbg-armel-cross - GCC mudflap shared support libraries (debug symbols)
libmudflap0-dbg-armhf-cross - GCC mudflap shared support libraries (debug symbols)
libmudflap0-dbg-powerpc-cross - GCC mudflap shared support libraries (debug symbols)
libmudflap0-powerpc-cross - GCC mudflap shared support libraries
libsfmudflap0-armhf-cross - GCC mudflap shared support libraries (soft float)
libsfmudflap0-dbg-armhf-cross - GCC mudflap shared support libraries (soft float debug symbols)

Why all the ARM and Armel stuff? Searching on the net suggestions there should be a package called libmudflap0-4.8-dev, corresponding the preinstalled version of GCC in Trusty, but it doesn't exist.

Is this a bug? If not, how to I install libmudflap?

Thanks.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I didn't realise that mudflap has been deprecated in GCC from version 4.9. Even though Ubuntu 14.04 ships 4.8, I guess they have discontinued the package. Look up AddressSanitiser instead.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.