From 6e209992eebb1ee91ccc8e1eff31fca67ded227e Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Wed, 13 Feb 2002 14:23:57 -0500 Subject: [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) --- src/H5Distore.c | 3 ++- src/H5Fistore.c | 3 ++- 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; jnext; } + 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; jnext; } + if (H5F_istore_preempt(f, cur)<0) nerrors++; } } -- cgit v0.12