add double-destroy check for MemoryContext

This commit is contained in:
jg0
2021-07-27 19:54:14 +08:00
committed by wangzelin.wzl
parent 91852f9b58
commit 0b7773c43f
86 changed files with 416 additions and 329 deletions

View File

@ -707,7 +707,7 @@ private:
ret = OB_INIT_TWICE;
SQL_RESV_LOG(WARN, "init twice", K(ret));
} else if (auto_free) {
block_allocator_ = &CURRENT_CONTEXT.get_arena_allocator();
block_allocator_ = &CURRENT_CONTEXT->get_arena_allocator();
} else {
void* alloc_buf = NULL;
if (OB_ISNULL(alloc_buf = ob_malloc(sizeof(ObArenaAllocator), ObModIds::OB_BIT_SET))) {