mudflap problem

Frank Ch. Eigler fche@redhat.com
Wed Sep 29 01:57:00 GMT 2004


Herman ten Brugge <hermantenbrugge@home.nl> writes:

> I tried mudflap on some test programs and found that the following
> program works:
> [...]
> 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.

This should not be happening, unless some intermediate compiler pass
is lowering the ARRAY_REF (b[i]) to a plain INDIRECT_REF (* b+i) type
expression.  (If so, the instrumentation loses its limited awareness
of where the pointer value came from, and checks only that it refers
to *some* valid object.)  This sort of lowering transform should
likely be disabled in the -fmudflap case.  (It's possible that there
is a bug elsewhere instead.)

- FChE



More information about the Gcc mailing list