diff options
author | Keith Bostic <keith@wiredtiger.com> | 2014-09-28 07:46:29 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2014-09-28 07:46:29 -0400 |
commit | 2700ef42cd6380c92aacdee2056e13bfae248ed3 (patch) | |
tree | 9e7fd9d728602d6a1a9b2ddc0fcf952649a7a612 /src/btree/bt_vrfy.c | |
parent | 098d1452e1ab7cde9f734b681867fe34d822cf4f (diff) | |
download | mongo-2700ef42cd6380c92aacdee2056e13bfae248ed3.tar.gz |
The WT_INTL_FOREACH_BEGIN macro walks the page's index, and it could be
split out and freed from underneath us. Change the
WT_INTL_FOREACH_BEGIN/WT_INTL_FOREACH_END pairs to protect the index
during the walk using WT_ENTER_PAGE_INDEX/WT_LEAVE_PAGE_INDEX pairs.
Reference #1246, #1211.
Diffstat (limited to 'src/btree/bt_vrfy.c')
-rw-r--r-- | src/btree/bt_vrfy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/btree/bt_vrfy.c b/src/btree/bt_vrfy.c index d720afe8881..ba8d690ee18 100644 --- a/src/btree/bt_vrfy.c +++ b/src/btree/bt_vrfy.c @@ -418,7 +418,7 @@ celltype_err: WT_RET_MSG(session, WT_ERROR, case WT_PAGE_COL_INT: /* For each entry in an internal page, verify the subtree. */ entry = 0; - WT_INTL_FOREACH_BEGIN(page, child_ref) { + WT_INTL_FOREACH_BEGIN(session, page, child_ref) { /* * It's a depth-first traversal: this entry's starting * record number should be 1 more than the total records @@ -452,7 +452,7 @@ celltype_err: WT_RET_MSG(session, WT_ERROR, case WT_PAGE_ROW_INT: /* For each entry in an internal page, verify the subtree. */ entry = 0; - WT_INTL_FOREACH_BEGIN(page, child_ref) { + WT_INTL_FOREACH_BEGIN(session, page, child_ref) { /* * It's a depth-first traversal: this entry's starting * key should be larger than the largest key previously |