CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
61 lines
2.6 KiB
C
61 lines
2.6 KiB
C
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -fsyntax-only -verify=c,expected %s
|
|
// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -fsyntax-only -verify=c,expected %s
|
|
// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -fsyntax-only -x c++ -verify=cxx,expected %s
|
|
// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -fsyntax-only -x c++ -verify=cxx,expected %s
|
|
|
|
#if defined __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
void *memset(void *, int, __SIZE_TYPE__);
|
|
void bzero(void *, __SIZE_TYPE__);
|
|
void *memcpy(void *, const void *, __SIZE_TYPE__);
|
|
void *memmove(void *, const void *, __SIZE_TYPE__);
|
|
|
|
#if defined __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#define AQ __ptrauth(1,1,50)
|
|
#define IQ __ptrauth(1,0,50)
|
|
|
|
struct PtrAuthTrivial {
|
|
int f0;
|
|
int * IQ f1;
|
|
};
|
|
|
|
struct PtrAuthNonTrivial0 {
|
|
int f0;
|
|
int * AQ f1; // c-note 2 {{non-trivial to copy}}
|
|
int f2;
|
|
};
|
|
|
|
struct PtrAuthNonTrivial1 {
|
|
int * AQ f0; // c-note 2 {{non-trivial to copy}}
|
|
int f1;
|
|
struct PtrAuthNonTrivial0 f2;
|
|
};
|
|
|
|
void testPtrAuthTrivial(struct PtrAuthTrivial *d, struct PtrAuthTrivial *s) {
|
|
memset(d, 0, sizeof(struct PtrAuthTrivial));
|
|
memset(d, 1, sizeof(struct PtrAuthTrivial));
|
|
bzero(d, sizeof(struct PtrAuthTrivial));
|
|
memcpy(d, s, sizeof(struct PtrAuthTrivial));
|
|
memmove(d, s, sizeof(struct PtrAuthTrivial));
|
|
}
|
|
|
|
void testPtrAuthNonTrivial1(struct PtrAuthNonTrivial1 *d,
|
|
struct PtrAuthNonTrivial1 *s) {
|
|
memset(d, 0, sizeof(struct PtrAuthNonTrivial1)); // cxx-warning {{is a pointer to non-trivially copyable type 'struct PtrAuthNonTrivial1'}} // cxx-note {{explicitly cast the pointer to silence}}
|
|
memset(d, 1, sizeof(struct PtrAuthNonTrivial1)); // cxx-warning {{is a pointer to non-trivially copyable type 'struct PtrAuthNonTrivial1'}} // cxx-note {{explicitly cast the pointer to silence}}
|
|
bzero(d, sizeof(struct PtrAuthNonTrivial1)); // cxx-warning {{is a pointer to non-trivially copyable type 'struct PtrAuthNonTrivial1'}} // cxx-note {{explicitly cast the pointer to silence}}
|
|
memcpy(d, s, sizeof(struct PtrAuthNonTrivial1));
|
|
// c-warning@-1 {{that is not trivial to primitive-copy}}
|
|
// cxx-warning@-2 {{is a pointer to non-trivially copyable type 'struct PtrAuthNonTrivial1'}}
|
|
// expected-note@-3 {{explicitly cast the pointer to silence}}
|
|
memmove(d, s, sizeof(struct PtrAuthNonTrivial1));
|
|
// c-warning@-1 {{that is not trivial to primitive-copy}}
|
|
// cxx-warning@-2 {{is a pointer to non-trivially copyable type 'struct PtrAuthNonTrivial1'}}
|
|
// expected-note@-3 {{explicitly cast the pointer to silence}}
|
|
}
|