recent libalias changes

David Malone dwmalone at maths.tcd.ie
Tue Jul 6 04:14:06 PDT 2004


On Tue, Jul 06, 2004 at 12:12:50PM +0200, des at des.no wrote:
> Done.  Could you please also test this one?  It fixes an aliasing
> violation in another checksum function in libalias (at least
> partially, I may have to rewrite the entire function).

The bit of the function that the patch changes seems to only be
accessing the data through char types, which the C standard says
can alias any type. The while loop that is immediately above it
looks risky though, as this function is probably called with a
struct ip * somewhere.

I guess this may not cause problems in practice because this function
isn't an inline and isn't called from the same file as it is defined
in, so it is probably too hard for gcc to do the strict aliasing
thing.

	David.


More information about the freebsd-current mailing list