[coreboot] fix memory allocator free list corruption

Stefan Reinauer stepan at coresystems.de
Thu Aug 14 16:46:18 CEST 2008


Jordan Crouse wrote:
>> * fix memory allocator bug that lead to freelist corruption on the first malloc
>>   (and spent 8 bytes too much per malloc)
>> * if the memory allocator detects freelist corruption, print a message instead
>>   of silently dying.
>>     
>
>   
>> Signed-off-by: Stefan Reinauer <stepan at coresystems.de>
>>     
> Acked-by: Jordan Crouse <jordan.crouse at amd.com>
>   
thanks! r3510.

> I'm not 100% sure how we want to handle fatal errors.  I am not convinced
> that a printf() -> halt() is the most customer friendly way.  But we have
> so few of them right now, we don't need a solution right away.
Yes, I thought about that, too. I introduced the printf merely to
distinguish the fatal cases caught by the code from those overwriting
the code or hanging the machine..

We could have a fatal() function that calls into a handler if the
payload installs one, or prints a warning and halts otherwise. I have no
strong opinion about this, just giving the user or developer a chance to
recognize what went wrong can be useful. In practice, those problems
won't happen anyways unless the payload (or, libpayload) has a bug.

Stefan

-- 
coresystems GmbH • Brahmsstr. 16 • D-79104 Freiburg i. Br.
      Tel.: +49 761 7668825 • Fax: +49 761 7664613
Email: info at coresystems.dehttp://www.coresystems.de/
Registergericht: Amtsgericht Freiburg • HRB 7656
Geschäftsführer: Stefan Reinauer • Ust-IdNr.: DE245674866






More information about the coreboot mailing list