-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
CFI: Support provided methods on traits #127295
Conversation
@bors r+ |
CFI: Support provided methods on traits Provided methods currently don't get type erasure performed on them because they are not in an `impl` block. If we are instantiating a method that is an associated item, but *not* in an impl block, treat it as a provided method instead.
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#126502 (Ignore allocation bytes in some mir-opt tests) - rust-lang#126606 (Guard against calling `libc::exit` multiple times on Linux.) - rust-lang#126922 (add lint for inline asm labels that look like binary) - rust-lang#127295 (CFI: Support provided methods on traits) - rust-lang#127310 (Fix import suggestion ice) - rust-lang#127535 (Fire unsafe_code lint on unsafe extern blocks) - rust-lang#127631 (Remove `fully_normalize`) - rust-lang#127632 (Implement `precise_capturing` support for rustdoc) r? `@ghost` `@rustbot` modify labels: rollup
Failed in #127657 (comment) @bors r- |
da3f7a2
to
abf6aa7
Compare
Provided methods currently don't get type erasure performed on them because they are not in an `impl` block. If we are instantiating a method that is an associated item, but *not* in an impl block, treat it as a provided method instead.
Non-items like This was only causing failures on KCFI because CFI would tag the method with both the erased and concrete types, and the concrete pass would get the correct logic running. It only happened on the I've restricted the provided method detection to only occur on @rustbot ready |
LGTM (@estebank @workingjubilee FYI). |
isn't codegen wonderful? everything's so optimization-dependent. @bors r=estebank |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#127295 (CFI: Support provided methods on traits) - rust-lang#127814 (`C-cmse-nonsecure-call`: improved error messages) - rust-lang#127949 (fix: explain E0120 better cover cases when its raised) - rust-lang#127966 (Use structured suggestions for unconstrained generic parameters on impl blocks) - rust-lang#127976 (Lazy type aliases: Diagostics: Detect bivariant ty params that are only used recursively) - rust-lang#127978 (Avoid ref when using format! for perf) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#127295 - maurer:default-impl-cfi, r=estebank CFI: Support provided methods on traits Provided methods currently don't get type erasure performed on them because they are not in an `impl` block. If we are instantiating a method that is an associated item, but *not* in an impl block, treat it as a provided method instead.
Provided methods currently don't get type erasure performed on them because they are not in an
impl
block. If we are instantiating a method that is an associated item, but not in an impl block, treat it as a provided method instead.