mudflap problem
Herman ten Brugge
hermantenbrugge@home.nl
Tue Sep 28 21:38:00 GMT 2004
Hello,
I tried mudflap on some test programs and found that the following
program works:
int a[1024];
int b[1024];
int
main(void)
{
int i;
for (i = 0 ; i < 2048 ; i++) {
b[i] = 0;
}
return 0;
}
When compiled with -fmudflap the code runs with no error. In the memory map
the array b is before array a. So the code above first fills array b
with 0 and then a.
I assumed mudflap should warn me about buffer overruns. It does not in
this case.
If I replace 'b[i] = 0' with 'a[i] = 0' I get the expected errors.
Herman.
More information about the Gcc
mailing list