Fix the problem of arm atomic operation crash caused by global variable address misalignment

This commit is contained in:
obdev
2023-01-29 16:32:29 +08:00
committed by ob-robot
parent 367cd4c339
commit 700e4a2978
2 changed files with 2 additions and 2 deletions

View File

@ -378,7 +378,7 @@ ObTenantCtxAllocator *ObMallocAllocator::take_off_tenant_allocator(uint64_t tena
void ObMallocAllocator::set_root_allocator()
{
int ret = OB_SUCCESS;
static char buf[sizeof(ObTenantCtxAllocator) * ObCtxIds::MAX_CTX_ID];
static char buf[sizeof(ObTenantCtxAllocator) * ObCtxIds::MAX_CTX_ID] __attribute__((__aligned__(16)));
ObTenantCtxAllocator *allocator = NULL;
abort_unless(OB_SUCCESS == create_tenant_allocator(OB_SERVER_TENANT_ID, buf, allocator));
abort_unless(OB_SUCCESS == add_tenant_allocator(allocator));