xref: /freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.h (revision fe6060f10f634930ff71b7c50291ddc610da2475)
10b57cec5SDimitry Andric //===-- sanitizer_fuchsia.h ------------------------------------*- C++ -*-===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===---------------------------------------------------------------------===//
80b57cec5SDimitry Andric //
90b57cec5SDimitry Andric // Fuchsia-specific sanitizer support.
100b57cec5SDimitry Andric //
110b57cec5SDimitry Andric //===---------------------------------------------------------------------===//
120b57cec5SDimitry Andric #ifndef SANITIZER_FUCHSIA_H
130b57cec5SDimitry Andric #define SANITIZER_FUCHSIA_H
140b57cec5SDimitry Andric 
150b57cec5SDimitry Andric #include "sanitizer_platform.h"
160b57cec5SDimitry Andric #if SANITIZER_FUCHSIA
170b57cec5SDimitry Andric 
180b57cec5SDimitry Andric #include "sanitizer_common.h"
190b57cec5SDimitry Andric 
200b57cec5SDimitry Andric #include <zircon/sanitizer.h>
215ffd83dbSDimitry Andric #include <zircon/syscalls/object.h>
220b57cec5SDimitry Andric 
230b57cec5SDimitry Andric namespace __sanitizer {
240b57cec5SDimitry Andric 
250b57cec5SDimitry Andric extern uptr MainThreadStackBase, MainThreadStackSize;
260b57cec5SDimitry Andric extern sanitizer_shadow_bounds_t ShadowBounds;
270b57cec5SDimitry Andric 
285ffd83dbSDimitry Andric struct MemoryMappingLayoutData {
295ffd83dbSDimitry Andric   InternalMmapVector<zx_info_maps_t> data;
305ffd83dbSDimitry Andric   size_t current;  // Current index into the vector.
315ffd83dbSDimitry Andric };
325ffd83dbSDimitry Andric 
33*fe6060f1SDimitry Andric void InitShadowBounds();
34*fe6060f1SDimitry Andric 
350b57cec5SDimitry Andric }  // namespace __sanitizer
360b57cec5SDimitry Andric 
370b57cec5SDimitry Andric #endif  // SANITIZER_FUCHSIA
380b57cec5SDimitry Andric #endif  // SANITIZER_FUCHSIA_H
39