Repository navigation
Remove -Z stack-protector=basic - #165812
Merged
rust-bors[bot] merged 1 commit intoNov 11, 2026
Merged
Conversation
Collaborator
|
Some changes occurred in tests/codegen-llvm/stack-protector.rs cc @rust-lang/project-exploit-mitigations, @rcvalle
Some changes occurred in tests/ui/stack-protector cc @rust-lang/project-exploit-mitigations, @rcvalle This PR modifies If appropriate, please update |
jieyouxu
reviewed
Nov 11, 2026
This is a part of the stack-protector stabilization The `-Z stack-protector=basic` mode (`-fstack-protector`) uses heuristics that are specifically designed to catch old-C-style string manipulation. This is not a good fit to Rust, which does not perform much unsafe C-style string manipulation. As far as I can tell, nobody has been asking for it, and few people are using it even in today's C - modern distros (e.g. Debian) tend to use `-fstack-protector-strong`. Therefore, `-Z stack-protector=basic` has been **removed**. If anyone is interested in it, they are welcome to add it back as an unstable option.
arielb1
force-pushed
the
remove-stack-protector-basic
branch
from
November 11, 2026 13:24
66d256f to
1a97ea1
Compare
jieyouxu
approved these changes
Nov 11, 2026
Contributor
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 11, 2026
…uwer Rollup of 6 pull requests Successful merges: - #165805 (Replace `match_span_kind` macro with `SpanKind`) - #165746 (std: don't overflow when rounding up huge thread stack sizes on unix) - #165807 (Fix 'simga' typo in char.to_lowercase documentation) - #165809 (Update to ar_archive_writer 0.5.5) - #165812 (Remove `-Z stack-protector=basic`) - #165815 (Adjust `unsized.rs` debuginfo test expected output for cdb `10.0.28000.2957`)
rust-bors Bot
pushed a commit
that referenced
this pull request
Nov 11, 2026
Rollup merge of #165812 - arielb1:remove-stack-protector-basic, r=jieyouxu Remove `-Z stack-protector=basic` This is a part of the stack-protector stabilization (pulled out from #165704) The `-Z stack-protector=basic` mode (`-fstack-protector`) uses heuristics that are specifically designed to catch old-C-style string manipulation. This is not a good fit to Rust, which does not perform much unsafe C-style string manipulation. As far as I can tell, nobody has been asking for it, and few people are using it even in today's C - modern distros (e.g. Debian) tend to use `-fstack-protector-strong`. Therefore, `-Z stack-protector=basic` has been **removed**. If anyone is interested in it, they are welcome to add it back as an unstable option. r? @jieyouxu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a part of the stack-protector stabilization (pulled out from #165704)
The
-Z stack-protector=basicmode (-fstack-protector) uses heuristics that are specifically designed to catch old-C-style string manipulation. This is not a good fit to Rust, which does not perform much unsafe C-style string manipulation. As far as I can tell, nobody has been asking for it, and few people are using it even in today's C - modern distros (e.g. Debian) tend to use-fstack-protector-strong.Therefore,
-Z stack-protector=basichas been removed. If anyone is interested in it, they are welcome to add it back as an unstable option.r? @jieyouxu