In the event anyone else runs into the issue I've been posting about,
here's a patch. Basically what it does is clear (memset all bytes to
zero) an buffer that's being allocated for type conversion when getting
the fill value of a dataset. Without that, any compiler-inserted pad
bytes are going to be whatever random bits happen to be in memory when
bkg is allocated.
diff -rupN orig/src/H5Pdcpl.c hdf5-1.8.9/src/H5Pdcpl.c
--- orig/src/H5Pdcpl.c 2012-05-09 10:05:58.000000000 -0500
+++ hdf5-1.8.9/src/H5Pdcpl.c 2012-06-01 18:03:14.156605097 -0500
@@ -1557,8 +1557,11 @@ H5P_get_fill_value(H5P_genplist_t *plist
*/
if(H5T_get_size(type) >= H5T_get_size(fill.type)) {
buf = value;
- if(H5T_path_bkg(tpath) && NULL == (bkg =
H5MM_malloc(H5T_get_size(type)
)))
- HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory
allocation fail
ed for type conversion")
+ if(H5T_path_bkg(tpath)) {
+ if(NULL == (bkg = H5MM_malloc(H5T_get_size(type))))
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory
allocation
failed for type conversion")
+ HDmemset(bkg, 0, H5T_get_size(type));
+ }
} /* end if */
else {
if(NULL == (buf = H5MM_malloc(H5T_get_size(fill.type))))
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org