]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
plugins/lockstep: make mixed-mode safe
authorAlex Bennée <alex.bennee@linaro.org>
Fri, 5 Jul 2024 08:40:31 +0000 (09:40 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Fri, 5 Jul 2024 11:34:41 +0000 (12:34 +0100)
The ExecState is shared across the socket and if we want to compare
say 64 bit and 32 bit binaries we need the two to use the same sizes
for things.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240705084047.857176-25-alex.bennee@linaro.org>

contrib/plugins/lockstep.c

index 67a779ee9d9029b8f4df05d87aa47b988f758480..8b90b37f670130616463255a7fbc7f23fb36ac78 100644 (file)
@@ -57,7 +57,7 @@ typedef struct {
 /* The execution state we compare */
 typedef struct {
     uint64_t pc;
-    unsigned long insn_count;
+    uint64_t insn_count;
 } ExecState;
 
 typedef struct {
@@ -148,7 +148,7 @@ static void report_divergance(ExecState *us, ExecState *them)
 
         g_string_printf(out,
                         "Δ insn_count @ 0x%016" PRIx64
-                        " (%ld) vs 0x%016" PRIx64 " (%ld)\n",
+                        " (%"PRId64") vs 0x%016" PRIx64 " (%"PRId64")\n",
                         us->pc, us->insn_count, them->pc, them->insn_count);
 
         for (entry = log, i = 0;