mudflap problem

Frank Ch. Eigler fche@redhat.com
Wed Oct 6 15:00:00 GMT 2004


dgraham wrote:

> [...]  Hey wait a minute.  Isn't this a bug?  a[16] has external
> linkage, so mudflap can't know that it isn't going to be accessed
> from some other compilation unit.  [...]

You're right.  Mudflap should instrument such extern declarations, and
omit them only for unaddressed static ones.  (I think it once did
that.)

> [...]  I'm not sure what the ["cannot track lifetime"] compilation warning
> is all about [...]

I'll reword that warning message.  It's trying to say that it realizes
that the extern variable should have its lifetime tracked via
mf_register/mf_unregister, but it doesn't know the actual size (since
it's declared as "int a [];") so can't do this itself in this compilation unit.

- FChE



More information about the Gcc mailing list