Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update crashpad to 2024-06-11 #1014

Merged
merged 16 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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**:
Expand Down
2 changes: 1 addition & 1 deletion external/crashpad
Submodule crashpad updated 129 files
6 changes: 3 additions & 3 deletions src/backends/sentry_backend_breakpad.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down
14 changes: 14 additions & 0 deletions tests/cmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
7 changes: 7 additions & 0 deletions tests/leaks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading