Add support for attachments on macOS. [crashpad/crashpad : main]

14 views
Skip to first unread message

Yilong Yao (Gerrit)

unread,
Dec 1, 2025, 3:40:18 PM (2 days ago) Dec 1
to Joshua Peraza, Ivan Penkov, Crashpad LUCI CQ, crashp...@chromium.org
Attention needed from Ivan Penkov and Joshua Peraza

Yilong Yao voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Ivan Penkov
  • Joshua Peraza
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
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: Icf74714c76215ea61136287d1118ac3795d6f6d8
Gerrit-Change-Number: 7214128
Gerrit-PatchSet: 1
Gerrit-Owner: Yilong Yao <yilo...@google.com>
Gerrit-Reviewer: Ivan Penkov <iva...@chromium.org>
Gerrit-Reviewer: Joshua Peraza <jpe...@chromium.org>
Gerrit-Reviewer: Yilong Yao <yilo...@google.com>
Gerrit-Attention: Joshua Peraza <jpe...@chromium.org>
Gerrit-Attention: Ivan Penkov <iva...@chromium.org>
Gerrit-Comment-Date: Mon, 01 Dec 2025 20:08:37 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Joshua Peraza (Gerrit)

unread,
Dec 1, 2025, 3:57:11 PM (2 days ago) Dec 1
to Yilong Yao, Mark Mentovai, Ivan Penkov, Crashpad LUCI CQ, crashp...@chromium.org
Attention needed from Mark Mentovai and Yilong Yao

Joshua Peraza added 2 comments

File handler/handler_main.cc
Line 96, Patchset 1 (Latest): BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)
Joshua Peraza . unresolved

IS_MAC to not include iOS in this.

File handler/mac/crash_report_exception_handler.cc
Line 183, Patchset 1 (Latest): ScopedFileHandle handle(
LoggingOpenFileForRead(attachment));
if (!handle.is_valid()) {
continue;
}
constexpr size_t kBufSize = 4096;
char buf[kBufSize];
FileOperationResult count;
while ((count = ReadFile(handle.get(), buf, kBufSize)) > 0) {
if (!writer->Write(buf, count)) {
LOG(WARNING) << "Failed to write to attachment";
break;
}
}
}
Open in Gerrit

Related details

Attention is currently required from:
  • Mark Mentovai
  • Yilong Yao
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    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: Icf74714c76215ea61136287d1118ac3795d6f6d8
    Gerrit-Change-Number: 7214128
    Gerrit-PatchSet: 1
    Gerrit-Owner: Yilong Yao <yilo...@google.com>
    Gerrit-Reviewer: Joshua Peraza <jpe...@chromium.org>
    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
    Gerrit-Reviewer: Yilong Yao <yilo...@google.com>
    Gerrit-CC: Ivan Penkov <iva...@google.com>
    Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
    Gerrit-Attention: Yilong Yao <yilo...@google.com>
    Gerrit-Comment-Date: Mon, 01 Dec 2025 20:57:09 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Ivan Penkov (Gerrit)

    unread,
    Dec 1, 2025, 4:08:09 PM (2 days ago) Dec 1
    to Yilong Yao, Mark Mentovai, Joshua Peraza, Crashpad LUCI CQ, crashp...@chromium.org
    Attention needed from Joshua Peraza, Mark Mentovai and Yilong Yao

    Ivan Penkov added 1 comment

    Patchset-level comments
    File-level comment, Patchset 1 (Latest):
    Ivan Penkov . resolved

    Adding Mark to review the changes to the MacOS client.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Joshua Peraza
    • Mark Mentovai
    • Yilong Yao
    Submit Requirements:
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      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: Icf74714c76215ea61136287d1118ac3795d6f6d8
      Gerrit-Change-Number: 7214128
      Gerrit-PatchSet: 1
      Gerrit-Owner: Yilong Yao <yilo...@google.com>
      Gerrit-Reviewer: Joshua Peraza <jpe...@chromium.org>
      Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
      Gerrit-Reviewer: Yilong Yao <yilo...@google.com>
      Gerrit-CC: Ivan Penkov <iva...@google.com>
      Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
      Gerrit-Attention: Yilong Yao <yilo...@google.com>
      Gerrit-Attention: Joshua Peraza <jpe...@chromium.org>
      Gerrit-Comment-Date: Mon, 01 Dec 2025 20:42:23 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      unsatisfied_requirement
      open
      diffy

      Yilong Yao (Gerrit)

      unread,
      Dec 1, 2025, 4:19:10 PM (2 days ago) Dec 1
      to Mark Mentovai, Ivan Penkov, Joshua Peraza, Crashpad LUCI CQ, crashp...@chromium.org
      Attention needed from Joshua Peraza and Mark Mentovai

      Yilong Yao added 2 comments

      File handler/handler_main.cc
      Line 96, Patchset 1: BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)
      Joshua Peraza . resolved

      IS_MAC to not include iOS in this.

      Yilong Yao

      Done

      File handler/mac/crash_report_exception_handler.cc
      Line 183, Patchset 1: ScopedFileHandle handle(

      LoggingOpenFileForRead(attachment));
      if (!handle.is_valid()) {
      continue;
      }
      constexpr size_t kBufSize = 4096;
      char buf[kBufSize];
      FileOperationResult count;
      while ((count = ReadFile(handle.get(), buf, kBufSize)) > 0) {
      if (!writer->Write(buf, count)) {
      LOG(WARNING) << "Failed to write to attachment";
      break;
      }
      }
      }
      Joshua Peraza . resolved
      Yilong Yao

      Fix applied.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Joshua Peraza
      • Mark Mentovai
      Submit Requirements:
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      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: Icf74714c76215ea61136287d1118ac3795d6f6d8
      Gerrit-Change-Number: 7214128
      Gerrit-PatchSet: 2
      Gerrit-Owner: Yilong Yao <yilo...@google.com>
      Gerrit-Reviewer: Joshua Peraza <jpe...@chromium.org>
      Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
      Gerrit-Reviewer: Yilong Yao <yilo...@google.com>
      Gerrit-CC: Ivan Penkov <iva...@google.com>
      Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
      Gerrit-Attention: Joshua Peraza <jpe...@chromium.org>
      Gerrit-Comment-Date: Mon, 01 Dec 2025 21:19:07 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Joshua Peraza <jpe...@chromium.org>
      unsatisfied_requirement
      open
      diffy

      Yilong Yao (Gerrit)

      unread,
      Dec 1, 2025, 4:43:23 PM (2 days ago) Dec 1
      to Mark Mentovai, Ivan Penkov, Joshua Peraza, Crashpad LUCI CQ, crashp...@chromium.org
      Attention needed from Joshua Peraza and Mark Mentovai

      Yilong Yao added 1 comment

      File handler/handler_main.cc
      Line 96, Patchset 1: BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)
      Joshua Peraza . unresolved

      IS_MAC to not include iOS in this.

      Yilong Yao

      Done

      Yilong Yao

      Note this seemed to require a few more #if guards in handler/mac/crash_report_exception_handler.cc to compile for iOS, making the code a bit messy. Open to any suggestions on how to keep the code clean.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Joshua Peraza
      • Mark Mentovai
      Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        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: Icf74714c76215ea61136287d1118ac3795d6f6d8
        Gerrit-Change-Number: 7214128
        Gerrit-PatchSet: 4
        Gerrit-Owner: Yilong Yao <yilo...@google.com>
        Gerrit-Reviewer: Joshua Peraza <jpe...@chromium.org>
        Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
        Gerrit-Reviewer: Yilong Yao <yilo...@google.com>
        Gerrit-CC: Ivan Penkov <iva...@google.com>
        Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
        Gerrit-Attention: Joshua Peraza <jpe...@chromium.org>
        Gerrit-Comment-Date: Mon, 01 Dec 2025 21:43:20 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Yilong Yao <yilo...@google.com>
        Comment-In-Reply-To: Joshua Peraza <jpe...@chromium.org>
        unsatisfied_requirement
        open
        diffy

        Joshua Peraza (Gerrit)

        unread,
        Dec 1, 2025, 6:49:21 PM (2 days ago) Dec 1
        to Yilong Yao, Mark Mentovai, Ivan Penkov, Crashpad LUCI CQ, crashp...@chromium.org
        Attention needed from Mark Mentovai and Yilong Yao

        Joshua Peraza added 1 comment

        File handler/handler_main.cc
        Line 96, Patchset 1: BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)
        Joshua Peraza . unresolved

        IS_MAC to not include iOS in this.

        Yilong Yao

        Done

        Yilong Yao

        Note this seemed to require a few more #if guards in handler/mac/crash_report_exception_handler.cc to compile for iOS, making the code a bit messy. Open to any suggestions on how to keep the code clean.

        Joshua Peraza

        I think handler_main.cc and crash_report_exception_handler.cc shouldn't be used on iOS at all (I guess my initial comment wasn't needed). I think you could put the "handler" and "handler_test" targets in "if (!crashpad_is_ios) {}" blocks to avoid building this code on iOS.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Mark Mentovai
        • Yilong Yao
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        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: Icf74714c76215ea61136287d1118ac3795d6f6d8
        Gerrit-Change-Number: 7214128
        Gerrit-PatchSet: 4
        Gerrit-Owner: Yilong Yao <yilo...@google.com>
        Gerrit-Reviewer: Joshua Peraza <jpe...@chromium.org>
        Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
        Gerrit-Reviewer: Yilong Yao <yilo...@google.com>
        Gerrit-CC: Ivan Penkov <iva...@google.com>
        Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
        Gerrit-Attention: Yilong Yao <yilo...@google.com>
        Gerrit-Comment-Date: Mon, 01 Dec 2025 23:49:18 +0000
        unsatisfied_requirement
        open
        diffy

        Yilong Yao (Gerrit)

        unread,
        Dec 1, 2025, 8:07:50 PM (2 days ago) Dec 1
        to Mark Mentovai, Ivan Penkov, Joshua Peraza, Crashpad LUCI CQ, crashp...@chromium.org
        Attention needed from Joshua Peraza and Mark Mentovai

        Yilong Yao added 1 comment

        File handler/handler_main.cc
        Line 96, Patchset 1: BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_APPLE)
        Joshua Peraza . resolved

        IS_MAC to not include iOS in this.

        Yilong Yao

        Done

        Yilong Yao

        Note this seemed to require a few more #if guards in handler/mac/crash_report_exception_handler.cc to compile for iOS, making the code a bit messy. Open to any suggestions on how to keep the code clean.

        Joshua Peraza

        I think handler_main.cc and crash_report_exception_handler.cc shouldn't be used on iOS at all (I guess my initial comment wasn't needed). I think you could put the "handler" and "handler_test" targets in "if (!crashpad_is_ios) {}" blocks to avoid building this code on iOS.

        Yilong Yao

        Thanks! Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Joshua Peraza
        • Mark Mentovai
        Submit Requirements:
          • requirement is not satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement is not satisfiedReview-Enforcement
          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: Icf74714c76215ea61136287d1118ac3795d6f6d8
          Gerrit-Change-Number: 7214128
          Gerrit-PatchSet: 8
          Gerrit-Owner: Yilong Yao <yilo...@google.com>
          Gerrit-Reviewer: Joshua Peraza <jpe...@chromium.org>
          Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
          Gerrit-Reviewer: Yilong Yao <yilo...@google.com>
          Gerrit-CC: Ivan Penkov <iva...@google.com>
          Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
          Gerrit-Attention: Joshua Peraza <jpe...@chromium.org>
          Gerrit-Comment-Date: Tue, 02 Dec 2025 01:07:48 +0000
          unsatisfied_requirement
          open
          diffy

          Joshua Peraza (Gerrit)

          unread,
          Dec 2, 2025, 11:44:46 AM (18 hours ago) Dec 2
          to Yilong Yao, AyeAye, Mark Mentovai, Ivan Penkov, Crashpad LUCI CQ, crashp...@chromium.org
          Attention needed from Mark Mentovai and Yilong Yao

          Joshua Peraza voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Mark Mentovai
          • Yilong Yao
          Submit Requirements:
          • requirement satisfiedCode-Owners
          • requirement is not satisfiedCode-Review
          • requirement satisfiedReview-Enforcement
          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: Icf74714c76215ea61136287d1118ac3795d6f6d8
          Gerrit-Change-Number: 7214128
          Gerrit-PatchSet: 8
          Gerrit-Owner: Yilong Yao <yilo...@google.com>
          Gerrit-Reviewer: Joshua Peraza <jpe...@chromium.org>
          Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
          Gerrit-Reviewer: Yilong Yao <yilo...@google.com>
          Gerrit-CC: Ivan Penkov <iva...@google.com>
          Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
          Gerrit-Attention: Yilong Yao <yilo...@google.com>
          Gerrit-Comment-Date: Tue, 02 Dec 2025 16:44:42 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages