Subject: Re: alignment crash in v6 ipfilter when receiving on gif
To: Greg Troxel <gdt@ir.bbn.com>
From: Martin Husemann <martin@duskware.de>
List: port-sparc64
Date: 07/11/2007 21:42:43
On Wed, Jul 11, 2007 at 07:38:26PM +0100, David Laight wrote:
> > +			memcpy(&ip6_src, &ip6->ip6_src,
> > +			       sizeof(struct in6_addr));
> 
> Unless we force a function call for memcpy, the compiler can still
> assume that the source is 64bit aligned and ensure that the target
> is 64bit aligned and to 64bit operations for the copy!

No, it can't - there is no magic cast involved and it knows the
alignment guarantees of ip6->ip6_src.

Martin