diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ca7154f1..19296915f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,16 +63,20 @@ jobs: os: ubuntu-22.04 RUN_ANALYZER: code-checker,valgrind - name: macOS (xcode llvm) - os: macOs-11 + os: macOs-14 + ERROR_ON_WARNINGS: 1 + SYSTEM_VERSION_COMPAT: 0 + - name: macOS 13 (xcode llvm) + os: macOs-13 ERROR_ON_WARNINGS: 1 SYSTEM_VERSION_COMPAT: 0 - name: macOS (xcode llvm + universal) - os: macOs-11 + os: macOs-14 ERROR_ON_WARNINGS: 1 SYSTEM_VERSION_COMPAT: 0 CMAKE_DEFINES: -DCMAKE_OSX_ARCHITECTURES=arm64;x86_64 - name: macOS (clang + asan + llvm-cov) - os: macOs-11 + os: macOs-12 CC: clang CXX: clang++ ERROR_ON_WARNINGS: 1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 42f07718f..0f64c80c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## Unreleased + +**Internal**: + +- Updated `crashpad` to 2024-06-11. ([#1014](https://github.com/getsentry/sentry-native/pull/1014), [crashpad#105](https://github.com/getsentry/crashpad/pull/105)) + ## 0.7.6 **Fixes**: diff --git a/external/crashpad b/external/crashpad index 7e36850f8..84f5f87e8 160000 --- a/external/crashpad +++ b/external/crashpad @@ -1 +1 @@ -Subproject commit 7e36850f853cbf76dfaf2f7f3ae2720724addd50 +Subproject commit 84f5f87e8a7f3500be5b534ac079033e8b4f3425 diff --git a/src/backends/sentry_backend_breakpad.cpp b/src/backends/sentry_backend_breakpad.cpp index 68718eaaf..afbf910a2 100644 --- a/src/backends/sentry_backend_breakpad.cpp +++ b/src/backends/sentry_backend_breakpad.cpp @@ -179,9 +179,8 @@ sentry__breakpad_backend_callback( static bool IsDebuggerActive() { - int junk; int mib[4]; - struct kinfo_proc info; + kinfo_proc info; size_t size; // Initialize the flags so that, if sysctl fails for some bizarre @@ -197,7 +196,8 @@ IsDebuggerActive() // Call sysctl. size = sizeof(info); - junk = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0); + [[maybe_unused]] const int junk + = sysctl(mib, std::size(mib), &info, &size, nullptr, 0); assert(junk == 0); // We're being debugged if the P_TRACED flag is set. diff --git a/tests/cmake.py b/tests/cmake.py index 906b8afad..6466d7910 100644 --- a/tests/cmake.py +++ b/tests/cmake.py @@ -153,6 +153,20 @@ def cmake(cwd, targets, options=None): if "llvm-cov" in os.environ.get("RUN_ANALYZER", ""): flags = "-fprofile-instr-generate -fcoverage-mapping" configcmd.append("-DCMAKE_C_FLAGS='{}'".format(flags)) + + # Since we overwrite `CXXFLAGS` below, we must add the experimental library here for the GHA runner that builds + # sentry-native with LLVM clang for macOS (to run ASAN on macOS) rather than the version coming with XCode. + # TODO: remove this if the GHA runner image for macOS ever updates beyond llvm15. + if ( + sys.platform == "darwin" + and os.environ.get("CC", "") == "clang" + and shutil.which("clang") == "/usr/local/opt/llvm@15/bin/clang" + ): + flags = ( + flags + + " -L/usr/local/opt/llvm@15/lib/c++ -fexperimental-library -Wno-unused-command-line-argument" + ) + configcmd.append("-DCMAKE_CXX_FLAGS='{}'".format(flags)) if "CMAKE_DEFINES" in os.environ: configcmd.extend(os.environ.get("CMAKE_DEFINES").split()) diff --git a/tests/leaks.txt b/tests/leaks.txt index 4ca4e4b68..4772a4261 100644 --- a/tests/leaks.txt +++ b/tests/leaks.txt @@ -3,4 +3,11 @@ # Adding a manual `[paths release]` "fixes" the `crashpad_handler` leak, but leads to a use-after-free in sentry. # https://github.com/getsentry/crashpad/blob/9cd1a4dadb51b31665f5e50c5ffc25bb9d10571a/client/crash_report_database_mac.mm#L705 leak:contentsOfDirectoryAtPath + +# This is a known issue introduced with libcurl 7.77.0 on macOS: https://github.com/getsentry/sentry-native/pull/827#issuecomment-1521956265 +# While it should have been fixed with 7.78.0, tests with SDK-packaged version 7.85.0 still detect the same leak. leak:SCDynamicStoreCopyProxiesWithOptions + +# This is a known issue in ASAN packaged with llvm15/16 (and below): https://github.com/google/sanitizers/issues/1501 +# I cannot reproduce it with the current brew llvm package (18.1.7). TODO: remove when GHA macOS runner image updates the llvm package. +leak:realizeClassWithoutSwift