Commit 6d3919c7 authored by Jose Dapena Paz's avatar Jose Dapena Paz Committed by Commit Bot

GCC: move NO_SANITIZE in PCScanTask::ScanPartition to the start.

GCC build breaks because we are declaring an attribute in the wrong
place of a function definition:
../../base/compiler_specific.h:125:27: error: attributes are not allowed on a function-definition
  125 | #define NO_SANITIZE(what) __attribute__((no_sanitize(what)))
      |                           ^~~~~~~~~~~~~
../../base/allocator/partition_allocator/pcscan.cc:221:57: note: in expansion of macro ‘NO_SANITIZE’
  221 | size_t PCScan<thread_safe>::PCScanTask::ScanPartition() NO_SANITIZE("thread") {
      |                                                         ^~~~~~~~~~~

Bug: 819294
Change-Id: Iff1a3ec8c4b2765c7d95c45a1951fa7f0714a86c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485545Reviewed-by: default avatarTom Sepez <tsepez@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/master@{#819268}
parent 00d00be9
......@@ -218,7 +218,7 @@ void PCScan<thread_safe>::PCScanTask::ClearQuarantinedObjects() const {
}
template <bool thread_safe>
size_t PCScan<thread_safe>::PCScanTask::ScanPartition() NO_SANITIZE("thread") {
size_t NO_SANITIZE("thread") PCScan<thread_safe>::PCScanTask::ScanPartition() {
static_assert(alignof(uintptr_t) % alignof(void*) == 0,
"Alignment of uintptr_t must be at least as strict as "
"alignment of a pointer type.");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment