================
@@ -0,0 +1,51 @@
+// RUN: %clang_cc1 -fsyntax-only -fsanitize=kcfi -verify %s
+
+#define __cfi_salt(S) __attribute__((cfi_salt(S)))
+
+int bad1() __cfi_salt(); // expected-error{{'cfi_salt' attribute takes one
argument}}
+int bad2() __cfi_salt(42); // expected-error{{expected string literal as
argument of 'cfi_salt' attribute}}
+int bad3() __attribute__((cfi_salt("a", "b", "c"))); //
expected-error{{'cfi_salt' attribute takes one argument}}
----------------
kees wrote:
> I think non-null ASCII characters would be good
Agreed: It can both be included in the existing mangle string -> hash step, and
I expect this to be a "meaningful" string for authors to use (e.g. "sched" or
"kvm") etc.
https://github.com/llvm/llvm-project/pull/141846
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits