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

[Xen-changelog] [xen-unstable] libxc: Fix 32-vs-64 bitness issue in saving vcpu contexts in core dump



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1259233215 0
# Node ID 338a7b35923fd9a34d6c57c13de01651053e384b
# Parent  3d04720e4d36b9a1d83453459f109ce1d0ea0bc1
libxc: Fix 32-vs-64 bitness issue in saving vcpu contexts in core dump

Signed-off-by: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/libxc/xc_core.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r 3d04720e4d36 -r 338a7b35923f tools/libxc/xc_core.c
--- a/tools/libxc/xc_core.c     Thu Nov 26 10:57:26 2009 +0000
+++ b/tools/libxc/xc_core.c     Thu Nov 26 11:00:15 2009 +0000
@@ -628,10 +628,10 @@ xc_domain_dumpcore_via_callback(int xc_h
         PERROR("Could not get section header for .xen_prstatus");
         goto out;
     }
-    filesz = sizeof(ctxt[0].c) * nr_vcpus;
+    filesz = sizeof(*ctxt) * nr_vcpus;
     sts = xc_core_shdr_set(shdr, strtab, XEN_DUMPCORE_SEC_PRSTATUS,
                            SHT_PROGBITS, offset, filesz,
-                           __alignof__(ctxt[0].c), sizeof(ctxt[0].c));
+                           __alignof__(*ctxt), sizeof(*ctxt));
     if ( sts != 0 )
         goto out;
     offset += filesz;
@@ -755,7 +755,7 @@ xc_domain_dumpcore_via_callback(int xc_h
         goto out;
 
     /* prstatus: .xen_prstatus */
-    sts = dump_rtn(args, (char *)&ctxt[0].c, sizeof(ctxt[0].c) * nr_vcpus);
+    sts = dump_rtn(args, (char *)ctxt, sizeof(*ctxt) * nr_vcpus);
     if ( sts != 0 )
         goto out;
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.