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
55 lines
1.4 KiB
C
55 lines
1.4 KiB
C
#if __aarch64__
|
|
#define VALID_DATA_KEY 2
|
|
#else
|
|
#error Provide these constants if you port this test
|
|
#endif
|
|
|
|
int *__ptrauth(VALID_DATA_KEY) valid0;
|
|
|
|
typedef int *intp;
|
|
|
|
int nonConstantGlobal = 5;
|
|
|
|
int *__ptrauth(VALID_DATA_KEY) valid0;
|
|
int *__ptrauth(VALID_DATA_KEY) * valid1;
|
|
__ptrauth(VALID_DATA_KEY) intp valid2;
|
|
__ptrauth(VALID_DATA_KEY) intp *valid3;
|
|
intp __ptrauth(VALID_DATA_KEY) valid4;
|
|
intp __ptrauth(VALID_DATA_KEY) * valid5;
|
|
int *__ptrauth(VALID_DATA_KEY, 0) valid6;
|
|
int *__ptrauth(VALID_DATA_KEY, 1) valid7;
|
|
int *__ptrauth(VALID_DATA_KEY, (_Bool)1) valid8;
|
|
int *__ptrauth(VALID_DATA_KEY, 1, 0) valid9;
|
|
int *__ptrauth(VALID_DATA_KEY, 1, 65535) valid10;
|
|
|
|
void test_code(intp p) {
|
|
__ptrauth(VALID_DATA_KEY) intp pSpecial = p;
|
|
pSpecial = p; // break in test_code
|
|
intp pNormal = pSpecial;
|
|
pNormal = pSpecial;
|
|
|
|
intp __ptrauth(VALID_DATA_KEY) *ppSpecial0 = &pSpecial;
|
|
intp *ppNormal1 = &pNormal;
|
|
}
|
|
|
|
void test_array(void) {
|
|
intp __ptrauth(VALID_DATA_KEY) pSpecialArray[10];
|
|
intp __ptrauth(VALID_DATA_KEY) *ppSpecial0 = pSpecialArray;
|
|
intp __ptrauth(VALID_DATA_KEY) *ppSpecial1 = &pSpecialArray[0];
|
|
}
|
|
|
|
int printf(const char *, ...);
|
|
|
|
int main(int argc, char **argv) {
|
|
valid0 = &nonConstantGlobal;
|
|
valid1 = &valid0;
|
|
valid2 = &nonConstantGlobal;
|
|
valid3 = &valid2;
|
|
valid4 = &nonConstantGlobal;
|
|
int (*f)(int, char **) = main; // break in main
|
|
test_code(valid4);
|
|
test_code(valid4);
|
|
test_array();
|
|
return 0;
|
|
}
|