summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJohn Mainzer <mainzer@hdfgroup.org>2015-11-05 13:36:59 (GMT)
committerJohn Mainzer <mainzer@hdfgroup.org>2015-11-05 13:36:59 (GMT)
commitfef44254feda42e3a9ea52eb1035f57dcb50ef77 (patch)
tree435bce633581e7fff2d1eee1f241221c2678b936 /test
parentaa1a5861a41d591d0de6b864db457dcac96883a8 (diff)
downloadhdf5-fef44254feda42e3a9ea52eb1035f57dcb50ef77.zip
hdf5-fef44254feda42e3a9ea52eb1035f57dcb50ef77.tar.gz
hdf5-fef44254feda42e3a9ea52eb1035f57dcb50ef77.tar.bz2
[svn-r28282] Fix for cache test failure in production mode only.
Cause of failure was stack corruption caused by type mismatch between expected and actual return value type in the validate checksum callback. Tested serial (debug and production) on mercury and jam parallel (debug) on mercury.
Diffstat (limited to 'test')
-rw-r--r--test/cache_common.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/cache_common.c b/test/cache_common.c
index c8444b0..0433f1c 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -100,7 +100,7 @@ static herr_t variable_get_load_size(const void *image_ptr, void *udata_ptr,
static herr_t notify_get_load_size(const void *image_ptr, void *udata_ptr,
size_t *image_len_ptr, size_t *actual_len);
-static hbool_t variable_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
+static htri_t variable_verify_chksum(const void *image_ptr, size_t len, void *udata_ptr);
static void *pico_deserialize(const void *image_ptr, size_t len, void *udata_ptr,
hbool_t *dirty_ptr);
@@ -776,7 +776,8 @@ notify_get_load_size(const void *image, void *udata, size_t *image_length, size_
*
*-------------------------------------------------------------------------
*/
-static hbool_t
+
+static htri_t
verify_chksum(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED len, void *udata, int32_t entry_type)
{
test_entry_t *entry;
@@ -808,7 +809,7 @@ verify_chksum(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED len, void
} /* verify_chksum() */
-static hbool_t
+static htri_t
variable_verify_chksum(const void *image, size_t len, void *udata)
{
return verify_chksum(image, len, udata, VARIABLE_ENTRY_TYPE);
@@ -3914,7 +3915,8 @@ protect_entry(H5F_t * file_ptr,
}
cache_entry_ptr = (H5C_cache_entry_t *)H5C_protect(file_ptr, xfer,
- &(types[type]), entry_ptr->addr, &entry_ptr->addr, H5C__NO_FLAGS_SET);
+ &(types[type]), entry_ptr->addr, &entry_ptr->addr,
+ H5C__NO_FLAGS_SET);
if ( ( cache_entry_ptr != (void *)entry_ptr ) ||
( !(entry_ptr->header.is_protected) ) ||
@@ -3943,6 +3945,10 @@ protect_entry(H5F_t * file_ptr,
HDfprintf(stdout,
"entry_ptr->addr = %d, entry_ptr->header.addr = %d\n",
(int)(entry_ptr->addr), (int)(entry_ptr->header.addr));
+ HDfprintf(stdout,
+ "entry_ptr->verify_ct = %d, entry_ptr->max_verify_ct = %d\n",
+ entry_ptr->verify_ct, entry_ptr->max_verify_ct);
+ H5Eprint2(H5E_DEFAULT, stdout);
#endif
pass = FALSE;
failure_mssg = "error in H5C_protect().";
@@ -3957,6 +3963,7 @@ protect_entry(H5F_t * file_ptr,
entry_ptr->is_protected = TRUE;
}
+
if(entry_ptr->header.is_corked)
entry_ptr->is_corked = TRUE;