add double-destroy check for MemoryContext
This commit is contained in:
@ -100,7 +100,7 @@ OB_DEF_DESERIALIZE(ObExpr)
|
||||
expr_ctx_id_);
|
||||
if (OB_SUCC(ret)) {
|
||||
if (ObExprExtraInfoFactory::is_registered(type_)) {
|
||||
if (OB_FAIL(ObExprExtraInfoFactory::alloc(CURRENT_CONTEXT.get_arena_allocator(), type_, extra_info_))) {
|
||||
if (OB_FAIL(ObExprExtraInfoFactory::alloc(CURRENT_CONTEXT->get_arena_allocator(), type_, extra_info_))) {
|
||||
LOG_WARN("fail to alloc expr extra info", K(ret), K(type_));
|
||||
} else if (OB_NOT_NULL(extra_info_)) {
|
||||
if (OB_FAIL(extra_info_->deserialize(buf, data_len, pos))) {
|
||||
|
||||
@ -753,7 +753,7 @@ inline int decode(const char* buf, const int64_t data_len, int64_t& pos, const O
|
||||
array.data_ = NULL;
|
||||
} else {
|
||||
const int64_t alloc_size = sizeof(*array.data_) * array.cnt_;
|
||||
array.data_ = static_cast<T*>(CURRENT_CONTEXT.get_arena_allocator().alloc(alloc_size));
|
||||
array.data_ = static_cast<T*>(CURRENT_CONTEXT->get_arena_allocator().alloc(alloc_size));
|
||||
if (OB_ISNULL(array.data_)) {
|
||||
ret = OB_ALLOCATE_MEMORY_FAILED;
|
||||
SQL_LOG(WARN, "alloc memory failed", K(ret), K(alloc_size));
|
||||
|
||||
@ -49,7 +49,7 @@ OB_DEF_SERIALIZE(ObInfixExprItem)
|
||||
OB_DEF_DESERIALIZE(ObInfixExprItem)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (OB_FAIL(ObPostExprItem::deserialize(CURRENT_CONTEXT.get_arena_allocator(), buf, data_len, pos))) {
|
||||
if (OB_FAIL(ObPostExprItem::deserialize(CURRENT_CONTEXT->get_arena_allocator(), buf, data_len, pos))) {
|
||||
LOG_WARN("expr item deserialize failed", K(ret));
|
||||
} else {
|
||||
bool param_lazy = false;
|
||||
|
||||
Reference in New Issue
Block a user