Skip to content

Commit

Permalink
spanification: Add #pragma allow_unsafe_buffers to ipc/*
Browse files Browse the repository at this point in the history
This is a preparation to fix each files.
This CL has no behavior changes.

This patch was fully automated using script:
https://paste.googleplex.com/5614491201175552

Note that in patchset2, change to:
/build/config/unsafe_buffers_paths.txt
was reverted. Indeed, running too many (~3) CQ run touching this file is
making the builder cache much slower. I will bundle every change to this
file in a subsequent CL. I will limit myself to 1-2 CQ run per day.

See internal doc about it:
https://docs.google.com/document/d/1erdcokeh6rfBqs_h0drHqSLtbDbB61j7j3O2Pz8NH78/edit?resourcekey=0-hNe6w1hYAYyVXGEpWI7HVA&tab=t.0

Bug: 351564777
Change-Id: Ibb92af9382433c7518d8e8ac11b73361832c589f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5718051
Reviewed-by: Tom Sepez <[email protected]>
Auto-Submit: Arthur Sonzogni <[email protected]>
Commit-Queue: Tom Sepez <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1329707}
  • Loading branch information
ArthurSonzogni authored and Chromium LUCI CQ committed Jul 18, 2024
1 parent 91f4a3f commit 9967fb9
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ipc/ipc_channel_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ipc/ipc_channel_reader.h"

#include <stddef.h>
Expand Down
5 changes: 5 additions & 0 deletions ipc/ipc_message.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ipc/ipc_message.h"

#include <limits.h>
Expand Down
5 changes: 5 additions & 0 deletions ipc/ipc_message_pipe_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ipc/ipc_message_pipe_reader.h"

#include <stdint.h>
Expand Down
5 changes: 5 additions & 0 deletions ipc/ipc_message_protobuf_utils_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "build/build_config.h"

#include "ipc/ipc_message_protobuf_utils.h"
Expand Down
5 changes: 5 additions & 0 deletions ipc/ipc_message_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ipc/ipc_message.h"

#include <stddef.h>
Expand Down
5 changes: 5 additions & 0 deletions ipc/ipc_message_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ipc/ipc_message_utils.h"

#include <stddef.h>
Expand Down
5 changes: 5 additions & 0 deletions ipc/ipc_mojo_bootstrap_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ipc/ipc_mojo_bootstrap.h"

#include <cstdint>
Expand Down
5 changes: 5 additions & 0 deletions ipc/ipc_perftest_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ipc/ipc_perftest_util.h"

#include <tuple>
Expand Down
5 changes: 5 additions & 0 deletions ipc/ipc_test_channel_listener.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ipc/ipc_test_channel_listener.h"

#include "base/run_loop.h"
Expand Down
5 changes: 5 additions & 0 deletions ipc/message_filter_router.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "ipc/message_filter_router.h"

#include <stddef.h>
Expand Down

0 comments on commit 9967fb9

Please sign in to comment.