qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 435cc3: hw/acpi/nvdimm: Don't take address of


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 435cc3: hw/acpi/nvdimm: Don't take address of fields in pa...
Date: Mon, 12 Nov 2018 07:14:24 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 435cc3e4d515591e15805b1e012564800a130b0f
      
https://github.com/qemu/qemu/commit/435cc3e4d515591e15805b1e012564800a130b0f
  Author: Peter Maydell <address@hidden>
  Date:   2018-11-12 (Mon, 12 Nov 2018)

  Changed paths:
    M hw/acpi/nvdimm.c

  Log Message:
  -----------
  hw/acpi/nvdimm: Don't take address of fields in packed structs

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.

Patch produced with scripts/coccinelle/inplace-byteswaps.cocci.

Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Message-id: address@hidden



      **NOTE:** This service has been marked for deprecation: 
https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]