This is the mail archive of the
libc-hacker@sourceware.cygnus.com
mailing list for the glibc project.
Re: strange printf failures
- To: Ulrich Drepper <drepper@cygnus.com>
- Subject: Re: strange printf failures
- From: Joel Sherrill <joel@OARcorp.com>
- Date: Wed, 27 May 1998 14:22:21 -0500 (CDT)
- cc: Philip Blundell <Philip.Blundell@pobox.com>, libc-hacker@gnu.org
On 27 May 1998, Ulrich Drepper wrote:
> Philip Blundell <Philip.Blundell@pobox.com> writes:
>
> > An example of this is printf(), particularly with floating point arguments.
> > It often seems to output complete garbage (not even digits).
>
> This seems like a problem with the GMP functions. In
> stdio-common/vfprintf.c there is a nested function hack_digit which
> generates the digits. Normally the __mpn_mul_1 function is used to
> multiply the number by 10 to get the next digit. So this would would
> be the first function to examine. The other function involved is
> mpn_divmod.
Unless this code has changed substantially since 1.09, this routine an
enormous amount of stack space. I was investigating the use of glibc
1.0[89] for embedded systems use and discovered that printing an FP number
required over 40K of stack space for a simple test case.
This may not be causing you problems but it is something to be aware of
when debugging.
--joel
Joel Sherrill Director of Research & Development
joel@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (205) 722-9985