Hi,

There's a small bug in get_reloc_expr in dyngen.c.

It should only affect SPARC hosts, but it can't be causing any real
problems, or someone would have noticed it by now.

I'm trying to port QEMU to PA-RISC[0], and needed this code, so it did
actually affect me.  I've attached the (one-line) patch.
-- 
Stuart Brady

[0] http://homepage.ntlworld.com/wholehog/stuart/qemu/guest.html
diff -ur qemu-head/dyngen.c qemu-new/dyngen.c
--- qemu-head/dyngen.c  2006-06-05 14:37:00.000000000 +0100
+++ qemu-new/dyngen.c   2006-06-05 14:36:49.000000000 +0100
@@ -1196,7 +1196,7 @@
     } else {
 #ifdef HOST_SPARC
         if (sym_name[0] == '.')
-            snprintf(name, sizeof(name),
+            snprintf(name, name_size,
                      "(long)(&__dot_%s)",
                      sym_name + 1);
         else
_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to