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
56 lines
2.6 KiB
C
56 lines
2.6 KiB
C
// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 0 | FileCheck -check-prefix=DEF -check-prefix=NOSSP %s
|
|
// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 1 | FileCheck -check-prefix=DEF -check-prefix=SSP %s
|
|
// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 2 | FileCheck -check-prefix=DEF -check-prefix=SSPSTRONG %s
|
|
// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 3 | FileCheck -check-prefix=DEF -check-prefix=SSPREQ %s
|
|
|
|
// RUN: %clang_cc1 -emit-llvm -o - %s -fsanitize=safe-stack | FileCheck -check-prefix=DEF -check-prefix=SAFESTACK-NOSSP %s
|
|
// RUN: %clang_cc1 -emit-llvm -o - %s -fsanitize=safe-stack -stack-protector 0 | FileCheck -check-prefix=DEF -check-prefix=SAFESTACK-NOSSP %s
|
|
// RUN: %clang_cc1 -emit-llvm -o - %s -fsanitize=safe-stack -stack-protector 1 | FileCheck -check-prefix=DEF -check-prefix=SAFESTACK-SSP %s
|
|
// RUN: %clang_cc1 -emit-llvm -o - %s -fsanitize=safe-stack -stack-protector 2 | FileCheck -check-prefix=DEF -check-prefix=SAFESTACK-SSPSTRONG %s
|
|
// RUN: %clang_cc1 -emit-llvm -o - %s -fsanitize=safe-stack -stack-protector 3 | FileCheck -check-prefix=DEF -check-prefix=SAFESTACK-SSPREQ %s
|
|
|
|
typedef __SIZE_TYPE__ size_t;
|
|
|
|
int printf(const char * _Format, ...);
|
|
size_t strlen(const char *s);
|
|
char *strcpy(char *s1, const char *s2);
|
|
|
|
// DEF: define {{.*}}void @test1(ptr noundef %msg) #[[A:.*]] {
|
|
void test1(const char *msg) {
|
|
char a[strlen(msg) + 1];
|
|
strcpy(a, msg);
|
|
printf("%s\n", a);
|
|
}
|
|
|
|
// DEF: define {{.*}}void @test2(ptr noundef %msg) #[[B:.*]] {
|
|
__attribute__((no_stack_protector))
|
|
void test2(const char *msg) {
|
|
char a[strlen(msg) + 1];
|
|
strcpy(a, msg);
|
|
printf("%s\n", a);
|
|
}
|
|
|
|
// NOSSP-NOT: attributes #[[A]] = {{.*}} ssp
|
|
// SSP: attributes #[[A]] = {{.*}} ssp{{ }}
|
|
// SSPSTRONG: attributes #[[A]] = {{.*}} sspstrong
|
|
// SSPREQ: attributes #[[A]] = {{.*}} sspreq
|
|
|
|
// SAFESTACK-NOSSP: attributes #[[A]] = {{.*}} safestack
|
|
// SAFESTACK-NOSSP-NOT: ssp
|
|
|
|
// SAFESTACK-SSP: attributes #[[A]] = {{.*}} safestack ssp{{ }}
|
|
// SAFESTACK-SSPSTRONG: attributes #[[A]] = {{.*}} safestack sspstrong
|
|
// SAFESTACK-SSPREQ: attributes #[[A]] = {{.*}} safestack sspreq
|
|
|
|
// NOSSP-NOT: attributes #[[B]] = {{.*}} ssp
|
|
// SSP-NOT: attributes #[[B]] = {{.*}} ssp{{ }}
|
|
// SSPSTRONG-NOT: attributes #[[B]] = {{.*}} sspstrong
|
|
// SSPREQ-NOT: attributes #[[B]] = {{.*}} sspreq
|
|
|
|
// SAFESTACK-SSP: attributes #[[B]] = {{.*}} safestack
|
|
// SAFESTACK-SSP-NOT: attributes #[[B]] = {{.*}} safestack ssp{{ }}
|
|
// SAFESTACK-SSPSTRONG: attributes #[[B]] = {{.*}} safestack
|
|
// SAFESTACK-SSPSTRONG-NOT: attributes #[[B]] = {{.*}} safestack sspstrong
|
|
// SAFESTACK-SSPREQ: attributes #[[B]] = {{.*}} safestack
|
|
// SAFESTACK-SSPREQ-NOT: attributes #[[B]] = {{.*}} safestack sspreq
|