[llvm-branch-commits] [clang] [llvm] [clang] Implement function pointer signing and authenticated function calls (PR #93906)
Akira Hatanaka via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jun 18 21:55:00 PDT 2024
================
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -triple arm64e-apple-ios -fptrauth-calls %s -verify -emit-llvm -o -
+
+void f(void);
+
+int *pf = (int *)&f + 1; // expected-error{{cannot compile this static initializer yet}}
----------------
ahatanak wrote:
As commented in the test case, adding a non-zero constant to a signed pointer is unrepresentable in relocations. I agree that the diagnostic should provide more information and should inform the users that the initialization failed because of this specific limitation.
I'll see if I can improve the error message later.
https://github.com/llvm/llvm-project/pull/93906
More information about the llvm-branch-commits
mailing list