fix null mod_name

This commit is contained in:
obdev
2023-04-13 06:46:35 +00:00
committed by ob-robot
parent fdc59d1d46
commit 36e28a5f79
89 changed files with 175 additions and 183 deletions

View File

@ -325,7 +325,7 @@ public:
int ret = OB_SUCCESS;
const int64_t buf_size = sizeof(task);
void *ptr = NULL;
if (NULL == (ptr = ob_malloc(buf_size))) {
if (NULL == (ptr = ob_malloc(buf_size, ObNewModIds::TEST))) {
ret = OB_ALLOCATE_MEMORY_FAILED;
COMMON_LOG(WARN, "ob_malloc failed", K(ret), K(buf_size));
} else {

View File

@ -153,7 +153,8 @@ public:
cout << "\n<<<<<<<<<<<<<<<<<<<<" << "start case" << case_num << ">>>>>>>>>>>>>>>>>>>>" << endl;
// do not use rpc, will core dump
// ASSERT_EQ(OB_SUCCESS, MTL(ObDeadLockDetectorMgr*)->init());
oceancase::unittest::MockDeadLockRpc *rpc = (oceancase::unittest::MockDeadLockRpc *)ob_malloc(sizeof(oceancase::unittest::MockDeadLockRpc));
oceancase::unittest::MockDeadLockRpc *rpc = (oceancase::unittest::MockDeadLockRpc *)ob_malloc(sizeof(oceancase::unittest::MockDeadLockRpc),
ObNewModIds::TEST);
rpc = new (rpc) oceancase::unittest::MockDeadLockRpc();
MTL(ObDeadLockDetectorMgr*)->rpc_ = rpc;

View File

@ -279,7 +279,8 @@ TEST_F(TestTenantResource, mtl_switch)
TEST_F(TestTenantResource, tenant_base_set)
{
transaction::ObTransService* trans_service = (transaction::ObTransService*)ob_malloc(sizeof(transaction::ObTransService));
transaction::ObTransService* trans_service = (transaction::ObTransService*)ob_malloc(sizeof(transaction::ObTransService),
ObNewModIds::TEST);
ObTenantBase tenant_base(1);
tenant_base.set(trans_service);
ObTenantEnv::set_tenant(&tenant_base);