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

Use insert_same in insert_evaluation_cache #73792

Conversation

GabrielMajeri
Copy link
Contributor

Closes #50507.

I was trying to fix this issue, but it seems the reported crash doesn't happen anymore.

@rust-highfive
Copy link
Collaborator

r? @estebank

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 27, 2020
@crlf0710 crlf0710 added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 17, 2020
@bors
Copy link
Contributor

bors commented Aug 3, 2020

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

@tesuji
Copy link
Contributor

tesuji commented Aug 3, 2020

r? @eddyb

@GabrielMajeri GabrielMajeri force-pushed the use-insert-same-in-insert-evaluation-cache branch 3 times, most recently from 8570de3 to ce09d22 Compare August 3, 2020 17:47
@estebank
Copy link
Contributor

estebank commented Aug 4, 2020

The code change looks correct, but deferring to @eddyb

@JohnTitor JohnTitor assigned eddyb and unassigned estebank Aug 6, 2020
@eddyb
Copy link
Member

eddyb commented Aug 16, 2020

r? @nikomatsakis or @matthewjasper

@rust-highfive rust-highfive assigned nikomatsakis and unassigned eddyb Aug 16, 2020
// This should be changed to use HashMapExt::insert_same
// when that is fixed
self.tcx().evaluation_cache.insert(param_env.and(trait_ref), dep_node, result);
self.tcx().evaluation_cache.insert_same(param_env.and(trait_ref), dep_node, result);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, #50507 is not yet closed -- but I think it is maybe specific to parallel execution? i.e., what prompted this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was looking for issues to work on in the list at #48685, and found a reference to that issue. I began investigating the panic mentioned in the issue description, and was unable to reproduce it.

@bors
Copy link
Contributor

bors commented Aug 30, 2020

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

@GabrielMajeri GabrielMajeri force-pushed the use-insert-same-in-insert-evaluation-cache branch from ce09d22 to 53056bd Compare September 2, 2020 11:49
@crlf0710 crlf0710 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 18, 2020
@Dylan-DPC-zz
Copy link

@nikomatsakis can we merge this or is this blocked on #50507 being merged first?

@nikomatsakis
Copy link
Contributor

Yeah, sorry, I got very distracted. I think I'd be inclined not to land this PR until #50507 is closed, just because it may cause unexpected problems if we were to enable the parallel mode. I guess the main thing would be to track down the problem -- though the bug report is pretty vague.

In any case, it's borderline, but I'm inclined to just leave the code for now since it's just one line.

@GabrielMajeri I do appreciate the PR though! Sorry for the confusion. :(

@GabrielMajeri GabrielMajeri deleted the use-insert-same-in-insert-evaluation-cache branch October 6, 2020 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EvaluationCache overwrites its entries
9 participants