Uh oh!
There was an error while loading. Please reload this page.
CFI: Fix fn items, closures, and Fn trait objects, and more - #116404
CFI: Fix fn items, closures, and Fn trait objects, and more#116404rcvalle wants to merge 5 commits into
Conversation
rustbot
commented
Oct 3, 2023
r? @oli-obk (rustbot has picked a reviewer for you, use r? to override) |
rcvalle
commented
Oct 3, 2023
5157709 to
256cab2Compare
This comment has been minimized.
This comment has been minimized.
256cab2 to
a25171bComparebors
commented
Oct 11, 2023
☔ The latest upstream changes (presumably #115948) made this pull request unmergeable. Please resolve the merge conflicts. |
a25171b to
d676343Comparerustbot
commented
Oct 24, 2023
Some changes occurred to the CTFE / Miri engine cc @rust-lang/miri |
d676343 to
df8c3a8CompareUh oh!
There was an error while loading. Please reload this page.
compiler-errors
commented
Oct 25, 2023
One nit @rustbot author |
df8c3a8 to
dd04959CompareUh oh!
There was an error while loading. Please reload this page.
d5b79c1 to
3e28128Comparercvalle
commented
Oct 26, 2023
@rustbot label -S-waiting-on-author +S-waiting-on-review |
bors
commented
Nov 16, 2023
☔ The latest upstream changes (presumably #117875) made this pull request unmergeable. Please resolve the merge conflicts. |
bc7ae20 to
6f146f5Compare
This comment has been minimized.
This comment has been minimized.
4abea48 to
f28ac45CompareFix casting between function items, closures, and Fn trait objects by transforming function items, closures, and Fn trait objects into function pointers for encoding.
Fix drop and drop_in_place by transforming self of drop and drop_in_place methods into a Drop trait object and handling drop method calls separatedly (and also transforming self into a Drop trait object). This has the same effect of what CFI does for impl methods by transforming self into trait objects that match the trait objects in the calls after type erasure.
Fixrust-lang#122705 by adding support for encoding `ty:CoroutineClosure`.
This reverts commit f2f0d25.
Fix casting between methods and function pointers by assigning a secondary type id to methods with their concrete self so they can be used as function pointers.
f28ac45 to
66b2708Comparebors
commented
Mar 24, 2024
☔ The latest upstream changes (presumably #122980) made this pull request unmergeable. Please resolve the merge conflicts. |
compiler-errors
commented
Mar 25, 2024
Given that this PR is doing like 5+ different things, I'd like to see this broken up into several different PRs to be honest. Like, there's no reason why the PR which changes coroutine encoding needs to go into the same PR which changes the way we encode the receiver for |
rcvalle
commented
Mar 25, 2024
Sure. I'll split it into smaller self-contained PRs. |
…place, r=compiler-errors CFI: Fix drop and drop_in_place Fix drop and drop_in_place by transforming self of drop and drop_in_place methods into a Drop trait objects. This was split off from rust-lang#116404. cc `@compiler-errors` `@workingjubilee`
Rollup merge of rust-lang#123075 - rcvalle:rust-cfi-fix-drop-drop-in-place, r=compiler-errors CFI: Fix drop and drop_in_place Fix drop and drop_in_place by transforming self of drop and drop_in_place methods into a Drop trait objects. This was split off from rust-lang#116404. cc `@compiler-errors` `@workingjubilee`
…ast, r=compiler-errors CFI: Fix methods as function pointer cast Fix casting between methods and function pointers by assigning a secondary type id to methods with their concrete self so they can be used as function pointers. This was split off from rust-lang#116404. cc `@compiler-errors` `@workingjubilee`
…ast, r=compiler-errors CFI: Fix methods as function pointer cast Fix casting between methods and function pointers by assigning a secondary type id to methods with their concrete self so they can be used as function pointers. This was split off from rust-lang#116404. cc `@compiler-errors` `@workingjubilee`
Jules-Bertholet
commented
Apr 8, 2024
@rustbot label A-sanitizers |
Dylan-DPC
commented
Apr 8, 2024
Closing this as it's being split into multiple prs |
This PR:
encode_ty: unexpected 'CoroutineWitness'#122705 by adding support for encodingty:CoroutineClosure.This is a zero cost solution for both the Rust compiler and compiled programs (i.e., without generating any shims/trampolines or changing the compiler code generation at all) for the issues described and solutions proposed in #121962 and #122573.