summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2008-03-06 17:16:17 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2008-03-06 17:16:17 (GMT)
commitda9a26d9a50defeb0631d29e1fc487c791635c58 (patch)
tree63c09ff132ff94e527c444ca714c89abc09b52fe
parent87be7927dd360613f5d884859d03bcb65095a5ce (diff)
downloadhdf5-da9a26d9a50defeb0631d29e1fc487c791635c58.zip
hdf5-da9a26d9a50defeb0631d29e1fc487c791635c58.tar.gz
hdf5-da9a26d9a50defeb0631d29e1fc487c791635c58.tar.bz2
[svn-r14710] Fixed the assert() failures (development mode) from Wed. daily tests:
Added 2 more parameters to H5HF_man_iblock_size() (parent iblock and parent entry) for passing onto H5HF_iblock_man_iblock_protect(). This bug was there before but was revealed now by exercising the recursive part of the code from the new "h5stat_newgrat.h5". Tested on kagiso, smirom and linew with --disable-production. -This line, and those below, will be ignored-- M src/H5HFiblock.c M src/H5HFpkg.h M src/H5HFstat.c
-rw-r--r--src/H5HFiblock.c7
-rw-r--r--src/H5HFpkg.h2
-rw-r--r--src/H5HFstat.c2
3 files changed, 6 insertions, 5 deletions
diff --git a/src/H5HFiblock.c b/src/H5HFiblock.c
index 539761f..4a11dc9 100644
--- a/src/H5HFiblock.c
+++ b/src/H5HFiblock.c
@@ -1591,7 +1591,7 @@ done:
*/
herr_t
H5HF_man_iblock_size(H5F_t *f, hid_t dxpl_id, H5HF_hdr_t *hdr, haddr_t iblock_addr,
- unsigned nrows, hsize_t *heap_size)
+ unsigned nrows, H5HF_indirect_t *par_iblock, unsigned par_entry, hsize_t *heap_size)
{
H5HF_indirect_t *iblock = NULL; /* Pointer to indirect block */
hbool_t did_protect; /* Whether we protected the indirect block or not */
@@ -1608,7 +1608,7 @@ H5HF_man_iblock_size(H5F_t *f, hid_t dxpl_id, H5HF_hdr_t *hdr, haddr_t iblock_ad
HDassert(heap_size);
/* Protect the indirect block */
- if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, nrows, NULL, 0, FALSE, H5AC_READ, &did_protect)))
+ if(NULL == (iblock = H5HF_man_iblock_protect(hdr, dxpl_id, iblock_addr, nrows, par_iblock, par_entry, FALSE, H5AC_READ, &did_protect)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to load fractal heap indirect block")
/* Accumulate size of this indirect block */
@@ -1631,7 +1631,7 @@ H5HF_man_iblock_size(H5F_t *f, hid_t dxpl_id, H5HF_hdr_t *hdr, haddr_t iblock_ad
for(v = 0; v < hdr->man_dtable.cparam.width; v++, entry++)
if(H5F_addr_defined(iblock->ents[entry].addr))
- if(H5HF_man_iblock_size(f, dxpl_id, hdr, iblock->ents[entry].addr, num_indirect_rows, heap_size) < 0)
+ if(H5HF_man_iblock_size(f, dxpl_id, hdr, iblock->ents[entry].addr, num_indirect_rows, iblock, entry, heap_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTLOAD, FAIL, "unable to get fractal heap storage info for indirect block")
} /* end for */
} /* end if */
@@ -1640,6 +1640,7 @@ done:
/* Release the indirect block */
if(iblock && H5HF_man_iblock_unprotect(iblock, dxpl_id, H5AC__NO_FLAGS_SET, did_protect) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release fractal heap indirect block")
+ iblock = NULL;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HF_man_iblock_size() */
diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h
index 702ce08..fd332e5 100644
--- a/src/H5HFpkg.h
+++ b/src/H5HFpkg.h
@@ -601,7 +601,7 @@ H5_DLL herr_t H5HF_man_iblock_delete(H5HF_hdr_t *hdr, hid_t dxpl_id,
haddr_t iblock_addr, unsigned iblock_nrows, H5HF_indirect_t *par_iblock,
unsigned par_entry);
H5_DLL herr_t H5HF_man_iblock_size(H5F_t *f, hid_t dxpl_id, H5HF_hdr_t *hdr,
- haddr_t iblock_addr, unsigned nrows, hsize_t *heap_size/*out*/);
+ haddr_t iblock_addr, unsigned nrows, H5HF_indirect_t *par_iblock, unsigned par_entry, hsize_t *heap_size/*out*/);
/* Direct block routines */
H5_DLL herr_t H5HF_man_dblock_new(H5HF_hdr_t *fh, hid_t dxpl_id, size_t request,
diff --git a/src/H5HFstat.c b/src/H5HFstat.c
index 1311e03..7c28505 100644
--- a/src/H5HFstat.c
+++ b/src/H5HFstat.c
@@ -148,7 +148,7 @@ H5HF_size(const H5HF_t *fh, hid_t dxpl_id, hsize_t *heap_size)
/* Check for indirect blocks for managed objects */
if(H5F_addr_defined(hdr->man_dtable.table_addr) && hdr->man_dtable.curr_root_rows != 0)
- if(H5HF_man_iblock_size(hdr->f, dxpl_id, hdr, hdr->man_dtable.table_addr, hdr->man_dtable.curr_root_rows, heap_size) < 0)
+ if(H5HF_man_iblock_size(hdr->f, dxpl_id, hdr, hdr->man_dtable.table_addr, hdr->man_dtable.curr_root_rows, NULL, 0, heap_size) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTGET, FAIL, "unable to get fractal heap storage info for indirect block")
/* Get B-tree storage for huge objects in fractal heap */