summaryrefslogtreecommitdiffstats
path: root/src/H5Dbtree.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2009-04-16 15:21:01 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2009-04-16 15:21:01 (GMT)
commit35bbc743d4cf77d6aa8af2acf5578db02e5129ca (patch)
tree7da01b2a6b5eee7c1cef255d64702071dea01572 /src/H5Dbtree.c
parent52fed52f9c6078729586186594e6e6955becb984 (diff)
downloadhdf5-35bbc743d4cf77d6aa8af2acf5578db02e5129ca.zip
hdf5-35bbc743d4cf77d6aa8af2acf5578db02e5129ca.tar.gz
hdf5-35bbc743d4cf77d6aa8af2acf5578db02e5129ca.tar.bz2
[svn-r16764] To fix a bug in extensible arrays as chunk index:
When the dataset is closed in H5D_close(), the pointer to the extensible array struct in the layout message is copied via H5D_flush_real() before H5D_chunk_dest(). This causes an abort from "Assertion `ea->hdr' failed" later when the dataset is re-opened and read. The bug was fixed by adding a flag to the reset function for indexed storage to set/not set the address of the indexed array. H5O_layout_copy() calls H5D_chunk_idx_reset() to reset only the pointer of the array struct for the chunked index storage.
Diffstat (limited to 'src/H5Dbtree.c')
-rw-r--r--src/H5Dbtree.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c
index 7db99d0..fe0349c 100644
--- a/src/H5Dbtree.c
+++ b/src/H5Dbtree.c
@@ -153,7 +153,7 @@ static herr_t H5D_btree_idx_copy_shutdown(H5O_layout_t *layout_src,
H5O_layout_t *layout_dst, hid_t dxpl_id);
static herr_t H5D_btree_idx_size(const H5D_chk_idx_info_t *idx_info,
hsize_t *size);
-static herr_t H5D_btree_idx_reset(H5O_layout_t *layout);
+static herr_t H5D_btree_idx_reset(H5O_layout_t *layout, hbool_t reset_addr);
static herr_t H5D_btree_idx_dump(const H5D_chk_idx_info_t *idx_info,
FILE *stream);
static herr_t H5D_btree_idx_dest(const H5D_chk_idx_info_t *idx_info);
@@ -1347,17 +1347,22 @@ done:
* Programmer: Quincey Koziol
* Thursday, January 15, 2009
*
+ * Modifications:
+ * Vailin Choi; April 2009
+ * Reset address of the chunked storage index if RESET_ADDR is set
+ *
*-------------------------------------------------------------------------
*/
static herr_t
-H5D_btree_idx_reset(H5O_layout_t *layout)
+H5D_btree_idx_reset(H5O_layout_t *layout, hbool_t reset_addr)
{
FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5D_btree_idx_reset)
HDassert(layout);
/* Reset index info */
- layout->u.chunk.u.btree.addr = HADDR_UNDEF;
+ if(reset_addr)
+ layout->u.chunk.u.btree.addr = HADDR_UNDEF;
layout->u.chunk.u.btree.shared = NULL;
FUNC_LEAVE_NOAPI(SUCCEED)