commit | 6c77bec14448f0d167146d617931faa9c87ead3e | [log] [tgz] |
---|---|---|
author | Arthur Sonzogni <arthursonzogni@chromium.org> | Sat Dec 14 18:53:10 2024 |
committer | Copybara-Service <copybara-worker@google.com> | Sat Dec 14 19:01:23 2024 |
tree | 26b2b9131527d1f4f415a8b6548817d843ca307b | |
parent | fe1f69e662aeb68fbdc48c4e7350ca020339a132 [diff] |
C++11 std::array rewrite for memory safety [17/19] Split from: https://chromium-review.googlesource.com/c/chromium/src/+/6004959/21 Generated patch --------------- - Tool: ./tool/clang/spanify/rewrite-multiple-platform.sh - Platform: Linux. - Filter: This includes 2400/4222 patches. I included the std::array ones and excluded build errors. Google announcement: -------------------- https://groups.google.com/a/google.com/g/chrome-memory-safety/c/RMiO4gaVLQA/m/Yz-3NCObAgAJ Benchmarks: ---------- See design doc and https://chromium-review.googlesource.com/c/chromium/src/+/6004959/21 Description ----------- The consensus during the memory safety summit was to begin rewriting relevant C-style arrays to C++11 std::array. It can be done immediately, offers better developer ergonomics, and fix large chunks of the -Wunsafe-buffer-usage errors in Chrome. To clarify, this effort is complementary to the longer plan work with enabling -fsanitize=array-bounds, and we plan to leverage both, especially for protecting 3p code. [Attached] is a document detailing the rationale, benefits, and considerations for potential compile-time and performance impacts. [Attached]:https://docs.google.com/document/d/1z5aBDg26lHmNDjXRCysElWKx7E4PAJXqykI_k7ondJI/edit?tab=t.0#heading=h.cqgo7wvp0kzt NO_IFTTT=No need to update base/debug/stack_trace.h Bug: 378069401 Change-Id: I5d2420ca9261f62a8a21f037ecd1850ecdb58210 R: dcheng@chromium.org AX-Relnotes: n/a. Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6039266 Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Owners-Override: Daniel Cheng <dcheng@chromium.org> Commit-Queue: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/main@{#1396391} NOKEYCHECK=True GitOrigin-RevId: 88ba2ce076d07b060f8e629a9a40f62db2aaee50