[RFC] QXLDevSurfaceCreate: reorder fields to avoid holes on 64-bit arches.

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

 



The hole remains uninitialized variable when allocating an instance of
QXLDevSurfaceCreate on the stack and setting each field individually,
producing an uninteresting valgrind warning. The reordering fixes this.
It also requires bumping the version of the server.
---
What's the suggested course here? just ignore this and either add memset in
qemu or just pretend I don't see the uninitialized value in valgrind, or push
this and what - raise the primary version number (and assume all users actually
check for the exact primary and not for a larger then relation..) ?

 server/spice.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/spice.h b/server/spice.h
index 77aec92..ef2c6d3 100644
--- a/server/spice.h
+++ b/server/spice.h
@@ -203,6 +203,7 @@ struct QXLDevMemSlot {
 };
 
 struct QXLDevSurfaceCreate {
+    uint64_t mem;
     uint32_t width;
     uint32_t height;
     int32_t stride;
@@ -211,7 +212,6 @@ struct QXLDevSurfaceCreate {
     uint32_t mouse_mode;
     uint32_t flags;
     uint32_t type;
-    uint64_t mem;
     uint32_t group_id;
 };
 
-- 
1.7.10.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]