This is an automated email from the ASF dual-hosted git repository. yjhjstz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 7fff6a58b5a45b095c144bea432dbcc5c8bc3990 Author: Chris Hajas <[email protected]> AuthorDate: Fri Apr 26 09:36:38 2024 -0700 Disable Orca refcount test on Mac (#17391) This test ensures that an exception is raised with an illegal refcount. However, MacOS seems to have extra protection and no exception is raised. GPOS_DELETE_ARRAY indirectly calls into CMemoryPoolTracker::DeleteImpl() which sets memory to 0xcdcdcdcd. But the last step in that function calls clib::Free(header) which on MacOS unexpectedly set the bits back to 0. The header is part of the allocation block so that's probably legal. Although Mac sets this to 0, it's not necessarily something we can assume. --- .../server/src/unittest/gpos/common/CRefCountTest.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/backend/gporca/libgpos/server/src/unittest/gpos/common/CRefCountTest.cpp b/src/backend/gporca/libgpos/server/src/unittest/gpos/common/CRefCountTest.cpp index b84b51138b..ca1d0a4bba 100644 --- a/src/backend/gporca/libgpos/server/src/unittest/gpos/common/CRefCountTest.cpp +++ b/src/backend/gporca/libgpos/server/src/unittest/gpos/common/CRefCountTest.cpp @@ -37,7 +37,19 @@ CRefCountTest::EresUnittest() #ifdef GPOS_DEBUG , GPOS_UNITTEST_FUNC_ASSERT(CRefCountTest::EresUnittest_Stack), + +// This test ensures that an exception is raised with an illegal refcount. +// However, MacOS seems to have extra protection and no exception is raised. +// +// GPOS_DELETE_ARRAY indirectly calls into CMemoryPoolTracker::DeleteImpl() +// which sets memory to 0xcdcdcdcd. But the last step in that function +// calls clib::Free(header) which on MacOS unexpectedly set the bits back +// to 0. The header is part of the allocation block so that's probably +// legal. Although Mac sets this to 0, it's not necessarily something we +// can assume. +#ifndef __APPLE__ GPOS_UNITTEST_FUNC_ASSERT(CRefCountTest::EresUnittest_Check) +#endif #endif // GPOS_DEBUG }; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
