client: Eliminate the g_crashpad_info module initializer [crashpad/crashpad : main]

2 views
Skip to first unread message

Justin Cohen (Gerrit)

unread,
Oct 21, 2026, 11:46:44 AM (yesterday) Oct 21
to Mark Mentovai, crashpa...@luci-project-accounts.iam.gserviceaccount.com, crashp...@chromium.org

Justin Cohen added 2 comments

Patchset-level comments
File-level comment, Patchset 3:
Justin Cohen . resolved

wdyt? are we OK with a static initializer here?

Justin Cohen

Acknowledged

Commit Message
Line 7, Patchset 3:client: Make CrashpadInfo constructor constexpr
Mark Mentovai . resolved

The operative thing here is more that g_crashpad_info is constinit, or that you’re eliminating a module initializer.

Sure, making the constructor constexpr is part of how you achieve that, but it’s not the main operative thing.

Justin Cohen

Done -- updated the CL description to add:

Make g_crashpad_info constinit, with a constexpr CrashpadInfo
constructor, so that it is constant-initialized at compile time in all
builds and no module initializer is emitted.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement 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: I29655e2e0428166fe2d30e5b440b42f11f6f1f55
Gerrit-Change-Number: 8613026
Gerrit-PatchSet: 4
Gerrit-Owner: Justin Cohen <justi...@google.com>
Gerrit-Reviewer: Justin Cohen <justi...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Comment-Date: Wed, 21 Oct 2026 15:46:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Mark Mentovai <ma...@chromium.org>
Comment-In-Reply-To: Justin Cohen <justi...@google.com>
satisfied_requirement
open
diffy

Mark Mentovai (Gerrit)

unread,
Oct 21, 2026, 12:11:03 PM (yesterday) Oct 21
to Justin Cohen, crashpa...@luci-project-accounts.iam.gserviceaccount.com, crashp...@chromium.org
Attention needed from Justin Cohen

Mark Mentovai voted and added 1 comment

Votes added by Mark Mentovai <ma...@chromium.org>

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Mark Mentovai . resolved

LGTM

Open in Gerrit

Related details

Attention is currently required from:
  • Justin Cohen
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement 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: I29655e2e0428166fe2d30e5b440b42f11f6f1f55
Gerrit-Change-Number: 8613026
Gerrit-PatchSet: 4
Gerrit-Owner: Justin Cohen <justi...@google.com>
Gerrit-Reviewer: Justin Cohen <justi...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Attention: Justin Cohen <justi...@google.com>
Gerrit-Comment-Date: Wed, 21 Oct 2026 16:11:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Justin Cohen (Gerrit)

unread,
Oct 21, 2026, 1:37:29 PM (yesterday) Oct 21
to Mark Mentovai, crashpa...@luci-project-accounts.iam.gserviceaccount.com, crashp...@chromium.org

Justin Cohen voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement 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: I29655e2e0428166fe2d30e5b440b42f11f6f1f55
Gerrit-Change-Number: 8613026
Gerrit-PatchSet: 4
Gerrit-Owner: Justin Cohen <justi...@google.com>
Gerrit-Reviewer: Justin Cohen <justi...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
Gerrit-Comment-Date: Wed, 21 Oct 2026 17:37:27 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

crashpad-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

unread,
Oct 21, 2026, 1:37:44 PM (yesterday) Oct 21
to Justin Cohen, Mark Mentovai, crashp...@chromium.org

crashpa...@luci-project-accounts.iam.gserviceaccount.com submitted the change

Change information

Commit message:
client: Eliminate the g_crashpad_info module initializer

After LLVM commit 57a637ad382b, GlobalOpt no longer constant-folds
runtime constructors into globals placed in an explicit section (Apple
`section()` and Windows `__declspec(allocate())`). This left a module
initializer (_GLOBAL__sub_I_crashpad_info.cc) for g_crashpad_info in
optimized builds. Debug builds always had one, since GlobalOpt does not
run at -O0.


Make g_crashpad_info constinit, with a constexpr CrashpadInfo
constructor, so that it is constant-initialized at compile time in all
builds and no module initializer is emitted.
Bug: 574100301
Change-Id: I29655e2e0428166fe2d30e5b440b42f11f6f1f55
Reviewed-by: Mark Mentovai <ma...@chromium.org>
Commit-Queue: Justin Cohen <justi...@google.com>
Files:
  • M client/crashpad_info.cc
  • M client/crashpad_info.h
Change size: M
Delta: 2 files changed, 28 insertions(+), 34 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Mark Mentovai
  • requirement satisfiedReview-Enforcement: Code-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: I29655e2e0428166fe2d30e5b440b42f11f6f1f55
Gerrit-Change-Number: 8613026
Gerrit-PatchSet: 5
Gerrit-Owner: Justin Cohen <justi...@google.com>
Gerrit-Reviewer: Justin Cohen <justi...@google.com>
Gerrit-Reviewer: Mark Mentovai <ma...@chromium.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages