Spanification --- propagation & hardening

21 views
Skip to first unread message

Kalvin Lee

unread,
Sep 25, 2025, 6:06:38 AM (3 days ago) Sep 25
to angleproject
Hi folks,

Our team was mulling over project ideas for 2025 Q4, and the idea of ANGLE spanification came up. As far as we can tell, this simply chunks into
  1. Harden angle::Span. We are most interested in driving spanification to improve memory safety, and angle::Span is not currently flush with Chromium's base::span in this regard. (Note 1)
  2. Propagate angle::Span. Adapt Chromium's spanify tool (or write a brand-new one) to greatly lessen the human effort required to rewrite clumps of functions, classes, etc.
...and I'm handwaving away a lot of the follow-up work, etc. etc., especially perf analysis, which I suspect will temper how much we can get out of both these items.

I'd like to hear what the project team thinks about this --- would you be receptive to CLs sent, are there no-go areas that will probably not bear spanification, etc.?

Thanks,
Kalvin

Note 1: To state the obvious for my own benefit --- angle::Span currently appears only to have bounds checking on first(), last(), and subspan(), and even then only tied to ANGLE_ENABLE_ASSERTS. All other accessors look unguarded to me.

Geoff Lang

unread,
Sep 25, 2025, 10:54:34 AM (3 days ago) Sep 25
to kd...@chromium.org, angleproject
Hey Kalvin,

I suggest syncing with tsepez@ about this. He's in the process of removing unsafe buffers and adding spans across ANGLE right now, see anglebug.com/436880895

We're definitely happy to spanify and will accept patches. ANGLE is pretty sensitive to CPU overhead but I haven't seen any obvious cases where spans add real overhead except some of the pixel processing routines.  

We're in the process of moving to std::span but some of our integrators are on c++17. There's ongoing discussion on how to solve it.

Geoff

--
You received this message because you are subscribed to the Google Groups "angleproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angleproject...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/angleproject/0d73971b-f544-497f-86ed-e0196b538702n%40googlegroups.com.

Kalvin Lee

unread,
Sep 26, 2025, 1:21:02 AM (2 days ago) Sep 26
to angleproject
Thanks, Geoff --- for my own reference it looks like the main discussion is going down in ANGLE bug 330910097.

Geoff Lang

unread,
Sep 26, 2025, 11:48:43 AM (2 days ago) Sep 26
to kd...@chromium.org, angleproject
Yes, and various email chains. It looks like these users of ANGLE stuck on c++17 may be able to use more recent libc++ versions with std::span support.

Geoff

Reply all
Reply to author
Forward
0 new messages