Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: "kjlin" <kj.lin@viditec-netmedia.com.tw>
To: <linux-mips@oss.sgi.com>
Subject: weird printf problem
Date: Fri, 20 Jul 2001 10:49:45 +0800	[thread overview]
Message-ID: <016701c110c6$a371d580$056aaac0@kjlin> (raw)

[-- Attachment #1: Type: text/plain, Size: 926 bytes --]

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:

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?
Does the compiler for my testing program concern this weird problem?
Can anybody give me some hints?

Thanks,
KJ

[-- Attachment #2: Type: text/html, Size: 2233 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: "kjlin" <kj.lin@viditec-netmedia.com.tw>
To: linux-mips@oss.sgi.com
Subject: weird printf problem
Date: Fri, 20 Jul 2001 10:49:45 +0800	[thread overview]
Message-ID: <016701c110c6$a371d580$056aaac0@kjlin> (raw)
Message-ID: <20010720024945.nm6moX_IgtctagdllpsFad59ZyRR0vGGyxlVcaU0XY0@z> (raw)

[-- Attachment #1: Type: text/plain, Size: 926 bytes --]

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:

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?
Does the compiler for my testing program concern this weird problem?
Can anybody give me some hints?

Thanks,
KJ

[-- Attachment #2: Type: text/html, Size: 2233 bytes --]

             reply	other threads:[~2001-07-20  3:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-20  2:49 kjlin [this message]
2001-07-20  2:49 ` weird printf problem kjlin
2001-07-21  1:41 ` Ralf Baechle
2001-07-24  2:23 ` kjlin
2001-07-24  2:23   ` kjlin

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='016701c110c6$a371d580$056aaac0@kjlin' \
    --to=kj.lin@viditec-netmedia.com.tw \
    --cc=linux-mips@oss.sgi.com \
    /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