Mitch Phillips 0a94511aec
Log errno (or fuchsia equivalent) on map failures (#95391)
A feature requested by Android, we should log errno (or the
corresponding fuchsia error status) as part of the message when
mmap/mprotect/etc. fails.
2024-07-29 12:35:20 +02:00

22 lines
857 B
C++

//===-- definitions.h -------------------------------------------*- 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
//
//===----------------------------------------------------------------------===//
#ifndef GWP_ASAN_DEFINITIONS_H_
#define GWP_ASAN_DEFINITIONS_H_
#define GWP_ASAN_TLS_INITIAL_EXEC \
__thread __attribute__((tls_model("initial-exec")))
#define GWP_ASAN_LIKELY(EXPR) __builtin_expect((bool)(EXPR), true)
#define GWP_ASAN_UNLIKELY(EXPR) __builtin_expect((bool)(EXPR), false)
#define GWP_ASAN_ALWAYS_INLINE inline __attribute__((always_inline))
#define GWP_ASAN_WEAK __attribute__((weak))
#endif // GWP_ASAN_DEFINITIONS_H_