diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2013-09-03 19:39:34 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2013-09-03 19:39:34 (GMT) |
commit | d50c061d38182a5b6477e63655fbe96fcb2c2726 (patch) | |
tree | e905a36999536f75624a9f650cca5769e0a1adc2 | |
parent | a4294ab3ccd31bb06336cfec0b90b28bc591dbf8 (diff) | |
download | hdf5-d50c061d38182a5b6477e63655fbe96fcb2c2726.zip hdf5-d50c061d38182a5b6477e63655fbe96fcb2c2726.tar.gz hdf5-d50c061d38182a5b6477e63655fbe96fcb2c2726.tar.bz2 |
[svn-r24095] Issue 8500 - H5detect.c has trouble to find info for long double with GCC 4.8. A user in the forum found the
problem in H5detect.c (uninitialized buffer) and provided the solution. Allen and I verified it.
Tested with h5committest and CMake on jam, koala, ostrich, playtus, and Allen's virtual machine.
-rw-r--r-- | config/gnu-flags | 5 | ||||
-rw-r--r-- | src/H5detect.c | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/config/gnu-flags b/config/gnu-flags index eef38ad..a79cc72 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -156,11 +156,6 @@ case "$cc_vendor-$cc_version" in gcc-3.*) PROD_CFLAGS="-O3" ;; - gcc-4.8.*) - # temp patch: when GCC 4.8.x is used for Linux, dt_arith fails if -O* - # is used. Remove any -O* flags. (AKC HDFFV-8500) - PROD_CFLAGS="`echo $PROD_CFLAGS | sed -e 's/-O[0-3]*//'`" - ;; gcc-4.*) PROD_CFLAGS="-O3" ;; diff --git a/src/H5detect.c b/src/H5detect.c index 2bf0d2d..25fe778 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -238,6 +238,7 @@ precision (detected_t *d) unsigned char *_x; \ \ HDmemset(&INFO, 0, sizeof(INFO)); \ + HDmemset(INFO.perm, 0, sizeof(INFO.perm)); \ INFO.varname = #VAR; \ INFO.size = sizeof(TYPE); \ \ @@ -297,6 +298,7 @@ precision (detected_t *d) char *_mesg; \ \ HDmemset(&INFO, 0, sizeof(INFO)); \ + HDmemset(INFO.perm, 0, sizeof(INFO.perm)); \ INFO.varname = #VAR; \ INFO.size = sizeof(TYPE); \ \ |