[uClibc]weird printf problem

kjlin kj.lin at viditec-netmedia.com.tw
Thu Jul 19 12:25:55 UTC 2001


Hi all,

I ported uClinux to an embeded board and encountered a weird "printf" problem.
I made the kernel to run a testing program directly after boot up.
In my case, less "printf" work well but more will fail.
Here is my testing program:

main()
{
    int i=0;

    while(i<200)
    {
                printf("Hello World=%d\n",i);
                i++;
    }
}
 
The output message will die at "Hello World=10" or "Hello World=168" or "Hello World=76" ........
Every times the message dies at different place but it will never successfully be outputed "200" times.
However, if the condition is changed to "while(i<100)", then everything is fine.
It is so weird!!
Why too much "printf" will cause the program to die?
Is it the problem of uClibc or kernel?
Can anybody give some hints?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/uclibc/attachments/20010719/dcbebad1/attachment-0001.htm 


More information about the uClibc mailing list