Skip to content
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

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mustartt
Copy link
Contributor

With function sections, the assembly label does not necessarily end in :.

Remove trailing : to be more consistent with the rest of the existing Filecheck patterns.

// CHECK-LABEL: local_string_addr_taken
#[no_mangle]
pub fn local_string_addr_taken(f: fn(&String)) {
    let x = String::new();
    f(&x);

@rustbot
Copy link
Collaborator

rustbot commented Feb 12, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 12, 2025
Copy link
Contributor

@amy-kwan amy-kwan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@workingjubilee
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 14, 2025

📌 Commit 142d107 has been approved by workingjubilee

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 14, 2025
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Feb 14, 2025
…heck, r=workingjubilee

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

With function sections, the assembly label does not necessarily end in `:`.

Remove trailing `:` to be more consistent with the rest of the existing Filecheck patterns.
```
// CHECK-LABEL: local_string_addr_taken
#[no_mangle]
pub fn local_string_addr_taken(f: fn(&String)) {
    let x = String::new();
    f(&x);
```
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 14, 2025
…kingjubilee

Rollup of 10 pull requests

Successful merges:

 - rust-lang#135778 (account for `c_enum_min_bits` in `multiple-reprs` UI test)
 - rust-lang#136052 (Correct comment for FreeBSD and DragonFly BSD in unix/thread)
 - rust-lang#136886 (Remove the common prelude module)
 - rust-lang#136938 (Remove `:` from `stack-protector-heuristics-effect.rs` Filecheck Pattern)
 - rust-lang#136956 (add vendor directory to .gitignore)
 - rust-lang#136958 (Fix presentation of purely "additive" replacement suggestion parts)
 - rust-lang#136967 (Use `slice::fill` in `io::Repeat` implementation)
 - rust-lang#136976 (alloc boxed: docs: use MaybeUninit::write instead of as_mut_ptr)
 - rust-lang#137007 (Emit MIR for each bit with on `dont_reset_cast_kind_without_updating_operand`)
 - rust-lang#137008 (Move code into `rustc_mir_transform`)

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr
Copy link
Member

@bors r-
#137019 (comment)

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 14, 2025
@workingjubilee
Copy link
Member

It seems that was indeed load-bearing

@mustartt
Copy link
Contributor Author

The original FileCheck pattern : is preventing the match against WASM's .functype emptyfn () -> (). Originally, only 4/16 of the check labels have : at the end of them.

Any suggestions on how to fix this? I was thinking of using a negative look ahead to not match with labels that starts with .functype, or CHECK-LABEL: emptyfn{{:|[}} as with .csect empty[PR].

@mustartt mustartt force-pushed the fix-stack-protector-filecheck branch from 142d107 to fb8c993 Compare February 20, 2025 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants