Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
safe_stack.h
Go to the documentation of this file.
1// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
5#ifndef RUNTIME_PLATFORM_SAFE_STACK_H_
6#define RUNTIME_PLATFORM_SAFE_STACK_H_
7
8#if defined(__has_feature)
9#if __has_feature(safe_stack)
10#define USING_SAFE_STACK
11#endif
12#endif
13
14#if defined(USING_SAFE_STACK)
15#define NO_SANITIZE_SAFE_STACK __attribute__((no_sanitize("safe-stack")))
16#else
17#define NO_SANITIZE_SAFE_STACK
18#endif
19
20#if defined(__has_feature)
21#if __has_feature(shadow_call_stack)
22#define USING_SHADOW_CALL_STACK
23#endif
24#endif
25
26#if defined(USING_SHADOW_CALL_STACK)
27#define NO_SANITIZE_SHADOW_CALL_STACK \
28 __attribute__((no_sanitize("shadow-call-stack")))
29#else
30#define NO_SANITIZE_SHADOW_CALL_STACK
31#endif
32
33#endif // RUNTIME_PLATFORM_SAFE_STACK_H_