[UBSan] Runtime Executable Only violation hit when checking the function pointer on an execute-only target.
An execute-only target disallows data access to code sections.
The commit rG279a4d causes the generated code to read text section data which is not allowed on an execute-only target.
When enabling the function sanitizer (-fsanitize=function), UBSan function signatures and type hashes are emitted within the function's prologue data to check the function type. This results in the non-execute access and a runtime error.
@llvm/issue-subscribers-clang-driver
@llvm/issue-subscribers-clang-frontend
D158614 is created for code review.
/cherry-pick 9ef536a12ea65a2b9e2511936327c7b621af38fb
/branch llvm/llvm-project-release-prs/issue64931
/pull-request llvm/llvm-project-release-prs#671
/cherry-pick 9ef536a12ea65a2b9e2511936327c7b621af38fb d26dd681f9726ed7d43d7c0bdd8ee3cb2db69a2b 39f6a31eaa665b1a01305346092ed69f4b9f940a c7dce0283b5b502dacd47eb1488342a31f4ed35a
/branch llvm/llvm-project-release-prs/issue64931
release/17.x does not contain -### exit code change in clang/lib/Driver (https://reviews.llvm.org/D156363).
Here is a modified fix:
/branch MaskRay/llvm-project/17.x-mexecute-only
I merged your branch manually @MaskRay