diff --git a/runtime/platform/undefined_behavior_sanitizer.h b/runtime/platform/undefined_behavior_sanitizer.h index 1985d0542f8..15de70ac91a 100644 --- a/runtime/platform/undefined_behavior_sanitizer.h +++ b/runtime/platform/undefined_behavior_sanitizer.h @@ -7,8 +7,10 @@ #ifdef __clang__ #define NO_SANITIZE_UNDEFINED(check) [[clang::no_sanitize(check)]] +#define NO_SANITIZE_UNDEFINED_FUNCTION NO_SANITIZE_UNDEFINED("function") #else #define NO_SANITIZE_UNDEFINED(check) [[gnu::no_sanitize(check)]] +#define NO_SANITIZE_UNDEFINED_FUNCTION #endif #endif // RUNTIME_PLATFORM_UNDEFINED_BEHAVIOR_SANITIZER_H_ diff --git a/runtime/vm/simulator_arm.cc b/runtime/vm/simulator_arm.cc index 85b6aefd444..905daed00b8 100644 --- a/runtime/vm/simulator_arm.cc +++ b/runtime/vm/simulator_arm.cc @@ -1394,7 +1394,7 @@ typedef int32_t (*SimulatorLeafRuntimeCall)(int32_t r0, // SimulatorLeafRuntimeCall. We can call them all from here only because in // IA32's calling convention a function can be called with extra arguments // and the callee will see the first arguments and won't unbalance the stack. -NO_SANITIZE_UNDEFINED("function") +NO_SANITIZE_UNDEFINED_FUNCTION static int32_t InvokeLeafRuntime(SimulatorLeafRuntimeCall target, int32_t r0, int32_t r1, @@ -1411,7 +1411,7 @@ typedef double (*SimulatorLeafFloatRuntimeCall)(double d0, double d1); // SimulatorFloatLeafRuntimeCall. We can call them all from here only because // IA32's calling convention a function can be called with extra arguments // and the callee will see the first arguments and won't unbalance the stack. -NO_SANITIZE_UNDEFINED("function") +NO_SANITIZE_UNDEFINED_FUNCTION static double InvokeFloatLeafRuntime(SimulatorLeafFloatRuntimeCall target, double d0, double d1) { diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc index c1514288c3a..ba84fedcaa4 100644 --- a/runtime/vm/simulator_arm64.cc +++ b/runtime/vm/simulator_arm64.cc @@ -1630,7 +1630,7 @@ typedef int64_t (*SimulatorLeafRuntimeCall)(int64_t r0, // SimulatorLeafRuntimeCall. We can call them all from here only because in // X64's calling conventions a function can be called with extra arguments // and the callee will see the first arguments and won't unbalance the stack. -NO_SANITIZE_UNDEFINED("function") +NO_SANITIZE_UNDEFINED_FUNCTION static int64_t InvokeLeafRuntime(SimulatorLeafRuntimeCall target, int64_t r0, int64_t r1, @@ -1657,7 +1657,7 @@ typedef double (*SimulatorLeafFloatRuntimeCall)(double d0, // SimulatorFloatLeafRuntimeCall. We can call them all from here only because in // X64's calling conventions a function can be called with extra arguments // and the callee will see the first arguments and won't unbalance the stack. -NO_SANITIZE_UNDEFINED("function") +NO_SANITIZE_UNDEFINED_FUNCTION static double InvokeFloatLeafRuntime(SimulatorLeafFloatRuntimeCall target, double d0, double d1, diff --git a/runtime/vm/simulator_riscv.cc b/runtime/vm/simulator_riscv.cc index 0a42bd481b2..64167b83644 100644 --- a/runtime/vm/simulator_riscv.cc +++ b/runtime/vm/simulator_riscv.cc @@ -2194,7 +2194,7 @@ typedef intx_t (*SimulatorLeafRuntimeCall)(intx_t r0, // SimulatorLeafRuntimeCall. We can call them all from here only because in // X64's calling conventions a function can be called with extra arguments // and the callee will see the first arguments and won't unbalance the stack. -NO_SANITIZE_UNDEFINED("function") +NO_SANITIZE_UNDEFINED_FUNCTION static intx_t InvokeLeafRuntime(SimulatorLeafRuntimeCall target, intx_t r0, intx_t r1, @@ -2221,7 +2221,7 @@ typedef double (*SimulatorLeafFloatRuntimeCall)(double d0, // SimulatorFloatLeafRuntimeCall. We can call them all from here only because in // X64's calling conventions a function can be called with extra arguments // and the callee will see the first arguments and won't unbalance the stack. -NO_SANITIZE_UNDEFINED("function") +NO_SANITIZE_UNDEFINED_FUNCTION static double InvokeFloatLeafRuntime(SimulatorLeafFloatRuntimeCall target, double d0, double d1, diff --git a/runtime/vm/virtual_memory_test.cc b/runtime/vm/virtual_memory_test.cc index 25cbb043fd4..ab9b2e1acc9 100644 --- a/runtime/vm/virtual_memory_test.cc +++ b/runtime/vm/virtual_memory_test.cc @@ -96,7 +96,7 @@ static int testFunction(int x) { return x * 2; } -NO_SANITIZE_UNDEFINED("function") // See https://dartbug.com/52440 +NO_SANITIZE_UNDEFINED_FUNCTION // See https://dartbug.com/52440 VM_UNIT_TEST_CASE(DuplicateRXVirtualMemory) { const uword page_size = VirtualMemory::PageSize(); const uword pointer = reinterpret_cast(&testFunction);