qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [5310] 64 bit truncation in code_gen_buffer_size calculation (Jes Sorensen)
@ 2008-09-24 14:10 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2008-09-24 14:10 UTC (permalink / raw)
  To: qemu-devel

Revision: 5310
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5310
Author:   aliguori
Date:     2008-09-24 14:10:36 +0000 (Wed, 24 Sep 2008)

Log Message:
-----------
64 bit truncation in code_gen_buffer_size calculation (Jes Sorensen)

Don't truncate code_gen_buffer_size calculation to int, as it will give
unpredicted results on 64 bit systems when booting large guests.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Modified Paths:
--------------
    trunk/exec.c

Modified: trunk/exec.c
===================================================================
--- trunk/exec.c	2008-09-24 03:32:33 UTC (rev 5309)
+++ trunk/exec.c	2008-09-24 14:10:36 UTC (rev 5310)
@@ -410,7 +410,7 @@
         code_gen_buffer_size = DEFAULT_CODE_GEN_BUFFER_SIZE;
 #else
         /* XXX: needs ajustments */
-        code_gen_buffer_size = (int)(phys_ram_size / 4);
+        code_gen_buffer_size = (unsigned long)(phys_ram_size / 4);
 #endif
     }
     if (code_gen_buffer_size < MIN_CODE_GEN_BUFFER_SIZE)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-09-24 14:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-24 14:10 [Qemu-devel] [5310] 64 bit truncation in code_gen_buffer_size calculation (Jes Sorensen) Anthony Liguori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).