This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mudflap problem


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]