unstable book: in a sanitizer example, check the code by folkertdev · Pull Request #139113 · rust-lang/rust (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
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
[ Show hidden characters]({{ revealButtonHref }})
Use some #
directives to make sure the code checks on x86_64, and does not produce errors on other platforms. This example still used an older version of #[naked]
, and because the snippet was ignored that was missed before.
I'm not sure when this gets built on CI exactly, so it might be worthwhile to try and build it for a non-x86_64 architecture to make sure that works. I'm not sure how to verify locally that e.g. on aarch64 this code works without errors/warnings.
try-job: aarch64-apple
rustbot has assigned @GuillaumeGomez.
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
Some changes occurred in src/doc/unstable-book/src/compiler-flags/sanitizer.md
cc @rust-lang/project-exploit-mitigations, @rcvalle
Nice trick, thanks!
@bors r+ rollup
📌 Commit b00b6a8 has been approved by GuillaumeGomez
It is now in the queue for this repository.
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
jhpratt added a commit to jhpratt/rust that referenced this pull request
…-check-block, r=GuillaumeGomez
unstable book: in a sanitizer example, check the code
Use some #
directives to make sure the code checks on x86_64, and does not produce errors on other platforms. This example still used an older version of #[naked]
, and because the snippet was ignored that was missed before.
I'm not sure when this gets built on CI exactly, so it might be worthwhile to try and build it for a non-x86_64 architecture to make sure that works. I'm not sure how to verify locally that e.g. on aarch64 this code works without errors/warnings.
bors added a commit to rust-lang-ci/rust that referenced this pull request
Rollup of 6 pull requests
Successful merges:
- rust-lang#139044 (bootstrap: Avoid cloning
change-id
list) - rust-lang#139111 (Properly document FakeReads)
- rust-lang#139113 (unstable book: in a sanitizer example, check the code)
- rust-lang#139122 (Remove attribute
#[rustc_error]
) - rust-lang#139132 (Improve hir_pretty for struct expressions.)
- rust-lang#139141 (Switch some rustc_on_unimplemented uses to diagnostic::on_unimplemented)
r? @ghost
@rustbot
modify labels: rollup
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
platforms are hard...
This now runs the example just on x86_64: it already used x86_64 inline assembly, so the code was kind of meaningless on any other platform. The goal of the unstable book is not really to test the behavior, but more that the example compiles and is up-to-date, so this seemed like the best option to me.
@rustbot ready
I also added a try build to make sure this actually works on non-x86_64.
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
and removed S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
labels
This comment has been minimized.
This comment has been minimized.
this uses some # directives to make sure the code works on x86_64, and does not produce errors on other platforms