diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-09-08 20:15:37 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-09-08 20:15:37 (GMT) |
commit | eaf4ee3eb992809394f74e607b932482126a5b57 (patch) | |
tree | 1a0b803f84532ddf92543239009c5df1a1a43a4d /src/H5FDspace.c | |
parent | 1cad9f47513a8819c82397371ebe25f83b9917e6 (diff) | |
download | hdf5-eaf4ee3eb992809394f74e607b932482126a5b57.zip hdf5-eaf4ee3eb992809394f74e607b932482126a5b57.tar.gz hdf5-eaf4ee3eb992809394f74e607b932482126a5b57.tar.bz2 |
[svn-r17459] Description:
Correct bad interaction between non-zero userblocks with non-zero
alignments.
Also add some additional range checking and tests for invalid userblock
sizes.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Mac OS X/32 10.5.8 (amazon) in debug mode
Mac OS X/32 10.5.8 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Diffstat (limited to 'src/H5FDspace.c')
-rw-r--r-- | src/H5FDspace.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/H5FDspace.c b/src/H5FDspace.c index 5526b03..19f9281 100644 --- a/src/H5FDspace.c +++ b/src/H5FDspace.c @@ -149,9 +149,11 @@ H5FD_extend(H5FD_t *file, H5FD_mem_t type, hbool_t new_block, hsize_t size, hadd /* Check for EOA already aligned */ if((mis_align = (eoa % file->alignment)) > 0) { extra = file->alignment - mis_align; - if (frag_addr) *frag_addr = eoa; - if (frag_size) *frag_size = extra; - } + if(frag_addr) + *frag_addr = eoa - file->base_addr; /* adjust for file's base address */ + if(frag_size) + *frag_size = extra; + } /* end if */ } /* end if */ /* Add in extra allocation amount */ |