[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)
This commit is contained in:
Quincey Koziol 2002-02-13 14:23:57 -05:00
parent 2c74598cbf
commit 6e209992ee
2 changed files with 4 additions and 2 deletions

View File

@ -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++;
}
}

View File

@ -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++;
}
}