2011-08-17 07:21:58 +00:00
|
|
|
--- chromium-131.0.6778.69/base/compiler_specific.h 2024/11/18 15:29:10 1.1
|
2024-11-18 15:50:42 +00:00
|
|
|
+++ chromium-131.0.6778.69/base/compiler_specific.h 2024/11/18 15:29:46
|
|
|
|
|
@@ -424,12 +424,11 @@
|
2011-08-17 07:21:58 +00:00
|
|
|
// // Stack canary checks will not be performed in this body.
|
|
|
|
|
// }
|
|
|
|
|
// ```
|
|
|
|
|
-#if __has_cpp_attribute(gnu::no_stack_protector)
|
|
|
|
|
-#define NO_STACK_PROTECTOR [[gnu::no_stack_protector]]
|
|
|
|
|
-#elif __has_cpp_attribute(gnu::optimize)
|
|
|
|
|
-#define NO_STACK_PROTECTOR [[gnu::optimize("-fno-stack-protector")]]
|
|
|
|
|
+#if defined(COMPILER_GCC) || defined(__clang__)
|
|
|
|
|
+#if HAS_ATTRIBUTE(__no_stack_protector__)
|
|
|
|
|
+#define NO_STACK_PROTECTOR __attribute__((__no_stack_protector__))
|
|
|
|
|
#else
|
2024-11-18 15:50:42 +00:00
|
|
|
-#define NO_STACK_PROTECTOR
|
|
|
|
|
+#define NO_STACK_PROTECTOR __attribute__((__optimize__("-fno-stack-protector")))
|
2011-08-17 07:21:58 +00:00
|
|
|
#endif
|
2024-11-18 15:50:42 +00:00
|
|
|
|
|
|
|
|
// Annotates a codepath suppressing static analysis along that path. Useful when
|