qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Bug 1273944] Re: multiboot header has 0 in mem_upper f


From: Peter Chubb
Subject: Re: [Qemu-devel] [Bug 1273944] Re: multiboot header has 0 in mem_upper field
Date: Wed, 29 Jan 2014 21:13:05 +1100
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/23.4 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

>>>>> "Peter" == Peter Chubb <address@hidden> writes:
This change fixes it.

> diff --git a/exec.c b/exec.c
> index 2435d9e..b387d28 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -1070,7 +1070,7 @@ static void *file_ram_alloc(RAMBlock *block,
>          }
> 
>          /* MAP_POPULATE silently ignores failures */
> -        for (i = 0; i < (memory/hpagesize); i++) {
> +        for (i = 0; i < (memory/hpagesize)-1; i++) {
>              memset(area + (hpagesize*i), 0, 1);
>          }

I don't know why this fixes the issue.  Hence, no signed-off-by line, etc.

My guess is that the memset zeros something it shouldn't off the end of
the array (but that doesn't make sense to me!)

Peter C
--
Dr Peter Chubb                                  peter.chubb AT nicta.com.au
http://www.ssrg.nicta.com.au          Software Systems Research Group/NICTA



reply via email to

[Prev in Thread] Current Thread [Next in Thread]