Skip to content

Commit

Permalink
Fix for punch list #13 item #1: Odd behavior in the superblock refres…
Browse files Browse the repository at this point in the history
…h routine.

The test "driver_addr != sblock->driver_addr" is failing for superblock version 2 & 3.
Fix: there is no driver_addr in superblock version 2 & 3.
It should decode the root group object header address (root_addr) and verify accordingly.
  • Loading branch information
Vailin Choi committed Nov 14, 2019
1 parent 227688c commit 350a786
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/H5Fsuper_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1309,25 +1309,18 @@ H5F__cache_superblock_refresh(H5F_t *f, void * _thing, const void * _image,
H5F_addr_decode(f, (const uint8_t **)&image, &base_addr/*out*/);
H5F_addr_decode(f, (const uint8_t **)&image, &ext_addr/*out*/);
H5F_addr_decode(f, (const uint8_t **)&image, &stored_eof/*out*/);
H5F_addr_decode(f, (const uint8_t **)&image, &driver_addr/*out*/);
H5F_addr_decode(f, (const uint8_t **)&image, &root_addr/*out*/);

if ( base_addr != sblock->base_addr )
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "unexpected base_addr")

if ( ext_addr != sblock->ext_addr )
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "unexpected ext_addr")

if ( root_addr != sblock->root_addr )
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "unexpected root_addr")

/* use stored_eof to update EOA below */
#if 0 /* JRM */
/* VFD SWMR TODO: This test is failing for some reason. As it is
* not an issue in phase 1 where we are only using sec2 for the
* writer, we can bypass it for now.
*
* JRM -- 1/16/19
*/
if ( driver_addr != sblock->driver_addr )
HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "unexpected driver_addr")
#endif /* JRM */

/* Decode checksum */
UINT32DECODE(image, read_chksum);
Expand Down

0 comments on commit 350a786

Please sign in to comment.