Skip to content

Remove : from stack-protector-heuristics-effect.rs Filecheck Pattern #136938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions tests/assembly/stack-protector/stack-protector-heuristics-effect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#![allow(incomplete_features)]
#![feature(unsized_locals, unsized_fn_params)]

// CHECK-LABEL: emptyfn:
// CHECK-LABEL: emptyfn{{:|\[}}
#[no_mangle]
pub fn emptyfn() {
// all: __stack_chk_fail
Expand All @@ -29,7 +29,7 @@ pub fn emptyfn() {
// missing-NOT: __stack_chk_fail
}

// CHECK-LABEL: array_char
// CHECK-LABEL: array_char{{:|\[}}
#[no_mangle]
pub fn array_char(f: fn(*const char)) {
let a = ['c'; 1];
Expand All @@ -47,7 +47,7 @@ pub fn array_char(f: fn(*const char)) {
// missing-NOT: __stack_chk_fail
}

// CHECK-LABEL: array_u8_1
// CHECK-LABEL: array_u8_1{{:|\[}}
#[no_mangle]
pub fn array_u8_1(f: fn(*const u8)) {
let a = [0u8; 1];
Expand All @@ -63,7 +63,7 @@ pub fn array_u8_1(f: fn(*const u8)) {
// missing-NOT: __stack_chk_fail
}

// CHECK-LABEL: array_u8_small:
// CHECK-LABEL: array_u8_small{{:|\[}}
#[no_mangle]
pub fn array_u8_small(f: fn(*const u8)) {
let a = [0u8; 2];
Expand All @@ -80,7 +80,7 @@ pub fn array_u8_small(f: fn(*const u8)) {
// missing-NOT: __stack_chk_fail
}

// CHECK-LABEL: array_u8_large:
// CHECK-LABEL: array_u8_large{{:|\[}}
#[no_mangle]
pub fn array_u8_large(f: fn(*const u8)) {
let a = [0u8; 9];
Expand All @@ -99,7 +99,7 @@ pub fn array_u8_large(f: fn(*const u8)) {
#[derive(Copy, Clone)]
pub struct ByteSizedNewtype(u8);

// CHECK-LABEL: array_bytesizednewtype_9:
// CHECK-LABEL: array_bytesizednewtype_9{{:|\[}}
#[no_mangle]
pub fn array_bytesizednewtype_9(f: fn(*const ByteSizedNewtype)) {
let a = [ByteSizedNewtype(0); 9];
Expand All @@ -115,7 +115,7 @@ pub fn array_bytesizednewtype_9(f: fn(*const ByteSizedNewtype)) {
// missing-NOT: __stack_chk_fail
}

// CHECK-LABEL: local_var_addr_used_indirectly
// CHECK-LABEL: local_var_addr_used_indirectly{{:|\[}}
#[no_mangle]
pub fn local_var_addr_used_indirectly(f: fn(bool)) {
let a = 5;
Expand All @@ -142,7 +142,7 @@ pub fn local_var_addr_used_indirectly(f: fn(bool)) {
// missing-NOT: __stack_chk_fail
}

// CHECK-LABEL: local_string_addr_taken
// CHECK-LABEL: local_string_addr_taken{{:|\[}}
#[no_mangle]
pub fn local_string_addr_taken(f: fn(&String)) {
let x = String::new();
Expand All @@ -168,7 +168,7 @@ impl SelfByRef for i32 {
}
}

// CHECK-LABEL: local_var_addr_taken_used_locally_only
// CHECK-LABEL: local_var_addr_taken_used_locally_only{{:|\[}}
#[no_mangle]
pub fn local_var_addr_taken_used_locally_only(factory: fn() -> i32, sink: fn(i32)) {
let x = factory();
Expand All @@ -195,7 +195,7 @@ pub struct Gigastruct {
members: u64,
}

// CHECK-LABEL: local_large_var_moved
// CHECK-LABEL: local_large_var_moved{{:|\[}}
#[no_mangle]
pub fn local_large_var_moved(f: fn(Gigastruct)) {
let x = Gigastruct { does: 0, not: 1, have: 2, array: 3, members: 4 };
Expand Down Expand Up @@ -224,7 +224,7 @@ pub fn local_large_var_moved(f: fn(Gigastruct)) {
// missing-NOT: __stack_chk_fail
}

// CHECK-LABEL: local_large_var_cloned
// CHECK-LABEL: local_large_var_cloned{{:|\[}}
#[no_mangle]
pub fn local_large_var_cloned(f: fn(Gigastruct)) {
f(Gigastruct { does: 0, not: 1, have: 2, array: 3, members: 4 });
Expand Down Expand Up @@ -281,7 +281,7 @@ extern "C" {
fn alloca(size: usize) -> *mut ();
}

// CHECK-LABEL: alloca_small_compile_time_constant_arg
// CHECK-LABEL: alloca_small_compile_time_constant_arg{{:|\[}}
#[no_mangle]
pub fn alloca_small_compile_time_constant_arg(f: fn(*mut ())) {
f(unsafe { alloca(8) });
Expand All @@ -293,7 +293,7 @@ pub fn alloca_small_compile_time_constant_arg(f: fn(*mut ())) {
// missing-NOT: __stack_chk_fail
}

// CHECK-LABEL: alloca_large_compile_time_constant_arg
// CHECK-LABEL: alloca_large_compile_time_constant_arg{{:|\[}}
#[no_mangle]
pub fn alloca_large_compile_time_constant_arg(f: fn(*mut ())) {
f(unsafe { alloca(9) });
Expand All @@ -305,7 +305,7 @@ pub fn alloca_large_compile_time_constant_arg(f: fn(*mut ())) {
// missing-NOT: __stack_chk_fail
}

// CHECK-LABEL: alloca_dynamic_arg
// CHECK-LABEL: alloca_dynamic_arg{{:|\[}}
#[no_mangle]
pub fn alloca_dynamic_arg(f: fn(*mut ()), n: usize) {
f(unsafe { alloca(n) });
Expand All @@ -324,7 +324,7 @@ pub fn alloca_dynamic_arg(f: fn(*mut ()), n: usize) {
// this is support for the "unsized locals" unstable feature:
// https://doc.rust-lang.org/unstable-book/language-features/unsized-locals.html.

// CHECK-LABEL: unsized_fn_param
// CHECK-LABEL: unsized_fn_param{{:|\[}}
#[no_mangle]
pub fn unsized_fn_param(s: [u8], l: bool, f: fn([u8])) {
let n = if l { 1 } else { 2 };
Expand All @@ -344,7 +344,7 @@ pub fn unsized_fn_param(s: [u8], l: bool, f: fn([u8])) {
// missing-NOT: __stack_chk_fail
}

// CHECK-LABEL: unsized_local
// CHECK-LABEL: unsized_local{{:|\[}}
#[no_mangle]
pub fn unsized_local(s: &[u8], l: bool, f: fn(&mut [u8])) {
let n = if l { 1 } else { 2 };
Expand Down
Loading