- Notifications
You must be signed in to change notification settings - Fork 13.9k
More robust stack protector testing #147115
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
base: master
Are you sure you want to change the base?
Conversation
…tics-effect-llvm.rs
|
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ics-effect-llvm.rs -> tests/assembly-llvm/stack-protector/stack-protector-heuristics-effect-2.rs new file: tests/assembly-llvm/stack-protector/stack-protector-heuristics-effect-windows-32bit-2.rs new file: tests/assembly-llvm/stack-protector/stack-protector-heuristics-effect-windows-64bit-2.rs
…tics-effect-windows-64bit-2.rs
…tics-effect-windows-32bit-2.rs modified: tests/assembly-llvm/stack-protector/stack-protector-heuristics-effect-windows-64bit-2.rs
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…tics-effect-windows-64bit-2.rs
|
| I'm looking this and gonna give some comments, expecting in the next week |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please split the PR into multiple commits according to the logical organization of the test, which makes it easier for others to review.
And if your tests are coming from llvm tests, could you write something like a sheet to explain if these result in rustc are all expected?
| fn dummy(_: ...) -> i32; | ||
| | ||
| static STR: [u8; 1]; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add some comments about why we need these extern functions?
| // #[repr(C)] | ||
| // struct A { | ||
| // data: [u8; 2], | ||
| // } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these code left here
| } | ||
| | ||
| // Note: test2 | ||
| // struct -> flat aggregate -> array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These codes too, please add some comments to explain why keep these codes
| | ||
| // CHECK-LABEL: test3{{:|\[}} | ||
| #[no_mangle] | ||
| pub fn test3(a: *const u8) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make these test function names more meaningful? Or add some comments to explain
I've added some tests related to the stack protector. These tests were originally in the LLVM stack protector test project.
These tests were written for the "Stabilize stack-protector" proposal, and therefore removed the "stack-protector=basic" test option, as this stack protector was considered ineffective in Rust.
For the proposal, see: #146369
For the discussion, see zulip: https://rust-lang.zulipchat.com/#narrow/channel/233931-t-compiler.2Fmajor-changes/topic/Proposal.20for.20Adapt.20Stack.20Protector.20for.20Ru.E2.80.A6.20compiler-team.23841
r? @wesleywiser (feel free to reassign)
cc @nikic, @rcvalle, @davidtwco, @arielb1, @Darksonn, @Noratrieb, @SparrowLii