08/10/2009 3:42 PM
post35619
|
Mario Charest wrote:
> Using 6.4.1 I started playing around with mudflap.
>
> The following C program:
>
> #include <stdio.h>
>
>
> int main(void)
> {
> int a[10];
>
> a[11] = 64;
> printf("this is a atest %d\n", a[11]);
> return 1;
>
> }
>
> Does what I expect it to and mudflap report an error.
>
> I compile this in C++, the program will do an Abort !!! I chase it down to a exception being throw in a new()
executed before main(), from ios_base::_Init().
>
> Build with qcc -fmudflap -lmudflap -g2 -osize -fexceptions inthemud.cpp.
>
> Suggestions?
Try compiling without -lmudflap:
qcc -fmudflap -lmudflap -g2 -Osize -fexceptions inthemud.cpp
libmudflap needs to be initialized before shared objects
that call wrapped functions (like malloc), therefore when
doing "ldd inthemud" it should list it below libcpp.
---
Aleksandar
|
|
|