[5310] 64 bit truncation in code_gen_buffer_size calculation (Jes Sorensen)
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 <[email protected]>
Signed-off-by Anthony Liguori <[email protected]>
Modified Paths:
--------------
trunk/exec.c
Modified: trunk/exec.c
===================================================================
exec.c +1 -1
@@ -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 )