Mac: ensure crashes are forwarded to system crash reporter [crashpad/crashpad : main]

44 views
Skip to first unread message

Leonard Grey (Gerrit)

unread,
Feb 7, 2025, 1:13:47 PM2/7/25
to Mark Mentovai, Crashpad LUCI CQ, crashp...@chromium.org
Attention needed from Mark Mentovai

Leonard Grey added 3 comments

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Leonard Grey . resolved

PTAL :)

File client/crashpad_client_mac.cc
Line 545, Patchset 3: exc_to_reset & ExcMaskValid(),
Leonard Grey . resolved

Should we drop this entirely? All of this logic is pre-10.10

File client/simulate_crash_mac.cc
Line 62, Patchset 3: CHECK(!set_state);
Leonard Grey . resolved

Just encoding how this is actually called. I can't tell if there was an intention to have this vary at some point

Open in Gerrit

Related details

Attention is currently required from:
  • Mark Mentovai
Submit Requirements:
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
Gerrit-Change-Number: 6242575
Gerrit-PatchSet: 4
Gerrit-Owner: Leonard Grey <lg...@chromium.org>
Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
Gerrit-Comment-Date: Fri, 07 Feb 2025 17:58:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Mark Mentovai (Gerrit)

unread,
Feb 7, 2025, 5:49:44 PM2/7/25
to Leonard Grey, Justin Cohen, Crashpad LUCI CQ, crashp...@chromium.org
Attention needed from Justin Cohen and Leonard Grey

Mark Mentovai added 1 comment

Patchset-level comments
Mark Mentovai . resolved

Thanks! I’ll dig in next week.

Justin expressed interest in reading through this too.

Open in Gerrit

Related details

Attention is currently required from:
  • Justin Cohen
  • Leonard Grey
Submit Requirements:
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: crashpad/crashpad
Gerrit-Branch: main
Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
Gerrit-Change-Number: 6242575
Gerrit-PatchSet: 4
Gerrit-Owner: Leonard Grey <lg...@chromium.org>
Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Attention: Leonard Grey <lg...@chromium.org>
Gerrit-Attention: Justin Cohen <justi...@chromium.org>
Gerrit-Comment-Date: Fri, 07 Feb 2025 22:49:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Justin Cohen (Gerrit)

unread,
Feb 10, 2025, 4:51:17 PM2/10/25
to Leonard Grey, Mark Mentovai, Crashpad LUCI CQ, crashp...@chromium.org
Attention needed from Leonard Grey

Justin Cohen added 1 comment

Commit Message
Line 11, Patchset 4 (Latest):Instead, it now listens to EXC_CORPSE_NOTIFY, which is raised postmortem iff an EXC_CRASH handler returns MACH_RCV_PORT_DIED. But we specifically were *not* doing that in order to avoid multiple reports (one from EXC_CRASH and one from EXC_CORPSE_NOTIFY) between 10.11 and 10.14.
Justin Cohen . unresolved

if

Open in Gerrit

Related details

Attention is currently required from:
  • Leonard Grey
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: crashpad/crashpad
    Gerrit-Branch: main
    Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
    Gerrit-Change-Number: 6242575
    Gerrit-PatchSet: 4
    Gerrit-Owner: Leonard Grey <lg...@chromium.org>
    Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
    Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
    Gerrit-Attention: Leonard Grey <lg...@chromium.org>
    Gerrit-Comment-Date: Mon, 10 Feb 2025 21:45:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Justin Cohen (Gerrit)

    unread,
    Feb 10, 2025, 4:51:17 PM2/10/25
    to Leonard Grey, Mark Mentovai, Crashpad LUCI CQ, crashp...@chromium.org
    Attention needed from Leonard Grey

    Justin Cohen voted and added 1 comment

    Votes added by Justin Cohen

    Code-Review+1

    1 comment

    Patchset-level comments
    Justin Cohen . resolved

    LG % Mark's review.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Leonard Grey
    Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: crashpad/crashpad
    Gerrit-Branch: main
    Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
    Gerrit-Change-Number: 6242575
    Gerrit-PatchSet: 4
    Gerrit-Owner: Leonard Grey <lg...@chromium.org>
    Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
    Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
    Gerrit-Attention: Leonard Grey <lg...@chromium.org>
    Gerrit-Comment-Date: Mon, 10 Feb 2025 21:47:12 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Justin Cohen (Gerrit)

    unread,
    Feb 10, 2025, 4:51:17 PM2/10/25
    to Leonard Grey, Mark Mentovai, Crashpad LUCI CQ, crashp...@chromium.org
    Attention needed from Leonard Grey

    Justin Cohen added 1 comment

    Patchset-level comments
    Justin Cohen . resolved

    Should `- Does assorted related cleanup` be put into a different CL?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Leonard Grey
    Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: crashpad/crashpad
    Gerrit-Branch: main
    Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
    Gerrit-Change-Number: 6242575
    Gerrit-PatchSet: 4
    Gerrit-Owner: Leonard Grey <lg...@chromium.org>
    Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
    Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
    Gerrit-Attention: Leonard Grey <lg...@chromium.org>
    Gerrit-Comment-Date: Mon, 10 Feb 2025 21:47:44 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Leonard Grey (Gerrit)

    unread,
    Feb 11, 2025, 11:01:21 AM2/11/25
    to Justin Cohen, Mark Mentovai, Crashpad LUCI CQ, crashp...@chromium.org
    Attention needed from Justin Cohen

    Leonard Grey added 2 comments

    Patchset-level comments
    Justin Cohen . resolved

    Should `- Does assorted related cleanup` be put into a different CL?

    Leonard Grey

    Done, will update with a dependent CL shortly

    Commit Message
    Line 11, Patchset 4:Instead, it now listens to EXC_CORPSE_NOTIFY, which is raised postmortem iff an EXC_CRASH handler returns MACH_RCV_PORT_DIED. But we specifically were *not* doing that in order to avoid multiple reports (one from EXC_CRASH and one from EXC_CORPSE_NOTIFY) between 10.11 and 10.14.
    Justin Cohen . resolved

    if

    Leonard Grey

    Actually meant iff for "if and only if". Spelled it out instead

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Justin Cohen
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: crashpad/crashpad
    Gerrit-Branch: main
    Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
    Gerrit-Change-Number: 6242575
    Gerrit-PatchSet: 9
    Gerrit-Owner: Leonard Grey <lg...@chromium.org>
    Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
    Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
    Gerrit-Attention: Justin Cohen <justi...@chromium.org>
    Gerrit-Comment-Date: Tue, 11 Feb 2025 16:01:18 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Justin Cohen <justi...@chromium.org>
    unsatisfied_requirement
    open
    diffy

    Mark Mentovai (Gerrit)

    unread,
    Feb 12, 2025, 2:49:11 PM2/12/25
    to Leonard Grey, Justin Cohen, Crashpad LUCI CQ, crashp...@chromium.org
    Attention needed from Justin Cohen and Leonard Grey

    Mark Mentovai added 5 comments

    Commit Message
    Line 9, Patchset 9 (Latest):Historically, we have forwarded exceptions from Crashpad to Apple's system reporting tool explicitly. However, starting in 10.15, the
    crash reporter stopped paying attention to EXC_CRASH type exceptions.
    Instead, it now listens to EXC_CORPSE_NOTIFY, which is raised postmortem if and only if an EXC_CRASH handler returns MACH_RCV_PORT_DIED. But we specifically were *not* doing that in order to avoid multiple reports (one from EXC_CRASH and one from EXC_CORPSE_NOTIFY) between 10.11 and 10.14.

    This change stops forwarding EXC_CRASH exceptions explicitly and *does* return MACH_RCV_PORT_DIED if they should be forwarded
    Mark Mentovai . unresolved

    Wrap to keep the whole thing within 72 columns.

    File handler/mac/crash_report_exception_handler.cc
    Line 207, Patchset 9 (Latest): // handler. See 10.9.4 `xnu-2422.110.17/osfmk/kern/exception.c`.
    // `exception_deliver()` will only set a new thread state if the handler’s
    Mark Mentovai . unresolved

    Wouldn’t backtick the filename, but would update the versions for 15.2 xnu-11215.61.5 (the current version we have source for) provided that everything else is correct.

    (backticking the function is OK, but avoid the parentheses.)

    Line 220, Patchset 9 (Latest): // if we do both, two crash reports are generated). Due to this, we
    // previously returned `KERN_SUCCESS` to prevent corpse generation and
    // manually forwarded. This flips that logic to always cause
    // `EXC_CORPSE_NOTIFY` generation and never explicitly forward.
    Mark Mentovai . unresolved

    This change’s commit message is a good place to write about the history and the flipping of the logic. Commit history is good to dig back and learn about what we used to do.

    Code comments are a good place to talk about what the code does now, not what it used to do.

    Line 227, Patchset 9 (Latest): // Don’t forward simulated exceptions such as kMachExceptionSimulated to the
    // system crash reporter. Only forward the types of exceptions that it would
    Mark Mentovai . unresolved

    This is a little out of place now.

    Line 229, Patchset 9 (Latest): // receive under normal conditions. Although the system crash reporter is
    // able to deal with other exceptions including simulated ones, forwarding
    Mark Mentovai . unresolved

    I’m not sure if this part is still true, but the rest of the sentence does apply: we don’t want ReportCrash UI to appear for anything other than situations where it would normally appear if we weren’t in the mix.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Justin Cohen
    • Leonard Grey
    Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: crashpad/crashpad
      Gerrit-Branch: main
      Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
      Gerrit-Change-Number: 6242575
      Gerrit-PatchSet: 9
      Gerrit-Owner: Leonard Grey <lg...@chromium.org>
      Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
      Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
      Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
      Gerrit-Attention: Leonard Grey <lg...@chromium.org>
      Gerrit-Attention: Justin Cohen <justi...@chromium.org>
      Gerrit-Comment-Date: Wed, 12 Feb 2025 19:49:06 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      unsatisfied_requirement
      open
      diffy

      Leonard Grey (Gerrit)

      unread,
      Feb 12, 2025, 4:12:40 PM2/12/25
      to Justin Cohen, Mark Mentovai, Crashpad LUCI CQ, crashp...@chromium.org
      Attention needed from Justin Cohen and Mark Mentovai

      Leonard Grey added 5 comments

      Commit Message
      Line 9, Patchset 9:Historically, we have forwarded exceptions from Crashpad to Apple's system reporting tool explicitly. However, starting in 10.15, the

      crash reporter stopped paying attention to EXC_CRASH type exceptions.
      Instead, it now listens to EXC_CORPSE_NOTIFY, which is raised postmortem if and only if an EXC_CRASH handler returns MACH_RCV_PORT_DIED. But we specifically were *not* doing that in order to avoid multiple reports (one from EXC_CRASH and one from EXC_CORPSE_NOTIFY) between 10.11 and 10.14.

      This change stops forwarding EXC_CRASH exceptions explicitly and *does* return MACH_RCV_PORT_DIED if they should be forwarded
      Mark Mentovai . resolved

      Wrap to keep the whole thing within 72 columns.

      Leonard Grey

      Done

      File handler/mac/crash_report_exception_handler.cc
      Line 207, Patchset 9: // handler. See 10.9.4 `xnu-2422.110.17/osfmk/kern/exception.c`.

      // `exception_deliver()` will only set a new thread state if the handler’s
      Mark Mentovai . resolved

      Wouldn’t backtick the filename, but would update the versions for 15.2 xnu-11215.61.5 (the current version we have source for) provided that everything else is correct.

      (backticking the function is OK, but avoid the parentheses.)

      Leonard Grey

      This part is just the old comment moving over! Done, and yes the description still holds :)

      Line 220, Patchset 9: // if we do both, two crash reports are generated). Due to this, we

      // previously returned `KERN_SUCCESS` to prevent corpse generation and
      // manually forwarded. This flips that logic to always cause
      // `EXC_CORPSE_NOTIFY` generation and never explicitly forward.
      Mark Mentovai . resolved

      This change’s commit message is a good place to write about the history and the flipping of the logic. Commit history is good to dig back and learn about what we used to do.

      Code comments are a good place to talk about what the code does now, not what it used to do.

      Leonard Grey

      Done

      Line 227, Patchset 9: // Don’t forward simulated exceptions such as kMachExceptionSimulated to the

      // system crash reporter. Only forward the types of exceptions that it would
      Mark Mentovai . resolved

      This is a little out of place now.

      Leonard Grey

      Done

      Line 229, Patchset 9: // receive under normal conditions. Although the system crash reporter is

      // able to deal with other exceptions including simulated ones, forwarding
      Mark Mentovai . resolved

      I’m not sure if this part is still true, but the rest of the sentence does apply: we don’t want ReportCrash UI to appear for anything other than situations where it would normally appear if we weren’t in the mix.

      Leonard Grey

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Justin Cohen
      • Mark Mentovai
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: crashpad/crashpad
      Gerrit-Branch: main
      Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
      Gerrit-Change-Number: 6242575
      Gerrit-PatchSet: 10
      Gerrit-Owner: Leonard Grey <lg...@chromium.org>
      Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
      Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
      Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
      Gerrit-Attention: Justin Cohen <justi...@chromium.org>
      Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
      Gerrit-Comment-Date: Wed, 12 Feb 2025 21:12:38 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Mark Mentovai <ma...@chromium.org>
      unsatisfied_requirement
      open
      diffy

      Mark Mentovai (Gerrit)

      unread,
      Feb 13, 2025, 11:12:13 AM2/13/25
      to Leonard Grey, Justin Cohen, Crashpad LUCI CQ, crashp...@chromium.org
      Attention needed from Justin Cohen and Leonard Grey

      Mark Mentovai added 3 comments

      File handler/mac/crash_report_exception_handler.cc
      Line 191, Patchset 11 (Latest): bool forward =
      client_options.system_crash_reporter_forwarding != TriState::kDisabled;
      if (forward && exception == EXC_CRASH) {
      Mark Mentovai . unresolved

      Rather than testing `forwad` repeatedly (the next test is on line 223), I’d prefer

      ```
      if (client_options.system_crash_reporter_forwarding != TriState::kDisabled) {
      if (exception == EXC_CRASH) {
      // explain
      return MACH_RCV_PORT_DIED;
      }
      if (exception == EXC_RESOURCE || exception == EXC_GUARD) {
      // explain
      // …
      }
      }
      ```

      as the more understandable, maintainable, and future-proof structure.

      Line 223, Patchset 11 (Latest): if (forward && (exception == EXC_RESOURCE || exception == EXC_GUARD)) {
      Mark Mentovai . unresolved

      As you noted in the other change, ReportCrash isn’t registered for `EXC_GUARD` on recent OS versions. It must be picking those up as `EXC_CORPSE_NOTIFY`. We wouldn’t want to forward `EXC_GUARD` to it in those cases, right?

      Line 249, Patchset 11 (Latest): EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES,
      Mark Mentovai . unresolved

      It’s great if this works for now, but as I noted in your other change, this isn’t how ReportCrash is registered on current macOS, so we might want to look into changing this to match what the OS is doing more closely.

      Can you confirm that you’ve tested `EXC_RESOURCE` and `EXC_GUARD`?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Justin Cohen
      • Leonard Grey
      Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: crashpad/crashpad
        Gerrit-Branch: main
        Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
        Gerrit-Change-Number: 6242575
        Gerrit-PatchSet: 11
        Gerrit-Owner: Leonard Grey <lg...@chromium.org>
        Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
        Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
        Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
        Gerrit-Attention: Leonard Grey <lg...@chromium.org>
        Gerrit-Attention: Justin Cohen <justi...@chromium.org>
        Gerrit-Comment-Date: Thu, 13 Feb 2025 16:12:10 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        open
        diffy

        Matthew Spelman

        unread,
        Apr 1, 2025, 11:32:22 AM4/1/25
        to Crashpad-dev, Mark Mentovai (Gerrit), Justin Cohen, Crashpad LUCI CQ, crashp...@chromium.org, Leonard Grey, change-...@chromium-review.googlesource.com
        Is there any ETA as to when this change will be finalized and committed to Crashpad's main? We are running into the problem this fix is attempting to correct and if the fix will be soon, I can simply upgrade Crashpad to get it once it's available, but if not, we'll have to consider patching our own copy of Crashpad to work around this.

        Thanks,
        Matt

        Leonard Grey

        unread,
        Apr 1, 2025, 1:11:20 PM4/1/25
        to Crashpad-dev, Matthew Spelman, Mark Mentovai (Gerrit), Justin Cohen, Crashpad LUCI CQ, crashp...@chromium.org, Leonard Grey, change-...@chromium-review.googlesource.com
        Sorry about that. I think we concluded we were going to land the minimal version of this first and clean up after but I haven't actually gone and done that. Will try to land this week

        Leonard Grey (Gerrit)

        unread,
        Apr 3, 2025, 10:58:53 AM4/3/25
        to Code Review Nudger, Justin Cohen, Mark Mentovai, Crashpad LUCI CQ, crashp...@chromium.org
        Attention needed from Justin Cohen and Mark Mentovai

        Leonard Grey added 3 comments

        File handler/mac/crash_report_exception_handler.cc
        Line 191, Patchset 11: bool forward =

        client_options.system_crash_reporter_forwarding != TriState::kDisabled;
        if (forward && exception == EXC_CRASH) {
        Mark Mentovai . resolved

        Rather than testing `forwad` repeatedly (the next test is on line 223), I’d prefer

        ```
        if (client_options.system_crash_reporter_forwarding != TriState::kDisabled) {
        if (exception == EXC_CRASH) {
        // explain
        return MACH_RCV_PORT_DIED;
        }
        if (exception == EXC_RESOURCE || exception == EXC_GUARD) {
        // explain
        // …
        }
        }
        ```

        as the more understandable, maintainable, and future-proof structure.

        Leonard Grey

        Did it that way because one's an early return and the other's a side effect so the structure felt clearer, but sure :)

        Line 223, Patchset 11: if (forward && (exception == EXC_RESOURCE || exception == EXC_GUARD)) {
        Mark Mentovai . resolved

        As you noted in the other change, ReportCrash isn’t registered for `EXC_GUARD` on recent OS versions. It must be picking those up as `EXC_CORPSE_NOTIFY`. We wouldn’t want to forward `EXC_GUARD` to it in those cases, right?

        Leonard Grey

        Done

        Line 249, Patchset 11: EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES,
        Mark Mentovai . resolved

        It’s great if this works for now, but as I noted in your other change, this isn’t how ReportCrash is registered on current macOS, so we might want to look into changing this to match what the OS is doing more closely.

        Can you confirm that you’ve tested `EXC_RESOURCE` and `EXC_GUARD`?

        Leonard Grey

        Pulling behavior from whatever's registered for CORPSE_NOTIFY now

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Justin Cohen
        • Mark Mentovai
        Submit Requirements:
        • requirement is not satisfiedCode-Review
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: crashpad/crashpad
        Gerrit-Branch: main
        Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
        Gerrit-Change-Number: 6242575
        Gerrit-PatchSet: 12
        Gerrit-Owner: Leonard Grey <lg...@chromium.org>
        Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
        Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
        Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
        Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
        Gerrit-Attention: Justin Cohen <justi...@chromium.org>
        Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
        Gerrit-Comment-Date: Thu, 03 Apr 2025 14:58:51 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Mark Mentovai <ma...@chromium.org>
        unsatisfied_requirement
        open
        diffy

        Mark Mentovai (Gerrit)

        unread,
        Apr 3, 2025, 11:23:04 AM4/3/25
        to Leonard Grey, Code Review Nudger, Justin Cohen, Crashpad LUCI CQ, crashp...@chromium.org
        Attention needed from Justin Cohen and Leonard Grey

        Mark Mentovai added 10 comments

        File handler/mac/crash_report_exception_handler.cc
        Line 49, Patchset 13 (Latest):// Fetches the standard system exception handler (using whatever is registered
        // for `EXC_CORPSE_NOTIFY` as a proxy). The system handler registering for
        // `EXC_MASK_CORPSE_NOTIFY` is confirmed back through macOS 10.13.
        std::optional<ExceptionPorts::ExceptionHandler> GetStandardHandler() {
        Mark Mentovai . unresolved

        Let’s name this to convey what it’s actually doing, rather than naming it one thing and using something else as a proxy.

        Line 59, Patchset 13 (Latest): DCHECK_GT(handlers.size(), 0u);
        if (handlers.size() > 0) {
        Mark Mentovai . unresolved

        You’re testing the condition you just `DCHECK`ed? Can it be 0 or not?

        A thing that you can safely `DCHECK` is that it’s ≤ 1. And if you decide that it can’t be 0, then you’d just `DCHECK` that it’s 1, exactly.

        Line 216, Patchset 13 (Latest): // For exception handlers that respond to state-carrying behaviors, when
        Mark Mentovai . unresolved

        Get a blank // in between these two lines, so that an auto-reflow doesn’t hoist this line up onto the previous one.

        Or just get rid of “As background:”, which is kind of noise.

        Line 228, Patchset 13 (Latest): // exception handler. See 15.2 xnu-11215.1.10/osfmk/kern/exception.c.
        Mark Mentovai . unresolved

        15.3 source is available now, xnu-11215.81.4. Please update comments to refer to what’s current as of the time that things get checked in.

        (In fact, in the comment you had here, you name macOS 15.2 but the xnu version that shipped with 15.0.)

        Line 234, Patchset 13 (Latest): // Another side effect of returning `MACH_RCV_PORT_DIED` for `EXC_CRASH`
        Mark Mentovai . unresolved

        Just an effect, nothing “side” about it.

        Line 234, Patchset 13 (Latest): // Another side effect of returning `MACH_RCV_PORT_DIED` for `EXC_CRASH`
        // is that an `EXC_CORPSE_NOTIFY` exception is generated. Starting with
        // macOS 10.15, for the system crash reporter to generate a report,
        // `EXC_CORPSE_NOTIFY` *must* be generated and forwarding `EXC_CRASH` (as
        // we do below with `EXC_RESOURCE` and pre-macOS 13 `EXC_GUARD`) is not
        // sufficient. Between macOS 10.11 and macOS 10.14 (inclusive), both
        // forwarding as below, and causing `EXC_CORPSE_NOTIFY` to be generated
        // are sufficient (and in fact, if we do both, two crash reports are
        // generated).
        Mark Mentovai . resolved

        This comment is the crux of what needs to be done. Thanks for writing it out so clearly!

        Line 243, Patchset 13 (Parent): return ExcServerSuccessfulReturnValue(exception, behavior, false);
        Mark Mentovai . unresolved

        Are there non-test callers to this left?

        Or are you saving further cleanup of this for a future change?

        Line 246, Patchset 13 (Latest): (MacOSVersionNumber() < 13'00'00 && exception == EXC_GUARD)) {
        Mark Mentovai . unresolved

        1. I think this reads better if you flip the order of these two: test `exception == EXC_GUARD` before checking the OS version number.

        2. If we’re going to get `EXC_GUARD` wrapped in `EXC_CRASH`, the right thing to do is to only register for `EXC_GUARD` on older OS versions where we know the OS won’t do the wrapping. Then, we wouldn’t need to do this version check here.

        Line 261, Patchset 13 (Latest): // Will likely not be used in practice, but we need a backup just in
        Mark Mentovai . unresolved

        Break things up vertically. If you find you need to write a comment to explain what follows, that’s also a good hint that it’s a viable spot to break things up with some whitespace.

        Line 261, Patchset 13 (Latest): // Will likely not be used in practice, but we need a backup just in
        // case we can't find the default crash handler.
        exception_behavior_t behavior =
        EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES;
        auto handler = GetStandardHandler();
        if (handler.has_value()) {
        behavior = handler.value().behavior;
        }
        Mark Mentovai . unresolved

        I don’t really get what you’re doing here, or why, or what the comment is trying to convey.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Justin Cohen
        • Leonard Grey
        Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: crashpad/crashpad
          Gerrit-Branch: main
          Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
          Gerrit-Change-Number: 6242575
          Gerrit-PatchSet: 13
          Gerrit-Owner: Leonard Grey <lg...@chromium.org>
          Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
          Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
          Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-Attention: Leonard Grey <lg...@chromium.org>
          Gerrit-Attention: Justin Cohen <justi...@chromium.org>
          Gerrit-Comment-Date: Thu, 03 Apr 2025 15:23:00 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          unsatisfied_requirement
          open
          diffy

          Leonard Grey (Gerrit)

          unread,
          Apr 7, 2025, 12:01:11 PM4/7/25
          to Code Review Nudger, Justin Cohen, Mark Mentovai, Crashpad LUCI CQ, crashp...@chromium.org
          Attention needed from Justin Cohen and Mark Mentovai

          Leonard Grey added 9 comments

          File handler/mac/crash_report_exception_handler.cc
          Line 49, Patchset 13:// Fetches the standard system exception handler (using whatever is registered

          // for `EXC_CORPSE_NOTIFY` as a proxy). The system handler registering for
          // `EXC_MASK_CORPSE_NOTIFY` is confirmed back through macOS 10.13.
          std::optional<ExceptionPorts::ExceptionHandler> GetStandardHandler() {
          Mark Mentovai . resolved

          Let’s name this to convey what it’s actually doing, rather than naming it one thing and using something else as a proxy.

          Leonard Grey

          Removed

          Line 59, Patchset 13: DCHECK_GT(handlers.size(), 0u);
          if (handlers.size() > 0) {
          Mark Mentovai . resolved

          You’re testing the condition you just `DCHECK`ed? Can it be 0 or not?

          A thing that you can safely `DCHECK` is that it’s ≤ 1. And if you decide that it can’t be 0, then you’d just `DCHECK` that it’s 1, exactly.

          Leonard Grey

          Removed

          Line 216, Patchset 13: // For exception handlers that respond to state-carrying behaviors, when
          Mark Mentovai . resolved

          Get a blank // in between these two lines, so that an auto-reflow doesn’t hoist this line up onto the previous one.

          Or just get rid of “As background:”, which is kind of noise.

          Leonard Grey

          Done

          Line 228, Patchset 13: // exception handler. See 15.2 xnu-11215.1.10/osfmk/kern/exception.c.
          Mark Mentovai . resolved

          15.3 source is available now, xnu-11215.81.4. Please update comments to refer to what’s current as of the time that things get checked in.

          (In fact, in the comment you had here, you name macOS 15.2 but the xnu version that shipped with 15.0.)

          Leonard Grey

          Done

          Line 234, Patchset 13: // Another side effect of returning `MACH_RCV_PORT_DIED` for `EXC_CRASH`
          Mark Mentovai . resolved

          Just an effect, nothing “side” about it.

          Leonard Grey

          Done

          Line 243, Patchset 13 (Parent): return ExcServerSuccessfulReturnValue(exception, behavior, false);
          Mark Mentovai . resolved

          Are there non-test callers to this left?

          Or are you saving further cleanup of this for a future change?

          Leonard Grey

          Future change

          Line 246, Patchset 13: (MacOSVersionNumber() < 13'00'00 && exception == EXC_GUARD)) {
          Mark Mentovai . resolved

          1. I think this reads better if you flip the order of these two: test `exception == EXC_GUARD` before checking the OS version number.

          2. If we’re going to get `EXC_GUARD` wrapped in `EXC_CRASH`, the right thing to do is to only register for `EXC_GUARD` on older OS versions where we know the OS won’t do the wrapping. Then, we wouldn’t need to do this version check here.

          Leonard Grey

          Done (2)

          Line 261, Patchset 13: // Will likely not be used in practice, but we need a backup just in
          Mark Mentovai . resolved

          Break things up vertically. If you find you need to write a comment to explain what follows, that’s also a good hint that it’s a viable spot to break things up with some whitespace.

          Leonard Grey

          Removed

          Line 261, Patchset 13: // Will likely not be used in practice, but we need a backup just in

          // case we can't find the default crash handler.
          exception_behavior_t behavior =
          EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES;
          auto handler = GetStandardHandler();
          if (handler.has_value()) {
          behavior = handler.value().behavior;
          }
          Mark Mentovai . resolved

          I don’t really get what you’re doing here, or why, or what the comment is trying to convey.

          Leonard Grey

          Discussed offline. Hardcoded `EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES` appears sufficient.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Justin Cohen
          • Mark Mentovai
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: crashpad/crashpad
          Gerrit-Branch: main
          Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
          Gerrit-Change-Number: 6242575
          Gerrit-PatchSet: 15
          Gerrit-Owner: Leonard Grey <lg...@chromium.org>
          Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
          Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
          Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-Attention: Justin Cohen <justi...@chromium.org>
          Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
          Gerrit-Comment-Date: Mon, 07 Apr 2025 16:01:06 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Mark Mentovai <ma...@chromium.org>
          unsatisfied_requirement
          open
          diffy

          Mark Mentovai (Gerrit)

          unread,
          Apr 7, 2025, 1:34:29 PM4/7/25
          to Leonard Grey, Code Review Nudger, Justin Cohen, Crashpad LUCI CQ, crashp...@chromium.org
          Attention needed from Justin Cohen and Leonard Grey

          Mark Mentovai voted and added 3 comments

          Votes added by Mark Mentovai

          Code-Review+1

          3 comments

          File client/crashpad_client_mac.cc
          Line 86, Patchset 15 (Latest): exception_mask_t mask = EXC_MASK_CRASH | EXC_MASK_RESOURCE;
          Mark Mentovai . unresolved

          Good place for a blank line.

          Line 91, Patchset 15 (Latest): return exception_ports.SetExceptionPort(
          Mark Mentovai . unresolved

          Another good place for a blank line.

          File handler/mac/crash_report_exception_handler.cc
          Line 237, Patchset 15 (Latest): new_state, new_state + new_state_forward_count);
          Mark Mentovai . unresolved

          Not if `!new_state_forward_count`.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Justin Cohen
          • Leonard Grey
          Submit Requirements:
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: crashpad/crashpad
          Gerrit-Branch: main
          Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
          Gerrit-Change-Number: 6242575
          Gerrit-PatchSet: 15
          Gerrit-Owner: Leonard Grey <lg...@chromium.org>
          Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
          Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
          Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-Attention: Leonard Grey <lg...@chromium.org>
          Gerrit-Attention: Justin Cohen <justi...@chromium.org>
          Gerrit-Comment-Date: Mon, 07 Apr 2025 17:34:25 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Leonard Grey (Gerrit)

          unread,
          Apr 8, 2025, 12:28:27 PM4/8/25
          to Mark Mentovai, Code Review Nudger, Justin Cohen, Crashpad LUCI CQ, crashp...@chromium.org
          Attention needed from Justin Cohen and Mark Mentovai

          Leonard Grey added 3 comments

          File client/crashpad_client_mac.cc
          Line 86, Patchset 15: exception_mask_t mask = EXC_MASK_CRASH | EXC_MASK_RESOURCE;
          Mark Mentovai . resolved

          Good place for a blank line.

          Leonard Grey

          Done

          Line 91, Patchset 15: return exception_ports.SetExceptionPort(
          Mark Mentovai . resolved

          Another good place for a blank line.

          Leonard Grey

          Done

          File handler/mac/crash_report_exception_handler.cc
          Line 237, Patchset 15: new_state, new_state + new_state_forward_count);
          Mark Mentovai . unresolved

          Not if `!new_state_forward_count`.

          Leonard Grey

          Just moving this but `new_state_forward_count ? &new_state_forward[0] : nullptr` takes care of that below, no?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Justin Cohen
          • Mark Mentovai
          Submit Requirements:
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: crashpad/crashpad
          Gerrit-Branch: main
          Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
          Gerrit-Change-Number: 6242575
          Gerrit-PatchSet: 15
          Gerrit-Owner: Leonard Grey <lg...@chromium.org>
          Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
          Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
          Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-Attention: Justin Cohen <justi...@chromium.org>
          Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
          Gerrit-Comment-Date: Tue, 08 Apr 2025 16:28:23 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Mark Mentovai (Gerrit)

          unread,
          Apr 8, 2025, 1:37:03 PM4/8/25
          to Leonard Grey, Code Review Nudger, Justin Cohen, Crashpad LUCI CQ, crashp...@chromium.org
          Attention needed from Justin Cohen and Leonard Grey

          Mark Mentovai voted and added 1 comment

          Votes added by Mark Mentovai

          Code-Review+1

          1 comment

          File handler/mac/crash_report_exception_handler.cc
          Line 237, Patchset 15: new_state, new_state + new_state_forward_count);
          Mark Mentovai . unresolved

          Not if `!new_state_forward_count`.

          Leonard Grey

          Just moving this but `new_state_forward_count ? &new_state_forward[0] : nullptr` takes care of that below, no?

          Mark Mentovai

          Just moving this but `new_state_forward_count ? &new_state_forward[0] : nullptr` takes care of that below, no?

          You can’t do pointer arithmetic on a null pointer.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Justin Cohen
          • Leonard Grey
          Submit Requirements:
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: crashpad/crashpad
          Gerrit-Branch: main
          Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
          Gerrit-Change-Number: 6242575
          Gerrit-PatchSet: 16
          Gerrit-Owner: Leonard Grey <lg...@chromium.org>
          Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
          Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
          Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-Attention: Leonard Grey <lg...@chromium.org>
          Gerrit-Attention: Justin Cohen <justi...@chromium.org>
          Gerrit-Comment-Date: Tue, 08 Apr 2025 17:36:59 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Leonard Grey <lg...@chromium.org>
          Comment-In-Reply-To: Mark Mentovai <ma...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Leonard Grey (Gerrit)

          unread,
          Apr 8, 2025, 2:45:55 PM4/8/25
          to Mark Mentovai, Code Review Nudger, Justin Cohen, Crashpad LUCI CQ, crashp...@chromium.org
          Attention needed from Justin Cohen and Mark Mentovai

          Leonard Grey added 1 comment

          File handler/mac/crash_report_exception_handler.cc
          Line 237, Patchset 15: new_state, new_state + new_state_forward_count);
          Mark Mentovai . resolved

          Not if `!new_state_forward_count`.

          Leonard Grey

          Just moving this but `new_state_forward_count ? &new_state_forward[0] : nullptr` takes care of that below, no?

          Mark Mentovai

          Just moving this but `new_state_forward_count ? &new_state_forward[0] : nullptr` takes care of that below, no?

          You can’t do pointer arithmetic on a null pointer.

          Leonard Grey

          Done. Kind of curious if UBSAN would catch this.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Justin Cohen
          • Mark Mentovai
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: crashpad/crashpad
          Gerrit-Branch: main
          Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
          Gerrit-Change-Number: 6242575
          Gerrit-PatchSet: 17
          Gerrit-Owner: Leonard Grey <lg...@chromium.org>
          Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
          Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
          Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
          Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
          Gerrit-Attention: Justin Cohen <justi...@chromium.org>
          Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
          Gerrit-Comment-Date: Tue, 08 Apr 2025 18:45:52 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          unsatisfied_requirement
          open
          diffy

          Mark Mentovai (Gerrit)

          unread,
          Apr 8, 2025, 3:06:42 PM4/8/25
          to Leonard Grey, Code Review Nudger, Justin Cohen, Crashpad LUCI CQ, crashp...@chromium.org
          Attention needed from Justin Cohen and Leonard Grey

          Mark Mentovai added 1 comment

          File handler/mac/crash_report_exception_handler.cc
          Line 238, Patchset 17 (Latest): new_state_forward.insert(new_state_forward.end(),
          Mark Mentovai . unresolved

          Isn’t there an `assign` that you could use instead?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Justin Cohen
          • Leonard Grey
          Submit Requirements:
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: crashpad/crashpad
            Gerrit-Branch: main
            Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
            Gerrit-Change-Number: 6242575
            Gerrit-PatchSet: 17
            Gerrit-Owner: Leonard Grey <lg...@chromium.org>
            Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
            Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
            Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
            Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
            Gerrit-Attention: Leonard Grey <lg...@chromium.org>
            Gerrit-Attention: Justin Cohen <justi...@chromium.org>
            Gerrit-Comment-Date: Tue, 08 Apr 2025 19:06:39 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            unsatisfied_requirement
            open
            diffy

            Leonard Grey (Gerrit)

            unread,
            Apr 8, 2025, 3:34:13 PM4/8/25
            to Mark Mentovai, Code Review Nudger, Justin Cohen, Crashpad LUCI CQ, crashp...@chromium.org
            Attention needed from Justin Cohen and Mark Mentovai

            Leonard Grey added 1 comment

            File handler/mac/crash_report_exception_handler.cc
            Line 238, Patchset 17: new_state_forward.insert(new_state_forward.end(),
            Mark Mentovai . resolved

            Isn’t there an `assign` that you could use instead?

            Leonard Grey

            Done

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Justin Cohen
            • Mark Mentovai
            Submit Requirements:
            • requirement is not satisfiedCode-Review
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: crashpad/crashpad
            Gerrit-Branch: main
            Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
            Gerrit-Change-Number: 6242575
            Gerrit-PatchSet: 18
            Gerrit-Owner: Leonard Grey <lg...@chromium.org>
            Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
            Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
            Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
            Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
            Gerrit-Attention: Justin Cohen <justi...@chromium.org>
            Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
            Gerrit-Comment-Date: Tue, 08 Apr 2025 19:34:10 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Mark Mentovai <ma...@chromium.org>
            unsatisfied_requirement
            open
            diffy

            Mark Mentovai (Gerrit)

            unread,
            Apr 8, 2025, 3:43:28 PM4/8/25
            to Leonard Grey, Code Review Nudger, Justin Cohen, Crashpad LUCI CQ, crashp...@chromium.org
            Attention needed from Justin Cohen and Leonard Grey

            Mark Mentovai voted Code-Review+1

            Code-Review+1
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Justin Cohen
            • Leonard Grey
            Submit Requirements:
            • requirement satisfiedCode-Review
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: crashpad/crashpad
            Gerrit-Branch: main
            Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
            Gerrit-Change-Number: 6242575
            Gerrit-PatchSet: 18
            Gerrit-Owner: Leonard Grey <lg...@chromium.org>
            Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
            Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
            Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
            Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
            Gerrit-Attention: Leonard Grey <lg...@chromium.org>
            Gerrit-Attention: Justin Cohen <justi...@chromium.org>
            Gerrit-Comment-Date: Tue, 08 Apr 2025 19:43:24 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            Leonard Grey (Gerrit)

            unread,
            Apr 8, 2025, 3:43:49 PM4/8/25
            to Mark Mentovai, Code Review Nudger, Justin Cohen, Crashpad LUCI CQ, crashp...@chromium.org
            Attention needed from Justin Cohen

            Leonard Grey voted Commit-Queue+2

            Commit-Queue+2
            Open in Gerrit

            Related details

            Attention is currently required from:
            • Justin Cohen
            Submit Requirements:
            • requirement satisfiedCode-Review
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: crashpad/crashpad
            Gerrit-Branch: main
            Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
            Gerrit-Change-Number: 6242575
            Gerrit-PatchSet: 18
            Gerrit-Owner: Leonard Grey <lg...@chromium.org>
            Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
            Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
            Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
            Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
            Gerrit-Attention: Justin Cohen <justi...@chromium.org>
            Gerrit-Comment-Date: Tue, 08 Apr 2025 19:43:45 +0000
            Gerrit-HasComments: No
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            open
            diffy

            Leonard Grey (Gerrit)

            unread,
            Apr 8, 2025, 5:27:00 PM4/8/25
            to Mark Mentovai, Code Review Nudger, Justin Cohen, Crashpad LUCI CQ, crashp...@chromium.org
            Attention needed from Justin Cohen

            Leonard Grey added 1 comment

            Patchset-level comments
            File-level comment, Patchset 18 (Latest):
            Leonard Grey . resolved

            Landing directly because the Fuschia thing is unrelated

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Justin Cohen
            Submit Requirements:
            • requirement satisfiedCode-Review
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: comment
            Gerrit-Project: crashpad/crashpad
            Gerrit-Branch: main
            Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
            Gerrit-Change-Number: 6242575
            Gerrit-PatchSet: 18
            Gerrit-Owner: Leonard Grey <lg...@chromium.org>
            Gerrit-Reviewer: Justin Cohen <justi...@chromium.org>
            Gerrit-Reviewer: Leonard Grey <lg...@chromium.org>
            Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
            Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
            Gerrit-Attention: Justin Cohen <justi...@chromium.org>
            Gerrit-Comment-Date: Tue, 08 Apr 2025 21:26:55 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            open
            diffy

            Leonard Grey (Gerrit)

            unread,
            Apr 8, 2025, 5:27:05 PM4/8/25
            to Mark Mentovai, Code Review Nudger, Justin Cohen, Crashpad LUCI CQ, crashp...@chromium.org

            Leonard Grey submitted the change

            Change information

            Commit message:
            Mac: ensure crashes are forwarded to system crash reporter


            Historically, we have forwarded exceptions from Crashpad to Apple's
            system reporting tool explicitly. However, starting in 10.15, the crash
            reporter stopped paying attention to EXC_CRASH type exceptions.
            Instead, it now listens to EXC_CORPSE_NOTIFY, which is raised postmortem
            if and only if an EXC_CRASH handler returns MACH_RCV_PORT_DIED. But we
            specifically were *not* doing that in order to avoid multiple reports
            (one from EXC_CRASH and one from EXC_CORPSE_NOTIFY) between 10.11 and
            10.14.

            This change stops forwarding EXC_CRASH exceptions explicitly and *does*
            return MACH_RCV_PORT_DIED if they should be forwarded
            Bug: chromium:388545119
            Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
            Reviewed-by: Mark Mentovai <ma...@chromium.org>
            Files:
            • M client/crashpad_client_mac.cc
            • M handler/mac/crash_report_exception_handler.cc
            • M tools/run_with_crashpad.md
            • M util/mach/exception_types.cc
            • M util/mach/exception_types_test.cc
            Change size: M
            Delta: 5 files changed, 99 insertions(+), 71 deletions(-)
            Branch: refs/heads/main
            Submit Requirements:
            • requirement satisfiedCode-Review: +1 by Mark Mentovai
            Open in Gerrit
            Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
            Gerrit-MessageType: merged
            Gerrit-Project: crashpad/crashpad
            Gerrit-Branch: main
            Gerrit-Change-Id: I36a781390386b9e164072fcc602809723a2dc2ee
            Gerrit-Change-Number: 6242575
            Gerrit-PatchSet: 19
            open
            diffy
            satisfied_requirement
            Reply all
            Reply to author
            Forward
            0 new messages