diff options
author | Joel Plutchak <plutchak@hdfgroup.org> | 2013-05-22 20:52:34 (GMT) |
---|---|---|
committer | Joel Plutchak <plutchak@hdfgroup.org> | 2013-05-22 20:52:34 (GMT) |
commit | 8cc6ceb4e32d51f9c296038fec589c2a4fb7eaaf (patch) | |
tree | d77b3272cd907557f432310c3ffcc1c4e0dc416f /src | |
parent | 424a41f878b9ac91f9411dcabc1b8358c7634ea1 (diff) | |
download | hdf5-8cc6ceb4e32d51f9c296038fec589c2a4fb7eaaf.zip hdf5-8cc6ceb4e32d51f9c296038fec589c2a4fb7eaaf.tar.gz hdf5-8cc6ceb4e32d51f9c296038fec589c2a4fb7eaaf.tar.bz2 |
[svn-r23715] Bug Fix: HDFFV-8247
Description:
Failure to write fill values to the user's buffer when reading unallocated
chunks from datasets that have a fill value set to H5D_FILL_VALUE_DEFAULT.
A consequence of this was the reporting of spurious data values in h5dump
and h5diff output.
Solution:
Added check for fill value of H5D_FILL_VALUE_DEFAULT whenever fill value
setting was checked to decide whether or not to fill. This effectively
treats H5D_FILL_VALUE_DEFAULT the same as H5D_FILL_VALUE_USER rather than
H5D_FILL_VALUE_UNDEFINED.
Tested:
h5committest (platypus, ostrich, jam-pp, koala) ran successfully
(fillval test was modified to reveal and check for this error)
Note: RELEASE.txt was previously changed to reflect this fix. This
checkin was of a cleaner version of the code, but mostly to get this
full log message entered.
-This line, and those below, will be ignored--
M H5Dchunk.c
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Dchunk.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 2838a39..dd1860f 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -1797,8 +1797,9 @@ H5D__chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, * but they aren't set, set the flag to skip missing chunks. */ if(fill->fill_time == H5D_FILL_TIME_NEVER || - (fill->fill_time == H5D_FILL_TIME_IFSET && fill_status != H5D_FILL_VALUE_USER_DEFINED && - fill_status != H5D_FILL_VALUE_DEFAULT)) + (fill->fill_time == H5D_FILL_TIME_IFSET && + fill_status != H5D_FILL_VALUE_USER_DEFINED && + fill_status != H5D_FILL_VALUE_DEFAULT)) skip_missing_chunks = TRUE; } @@ -2889,7 +2890,9 @@ H5D__chunk_lock(const H5D_io_info_t *io_info, H5D_chunk_ud_t *udata, HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't tell if fill value defined") if(fill->fill_time == H5D_FILL_TIME_ALLOC || - (fill->fill_time == H5D_FILL_TIME_IFSET && fill_status == H5D_FILL_VALUE_USER_DEFINED)) { + (fill->fill_time == H5D_FILL_TIME_IFSET && + (fill_status == H5D_FILL_VALUE_USER_DEFINED || + fill_status == H5D_FILL_VALUE_DEFAULT))) { /* * The chunk doesn't exist in the file. Replicate the fill * value throughout the chunk, if the fill value is defined. @@ -3314,7 +3317,9 @@ H5D__chunk_allocate(H5D_t *dset, hid_t dxpl_id, hbool_t full_overwrite, * set the "should fill" flag */ if((!full_overwrite && (fill->fill_time == H5D_FILL_TIME_ALLOC || - (fill->fill_time == H5D_FILL_TIME_IFSET && fill_status == H5D_FILL_VALUE_USER_DEFINED))) + (fill->fill_time == H5D_FILL_TIME_IFSET && + (fill_status == H5D_FILL_VALUE_USER_DEFINED || + fill_status == H5D_FILL_VALUE_DEFAULT)))) || pline->nused > 0) should_fill = TRUE; |