summaryrefslogtreecommitdiffstats
path: root/src/H5Omessage.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2012-03-15 19:16:24 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2012-03-15 19:16:24 (GMT)
commit3ee8b91dee10390a31d60fb6578b7e874060a50e (patch)
treef5423bd673c4b99eea985cd5888796ad71788acc /src/H5Omessage.c
parentd849a118c28f7bcb57798c1222b539adeb8dbe2b (diff)
downloadhdf5-3ee8b91dee10390a31d60fb6578b7e874060a50e.zip
hdf5-3ee8b91dee10390a31d60fb6578b7e874060a50e.tar.gz
hdf5-3ee8b91dee10390a31d60fb6578b7e874060a50e.tar.bz2
[svn-r22072] Purpose: Fix rare corruption bug (HDFFV-7879)
Description: When using the new object header format, it was possible for corruption to occur if the first object header chunk changed size such that the lenght of the "chunk 0 size" field changed. This only occurred if there were messages that had not been decoded. The original algorithm that changed the object header chunk size marked all messages as dirty, causing those that had not been decoded to have both the raw and native form invalidated. Changed the algorithm to avoid marking messages dirty and added assertions to catch the case where messages are dirtied without being decoded (or recently created) first. Tested: jam, koala, ostrich (h5committest), durandal
Diffstat (limited to 'src/H5Omessage.c')
-rw-r--r--src/H5Omessage.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index a3d02d1..f12c835 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -2161,9 +2161,8 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
/* Make certain that null messages aren't in chunks w/gaps */
if(H5O_NULL_ID == msg_id)
HDassert(oh->chunk[mesg->chunkno].gap == 0);
-
- /* Unknown messages should always have a native pointer */
- if(mesg->type == H5O_MSG_UNKNOWN)
+ else
+ /* Non-null messages should always have a native pointer */
HDassert(mesg->native);
#endif /* NDEBUG */