From f2a15321059512c244ead069947473101aeab159 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 21 Feb 2023 04:55:39 +0200 Subject: [PATCH 1/6] Add macOS 12.4 (M1) to Drone --- .drone.jsonnet | 12 ++++++++++++ .drone/drone.sh | 1 + 2 files changed, 13 insertions(+) diff --git a/.drone.jsonnet b/.drone.jsonnet index e2262ca..4d8f622 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -344,6 +344,18 @@ local windows_pipeline(name, image, environment, arch = "amd64") = { TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '03,11,14,1z' } + asan, ), + macos_pipeline( + "MacOS 12.4 Xcode 13.4.1 UBSAN", + { TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '03,11,14,17,20,2b' } + ubsan, + xcode_version = "13.4.1", osx_version = "monterey", arch = "arm64", + ), + + macos_pipeline( + "MacOS 12.4 Xcode 13.4.1 ASAN", + { TOOLSET: 'clang', COMPILER: 'clang++', CXXSTD: '03,11,14,17,20,2b' } + asan, + xcode_version = "13.4.1", osx_version = "monterey", arch = "arm64", + ), + windows_pipeline( "Windows VS2015 msvc-14.0", "cppalliance/dronevs2015", diff --git a/.drone/drone.sh b/.drone/drone.sh index 622fbfe..e1f3e04 100755 --- a/.drone/drone.sh +++ b/.drone/drone.sh @@ -5,6 +5,7 @@ # https://www.boost.org/LICENSE_1_0.txt set -ex +export PATH=~/.local/bin:/usr/local/bin:$PATH DRONE_BUILD_DIR=$(pwd) From 5afc91d52db8cfaba56577eecc72c4ec942b10be Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 21 Feb 2023 05:23:43 +0200 Subject: [PATCH 2/6] Change _EQ(max_align, alignof(std::max_align_t)) to _GE unconditionally, because macOS 12.4/M1 also fails (16 > 8) --- test/max_align_test.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/test/max_align_test.cpp b/test/max_align_test.cpp index 4b4a97d..45b8e35 100644 --- a/test/max_align_test.cpp +++ b/test/max_align_test.cpp @@ -54,16 +54,9 @@ int main() BOOST_TEST_GE( boost::core::max_align, boost::alignment_of::value ); #if !defined(BOOST_NO_CXX11_ALIGNOF) && !defined(BOOST_NO_STD_MAX_ALIGN_T) -# if defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 70000 - // libstdc++ 7 adds __float128 to std::max_align_t, but we always have it BOOST_TEST_GE( boost::core::max_align, alignof( std::max_align_t ) ); -# else - - BOOST_TEST_EQ( boost::core::max_align, alignof( std::max_align_t ) ); - -# endif #endif return boost::report_errors(); From dbf0ea98b93292f4303c101f653bfcac0abb35d7 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 21 Feb 2023 05:25:20 +0200 Subject: [PATCH 3/6] Add visibility=global to serialization tests because of UBSan; disable serialization_nvp_test for GCC/UBSan as well --- test/Jamfile.v2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 956ee36..7e83d13 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -363,10 +363,10 @@ run memory_resource_test.cpp ; run data_test.cpp ; run size_test.cpp ; -run serialization_nvp_test.cpp : : : /boost//serialization/off clang,norecover:no ; -run serialization_split_free_test.cpp : : : /boost//serialization/off ; -run serialization_split_member_test.cpp : : : /boost//serialization/off ; -run serialization_construct_data_test.cpp : : : /boost//serialization/off ; +run serialization_nvp_test.cpp : : : /boost//serialization/off norecover:no ; +run serialization_split_free_test.cpp : : : /boost//serialization/off global ; +run serialization_split_member_test.cpp : : : /boost//serialization/off global ; +run serialization_construct_data_test.cpp : : : /boost//serialization/off global ; use-project /boost/core/swap : ./swap ; build-project ./swap ; From 3ab949d3218623209cd3ce771c89b34a789fa184 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 21 Feb 2023 05:32:28 +0200 Subject: [PATCH 4/6] Only use visibility=global in UBSan builds --- test/Jamfile.v2 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 7e83d13..d272daf 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -364,9 +364,9 @@ run data_test.cpp ; run size_test.cpp ; run serialization_nvp_test.cpp : : : /boost//serialization/off norecover:no ; -run serialization_split_free_test.cpp : : : /boost//serialization/off global ; -run serialization_split_member_test.cpp : : : /boost//serialization/off global ; -run serialization_construct_data_test.cpp : : : /boost//serialization/off global ; +run serialization_split_free_test.cpp : : : /boost//serialization/off norecover:global ; +run serialization_split_member_test.cpp : : : /boost//serialization/off norecover:global ; +run serialization_construct_data_test.cpp : : : /boost//serialization/off norecover:global ; use-project /boost/core/swap : ./swap ; build-project ./swap ; From b6b1498275fd68d9b44e0c6181a1a370d6c3789d Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 21 Feb 2023 06:11:44 +0200 Subject: [PATCH 5/6] Use link=static instead of visibility=global (which doesn't help) --- test/Jamfile.v2 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index d272daf..049c607 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -363,10 +363,10 @@ run memory_resource_test.cpp ; run data_test.cpp ; run size_test.cpp ; -run serialization_nvp_test.cpp : : : /boost//serialization/off norecover:no ; -run serialization_split_free_test.cpp : : : /boost//serialization/off norecover:global ; -run serialization_split_member_test.cpp : : : /boost//serialization/off norecover:global ; -run serialization_construct_data_test.cpp : : : /boost//serialization/off norecover:global ; +run serialization_nvp_test.cpp : : : /boost//serialization/off norecover:static ; +run serialization_split_free_test.cpp : : : /boost//serialization/off norecover:static ; +run serialization_split_member_test.cpp : : : /boost//serialization/off norecover:static ; +run serialization_construct_data_test.cpp : : : /boost//serialization/off norecover:static ; use-project /boost/core/swap : ./swap ; build-project ./swap ; From 2691efd1ca93f6ddf7e2d84401be8d182cda556f Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 21 Feb 2023 06:29:10 +0200 Subject: [PATCH 6/6] Re-disable serialization_nvp_test under UBSan; link=static doesn't help there --- test/Jamfile.v2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 049c607..f590d81 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -363,7 +363,7 @@ run memory_resource_test.cpp ; run data_test.cpp ; run size_test.cpp ; -run serialization_nvp_test.cpp : : : /boost//serialization/off norecover:static ; +run serialization_nvp_test.cpp : : : /boost//serialization/off norecover:no ; run serialization_split_free_test.cpp : : : /boost//serialization/off norecover:static ; run serialization_split_member_test.cpp : : : /boost//serialization/off norecover:static ; run serialization_construct_data_test.cpp : : : /boost//serialization/off norecover:static ;