[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] build: fix type-punning bug



On 10/26/2012 12:58 PM, Eric Blake wrote:
> With older gcc and 64-bit size_t, the compiler issues a real warning:
> rpc/virnetserverservice.c:277: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
> 
> Introduced in commit 0cc79255.  Depending on machine endianness,
> this warning represents a real bug that could mis-interpret the
> value by a factor of 2^32.  I don't know why newer gcc didn't
> bother to warn.
> 
> * src/rpc/virnetserverservice.c
> (virNetServerServiceNewPostExecRestart): Use temporary instead.
> ---
>  src/rpc/virnetserverservice.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Pushed under the build-breaker rule.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]