This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Use of initialized variable in strtod.c
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Wed, 15 Mar 2017 13:16:45 -0500
- Subject: Use of initialized variable in strtod.c
- Authentication-results: sourceware.org; auth=none
Hi
I have looked at this one enough to believe it is
a real issue but have no idea what the proper
solution is. Maybe someone is more familiar with
this routine can help.
This looks like it was introduced in 2006 by Jeff
Johnston but I don't expect him to remember it. :)
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;f=newlib/libc/stdlib/strtod.c;h=f489b5943c8f8655b0a3caddd38114111576ab35
2006-06-22 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdlib/Makefile.am: Add new gdtoa routines.
* libc/stdlib/Makefile.in: Regenerated.
* libc/stdlib/gd_qnan.h: New file.
* libc/stdlib/gdtoa-gethex.c: Ditto.
* libc/stdlib/gdtoa-hexnan.c: Ditto.
* libc/stdlib/gdtoa.h: Ditto.
* libc/stdlib/mprec.c: Add new helper routines needed by
the new gdtoa code.
* libc/stdlib/mprec.h: Integrate some defines and prototypes
used by gdtoa routines here.
* libc/stdlib/strtod.c: Rebased on David M. Gay's gdtoa-strtod.c
which adds C99 support such as nan, inf, and hexadecimal input
format.
Basically if (bb) is false, then bits is not set
and it is used as input to ULtod.
334 if (bb) {
335 copybits(bits, fpi.nbits, bb);
336 Bfree(ptr,bb);
337 }
CID 175379 (#1 of 1): Uninitialized scalar variable (UNINIT)
10. uninit_use_in_call: Using uninitialized element of array bits when calling ULtod. [show details]
338 ULtod(rv.i, bits, exp, i);
Hopefully someone has some insight on how to fix this.
Thanks.
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35806
Support Available (256) 722-9985