Project-Fortify: Introduce `PushEGLintOrDie()` [chromium/src : main]

0 views
Skip to first unread message

Kalvin Lee (Gerrit)

unread,
Mar 31, 2026, 2:16:23 AM (3 days ago) Mar 31
to Vasiliy Telezhnikov, Chromium LUCI CQ, chromium...@chromium.org, ozone-...@chromium.org
Attention needed from Vasiliy Telezhnikov

Kalvin Lee voted and added 3 comments

Votes added by Kalvin Lee

Auto-Submit+1
Commit-Queue+1

3 comments

File ui/ozone/common/native_pixmap_egl_binding.cc
Line 194, Patchset 1: PushEGLintOrDie(pixmap->GetDmaBufOffset(attrs_plane), attrs);
Kramer Ge . resolved

From the bug I thought only `offset` is required to perform checked cast. Other usages are safe here.

Kalvin Lee

I was just slapping the cast on for consistency everywhere --- it's not clear to me at a glance what is and isn't safe. (By the way --- IIUC --- `checked_cast` should simply be compiled out when the compiler can tell that the type would fit.)

Retained lines 193-194 in patchset 2, undoing the others in this block.

Line 196, Patchset 1: PushEGLintOrDie(pixmap->GetDmaBufPitch(attrs_plane), attrs);
Kramer Ge . resolved

pitch is already `checked_cast` to 32 bit [here](https://source.chromium.org/chromium/chromium/src/+/main:ui/gfx/linux/native_pixmap_dmabuf.cc;l=38;drc=cf44d078028acbcb97d0fc80630ba9087a9ae620;bpv=0;bpt=1)

Kalvin Lee

I can't tell what `EGLint` is defined as, but CodeSearch commonly shows `int32_t`. Thus `uint32_t` may not necessarily fit.

Line 216, Patchset 1: PushEGLintOrDie(pixmap->GetDmaBufOffset(pixmap_plane), attrs);
Kramer Ge . resolved

ditto

Kalvin Lee

Retained line 216 for patchset 2, undoing everything else in this block.

Open in Gerrit

Related details

Attention is currently required from:
  • Vasiliy Telezhnikov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I18adeeea99c097a8294782c4a547ce0f2d96794b
Gerrit-Change-Number: 7708472
Gerrit-PatchSet: 2
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
Gerrit-Attention: Vasiliy Telezhnikov <vas...@chromium.org>
Gerrit-Comment-Date: Tue, 31 Mar 2026 06:15:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Kramer Ge <fang...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Vasiliy Telezhnikov (Gerrit)

unread,
10:53 AM (6 hours ago) 10:53 AM
to Kalvin Lee, Code Review Nudger, Chromium LUCI CQ, chromium...@chromium.org, ozone-...@chromium.org
Attention needed from Kalvin Lee

Vasiliy Telezhnikov voted and added 1 comment

Votes added by Vasiliy Telezhnikov

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Vasiliy Telezhnikov . resolved

lgtm % Kramer, thanks.

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I18adeeea99c097a8294782c4a547ce0f2d96794b
    Gerrit-Change-Number: 7708472
    Gerrit-PatchSet: 2
    Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
    Gerrit-Reviewer: Kalvin Lee <kd...@chromium.org>
    Gerrit-Reviewer: Kramer Ge <fang...@chromium.org>
    Gerrit-Reviewer: Vasiliy Telezhnikov <vas...@chromium.org>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
    Gerrit-Comment-Date: Thu, 02 Apr 2026 14:53:36 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages