From 2d0d9cd15518c9ee90e3de508d330ea381ee7816 Mon Sep 17 00:00:00 2001 From: tushicheng <18829573815@163.com> Date: Mon, 17 Jun 2024 23:02:45 +0000 Subject: [PATCH] fix core at on_free when enable_sanity --- deps/oblib/src/lib/alloc/ob_tenant_ctx_allocator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deps/oblib/src/lib/alloc/ob_tenant_ctx_allocator.cpp b/deps/oblib/src/lib/alloc/ob_tenant_ctx_allocator.cpp index 8517962210..5bacefc84d 100644 --- a/deps/oblib/src/lib/alloc/ob_tenant_ctx_allocator.cpp +++ b/deps/oblib/src/lib/alloc/ob_tenant_ctx_allocator.cpp @@ -452,7 +452,9 @@ void ObTenantCtxAllocator::on_free(AObject &obj) int64_t tenant_id = blk_mgr->get_tenant_id(); int64_t ctx_id = blk_mgr->get_ctx_id(); - ObMemAttr attr(tenant_id, obj.label_, ctx_id); + char label[lib::AOBJECT_LABEL_SIZE + 1]; + MEMCPY(label, obj.label_, sizeof(label)); + ObMemAttr attr(tenant_id, label, ctx_id); if (OB_NOT_NULL(malloc_callback)) { const int64_t size = obj.alloc_bytes_; (*malloc_callback)(attr, -size);