Bug 18090 - Valgrind errors while building libgfortran
Summary: Valgrind errors while building libgfortran
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-20 20:02 UTC by Daniel Jacobowitz
Modified: 2004-10-21 22:33 UTC (History)
3 users (show)

See Also:
Host: i686-pc-linux-gnu
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-10-21 18:57:19


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Jacobowitz 2004-10-20 20:02:46 UTC
/home/drow/valgrind/gcc/gfortran -B/home/drow/valgrind/gcc/
-B/usr/local/i686-pc-linux-gnu/bin/ -B/usr/l
ocal/i686-pc-linux-gnu/lib/ -isystem /usr/local/i686-pc-linux-gnu/include
-isystem /usr/local/i686-pc-li
nux-gnu/sys-include -g -O2 -Wall -fno-repack-arrays -fno-underscoring -c
/home/drow/src/gcc/libgfortran/
intrinsics/selected_real_kind.f90  -fPIC -DPIC -o .libs/selected_real_kind.o

==9587== Conditional jump or move depends on uninitialised value(s)
==9587==    at 0x8757BB9: mpfr_round_raw_generic (in /home/drow/valgrind/gcc/f951)
==9587==    by 0x8758617: mpfr_set4 (in /home/drow/valgrind/gcc/f951)
==9587==    by 0x8758ED0: mpfr_set_str (in /home/drow/valgrind/gcc/f951)
==9587==    by 0x804D544: gfc_convert_real (arith.c:1883)
==9587== 
==9587== Conditional jump or move depends on uninitialised value(s)
==9587==    at 0x8757D5F: mpfr_round_raw_generic (in /home/drow/valgrind/gcc/f951)
==9587==    by 0x8758617: mpfr_set4 (in /home/drow/valgrind/gcc/f951)
==9587==    by 0x8758ED0: mpfr_set_str (in /home/drow/valgrind/gcc/f951)
==9587==    by 0x804D544: gfc_convert_real (arith.c:1883)
==9587== 
==9587== Conditional jump or move depends on uninitialised value(s)
==9587==    at 0x8757C39: mpfr_round_raw_generic (in /home/drow/valgrind/gcc/f951)
==9587==    by 0x8758617: mpfr_set4 (in /home/drow/valgrind/gcc/f951)
==9587==    by 0x8758ED0: mpfr_set_str (in /home/drow/valgrind/gcc/f951)
==9587==    by 0x804D544: gfc_convert_real (arith.c:1883)
Comment 1 Tobias Schlüter 2004-10-21 18:57:18 UTC
Adding Steve Kargl, as he converted gfortran to mpfr.
Comment 2 Steve Kargl 2004-10-21 19:48:42 UTC
Tobi,

I won't be able to look into this problem until late November.  Yes,
I'm still on a boat in the Gulf of Mexico.  Valgrind's output suggests
that the problem is within the MPFR library.  At least, I know I never
used mpfr_set4 or mpfr_round_raw_generic.

-- 
steve
Comment 3 Tobias Schlüter 2004-10-21 22:33:29 UTC
This is an issue in mpfr, and is fixed by a newer libmpfr. I didn't find
anything pertaining to this in mpfr's ChangeLog's, but the failure disappeared
after installing the current mpfr, and the code in gfortran is definitely right:
- I verified that all mpfr variables are initialized before being set in
gfc_convert_real ()
- I verified that the string buffers passed to mpfr_set_str are set to the right
lengths and correctly zero-terminated

I'm closing this as WONTFIX, if someone disagrees, feel free to reopen.