1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
Description: Do not put the no_sanitize attribute near generated declarations.
-fsanitize=cfi-icall is supported only by Clang for x86 and x86_64. That is not
our case. Exclude compiler_specific.h that requires hard-coded build_config.h.
.
This way we avoid the header blocking the build on RISC-V 64bit and other
platforms.
Author: Nicholas Guriev <guriev-ns@ya.ru>
Last-Update: Thu, 04 May 2023 20:11:56 +0300
--- a/src/tools/generate_stubs/generate_stubs.py
+++ b/src/tools/generate_stubs/generate_stubs.py
@@ -92,7 +92,6 @@
# arg_list: The arguments used to call the stub function.
STUB_FUNCTION_DEFINITION = (
"""extern %(return_type)s %(name)s(%(params)s) __attribute__((weak));
-DISABLE_CFI_ICALL
%(return_type)s %(export)s %(name)s(%(params)s) {
%(return_prefix)s%(name)s_ptr(%(arg_list)s);
}""")
@@ -111,7 +110,6 @@
# argument.
VARIADIC_STUB_FUNCTION_DEFINITION = (
"""extern %(return_type)s %(name)s(%(params)s) __attribute__((weak));
-DISABLE_CFI_ICALL
%(return_type)s %(export)s %(name)s(%(params)s) {
va_list args___;
va_start(args___, %(last_named_arg)s);
@@ -133,7 +131,6 @@
# argument.
VOID_VARIADIC_STUB_FUNCTION_DEFINITION = (
"""extern void %(name)s(%(params)s) __attribute__((weak));
-DISABLE_CFI_ICALL
void %(export)s %(name)s(%(params)s) {
va_list args___;
va_start(args___, %(last_named_arg)s);
@@ -182,8 +179,6 @@
#include <map>
#include <vector>
-
-#include "base/compiler_specific.h"
"""
# The start and end templates for the enum definitions used by the Umbrella
|