diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-01-23 21:28:24 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-01-23 21:28:24 (GMT) |
commit | 5e7ed206eacbaf97f92765a393af0acffe931934 (patch) | |
tree | 1affec8d0f08d84a99659087066de758163b893d /src/H5Fprivate.h | |
parent | 32f52d953cffb133e92b772746b66c57714ff6e8 (diff) | |
download | hdf5-5e7ed206eacbaf97f92765a393af0acffe931934.zip hdf5-5e7ed206eacbaf97f92765a393af0acffe931934.tar.gz hdf5-5e7ed206eacbaf97f92765a393af0acffe931934.tar.bz2 |
[svn-r4851] Purpose:
Bug Fix
Description:
When file space was returned to the file space free-list for reuse,
occasionally raw data allocations which used space from the free-list
would overlap with the metadata accumulator and get over-written with
the cached information in the accumulator, corrupting the data.
Solution:
Check if the space about to be recycled on the free-list is going to be
used for raw data and also overlaps with the metadata accumulator cache,
avoiding using space that fits those criteria.
This fixes bug #701
Platforms tested:
FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'src/H5Fprivate.h')
-rw-r--r-- | src/H5Fprivate.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h index ed5daf6..2b43757 100644 --- a/src/H5Fprivate.h +++ b/src/H5Fprivate.h @@ -170,6 +170,8 @@ typedef struct H5F_t H5F_t; #define H5F_addr_cmp(X,Y) (H5F_addr_eq(X,Y)?0: \ (H5F_addr_lt(X, Y)?-1:1)) #define H5F_addr_pow2(N) ((haddr_t)1<<(N)) +#define H5F_addr_overlap(O1,L1,O2,L2) ((O1<O2 && (O1+L1)>O2) || \ + (O1>=O2 && O1<(O2+L2))) /* size of size_t and off_t as they exist on disk */ #define H5F_SIZEOF_ADDR(F) (H5F_sizeof_addr(F)) |