[Top] [All Lists]

weird printf problem

To: <>
Subject: weird printf problem
From: "kjlin" <>
Date: Fri, 20 Jul 2001 10:49:45 +0800
Hi all,
I ported linux to my embeded board and encountered a weird "printf" problem.
The library i used is uClibc.
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:
    int i=0;
                printf("Hello World=%d\n",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?
Does the compiler for my testing program concern this weird problem?
Can anybody give me some hints?
<Prev in Thread] Current Thread [Next in Thread>