Commit 0c58583b authored by Will Harris's avatar Will Harris Committed by Commit Bot

Add support for __declspec(nocf).

__declspec(nocf) syntax was added in https://reviews.llvm.org/D72167
and annotates that checks should not be added on indirect calls
within that function.

BUG=chromium:584575

Change-Id: Ib2e2d2a827186a9c1fd3de15356b2b04d6a69e49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2270707Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Will Harris <wfh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68590}
parent de066cc6
...@@ -176,7 +176,14 @@ V8_INLINE Dest bit_cast(Source const& source) { ...@@ -176,7 +176,14 @@ V8_INLINE Dest bit_cast(Source const& source) {
// DISABLE_CFI_ICALL -- Disable Control Flow Integrity indirect call checks, // DISABLE_CFI_ICALL -- Disable Control Flow Integrity indirect call checks,
// useful because calls into JITed code can not be CFI verified. // useful because calls into JITed code can not be CFI verified.
#ifdef V8_OS_WIN
// On Windows, also needs __declspec(guard(nocf)) for CFG.
#define DISABLE_CFI_ICALL \
V8_CLANG_NO_SANITIZE("cfi-icall") \
__declspec(guard(nocf))
#else
#define DISABLE_CFI_ICALL V8_CLANG_NO_SANITIZE("cfi-icall") #define DISABLE_CFI_ICALL V8_CLANG_NO_SANITIZE("cfi-icall")
#endif
#if V8_CC_GNU #if V8_CC_GNU
#define V8_IMMEDIATE_CRASH() __builtin_trap() #define V8_IMMEDIATE_CRASH() __builtin_trap()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment