Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(653)

Side by Side Diff: src/base/macros.h

Issue 2258003002: Disable CFI on a few methods. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/api.cc ('k') | src/global-handles.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_BASE_MACROS_H_ 5 #ifndef V8_BASE_MACROS_H_
6 #define V8_BASE_MACROS_H_ 6 #define V8_BASE_MACROS_H_
7 7
8 #include "src/base/compiler-specific.h" 8 #include "src/base/compiler-specific.h"
9 #include "src/base/format-macros.h" 9 #include "src/base/format-macros.h"
10 #include "src/base/logging.h" 10 #include "src/base/logging.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 #endif 147 #endif
148 #endif 148 #endif
149 149
150 // Define DISABLE_ASAN macros. 150 // Define DISABLE_ASAN macros.
151 #ifdef V8_USE_ADDRESS_SANITIZER 151 #ifdef V8_USE_ADDRESS_SANITIZER
152 #define DISABLE_ASAN __attribute__((no_sanitize_address)) 152 #define DISABLE_ASAN __attribute__((no_sanitize_address))
153 #else 153 #else
154 #define DISABLE_ASAN 154 #define DISABLE_ASAN
155 #endif 155 #endif
156 156
157 // DISABLE_CFI_PERF -- Disable Control Flow Integrity checks for Perf reasons.
158 #if !defined(DISABLE_CFI_PERF)
159 #if defined(__clang__) && defined(__has_attribute)
160 #if __has_attribute(no_sanitize)
161 #define DISABLE_CFI_PERF __attribute__((no_sanitize("cfi")))
162 #endif
163 #endif
164 #endif
165 #if !defined(DISABLE_CFI_PERF)
166 #define DISABLE_CFI_PERF
167 #endif
157 168
158 #if V8_CC_GNU 169 #if V8_CC_GNU
159 #define V8_IMMEDIATE_CRASH() __builtin_trap() 170 #define V8_IMMEDIATE_CRASH() __builtin_trap()
160 #else 171 #else
161 #define V8_IMMEDIATE_CRASH() ((void(*)())0)() 172 #define V8_IMMEDIATE_CRASH() ((void(*)())0)()
162 #endif 173 #endif
163 174
164 175
165 // TODO(all) Replace all uses of this macro with static_assert, remove macro. 176 // TODO(all) Replace all uses of this macro with static_assert, remove macro.
166 #define STATIC_ASSERT(test) static_assert(test, #test) 177 #define STATIC_ASSERT(test) static_assert(test, #test)
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 301
291 template <> 302 template <>
292 inline bool is_fundamental<uint8_t>() { 303 inline bool is_fundamental<uint8_t>() {
293 return true; 304 return true;
294 } 305 }
295 306
296 } // namespace base 307 } // namespace base
297 } // namespace v8 308 } // namespace v8
298 309
299 #endif // V8_BASE_MACROS_H_ 310 #endif // V8_BASE_MACROS_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/global-handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698