Skip to content
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

Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types #136311

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jan 30, 2025

Check for impossible obligations in the dyn Trait type we're trying to compute its the vtable upcasting and method call slots.

r? lcnr

@rustbot rustbot added A-rustc-dev-guide Area: rustc-dev-guide 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. labels Jan 30, 2025
@bors
Copy link
Contributor

bors commented Jan 31, 2025

☔ The latest upstream changes (presumably #135318) made this pull request unmergeable. Please resolve the merge conflicts.

@compiler-errors
Copy link
Member Author

@bors try

@bors
Copy link
Contributor

bors commented Jan 31, 2025

⌛ Trying commit 9310860 with merge 13359cb...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 31, 2025
Ensure that we never try to monomorphize the upcasting of impossible dyn types

Just the last commit, blocked on rust-lang#135318.

r? lcnr
@compiler-errors compiler-errors changed the title Ensure that we never try to monomorphize the upcasting of impossible dyn types Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types Jan 31, 2025
@compiler-errors
Copy link
Member Author

compiler-errors commented Jan 31, 2025

Ok, I removed the impossible_predicates check for the vtable_entries call. I don't think that one is necessary (at least not for this ICE) b/c we should've actually checked this during unsizing. Checking locally, this seems to make fuchsia build 👍.

@lcnr
Copy link
Contributor

lcnr commented Feb 3, 2025

r=me after perf :3

@compiler-errors
Copy link
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 5, 2025
@bors
Copy link
Contributor

bors commented Feb 5, 2025

⌛ Trying commit 0a8b81e with merge cf8986d...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 5, 2025
Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types

Check for impossible obligations in the `dyn Trait` type we're trying to compute its the vtable upcasting and method call slots.

r? lcnr
@bors
Copy link
Contributor

bors commented Feb 5, 2025

☀️ Try build successful - checks-actions
Build commit: cf8986d (cf8986daa8d97159c481e234909426645594cc43)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (cf8986d): comparison URL.

Overall result: no relevant changes - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -1.1%, secondary -0.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
6.2% [6.2%, 6.2%] 1
Improvements ✅
(primary)
-1.1% [-1.1%, -1.1%] 1
Improvements ✅
(secondary)
-3.4% [-3.6%, -3.2%] 2
All ❌✅ (primary) -1.1% [-1.1%, -1.1%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 778.541s -> 779.275s (0.09%)
Artifact size: 328.82 MiB -> 328.82 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Feb 6, 2025
@compiler-errors
Copy link
Member Author

@bors r=lcnr rollup=maybe

@bors
Copy link
Contributor

bors commented Feb 6, 2025

📌 Commit 0a8b81e has been approved by lcnr

It is now in the queue for this repository.

@bors 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 Feb 6, 2025
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Feb 6, 2025
…lcnr

Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types

Check for impossible obligations in the `dyn Trait` type we're trying to compute its the vtable upcasting and method call slots.

r? lcnr
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2025
…kingjubilee

Rollup of 9 pull requests

Successful merges:

 - rust-lang#135439 (Make `-O` mean `OptLevel::Aggressive`)
 - rust-lang#136193 (Implement pattern type ffi checks)
 - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern)
 - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types)
 - rust-lang#136315 (Use short ty string for binop and unop errors)
 - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns)
 - rust-lang#136530 (Implement `x perf` directly in bootstrap)
 - rust-lang#136580 (Couple of changes to run rustc in miri)
 - rust-lang#136589 (Enable "jump to def" feature on rustc docs)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#136073 (Always compute coroutine layout for eagerly emitting recursive layout errors)
 - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern)
 - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types)
 - rust-lang#136315 (Use short ty string for binop and unop errors)
 - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns)
 - rust-lang#136435 (Simplify some code for lowering THIR patterns)
 - rust-lang#136630 (Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2025
Rollup of 7 pull requests

Successful merges:

 - rust-lang#136073 (Always compute coroutine layout for eagerly emitting recursive layout errors)
 - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern)
 - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types)
 - rust-lang#136315 (Use short ty string for binop and unop errors)
 - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns)
 - rust-lang#136435 (Simplify some code for lowering THIR patterns)
 - rust-lang#136630 (Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: aarch64-gnu-debug
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#136073 (Always compute coroutine layout for eagerly emitting recursive layout errors)
 - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern)
 - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types)
 - rust-lang#136315 (Use short ty string for binop and unop errors)
 - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns)
 - rust-lang#136435 (Simplify some code for lowering THIR patterns)
 - rust-lang#136630 (Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: aarch64-gnu-debug
@bors bors merged commit b62f318 into rust-lang:master Feb 6, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 6, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2025
…kingjubilee

Rollup of 9 pull requests

Successful merges:

 - rust-lang#135439 (Make `-O` mean `OptLevel::Aggressive`)
 - rust-lang#136193 (Implement pattern type ffi checks)
 - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern)
 - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types)
 - rust-lang#136315 (Use short ty string for binop and unop errors)
 - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns)
 - rust-lang#136530 (Implement `x perf` directly in bootstrap)
 - rust-lang#136580 (Couple of changes to run rustc in miri)
 - rust-lang#136589 (Enable "jump to def" feature on rustc docs)

r? `@ghost`
`@rustbot` modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2025
Rollup merge of rust-lang#136311 - compiler-errors:vtable-fixes-2, r=lcnr

Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types

Check for impossible obligations in the `dyn Trait` type we're trying to compute its the vtable upcasting and method call slots.

r? lcnr
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 20, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#136073 (Always compute coroutine layout for eagerly emitting recursive layout errors)
 - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern)
 - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types)
 - rust-lang#136315 (Use short ty string for binop and unop errors)
 - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns)
 - rust-lang#136435 (Simplify some code for lowering THIR patterns)
 - rust-lang#136630 (Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: aarch64-gnu-debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustc-dev-guide Area: rustc-dev-guide S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants