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

Unified Diff: base/compiler_specific.h

Issue 2257323002: Disable CFI on a few src/cc methods for perf reasons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | cc/base/contiguous_container.h » ('j') | cc/base/contiguous_container.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/compiler_specific.h
diff --git a/base/compiler_specific.h b/base/compiler_specific.h
index 17e1f688419a8b1b8c1d104c1f3fcd5b8ddf7566..f064be8d9d192735f96f5019286d139988a02950 100644
--- a/base/compiler_specific.h
+++ b/base/compiler_specific.h
@@ -169,6 +169,15 @@
#define MSAN_CHECK_MEM_IS_INITIALIZED(p, size)
#endif // MEMORY_SANITIZER
+// DISABLE_CFI_PERF -- Disable Control Flow Integrity for perf reasons.
+#if !defined(DISABLE_CFI_PERF)
+#if defined(__clang__)
+#define DISABLE_CFI_PERF __attribute__((no_sanitize("cfi")))
+#else
+#define DISABLE_CFI_PERF
+#endif
+#endif
+
// Macro useful for writing cross-platform function pointers.
#if !defined(CDECL)
#if defined(OS_WIN)
« no previous file with comments | « no previous file | cc/base/contiguous_container.h » ('j') | cc/base/contiguous_container.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698