-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rollup of 5 pull requests #93943
Closed
Closed
Rollup of 5 pull requests #93943
Conversation
This file contains 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
This change adds a flag for configuring control-flow protection in the LLVM backend. In Clang, this flag is exposed as `-fcf-protection` with options `none|branch|return|full`. This convention is followed for `rustc`, though as a codegen option: `rustc -Z cf-protection=<none|branch|return|full>`. Co-authored-by: BlackHoleFox <[email protected]>
… r=oli-obk More informative error message for E0015 Helps with rust-lang#92380
Add support for control-flow protection This change adds a flag for configuring control-flow protection in the LLVM backend. In Clang, this flag is exposed as `-fcf-protection` with options `none|branch|return|full`. This convention is followed for `rustc`, though as a codegen option: `rustc -C cf-protection=<none|branch|return|full>`. There are a couple of issues with this PR as-is, but I figured it would be advantageous to get some review feedback before proceeding much further: - [x] I would like this change would have some kind of test, e.g., compile a simple example with cf-protection enabled and verify that the ELF output indeed has the `IBT` and `SHSTK` issues; I will need someone to point out where such a test would go as I'm not too familiar with the `rustc` repository - [ ] Any assembly code in the libraries will need to be manually checked to see to it that when this flag is set, `ENDBR*` instructions are inserted in the right places; again, I will need a bit of help with this, since I don't know where all the x86 assembly lives [edit: see followup issue] - [x] A more serious issue, I think: if other libraries are not also built with these flags enabled, then LLVM will seek the "lowest-common denominator" and compile without cf-protection enabled; what I observed is that compiling a simple example with `-C cf-protection=full` doesn't result in the correct ELF tags, presumably because the standard libraries were not compiled with the same flags--any thoughts on this?
…rk-Simulacrum bootstrap.py: Suggest disabling download-ci-llvm option if url fails to download I got an error when trying to build the compiler using an old commit, and it turns out it was because the option `download-ci-llvm` was implicitly set to true. So this pull request tries to add a help message for other people that may run into the same problem. To reproduce my error: ``` git checkout 8d7707f ./x.py test [...] spurious failure, trying again downloading https://ci-artifacts.rust-lang.org/rustc-builds/db002a06ae9154a35d410550bc5132df883d7baa/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz curl: (22) The requested URL returned error: 404 failed to run: curl -# -y 30 -Y 10 --connect-timeout 30 --retry 3 -Sf -o /tmp/tmp8g13rb4n https://ci-artifacts.rust-lang.org/rustc-builds/db002a06ae9154a35d410550bc5132df883d7baa/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz Build completed unsuccessfully in 0:00:46 ``` This is my `config.toml`: ``` # Includes one of the default files in src/bootstrap/defaults profile = "compiler" changelog-seen = 2 [rust] debug = true ``` To reproduce an error with this branch: Change line 618 of bootstrap.py to ``` url = "rustc-builds-error404/{}".format(llvm_sha) ``` Delete llvm and cached tarball, and set `llvm.download-ci-llvm=true` in config.toml. ``` ./x.py test [...] spurious failure, trying again downloading https://ci-artifacts.rust-lang.org/rustc-builds-error404/719b04ca99be0c78e09a8ec5e2eda082a5d8ccae/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz curl: (22) The requested URL returned error: 404 failed to run: curl -# -y 30 -Y 10 --connect-timeout 30 --retry 3 -Sf -o /tmp/tmpesl1ydvo https://ci-artifacts.rust-lang.org/rustc-builds-error404/719b04ca99be0c78e09a8ec5e2eda082a5d8ccae/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz error: failed to download llvm from ci help: old builds get deleted after a certain time help: if trying to compile an old commit of rustc, disable `download-ci-llvm` in config.toml: [llvm] download-ci-llvm = false Build completed unsuccessfully in 0:00:01 ``` Regarding the implementation, I expected to be able to use a try/catch block in `_download_ci_llvm`, but the `run` function calls `sys.exit` instead of raising an exception so that's not possible. Also, suggestions for better wording of the help message are welcome.
add link to format_args! when mention it in docs close rust-lang#93904
update miri to fix the libcore test suite r? `@ghost`
rustbot
added
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
rollup
A PR which is a rollup
labels
Feb 12, 2022
@bors r+ rollup=never p=5 |
📌 Commit 555a6fe has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Feb 12, 2022
⌛ Testing commit 555a6fe with merge 6da423dba6f359b4552fec9a6697ee49e50dea1d... |
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
bors
added
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
labels
Feb 12, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
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.
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.
Successful merges:
Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup