Skip to content

Commit

Permalink
Ensure large enough stack on all jobs, not just at the query call site
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Nov 6, 2018
1 parent 4e8f211 commit 9f61d00
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustc/ty/query/plumbing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ impl<'a, 'tcx, Q: QueryDescription<'tcx>> JobOwner<'a, 'tcx, Q> {

// Use the ImplicitCtxt while we execute the query
tls::enter_context(&new_icx, |_| {
compute(tcx)
::middle::recursion_limit::ensure_sufficient_stack(|| compute(tcx))
})
});

Expand Down Expand Up @@ -540,7 +540,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
p.record_query(Q::CATEGORY);
});

let res = ::middle::recursion_limit::ensure_sufficient_stack(|| job.start(self, |tcx| {
let res = job.start(self, |tcx| {
if dep_node.kind.is_eval_always() {
tcx.dep_graph.with_eval_always_task(dep_node,
tcx,
Expand All @@ -552,7 +552,7 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
key,
Q::compute)
}
}));
});

self.sess.profiler(|p| p.end_activity(Q::CATEGORY));
profq_msg!(self, ProfileQueriesMsg::ProviderEnd);
Expand Down

0 comments on commit 9f61d00

Please sign in to comment.