Remove legacy Android APIs, mark crashpad_handler testonly on Android [crashpad/crashpad : main]

2 views
Skip to first unread message

Andrew Grieve (Gerrit)

unread,
Jun 1, 2026, 8:39:12 PM (4 days ago) Jun 1
to Andrew Grieve, Mark Mentovai, crashp...@chromium.org
Attention needed from Mark Mentovai

Andrew Grieve voted and added 1 comment

Votes added by Andrew Grieve

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Andrew Grieve . resolved

Gerrit UI is showing "Merge Conflict", but the parent commit is already at tip-of-tree, so I'm not sure why it's showing that...

Open in Gerrit

Related details

Attention is currently required from:
  • 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: I7a7d2f40452ba53e967ceea1ba18dde62d9b3b74
Gerrit-Change-Number: 7892465
Gerrit-PatchSet: 2
Gerrit-Owner: Andrew Grieve <agr...@chromium.org>
Gerrit-Reviewer: Andrew Grieve <agr...@chromium.org>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Attention: Mark Mentovai <ma...@chromium.org>
Gerrit-Comment-Date: Tue, 02 Jun 2026 00:39:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Mark Mentovai (Gerrit)

unread,
Jun 2, 2026, 9:55:53 AM (4 days ago) Jun 2
to Andrew Grieve, crashpa...@luci-project-accounts.iam.gserviceaccount.com, crashp...@chromium.org
Attention needed from Andrew Grieve

Mark Mentovai added 11 comments

Commit Message
Line 12, Patchset 2 (Latest):* Adds GetHandlerLinkerPathsAndEnv(), since apps should not be
responsible for coming up with this logic on their own.
Mark Mentovai . unresolved

Seeing how this works out, I am less convinced about this part.

Line 18, Patchset 2 (Latest):Bug: chromium:425948259
Mark Mentovai . unresolved

chromium: prefix not necessary in the merged bug namespace.

File client/crashpad_client.h
Line 314, Patchset 2 (Latest): //! \param[in] symbol An address of a symbol in the calling module (e.g. a
//! function in the test or chrome library). This is used by `dladdr` to
//! identify the library.
Mark Mentovai . unresolved

I don’t really love this approach. It seems kind of specific to Chrome’s precise use. I’m a little inclined to just make the caller work it out.

File client/crashpad_client_linux.cc
Line 39, Patchset 2 (Latest):#include "base/files/file_path.h"
Mark Mentovai . unresolved

Crashpad allows the #include that’s already in the lead header (`client/crashpad_client.h`) to fulfill the IWYU need for this.

Line 701, Patchset 2 (Latest): LOG(ERROR) << "dladdr failed";
Mark Mentovai . unresolved

Use `dlerror` when any of the `<dlfcn.h>` functions fail.

Line 707, Patchset 2 (Latest): base::FilePath handler_trampoline_path =
libdir.Append("libcrashpad_handler_trampoline.so");
Mark Mentovai . unresolved

This is also probably assuming too much.

Line 717, Patchset 2 (Latest): for (char** envp = environ; *envp != nullptr; ++envp) {
std::string env_var(*envp);
if (env_var.compare(0, 16, "LD_LIBRARY_PATH=") == 0) {
env_var = "LD_LIBRARY_PATH=" + libdir_str + ":" + env_var.substr(16);
found_ld_library_path = true;
}
local_env.push_back(env_var);
}
if (!found_ld_library_path) {
local_env.push_back("LD_LIBRARY_PATH=" + libdir_str);
}
Mark Mentovai . unresolved

Doesn’t Bionic have its own environment-manipulation functions per standard C?

If you’ve got a reason to not use that, you’e got to say so in a comment.

Line 729, Patchset 2 (Latest): handler_trampoline->swap(local_handler_trampoline);
handler_library->swap(local_handler_library);
env->swap(local_env);
Mark Mentovai . unresolved

This function can’t fail (after `dladdr`, which happens early enough that none of these are a concern), so what’s the point of the local/swap stuff?

File handler/BUILD.gn
Line 169, Patchset 2 (Latest):}

if (!crashpad_is_ios) {
Mark Mentovai . unresolved

The block above that’s ending on line 169 is already `if (!crashpad_is_ios)`. Why break it up into a second conditional that tests the same thing?

Line 207, Patchset 2 (Latest): # crashpad_handler_trampoline is used on Android, but crashpad_handler is
# needed by crashpad_client_linux_test.cc (which cannot use the
# trampoline because it runs as a normal executable, which it does
# because it does not have access to chromium's base::MultiProcessTest).
testonly = true
Mark Mentovai . unresolved

(see below.)

Line 265, Patchset 2 (Latest): # Avoid .exp, .ilk, and .lib file collisions with crashpad_handler.exe by
# having this target produce crashpad_handler_com.com. Don’t use this
# target directly. Instead, use crashpad_handler_console.
Mark Mentovai . unresolved

Why was this reformatted? The only change I see is that it’s being rewrapped, but the existing comment already fit within 80 columns, so the new wrapping is less correct.

In fact, now that I look at it (which I wouldn’t have done until this came along), the block at line 207 seems to have wrapped at 79 instead of 80 also.

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Grieve
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: I7a7d2f40452ba53e967ceea1ba18dde62d9b3b74
    Gerrit-Change-Number: 7892465
    Gerrit-PatchSet: 2
    Gerrit-Owner: Andrew Grieve <agr...@chromium.org>
    Gerrit-Reviewer: Andrew Grieve <agr...@chromium.org>
    Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
    Gerrit-Attention: Andrew Grieve <agr...@chromium.org>
    Gerrit-Comment-Date: Tue, 02 Jun 2026 13:55:50 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages