From: Matthias Weisser <weisserm@arcor.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] sandbox: Crash on startup
Date: Tue, 01 Nov 2011 15:18:22 +0100 [thread overview]
Message-ID: <4EAFFFAE.8080700@arcor.de> (raw)
In-Reply-To: <CAPnjgZ38TtDAyafufk-E-txK3yogeZtXqxC9C706-=5Db-jdQQ@mail.gmail.com>
Am 01.11.2011 15:01, schrieb Simon Glass:
> Mi Matthias,
>
> On Tue, Nov 1, 2011 at 2:50 AM, Matthias Weisser <weisserm@arcor.de> wrote:
>> Dear Simon
>>
>> I just wanted to play around with the sandbox "arch" of u-boot maybe
>> adding tun/tap support. Current head compiled successfully but crashed
>> immediately after startup in board_init_f:
>>
>> gd = malloc(sizeof(gd_t));
>> assert(gd);
>>
>> memset((void *)gd, 0, sizeof(gd_t));
>>
>> The simple reason was that malloc refers to u-boots internal malloc
>> which is not initialized at this point. I added the following snippet
>
> That is odd. This commit is supposed to switch over to the system malloc():
>
> fe34107 sandbox: Disable built-in malloc
>
> Can you please check that it is there?
This commit is there. But it seems to be ignored. dlmalloc.c is build
and linked on my machine here.
> I would first check that dlmalloc.o is not being linked, and that
> mem_malloc_init() is undefined.
>
> The current setup works OK for me, but yes it would be nice use
> U-Boot's internal malloc(). The initial effort was to get a baseline
> implementation into U-Boot and there are a number of areas where it
> can be expanded. We want to test as much as possible of the code, and
> dlmalloc is no exception.
Please see http://patchwork.ozlabs.org/patch/123074/ I just posted. This
may be a solution for this issue and we can use dlmalloc in sandbox.
Regards
Matthias
next prev parent reply other threads:[~2011-11-01 14:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-01 9:50 [U-Boot] sandbox: Crash on startup Matthias Weisser
2011-11-01 14:01 ` Simon Glass
2011-11-01 14:18 ` Matthias Weisser [this message]
2011-11-01 18:54 ` Mike Frysinger
2011-11-02 21:01 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EAFFFAE.8080700@arcor.de \
--to=weisserm@arcor.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox