This CL introduces the Fuchsia versions of the existing platform specific functions. For Fuchsia, we need to track the VMAR (https://fuchsia.dev/fuchsia-src/reference/kernel_objects/vm_address_region) of the Guarded Pool mapping, and for this purpose I added some platform specific data structure that remains empty on POSIX platforms. `getThreadID` is not super useful for Fuchsia so it's just left as a stub for now. While testing the changes in my Fuchsia tree, I realized that `guarded_pool_allocator_tls.h` should have closed the namespace before including `GWP_ASAN_PLATFORM_TLS_HEADER`, otherwise drama ensues. This was tested in g3, upstream LLVM, and Fuchsia (with local changes). Differential Revision: https://reviews.llvm.org/D90483
16 lines
606 B
C++
16 lines
606 B
C++
//===-- common_fuchsia.cpp --------------------------------------*- C++ -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "gwp_asan/common.h"
|
|
|
|
namespace gwp_asan {
|
|
// This is only used for AllocationTrace.ThreadID and allocation traces are not
|
|
// yet supported on Fuchsia.
|
|
uint64_t getThreadID() { return kInvalidThreadID; }
|
|
} // namespace gwp_asan
|