MiraclePtr in Dawn: Fetch PartitionaAlloc in DEPS
We want to expand MiraclePtr coverage by rewriting pointers inside Dawn.
This offers an effective protection against UAFs.
This is step 2 from:
https://docs.google.com/document/d/1wz45t0alQthsIU9P7_rQcfQyqnrBMXzrOjSzdQo-V-A/edit
This fetch PartitionAlloc as a dependency when depot_tools are used.
Support for CMake will be added next in step 3.
After this patch the dependency is not used.
Bug: chromium:1464560
Change-Id: I12090455881a35db80142bb3bb2b72c798ed536e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/141160
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
diff --git a/build_overrides/partition_alloc.gni b/build_overrides/partition_alloc.gni
new file mode 100644
index 0000000..488806e
--- /dev/null
+++ b/build_overrides/partition_alloc.gni
@@ -0,0 +1,27 @@
+# Copyright 2023 The Dawn Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This is the default build configuration when building PartitionAlloc
+# as a standalone library.
+use_partition_alloc_as_malloc_default = false
+use_allocator_shim_default = false
+enable_backup_ref_ptr_support_default = false
+put_ref_count_in_previous_slot_default = true
+enable_backup_ref_ptr_slow_checks_default = false
+enable_dangling_raw_ptr_checks_default = false
+
+# This is the default build configuration for pointers/raw_ptr*.
+raw_ptr_zero_on_construct_default = true
+raw_ptr_zero_on_move_default = true
+raw_ptr_zero_on_destruct_default = false