using libmudflap with non-instrumented shared libraries

2006-03-20 Thread Rafael EspĂ­ndola
Using libmudflap to test a program that uses libxml2, I found that if a program access a constant pointer in a non-instrumented library, mudflap thinks that a read violation has occurred. A simple test that illustrates this is: a.c: - char *p = abc;

Re: using libmudflap with non-instrumented shared libraries

2006-03-20 Thread Frank Ch. Eigler
rafael.espindola wrote: [...] extern char *p; [...] char a = p[0]; [...] compile and link with gcc -shared -fPIC a.c -o liba.so gcc -fmudflap -lmudflap b.c -la -L. -o b Did the compiler give you a warning about inability to track the lifetime of p? It should have. - FChE

Re: using libmudflap with non-instrumented shared libraries

2006-03-20 Thread Rafael EspĂ­ndola
Did the compiler give you a warning about inability to track the lifetime of p? It should have. No. Not even with -Wall -O2. gcc -v: gcc (GCC) 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9) - FChE Thanks, Rafael