On 9/27/18 7:16 PM, Eric Blake wrote:
> On 9/27/18 11:42 AM, Peter Maydell wrote:
>> Taking the address of a field in a packed struct is a bad idea, because
>> it might not be actually aligned enough for that pointer type (and
>> thus cause a crash on dereference on some host architectures). Newer
>> versions of clang warn about this. Avoid the bug by not using the
>> "modify in place" byte swapping functions.

Good cleaning.

>>
>> This patch was produced with the following spatch script:
> 
> 
> Will queue through my NBD tree.
> 
>>
>> Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>
>> ---
>> Disclaimer: tested only with "make check", but it is a mechanically
>> generated patch...
>>
> 
> Reviewed-by: Eric Blake <ebl...@redhat.com>
> 
> Conflicts with my pending NBD pull request, but I can touch that up (and
> ensure that it gets more than just compile-time testing, even though I
> agree that the change is safe from a pure review standpoint).
> 

Reviewed-by: Philippe Mathieu-Daudé <phi...@redhat.com>

Reply via email to