build: Add seam to enable array bounds checking [chromium/src : main]

0 views
Skip to first unread message

Kalvin Lee (Gerrit)

unread,
Jun 12, 2025, 4:08:21 AM6/12/25
to Nico Weber, chromium...@chromium.org
Attention needed from Nico Weber

Kalvin Lee added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Kalvin Lee . resolved

Hi Nico - I stole this arcana from Daniel, who claims he got it from you. Would you say this is leaning in the right direction?

Open in Gerrit

Related details

Attention is currently required from:
  • Nico Weber
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Attention: Nico Weber <tha...@chromium.org>
Gerrit-Comment-Date: Thu, 12 Jun 2025 08:06:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Nico Weber (Gerrit)

unread,
Jun 12, 2025, 9:04:59 AM6/12/25
to Kalvin Lee, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee

Nico Weber added 1 comment

Patchset-level comments
Nico Weber . resolved

Which embedders want this? Why?

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Comment-Date: Thu, 12 Jun 2025 13:04:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Kalvin Lee (Gerrit)

unread,
Jun 12, 2025, 9:20:51 AM6/12/25
to Nico Weber, chromium...@chromium.org
Attention needed from Nico Weber

Kalvin Lee added 1 comment

Patchset-level comments
Nico Weber . resolved

Which embedders want this? Why?

Attention is currently required from:
  • Nico Weber
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Attention: Nico Weber <tha...@chromium.org>
Gerrit-Comment-Date: Thu, 12 Jun 2025 13:19:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Weber <tha...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Nico Weber (Gerrit)

unread,
Jun 12, 2025, 9:23:01 AM6/12/25
to Kalvin Lee, Shahbaz Youssefi, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee

Nico Weber added 1 comment

Patchset-level comments
Nico Weber . resolved

syouseffi: Why do you need this for angle?

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-CC: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Comment-Date: Thu, 12 Jun 2025 13:22:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Shahbaz Youssefi (Gerrit)

unread,
Jun 12, 2025, 9:35:46 AM6/12/25
to Kalvin Lee, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee and Nico Weber

Shahbaz Youssefi added 1 comment

Patchset-level comments
Nico Weber . resolved

syouseffi: Why do you need this for angle?

Shahbaz Youssefi

ANGLE is perf sensitive. Outside Chromium, we don't want to have the overhead.

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
  • Nico Weber
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-CC: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Attention: Nico Weber <tha...@chromium.org>
Gerrit-Comment-Date: Thu, 12 Jun 2025 13:35:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Weber <tha...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Nico Weber (Gerrit)

unread,
Jun 12, 2025, 9:36:31 AM6/12/25
to Kalvin Lee, Shahbaz Youssefi, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee and Shahbaz Youssefi

Nico Weber added 1 comment

Patchset-level comments
Nico Weber . resolved

syouseffi: Why do you need this for angle?

Shahbaz Youssefi

ANGLE is perf sensitive. Outside Chromium, we don't want to have the overhead.

Nico Weber

Did you measure an overhead?

Chromium is also perf-sensitive, and this looks neutral in benchmarks. See linked docs.

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
  • Shahbaz Youssefi
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-CC: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Attention: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Comment-Date: Thu, 12 Jun 2025 13:36:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Shahbaz Youssefi <syou...@chromium.org>
Comment-In-Reply-To: Nico Weber <tha...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Shahbaz Youssefi (Gerrit)

unread,
Jun 12, 2025, 9:40:35 AM6/12/25
to Kalvin Lee, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee and Nico Weber

Shahbaz Youssefi added 1 comment

Patchset-level comments
Nico Weber . resolved

syouseffi: Why do you need this for angle?

Shahbaz Youssefi

ANGLE is perf sensitive. Outside Chromium, we don't want to have the overhead.

Nico Weber

Did you measure an overhead?

Chromium is also perf-sensitive, and this looks neutral in benchmarks. See linked docs.

Shahbaz Youssefi

I could have someone gather some data if you have instructions. But FYI, we are _really_ perf sensitive as the GLES driver on Android, and under high scrutiny. To the point where likely/unlikely markers are needed, we need to hand-hold the compiler to inline somethings and somethings not, etc.

We don't need bounds checking as a GLES driver, and I'm fairly confident someone will come back to us and ask for it to be removed.

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
  • Nico Weber
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-CC: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Attention: Nico Weber <tha...@chromium.org>
Gerrit-Comment-Date: Thu, 12 Jun 2025 13:40:30 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Nico Weber (Gerrit)

unread,
Jun 12, 2025, 11:55:55 AM6/12/25
to Kalvin Lee, Shahbaz Youssefi, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee and Shahbaz Youssefi

Nico Weber added 1 comment

Patchset-level comments
Nico Weber . resolved

syouseffi: Why do you need this for angle?

Shahbaz Youssefi

ANGLE is perf sensitive. Outside Chromium, we don't want to have the overhead.

Nico Weber

Did you measure an overhead?

Chromium is also perf-sensitive, and this looks neutral in benchmarks. See linked docs.

Shahbaz Youssefi

I could have someone gather some data if you have instructions. But FYI, we are _really_ perf sensitive as the GLES driver on Android, and under high scrutiny. To the point where likely/unlikely markers are needed, we need to hand-hold the compiler to inline somethings and somethings not, etc.

We don't need bounds checking as a GLES driver, and I'm fairly confident someone will come back to us and ask for it to be removed.

Nico Weber

To the point where likely/unlikely markers are needed

A bit of a derail, but do you build with PGO? That helps quite a bit with perf, and should make those markers unnecessary.

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
  • Shahbaz Youssefi
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-CC: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Attention: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Comment-Date: Thu, 12 Jun 2025 15:55:39 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Shahbaz Youssefi (Gerrit)

unread,
Jun 12, 2025, 12:10:53 PM6/12/25
to Kalvin Lee, Yuly Novikov, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee, Nico Weber and Yuly Novikov

Shahbaz Youssefi added 1 comment

Patchset-level comments
Nico Weber . resolved

syouseffi: Why do you need this for angle?

Shahbaz Youssefi

ANGLE is perf sensitive. Outside Chromium, we don't want to have the overhead.

Nico Weber

Did you measure an overhead?

Chromium is also perf-sensitive, and this looks neutral in benchmarks. See linked docs.

Shahbaz Youssefi

I could have someone gather some data if you have instructions. But FYI, we are _really_ perf sensitive as the GLES driver on Android, and under high scrutiny. To the point where likely/unlikely markers are needed, we need to hand-hold the compiler to inline somethings and somethings not, etc.

We don't need bounds checking as a GLES driver, and I'm fairly confident someone will come back to us and ask for it to be removed.

Nico Weber

To the point where likely/unlikely markers are needed

A bit of a derail, but do you build with PGO? That helps quite a bit with perf, and should make those markers unnecessary.

Shahbaz Youssefi

We considered it, that all actually started with the idea of PGO. But we found PGO to be cumbersome; it has to be constantly updated (which we don't have the resources for), and apparently can be detrimental when it's out of date. We had an excellent engineer who was figuring out what PGO is doing it, and manually doing it in the code so it's baked in and we don't have to rely on PGO.

Well, I see "we", I mean the ANGLE-4-Android folks.

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
  • Nico Weber
  • Yuly Novikov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Yuly Novikov <ynov...@chromium.org>
Gerrit-CC: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Yuly Novikov <ynov...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Attention: Nico Weber <tha...@chromium.org>
Gerrit-Comment-Date: Thu, 12 Jun 2025 16:10:46 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Nico Weber (Gerrit)

unread,
Jun 13, 2025, 9:02:15 AM6/13/25
to Kalvin Lee, Yuly Novikov, Shahbaz Youssefi, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee, Shahbaz Youssefi and Yuly Novikov

Nico Weber added 2 comments

Patchset-level comments
Nico Weber . resolved

Hm, looks like the

Nico Weber . resolved

syouseffi: Why do you need this for angle?

Shahbaz Youssefi

ANGLE is perf sensitive. Outside Chromium, we don't want to have the overhead.

Nico Weber

Did you measure an overhead?

Chromium is also perf-sensitive, and this looks neutral in benchmarks. See linked docs.

Shahbaz Youssefi

I could have someone gather some data if you have instructions. But FYI, we are _really_ perf sensitive as the GLES driver on Android, and under high scrutiny. To the point where likely/unlikely markers are needed, we need to hand-hold the compiler to inline somethings and somethings not, etc.

We don't need bounds checking as a GLES driver, and I'm fairly confident someone will come back to us and ask for it to be removed.

Nico Weber

To the point where likely/unlikely markers are needed

A bit of a derail, but do you build with PGO? That helps quite a bit with perf, and should make those markers unnecessary.

Shahbaz Youssefi

We considered it, that all actually started with the idea of PGO. But we found PGO to be cumbersome; it has to be constantly updated (which we don't have the resources for), and apparently can be detrimental when it's out of date. We had an excellent engineer who was figuring out what PGO is doing it, and manually doing it in the code so it's baked in and we don't have to rely on PGO.

Well, I see "we", I mean the ANGLE-4-Android folks.

Nico Weber

Saying "we care about perf so much that we need an opt-out for a thing that has no measurable cost" and "we don't use PGO" is IMHO not a very convincing position.

I'd say we land the flag without an opt-out for now, and add it if there's data that shows that we actually need it.

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
  • Shahbaz Youssefi
  • Yuly Novikov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Yuly Novikov <ynov...@chromium.org>
Gerrit-CC: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Yuly Novikov <ynov...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Attention: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Comment-Date: Fri, 13 Jun 2025 13:02:04 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Nico Weber (Gerrit)

unread,
Jun 13, 2025, 9:02:36 AM6/13/25
to Kalvin Lee, Yuly Novikov, Shahbaz Youssefi, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee, Shahbaz Youssefi and Yuly Novikov

Nico Weber added 1 comment

Patchset-level comments
Nico Weber . resolved

Hm, looks like the

Nico Weber

(accidental comment, ignore this one)

Gerrit-Comment-Date: Fri, 13 Jun 2025 13:02:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Weber <tha...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Yuly Novikov (Gerrit)

unread,
Jun 13, 2025, 9:56:36 AM6/13/25
to Kalvin Lee, Yuly Novikov, Shahbaz Youssefi, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee and Shahbaz Youssefi

Yuly Novikov added 1 comment

Patchset-level comments
Yuly Novikov . resolved

Would it be acceptable if we remove the "//build/config/compiler:sanitize_c_array_bounds" config in standalone ANGLE, like we do for others here https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/gni/angle.gni;l=352;drc=3c2bff4b540d1c98b6dd4ea901b05a3b7e6112b8?

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
  • Shahbaz Youssefi
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Yuly Novikov <ynov...@chromium.org>
Gerrit-CC: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Attention: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Comment-Date: Fri, 13 Jun 2025 13:56:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Shahbaz Youssefi (Gerrit)

unread,
Jun 13, 2025, 10:09:28 AM6/13/25
to Kalvin Lee, Yuly Novikov, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee, Nico Weber and Yuly Novikov

Shahbaz Youssefi added 2 comments

Patchset-level comments
Nico Weber . resolved

syouseffi: Why do you need this for angle?

Shahbaz Youssefi

ANGLE is perf sensitive. Outside Chromium, we don't want to have the overhead.

Nico Weber

Did you measure an overhead?

Chromium is also perf-sensitive, and this looks neutral in benchmarks. See linked docs.

Shahbaz Youssefi

I could have someone gather some data if you have instructions. But FYI, we are _really_ perf sensitive as the GLES driver on Android, and under high scrutiny. To the point where likely/unlikely markers are needed, we need to hand-hold the compiler to inline somethings and somethings not, etc.

We don't need bounds checking as a GLES driver, and I'm fairly confident someone will come back to us and ask for it to be removed.

Nico Weber

To the point where likely/unlikely markers are needed

A bit of a derail, but do you build with PGO? That helps quite a bit with perf, and should make those markers unnecessary.

Shahbaz Youssefi

We considered it, that all actually started with the idea of PGO. But we found PGO to be cumbersome; it has to be constantly updated (which we don't have the resources for), and apparently can be detrimental when it's out of date. We had an excellent engineer who was figuring out what PGO is doing it, and manually doing it in the code so it's baked in and we don't have to rely on PGO.

Well, I see "we", I mean the ANGLE-4-Android folks.

Nico Weber

Saying "we care about perf so much that we need an opt-out for a thing that has no measurable cost" and "we don't use PGO" is IMHO not a very convincing position.

I'd say we land the flag without an opt-out for now, and add it if there's data that shows that we actually need it.

Shahbaz Youssefi

I never agreed it doesn't have a measurable cost :)

Yuly Novikov . resolved

Would it be acceptable if we remove the "//build/config/compiler:sanitize_c_array_bounds" config in standalone ANGLE, like we do for others here https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/gni/angle.gni;l=352;drc=3c2bff4b540d1c98b6dd4ea901b05a3b7e6112b8?

Shahbaz Youssefi

Yes sure, that would be great!

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
  • Nico Weber
  • Yuly Novikov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Yuly Novikov <ynov...@chromium.org>
Gerrit-CC: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Yuly Novikov <ynov...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Attention: Nico Weber <tha...@chromium.org>
Gerrit-Comment-Date: Fri, 13 Jun 2025 14:09:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Yuly Novikov <ynov...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Yuly Novikov (Gerrit)

unread,
Jun 13, 2025, 11:19:52 AM6/13/25
to Kalvin Lee, Yuly Novikov, Shahbaz Youssefi, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee, Nico Weber and Shahbaz Youssefi

Yuly Novikov added 1 comment

Patchset-level comments
Yuly Novikov . resolved

Would it be acceptable if we remove the "//build/config/compiler:sanitize_c_array_bounds" config in standalone ANGLE, like we do for others here https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/gni/angle.gni;l=352;drc=3c2bff4b540d1c98b6dd4ea901b05a3b7e6112b8?

Shahbaz Youssefi

Yes sure, that would be great!

Yuly Novikov

OK, so the plan is:
1. Abandon this
2. Land https://chromium-review.googlesource.com/c/chromium/src/+/6600050
3. Roll Chromium into ANGLE
4. Disable "//build/config/compiler:sanitize_c_array_bounds" config in ANGLE.
Ideally we disable the config in the roll, but I think it's not a big deal if we do it a bit later, since rolling and landing would be hard to synchronize.

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
  • Nico Weber
  • Shahbaz Youssefi
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Yuly Novikov <ynov...@chromium.org>
Gerrit-CC: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Attention: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Nico Weber <tha...@chromium.org>
Gerrit-Comment-Date: Fri, 13 Jun 2025 15:19:36 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Nico Weber (Gerrit)

unread,
Jun 13, 2025, 11:50:47 AM6/13/25
to Kalvin Lee, Yuly Novikov, Shahbaz Youssefi, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee, Shahbaz Youssefi and Yuly Novikov

Nico Weber added 2 comments

Patchset-level comments
Nico Weber . resolved

syouseffi: Why do you need this for angle?

Shahbaz Youssefi

ANGLE is perf sensitive. Outside Chromium, we don't want to have the overhead.

Nico Weber

Did you measure an overhead?

Chromium is also perf-sensitive, and this looks neutral in benchmarks. See linked docs.

Shahbaz Youssefi

I could have someone gather some data if you have instructions. But FYI, we are _really_ perf sensitive as the GLES driver on Android, and under high scrutiny. To the point where likely/unlikely markers are needed, we need to hand-hold the compiler to inline somethings and somethings not, etc.

We don't need bounds checking as a GLES driver, and I'm fairly confident someone will come back to us and ask for it to be removed.

Nico Weber

To the point where likely/unlikely markers are needed

A bit of a derail, but do you build with PGO? That helps quite a bit with perf, and should make those markers unnecessary.

Shahbaz Youssefi

We considered it, that all actually started with the idea of PGO. But we found PGO to be cumbersome; it has to be constantly updated (which we don't have the resources for), and apparently can be detrimental when it's out of date. We had an excellent engineer who was figuring out what PGO is doing it, and manually doing it in the code so it's baked in and we don't have to rely on PGO.

Well, I see "we", I mean the ANGLE-4-Android folks.

Nico Weber

Saying "we care about perf so much that we need an opt-out for a thing that has no measurable cost" and "we don't use PGO" is IMHO not a very convincing position.

I'd say we land the flag without an opt-out for now, and add it if there's data that shows that we actually need it.

Shahbaz Youssefi

I never agreed it doesn't have a measurable cost :)

Nico Weber

You haven't shown data that it does though, while Kalvin has data showing that it doesn't.

Yuly Novikov . resolved

Would it be acceptable if we remove the "//build/config/compiler:sanitize_c_array_bounds" config in standalone ANGLE, like we do for others here https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/gni/angle.gni;l=352;drc=3c2bff4b540d1c98b6dd4ea901b05a3b7e6112b8?

Shahbaz Youssefi

Yes sure, that would be great!

Yuly Novikov

OK, so the plan is:
1. Abandon this
2. Land https://chromium-review.googlesource.com/c/chromium/src/+/6600050
3. Roll Chromium into ANGLE
4. Disable "//build/config/compiler:sanitize_c_array_bounds" config in ANGLE.
Ideally we disable the config in the roll, but I think it's not a big deal if we do it a bit later, since rolling and landing would be hard to synchronize.

Nico Weber

Please only do 4 if you have numbers to back up it having an effect (in particular, with PGO enabled). We likely do want this on in angle as it ships in chromium.

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
  • Shahbaz Youssefi
  • Yuly Novikov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Yuly Novikov <ynov...@chromium.org>
Gerrit-CC: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Yuly Novikov <ynov...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Attention: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Comment-Date: Fri, 13 Jun 2025 15:50:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Yuly Novikov <ynov...@chromium.org>
Comment-In-Reply-To: Shahbaz Youssefi <syou...@chromium.org>
Comment-In-Reply-To: Nico Weber <tha...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Yuly Novikov (Gerrit)

unread,
Jun 13, 2025, 11:54:21 AM6/13/25
to Kalvin Lee, Yuly Novikov, Shahbaz Youssefi, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee, Nico Weber and Shahbaz Youssefi

Yuly Novikov added 1 comment

Patchset-level comments
Yuly Novikov . resolved

Would it be acceptable if we remove the "//build/config/compiler:sanitize_c_array_bounds" config in standalone ANGLE, like we do for others here https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/gni/angle.gni;l=352;drc=3c2bff4b540d1c98b6dd4ea901b05a3b7e6112b8?

Shahbaz Youssefi

Yes sure, that would be great!

Yuly Novikov

OK, so the plan is:
1. Abandon this
2. Land https://chromium-review.googlesource.com/c/chromium/src/+/6600050
3. Roll Chromium into ANGLE
4. Disable "//build/config/compiler:sanitize_c_array_bounds" config in ANGLE.
Ideally we disable the config in the roll, but I think it's not a big deal if we do it a bit later, since rolling and landing would be hard to synchronize.

Nico Weber

Please only do 4 if you have numbers to back up it having an effect (in particular, with PGO enabled). We likely do want this on in angle as it ships in chromium.

Yuly Novikov

It would be enabled in the version of ANGLE that's built as a part of Chromium, and would be disabled in standalone ANGLE, which is shipped elsewhere.
Win-Win!

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
  • Nico Weber
  • Shahbaz Youssefi
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Yuly Novikov <ynov...@chromium.org>
Gerrit-CC: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Attention: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Nico Weber <tha...@chromium.org>
Gerrit-Comment-Date: Fri, 13 Jun 2025 15:54:06 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Nico Weber (Gerrit)

unread,
Jun 13, 2025, 11:57:43 AM6/13/25
to Kalvin Lee, Yuly Novikov, Shahbaz Youssefi, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee, Shahbaz Youssefi and Yuly Novikov

Nico Weber added 1 comment

Patchset-level comments
Yuly Novikov . resolved

Would it be acceptable if we remove the "//build/config/compiler:sanitize_c_array_bounds" config in standalone ANGLE, like we do for others here https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/gni/angle.gni;l=352;drc=3c2bff4b540d1c98b6dd4ea901b05a3b7e6112b8?

Shahbaz Youssefi

Yes sure, that would be great!

Yuly Novikov

OK, so the plan is:
1. Abandon this
2. Land https://chromium-review.googlesource.com/c/chromium/src/+/6600050
3. Roll Chromium into ANGLE
4. Disable "//build/config/compiler:sanitize_c_array_bounds" config in ANGLE.
Ideally we disable the config in the roll, but I think it's not a big deal if we do it a bit later, since rolling and landing would be hard to synchronize.

Nico Weber

Please only do 4 if you have numbers to back up it having an effect (in particular, with PGO enabled). We likely do want this on in angle as it ships in chromium.

Yuly Novikov

It would be enabled in the version of ANGLE that's built as a part of Chromium, and would be disabled in standalone ANGLE, which is shipped elsewhere.
Win-Win!

Nico Weber

Sure, works for me from a chrome PoV.

Who are contacts on the android gles driver team who can explicitly confirm that they're not interested in security hardening measures without demonstrated performance overhead? That's fairly different from what I've heard from my contacts in android land. I'd like to check with both the gles driver team and my contacts and make sure they're aligned on this.

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
  • Shahbaz Youssefi
  • Yuly Novikov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Yuly Novikov <ynov...@chromium.org>
Gerrit-CC: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Yuly Novikov <ynov...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Attention: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Comment-Date: Fri, 13 Jun 2025 15:57:39 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Shahbaz Youssefi (Gerrit)

unread,
Jun 13, 2025, 12:20:12 PM6/13/25
to Kalvin Lee, Amirali Abdolrashidi, Yuly Novikov, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee, Nico Weber and Yuly Novikov

Shahbaz Youssefi added 2 comments

Patchset-level comments
Nico Weber . resolved

syouseffi: Why do you need this for angle?

Shahbaz Youssefi

ANGLE is perf sensitive. Outside Chromium, we don't want to have the overhead.

Nico Weber

Did you measure an overhead?

Chromium is also perf-sensitive, and this looks neutral in benchmarks. See linked docs.

Shahbaz Youssefi

I could have someone gather some data if you have instructions. But FYI, we are _really_ perf sensitive as the GLES driver on Android, and under high scrutiny. To the point where likely/unlikely markers are needed, we need to hand-hold the compiler to inline somethings and somethings not, etc.

We don't need bounds checking as a GLES driver, and I'm fairly confident someone will come back to us and ask for it to be removed.

Nico Weber

To the point where likely/unlikely markers are needed

A bit of a derail, but do you build with PGO? That helps quite a bit with perf, and should make those markers unnecessary.

Shahbaz Youssefi

We considered it, that all actually started with the idea of PGO. But we found PGO to be cumbersome; it has to be constantly updated (which we don't have the resources for), and apparently can be detrimental when it's out of date. We had an excellent engineer who was figuring out what PGO is doing it, and manually doing it in the code so it's baked in and we don't have to rely on PGO.

Well, I see "we", I mean the ANGLE-4-Android folks.

Nico Weber

Saying "we care about perf so much that we need an opt-out for a thing that has no measurable cost" and "we don't use PGO" is IMHO not a very convincing position.

I'd say we land the flag without an opt-out for now, and add it if there's data that shows that we actually need it.

Shahbaz Youssefi

I never agreed it doesn't have a measurable cost :)

Nico Weber

You haven't shown data that it does though, while Kalvin has data showing that it doesn't.

Shahbaz Youssefi

You haven't shown data

I could have someone gather some data if you have instructions.

Pending said instructions.

Yuly Novikov . resolved

Would it be acceptable if we remove the "//build/config/compiler:sanitize_c_array_bounds" config in standalone ANGLE, like we do for others here https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/gni/angle.gni;l=352;drc=3c2bff4b540d1c98b6dd4ea901b05a3b7e6112b8?

Shahbaz Youssefi

Yes sure, that would be great!

Yuly Novikov

OK, so the plan is:
1. Abandon this
2. Land https://chromium-review.googlesource.com/c/chromium/src/+/6600050
3. Roll Chromium into ANGLE
4. Disable "//build/config/compiler:sanitize_c_array_bounds" config in ANGLE.
Ideally we disable the config in the roll, but I think it's not a big deal if we do it a bit later, since rolling and landing would be hard to synchronize.

Nico Weber

Please only do 4 if you have numbers to back up it having an effect (in particular, with PGO enabled). We likely do want this on in angle as it ships in chromium.

Yuly Novikov

It would be enabled in the version of ANGLE that's built as a part of Chromium, and would be disabled in standalone ANGLE, which is shipped elsewhere.
Win-Win!

Nico Weber

Sure, works for me from a chrome PoV.

Who are contacts on the android gles driver team who can explicitly confirm that they're not interested in security hardening measures without demonstrated performance overhead? That's fairly different from what I've heard from my contacts in android land. I'd like to check with both the gles driver team and my contacts and make sure they're aligned on this.

Shahbaz Youssefi

Perhaps @abdolr...@google.com could take a look at driver_overhead2 and some other cpu-perf sensitive traces? Again, needs instructions (I'm not sure how we'd get from https://chromium-review.googlesource.com/c/chromium/src/+/6600050 to ANGLE standalone using it, before it all lands).

security hardening measures

It's all about the context. Chrome serves multiple GL "users" (the different pages) that can't trust each other. So yes, of course it needs to be as secure as possible. On the other hand, a mobile game doesn't need this kind of security. What it does need is longer battery life.

Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
  • Nico Weber
  • Yuly Novikov
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Yuly Novikov <ynov...@chromium.org>
Gerrit-CC: Amirali Abdolrashidi <abdolr...@google.com>
Gerrit-CC: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Yuly Novikov <ynov...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Attention: Nico Weber <tha...@chromium.org>
Gerrit-Comment-Date: Fri, 13 Jun 2025 16:20:08 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Yuly Novikov (Gerrit)

unread,
Jun 13, 2025, 12:29:22 PM6/13/25
to Kalvin Lee, Amirali Abdolrashidi, Yuly Novikov, Shahbaz Youssefi, Nico Weber, chromium...@chromium.org
Attention needed from Kalvin Lee, Nico Weber and Shahbaz Youssefi

Yuly Novikov added 1 comment

Patchset-level comments
Yuly Novikov . resolved

Would it be acceptable if we remove the "//build/config/compiler:sanitize_c_array_bounds" config in standalone ANGLE, like we do for others here https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/gni/angle.gni;l=352;drc=3c2bff4b540d1c98b6dd4ea901b05a3b7e6112b8?

Shahbaz Youssefi

Yes sure, that would be great!

Yuly Novikov

OK, so the plan is:
1. Abandon this
2. Land https://chromium-review.googlesource.com/c/chromium/src/+/6600050
3. Roll Chromium into ANGLE
4. Disable "//build/config/compiler:sanitize_c_array_bounds" config in ANGLE.
Ideally we disable the config in the roll, but I think it's not a big deal if we do it a bit later, since rolling and landing would be hard to synchronize.

Nico Weber

Please only do 4 if you have numbers to back up it having an effect (in particular, with PGO enabled). We likely do want this on in angle as it ships in chromium.

Yuly Novikov

It would be enabled in the version of ANGLE that's built as a part of Chromium, and would be disabled in standalone ANGLE, which is shipped elsewhere.
Win-Win!

Nico Weber

Sure, works for me from a chrome PoV.

Who are contacts on the android gles driver team who can explicitly confirm that they're not interested in security hardening measures without demonstrated performance overhead? That's fairly different from what I've heard from my contacts in android land. I'd like to check with both the gles driver team and my contacts and make sure they're aligned on this.

Shahbaz Youssefi

Perhaps @abdolr...@google.com could take a look at driver_overhead2 and some other cpu-perf sensitive traces? Again, needs instructions (I'm not sure how we'd get from https://chromium-review.googlesource.com/c/chromium/src/+/6600050 to ANGLE standalone using it, before it all lands).

security hardening measures

It's all about the context. Chrome serves multiple GL "users" (the different pages) that can't trust each other. So yes, of course it needs to be as secure as possible. On the other hand, a mobile game doesn't need this kind of security. What it does need is longer battery life.

Yuly Novikov

I'm not sure how we'd get from https://chromium-review.googlesource.com/c/chromium/src/+/6600050 to ANGLE standalone using it, before it all lands

Seems as simple as adding these to `cflags`:
```
"-fsanitize=array-bounds",
"-fsanitize-trap=array-bounds",
```
We could do it e.g. here: https://source.chromium.org/chromium/chromium/src/+/main:third_party/angle/BUILD.gn;l=471;drc=3c2bff4b540d1c98b6dd4ea901b05a3b7e6112b8
Open in Gerrit

Related details

Attention is currently required from:
  • Kalvin Lee
  • Nico Weber
  • Shahbaz Youssefi
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • 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: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic271855af0881197c82538385894414136716ecc
Gerrit-Change-Number: 6640888
Gerrit-PatchSet: 1
Gerrit-Owner: Kalvin Lee <kd...@chromium.org>
Gerrit-Reviewer: Nico Weber <tha...@chromium.org>
Gerrit-Reviewer: Yuly Novikov <ynov...@chromium.org>
Gerrit-CC: Amirali Abdolrashidi <abdolr...@google.com>
Gerrit-CC: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Kalvin Lee <kd...@chromium.org>
Gerrit-Attention: Shahbaz Youssefi <syou...@chromium.org>
Gerrit-Attention: Nico Weber <tha...@chromium.org>
Gerrit-Comment-Date: Fri, 13 Jun 2025 16:29:07 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Kalvin Lee (Gerrit)

unread,
Jun 16, 2025, 12:11:29 AM6/16/25
to Amirali Abdolrashidi, Yuly Novikov, Shahbaz Youssefi, Nico Weber, chromium...@chromium.org

Kalvin Lee abandoned this change

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: abandon
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages