-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Stabilize -Zno-jump-tables into -Cjump-tables=bool #145974
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question:
How does this interact with pre-compiled std? I.e. can you mix downstream user crates compiled with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Not having double-negatives is very nice 👍
No, I rather not have to keep around an unstable flag as an alias to a stable flag, that's very weird. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,6 +209,19 @@ Note that while the `-C instrument-coverage` option is stable, the profile data | |
format produced by the resulting instrumentation may change, and may not work | ||
with coverage tools other than those built and shipped with the compiler. | ||
|
||
## jump-tables | ||
|
||
This option is used to allow or prevent the codegen backend from creating | ||
jump tables when lowering switches. | ||
Comment on lines
+214
to
+215
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Discussion: Hm, what happens if a different cg backend is selected?
Comment on lines
+214
to
+215
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question [GUARANTEE 2/3]: This wording reads like a guarantee -- but is it? Can we make that guarantee? |
||
|
||
* `y`, `yes`, `on`, `true` or no value: allow jump tables (the default). | ||
* `n`, `no`, `off` or `false`: disable jump tables. | ||
|
||
Disabling jump tables can be used to help provide protection against | ||
jump-oriented-programming (JOP) attacks, such as with the linux kernel's [IBT]. | ||
Comment on lines
+220
to
+221
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Discussion [GUARANTEE 3/3]: If the flag is intended to be a hint, then this sentence can be a bit misleading, because we may not always guarantee it. We may want to slightly caveat this wording to not convey a "false promise" so to speak. Or, if a user do want such protection, then do they need to enforce it over the whole crate graph? |
||
|
||
[IBT]: https://www.phoronix.com/news/Linux-IBT-By-Default-Tip | ||
|
||
## link-arg | ||
|
||
This flag lets you append a single extra argument to the linker invocation. | ||
|
This file was deleted.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Question: I'm assuming that if you inspect the assembly of an actual hello world binary that uses std in some way, then you might see jump stables still? 🤔 |
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.
Question [GUARANTEE 1/3]: is this intended to be a hint, or a guarantee?