diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-05-08 08:48:16 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-05-09 17:27:58 +0000 |
| commit | ccc1da247bf3be7e71932844484847da6e35f185 (patch) | |
| tree | 6c7d494c123d9ad14782066b53022cac80b0a01b /compiler/rustc_mir_dataflow/src | |
| parent | 2aa1c23fed118900103f70e4ab3473e75215862c (diff) | |
| download | rust-ccc1da247bf3be7e71932844484847da6e35f185.tar.gz rust-ccc1da247bf3be7e71932844484847da6e35f185.zip | |
Prevent stack overflow.
Diffstat (limited to 'compiler/rustc_mir_dataflow/src')
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/value_analysis.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_mir_dataflow/src/value_analysis.rs b/compiler/rustc_mir_dataflow/src/value_analysis.rs index 9232ea74d36..b74d06e5ae8 100644 --- a/compiler/rustc_mir_dataflow/src/value_analysis.rs +++ b/compiler/rustc_mir_dataflow/src/value_analysis.rs @@ -37,6 +37,7 @@ use std::fmt::{Debug, Formatter}; use std::ops::Range; use rustc_data_structures::fx::FxHashMap; +use rustc_data_structures::stack::ensure_sufficient_stack; use rustc_index::bit_set::BitSet; use rustc_index::{IndexSlice, IndexVec}; use rustc_middle::mir::visit::{MutatingUseContext, PlaceContext, Visitor}; @@ -774,7 +775,7 @@ impl Map { // We manually iterate instead of using `children` as we need to mutate `self`. let mut next_child = self.places[root].first_child; while let Some(child) = next_child { - self.cache_preorder_invoke(child); + ensure_sufficient_stack(|| self.cache_preorder_invoke(child)); next_child = self.places[child].next_sibling; } |
