Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Strange:  MIPS, librt, malloc
@ 2011-02-25 20:47 ANDY KENNEDY
  2011-02-26 11:44 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: ANDY KENNEDY @ 2011-02-25 20:47 UTC (permalink / raw)
  To: buildroot

Given the following code:

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
        void *mem;

        mem = malloc(1);
        printf("Hello world\n");
        return 0;
}

and the build command:

../../../buildroot/output/host/usr/bin/mips-unknown-linux-uclibc-gcc -o
test -g -Wall test.c

Everything works as you would expect.  However, if I use the following
build command:

../../../buildroot/output/host/usr/bin/mips-unknown-linux-uclibc-gcc -o
test -g -Wall test.c -lrt


malloc never returns and I sit in the _pthread_cleanup_push_defer()
while (1) loop.


If I remove the malloc(), I get Hello World but never return.


Where do I start tracking this problem down?  Anyone else have this
issue?

Thanks,
Andy

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Buildroot] Strange:  MIPS, librt, malloc
  2011-02-25 20:47 [Buildroot] Strange: MIPS, librt, malloc ANDY KENNEDY
@ 2011-02-26 11:44 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2011-02-26 11:44 UTC (permalink / raw)
  To: buildroot

>>>>> "ANDY" == ANDY KENNEDY <ANDY.KENNEDY@adtran.com> writes:

Hi,

 ANDY> malloc never returns and I sit in the _pthread_cleanup_push_defer()
 ANDY> while (1) loop.

 ANDY> If I remove the malloc(), I get Hello World but never return.

 ANDY> Where do I start tracking this problem down?  Anyone else have this
 ANDY> issue?

No, I haven't seen this before. It presumably is a uClibc issue - Could
you try the various uClibc versions we support and report it on the
uClibc list if it still happens with 0.9.32-rc2?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-26 11:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-25 20:47 [Buildroot] Strange: MIPS, librt, malloc ANDY KENNEDY
2011-02-26 11:44 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox