[syslinux] SysLinux 5.0 - Problems booting via PXE
Matt Fleming
matt at console-pimps.org
Mon Jan 28 14:26:25 PST 2013
On Mon, 2013-01-28 at 09:24 -0800, H. Peter Anvin wrote:
> On 01/14/2013 07:43 AM, Matt Fleming wrote:
> > On Wed, 2013-01-09 at 04:58 -0800, Shantanu Gadgil wrote:
> >> Hi Shao,
> >>
> >> This is the exact same symptom that I have see on the 4.10 branch on my cluster.
> >> This was quite some time back, before the v5 and v6 development started.
> >
> > Guys, do we know when this bug first appeared? If it's present on the
> > 4.10 branch then that means it's not a new bug, since 4.10 doesn't
> > contain any 5.00 code, and vice versa.
> >
> > Though the fact that Herwig says 4.06 works for him is just confusing.
> >
> > Has anyone else seen this bug where PXELINUX isn't searching through all
> > of the config names? If so, what versions are affected?
> >
>
> That's not entirely true. 4.10 contains a backport of core malloc()
> from the 5.0x branch, so if this is malloc()-related that may very well
> be a strong hint.
Ho hum! I wasn't aware of that. I recently fixed a realloc() bug for the
5.01 release. Something similar might be needed for 4.10,
commit 8bd57b191035bf02b676e2fa760d3a981bd1df02
Author: Matt Fleming <matt.fleming at intel.com>
Date: Wed Jan 23 10:55:14 2013 +0000
realloc: Set the HEAP when splitting a block
Failure to do so means we may put a free block in some random location
because ARENA_HEAP_GET() can return something invalid when used to
find the correct free list in __free_block().
This bug manifested as running out of available free memory.
Cc: H. Peter Anvin <hpa at zytor.com>
Signed-off-by: Matt Fleming <matt.fleming at intel.com>
diff --git a/core/mem/malloc.c b/core/mem/malloc.c
index 02e6061..3825f2a 100644
--- a/core/mem/malloc.c
+++ b/core/mem/malloc.c
@@ -165,6 +165,8 @@ __export void *realloc(void *ptr, size_t size)
ARENA_TYPE_SET(nah->a.attrs, ARENA_TYPE_FREE);
ARENA_SIZE_SET(nah->a.attrs, xsize - newsize);
ARENA_SIZE_SET(ah->a.attrs, newsize);
+ ARENA_HEAP_SET(nah->a.attrs, ARENA_HEAP_GET(ah->a.attrs));
+
//nah->a.type = ARENA_TYPE_FREE;
//nah->a.size = xsize - newsize;
//ah->a.size = newsize;
--
Matt Fleming, Intel Open Source Technology Center
More information about the Syslinux
mailing list