Problems with printing double-values with printf and sprintf

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Sep 4 12:47:34 UTC 2009


The problem is in the function dtoa_r() in file dtoa.c line 430. Somehow the
value for _REENT_MP_RESULT(ptr) is to big and arbitrary memory will be overwritten.

Ralf Corsepius wrote:
> On 08/17/2009 12:34 PM, Christian Mauderer wrote:
> 
>> I'm using the newlib 1.17.0 with RTEMS 4.10 patches out of the
>> rtems-4.10-newlib-common-1.17.0-44.suse10.3 rpm.
>>
>> I'm using the following CFLAGS:
>> -mcpu=arm7tdmi-s -mstructure-size-boundary=8 -mapcs-frame -mthumb -Os -g
> 
> Well, that's a lot of obscure flags, of which each may cause your problem.
> 
> => We need to further isolate the problem.
> 
> Can you try to build and excute something similar to this:
> printf( "%f\n", 1.2345 );
> 
> while permuting the CFLAGS you are using, esp.
> -mcpu=arm7tdmi-s, -mapcs-frame and -mthumb?
> 
> Ralf
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users


-- 
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the users mailing list