diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2016-01-11 15:55:55 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2016-01-11 15:55:55 (GMT) |
commit | 5dbc03ac86cb05730467eb0cad4bf3fb51a74ae4 (patch) | |
tree | 85afdc8134a6e0b512c8ffeb3a63b6af4eb5409e /src/H5SM.c | |
parent | 2824e6bef0f9ea6550845f75ad4580349eafb822 (diff) | |
parent | 887cf130ff773568f90ec8bae66dafa761a77712 (diff) | |
download | hdf5-5dbc03ac86cb05730467eb0cad4bf3fb51a74ae4.zip hdf5-5dbc03ac86cb05730467eb0cad4bf3fb51a74ae4.tar.gz hdf5-5dbc03ac86cb05730467eb0cad4bf3fb51a74ae4.tar.bz2 |
[svn-r28851] merge from trunk.
Diffstat (limited to 'src/H5SM.c')
-rw-r--r-- | src/H5SM.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -1375,11 +1375,23 @@ H5SM_write_mesg(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, } /* end else */ } /* end else */ - if(found) + if(found) { /* If the message was found, it's shared in the heap (now). Set up a * shared message so we can mark it as shared. */ shared.type = H5O_SHARE_TYPE_SOHM; + +#ifdef H5_USING_MEMCHECKER + /* Reset the shared message payload if deferring. This doesn't matter + * in the long run since the payload will get overwritten when the + * non-deferred call to this routine occurs, but it stops memory + * checkers like valgrind from whining when the partially initialized + * shared message is serialized. -QAK + */ + if(defer) + HDmemset(&shared.u, 0, sizeof(shared.u)); +#endif /* H5_USING_MEMCHECKER */ + } /* end if */ else { htri_t share_in_ohdr; /* Whether the new message can be shared in another object's header */ |