summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2010-09-15 15:33:03 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2010-09-15 15:33:03 (GMT)
commitbf8d33a34b756a926f146a5507f7ecfcee3d3579 (patch)
tree441e2cb99d72612b0290a257112c537954428fb9 /src
parentf0939c320dd3ad761aba4edfdbd63c4b2829f20c (diff)
downloadhdf5-bf8d33a34b756a926f146a5507f7ecfcee3d3579.zip
hdf5-bf8d33a34b756a926f146a5507f7ecfcee3d3579.tar.gz
hdf5-bf8d33a34b756a926f146a5507f7ecfcee3d3579.tar.bz2
[svn-r19387] Purpose: Fix assertion failure caused by fractal heap header file pointer
Description: The fractal heap header structure keeps a pointer to the file associated with it. However, it is possible for that file pointer to be closed while the header is still in cache (through the shared file pointer). Previously, the header's file pointer was not updated and subsequently pointed to an invalid file structure. Modified fractal heap code to update the file pointer every time the header is accessed. Tested: jam, linew, amani (h5committest)
Diffstat (limited to 'src')
-rw-r--r--src/H5HF.c3
-rw-r--r--src/H5HFhdr.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/src/H5HF.c b/src/H5HF.c
index 85018c4..9d8f01d 100644
--- a/src/H5HF.c
+++ b/src/H5HF.c
@@ -856,9 +856,6 @@ HDfprintf(stderr, "%s; After iterator reset fh->hdr->rc = %Zu\n", FUNC, fh->hdr-
if(NULL == (hdr = H5HF_hdr_protect(fh->f, dxpl_id, heap_addr, H5AC_WRITE)))
HGOTO_ERROR(H5E_HEAP, H5E_CANTPROTECT, FAIL, "unable to protect fractal heap header")
- /* Set the shared heap header's file context for this operation */
- hdr->f = fh->f;
-
/* Delete heap, starting with header (unprotects header) */
if(H5HF_hdr_delete(hdr, dxpl_id) < 0)
HGOTO_ERROR(H5E_HEAP, H5E_CANTDELETE, FAIL, "unable to delete fractal heap")
diff --git a/src/H5HFhdr.c b/src/H5HFhdr.c
index e678d74..684c171 100644
--- a/src/H5HFhdr.c
+++ b/src/H5HFhdr.c
@@ -552,6 +552,9 @@ H5HF_hdr_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, H5AC_protect_t rw)
/* Set the header's address */
hdr->heap_addr = addr;
+ /* Update header's file pointer */
+ hdr->f = f;
+
/* Set the return value */
ret_value = hdr;