[U-Boot] [PATCH] dlmalloc: ensure gd is set for early free

Eugeniu Rosca erosca at de.adit-jv.com
Wed May 23 20:28:17 UTC 2018


Hi Stephen,

On Wed, May 23, 2018 at 01:32:53PM -0600, Stephen Warren wrote:
> On 05/23/2018 01:07 PM, Eugeniu Rosca wrote:
> >This fix seems to be a twin of v2015.01 commit 854d2b9753e4 ("dlmalloc:
> >ensure gd is set for early alloc"). Here is a gdb backtrace to make them
> >look even more similar (sandbox build):
> ...
> >Interestingly, this issue appears on a very old v2015.04 U-boot, but
> >not on u-boot/master (even if the fix applies cleanly to u-boot/master).
> >With the patch applied, my ancient u-boot starts to work properly:
> 
> That's probably because of 2f0bcd4de1ab0cb03f01428a334cd91f8870504c "malloc:
> use hidden visibility" which prevents code outside of U-Boot from using
> U-Boot's malloc/free?

This fixes my issue in apparently much cleaner way. Thanks! The break
down of sandbox into phases is very informative. Like the comments/code
ratio.

> (I only remember this because I very recently bisected an issue in an old
> branch that caused sandbox crashes after upgrading the OS on a test machine
> and triggering the bug that commit fixes.)

Thanks again!

Best regards,
Eugeniu.


More information about the U-Boot mailing list