summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-02-13 19:23:57 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-02-13 19:23:57 (GMT)
commit6e209992eebb1ee91ccc8e1eff31fca67ded227e (patch)
tree337a47de005aad23ee06535dea948e40ce6cf6e9 /src
parent2c74598cbf97e35b1e7f803b4551c21601209b70 (diff)
downloadhdf5-6e209992eebb1ee91ccc8e1eff31fca67ded227e.zip
hdf5-6e209992eebb1ee91ccc8e1eff31fca67ded227e.tar.gz
hdf5-6e209992eebb1ee91ccc8e1eff31fca67ded227e.tar.bz2
[svn-r4948] Purpose:
Bug fix Description: When a block was preempted from the chunk cache, it is possible that one of the pointers in the algorithm is invalidated and would generate a core dump. Solution: Re-calculate the internal pointer and move the the preemption after the re-calc. Platforms tested: FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'src')
-rw-r--r--src/H5Distore.c3
-rw-r--r--src/H5Fistore.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/H5Distore.c b/src/H5Distore.c
index 886529d..ed5d351 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -1276,10 +1276,11 @@ H5F_istore_prune (H5F_t *f, size_t size)
}
if (cur) {
- if (H5F_istore_preempt(f, cur)<0) nerrors++;
for (j=0; j<nmeth; j++) {
if (p[j]==cur) p[j] = NULL;
+ if (n[j]==cur) n[j] = cur->next;
}
+ if (H5F_istore_preempt(f, cur)<0) nerrors++;
}
}
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index 886529d..ed5d351 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -1276,10 +1276,11 @@ H5F_istore_prune (H5F_t *f, size_t size)
}
if (cur) {
- if (H5F_istore_preempt(f, cur)<0) nerrors++;
for (j=0; j<nmeth; j++) {
if (p[j]==cur) p[j] = NULL;
+ if (n[j]==cur) n[j] = cur->next;
}
+ if (H5F_istore_preempt(f, cur)<0) nerrors++;
}
}