summaryrefslogtreecommitdiffstats
path: root/src/H5B2cache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-07-26 19:12:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-07-26 19:12:22 (GMT)
commit6f3fe31a4c04b15ae7c783ac6295c4cfc532f8e4 (patch)
treeea53de316e332873371de4d5c83d53b8e1a6988a /src/H5B2cache.c
parent76cf163f9617eecb02cbca323cc8be60c8490091 (diff)
downloadhdf5-6f3fe31a4c04b15ae7c783ac6295c4cfc532f8e4.zip
hdf5-6f3fe31a4c04b15ae7c783ac6295c4cfc532f8e4.tar.gz
hdf5-6f3fe31a4c04b15ae7c783ac6295c4cfc532f8e4.tar.bz2
[svn-r14020] Description:
Correct error in size of v2 B-tree metadata prefix, which could cause too many entries to get inserted into a node, eventually causing either a file corruption bug (if debugging asserts were off) or a core dump on the assertion which checked this. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5B2cache.c')
-rw-r--r--src/H5B2cache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index 86592c5..d8679aa 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -647,6 +647,7 @@ H5B2_cache_internal_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr
/* B-tree type */
*p++ = shared->type->id;
+ HDassert((size_t)(p - shared->page) == (H5B2_INT_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM));
/* Serialize records for internal node */
native = internal->int_native;
@@ -982,6 +983,7 @@ H5B2_cache_leaf_flush(H5F_t *f, hid_t dxpl_id, hbool_t destroy, haddr_t addr, H5
/* b-tree type */
*p++ = shared->type->id;
+ HDassert((size_t)(p - shared->page) == (H5B2_LEAF_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM));
/* Serialize records for leaf node */
native = leaf->leaf_native;