This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
mudflap problem
- From: Herman ten Brugge <hermantenbrugge at home dot nl>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 28 Sep 2004 21:30:10 +0200
- Subject: mudflap problem
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.