Message ID | 20140129042749.12626.79571.malone@soybean.canonical.com |
---|---|
State | New |
Headers | show |
>>>>> "Peter" == Peter Chubb <peter.chubb@nicta.com.au> 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
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); }