[CRIU] Re: [PATCH 4/5] util-net: Fix strict aliasing problem on certain compilers

Pavel Emelyanov xemul at parallels.com
Tue Jul 31 06:18:50 EDT 2012


On 07/31/2012 02:13 PM, Cyrill Gorcunov wrote:
> 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.

Check this issue in kernel please.

> 	Cyrill
> 



More information about the CRIU mailing list