From 8fe5738f1853da8ace7cf025f2c6a256faf60261 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Wed, 1 May 2024 15:10:18 -0700 Subject: [PATCH 1/2] Don't enable use-after-return checking on Apple's Clang --- eng/native/configurecompiler.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake index 4675a8b07cb6b..3ee99eb13acb7 100644 --- a/eng/native/configurecompiler.cmake +++ b/eng/native/configurecompiler.cmake @@ -211,8 +211,8 @@ if (CLR_CMAKE_ENABLE_SANITIZERS) # Disable the use-after-return check for ASAN on Clang. This is because we have a lot of code that # depends on the fact that our locals are not saved in a parallel stack, so we can't enable this today. # If we ever have a way to detect a parallel stack and track its bounds, we can re-enable this check. - add_compile_options($<$:-fsanitize-address-use-after-return=never>) - add_compile_options($<$:-fsanitize-address-use-after-return=never>) + add_compile_options($<$:-fsanitize-address-use-after-return=never>) + add_compile_options($<$:-fsanitize-address-use-after-return=never>) endif() endif() From 70e787876bd9353ef8148f2f6b1afd57d661b942 Mon Sep 17 00:00:00 2001 From: Jeremy Koritzinsky Date: Thu, 2 May 2024 08:33:29 -0700 Subject: [PATCH 2/2] Update configurecompiler.cmake Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com> --- eng/native/configurecompiler.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/native/configurecompiler.cmake b/eng/native/configurecompiler.cmake index 3ee99eb13acb7..ea2ace1672750 100644 --- a/eng/native/configurecompiler.cmake +++ b/eng/native/configurecompiler.cmake @@ -211,8 +211,8 @@ if (CLR_CMAKE_ENABLE_SANITIZERS) # Disable the use-after-return check for ASAN on Clang. This is because we have a lot of code that # depends on the fact that our locals are not saved in a parallel stack, so we can't enable this today. # If we ever have a way to detect a parallel stack and track its bounds, we can re-enable this check. - add_compile_options($<$:-fsanitize-address-use-after-return=never>) - add_compile_options($<$:-fsanitize-address-use-after-return=never>) + add_compile_options($<$:-fsanitize-address-use-after-return=never>) + add_compile_options($<$:-fsanitize-address-use-after-return=never>) endif() endif()