From fcb06e0178926aaccfb9a7a324366984734db598 Mon Sep 17 00:00:00 2001 From: hanr881 <1741282579@qq.com> Date: Thu, 22 Jun 2023 03:54:31 +0000 Subject: [PATCH] to issue<50468640>:fix core when destruct obj which has been copied succ after fail to copy other element --- src/pl/ob_pl_user_type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pl/ob_pl_user_type.cpp b/src/pl/ob_pl_user_type.cpp index 5976cb3c71..02461c6c30 100644 --- a/src/pl/ob_pl_user_type.cpp +++ b/src/pl/ob_pl_user_type.cpp @@ -1797,7 +1797,7 @@ int ObPLCollection::deep_copy(ObPLCollection *src, ObIAllocator *allocator) } // 对于已经copy成功的new obj释放内存 if (OB_FAIL(ret) && OB_NOT_NULL(data)) { - for (int64_t j = 0; j <= i; ++j) { + for (int64_t j = 0; j <= i && j < src->get_count(); ++j) { int tmp = ObUserDefinedType::destruct_obj(new_objs[j]); if (OB_SUCCESS != tmp) { LOG_WARN("fail torelease memory", K(ret), K(tmp));