This is the mail archive of the newlib@sourceware.cygnus.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

printf for denormalized double in newlib-1.8.1


When running the paranoia.exe test from RTEMS under psim, problems occur
when it tries to print the smallest positive double.  The d2b() function
operates on an uninitialized value and returns an invalid value which
later causes the automatic variables to be overwritten by a too-long
string, taking out the whole program.





(616)% diff -c newlib-1.8.1/newlib/libc/stdlib/mprec.c{-orig,}
*** newlib-1.8.1/newlib/libc/stdlib/mprec.c-orig        Wed May 12
11:43:46 1999
--- newlib-1.8.1/newlib/libc/stdlib/mprec.c     Wed May 12 11:45:08 1999
***************
*** 763,769 ****
--- 763,771 ----
    unsigned long *x, y, z;
  #ifdef VAX
    unsigned long d0, d1;
+ #endif
    d.d = _d;
+ #ifdef VAX
    d0 = word0 (d) >> 16 | word0 (d) << 16;
    d1 = word1 (d) >> 16 | word1 (d) << 16;
  #else

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]