summaryrefslogtreecommitdiff
path: root/src/reconcile/rec_write.c
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2016-03-14 13:23:03 +0000
committerKeith Bostic <keith@wiredtiger.com>2016-03-14 13:23:03 +0000
commit1fd5955e494b17617211778acb1a17d59f412b3c (patch)
tree3e7ce8aee4ef86ffca1677c742c801b787f2269f /src/reconcile/rec_write.c
parentdee838189e67a4a68313450c98042ec17321285f (diff)
downloadmongo-1fd5955e494b17617211778acb1a17d59f412b3c.tar.gz
WT-2478: Valgrind test failures
Too many places create buffers we write (for example, encryption). Quit trying to initialize the block header information in any place other than the block header code.
Diffstat (limited to 'src/reconcile/rec_write.c')
-rw-r--r--src/reconcile/rec_write.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/reconcile/rec_write.c b/src/reconcile/rec_write.c
index 9b1ff9ede74..a69f335c9b3 100644
--- a/src/reconcile/rec_write.c
+++ b/src/reconcile/rec_write.c
@@ -1960,13 +1960,15 @@ __rec_split_init(WT_SESSION_IMPL *session,
WT_RET(__wt_buf_init(session, &r->disk_image, corrected_page_size));
/*
- * Clear at least the disk page's header and block-manager space, but
- * in the case of fixed-length column-store, clear the entire buffer.
- * (Fixed-length column-store sets bits in bytes, and the bytes are
- * assumed to be initially 0.)
+ * Clear the disk page header to ensure all of it is initialized, even
+ * the unused fields.
+ *
+ * In the case of fixed-length column-store, clear the entire buffer:
+ * fixed-length column-store sets bits in bytes, where the bytes are
+ * assumed to initially be 0.
*/
memset(r->disk_image.mem, 0, page->type == WT_PAGE_COL_FIX ?
- corrected_page_size : WT_PAGE_HEADER_BYTE_SIZE(btree));
+ corrected_page_size : WT_PAGE_HEADER_SIZE);
/*
* Set the page type (the type doesn't change, and setting it later