[CRIU] Re: [PATCH 4/5] util-net: Fix strict aliasing problem on
certain compilers
Cyrill Gorcunov
gorcunov at openvz.org
Tue Jul 31 06:13:15 EDT 2012
On Tue, Jul 31, 2012 at 02:10:47PM +0400, Pavel Emelyanov wrote:
> > cmsg = CMSG_FIRSTHDR(&fdset->hdr);
> > - cmsg->cmsg_len = fdset->hdr.msg_controllen;
> > - cmsg->cmsg_level = SOL_SOCKET;
> > - cmsg->cmsg_type = SCM_RIGHTS;
>
> Huh? How does the net/core/rtnetlink.c work then?! It uses such tricks all the way around!
>
> > + from.cmsg_len = fdset->hdr.msg_controllen;
> > + from.cmsg_level = SOL_SOCKET;
> > + from.cmsg_type = SCM_RIGHTS;
> > +
> > + builtin_memcpy(cmsg, &from, sizeof(from));
I believe it depends on compiler version. On my F16 machine there is no such
problem, but only on the compiler 4.4.5.
Cyrill
More information about the CRIU
mailing list