[Bug libfortran/85906] New: Conditional jump depends on uninitialized value in write_decimal / write_integer
jhasse at bixense dot com
gcc-bugzilla@gcc.gnu.org
Thu May 24 14:37:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85906
Bug ID: 85906
Summary: Conditional jump depends on uninitialized value in
write_decimal / write_integer
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
Assignee: unassigned at gcc dot gnu.org
Reporter: jhasse at bixense dot com
Target Milestone: ---
Created attachment 44177
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44177&action=edit
Initialize f->format in write_integer
r256034 modified write_integer to use write_decimal. In write_decimal
(write.c:808) the following line
m = f->format == FMT_G ? -1 : f->u.integer.m;
checks format of the fnode struct. write_integer doesn't initialize that member
which results in a valgrind error "conditional jump or move depends on
uninitialized value".
The attached patch simply sets f->format to FMT_NONE in write_integer.
More information about the Gcc-bugs
mailing list