delegation: fix def path hash collision, add per parent disambiguators#153955
delegation: fix def path hash collision, add per parent disambiguators#153955rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
|
This is all pretty awful. What exactly definitions create collisions like this? Generic parameters? As I understand the small per-node disambiguator tables partially duplicate content from the big table. |
We generate new The difference between delegation and other Maybe we can create our own
From our side yes, when we create generic params, their def path data can be either
Big table which is Internally Given this underlying structure I also didn't want to iterate over all map to find delegation-related key-values, and I also didn't want to expose the possibility of traversal of whole This left me with an option that I implemented in this PR: for each delegation we create additional disambiguator which follows the main one and then stored in |
|
@rustbot ready To get feedback on the comments. |
This comment has been minimized.
This comment has been minimized.
fbb4d60 to
b9ef605
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
This PR may be relevant: It solved the collision problem by adding new |
5c0e8e9 to
ef583eb
Compare
|
Some changes occurred in compiler/rustc_sanitizers cc @rcvalle |
This comment has been minimized.
This comment has been minimized.
ef583eb to
5b48d28
Compare
23a9f3b to
5d9cfeb
Compare
|
Removed duplicated test for #143498. |
This comment has been minimized.
This comment has been minimized.
|
r=me after rebase. |
|
✌️ @aerooneqq, you can now approve this pull request! If @petrochenkov told you to " |
5d9cfeb to
699eb29
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors r=petrochenkov |
|
📋 This PR cannot be approved because it currently has the following label: |
|
@bors r+ |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 27dbdb5 (parent) -> 4dbafc3 (this PR) Test differencesShow 21 test diffsStage 1
Stage 2
Additionally, 19 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 4dbafc340b0f8e9ff9e95974d0ceef81ae2652c8 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (4dbafc3): comparison URL. Overall result: ❌ regressions - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 0.4%, secondary 0.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.3%, secondary 2.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.1%, secondary 0.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 490.301s -> 493.358s (0.62%) |
|
I didn't see this. I don't like that this was done in a manner that didn't need input from us. Disambiguators are not visible except in symbols. Why was this a problem? |
View all comments
This PR addresses the following delegation issues:
found DefPathHash collision between DefPath#153410 when generating newDefIds for generic parameters bysavingintroducing per owner disambiguators and transferring them to AST -> HIR lowering stageDisambiguatorStates from resolve stage and using them at AST -> HIR loweringNext it fixes the ICE which is connected to usingDUMMY_SPin delegation code, which was found during previous fixFinally, after those fixes the ICE: delegation:DefId::expect_local DefId(..) isn't local#143498 is also fixed, only bugs with propagating synthetic generic params are left.Fixes #153410. Part of #118212.
r? @petrochenkov