We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0effb4b commit 6b1eb15Copy full SHA for 6b1eb15
src/common/src/util/recursive.rs
@@ -12,6 +12,8 @@
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
+//! Track the recursion and grow the stack when necessary to enable fearless recursion.
16
+
17
use std::cell::RefCell;
18
19
// See documentation of `stacker` for the meaning of these constants.
@@ -92,7 +94,12 @@ impl Tracker {
92
94
}
93
95
96
let _guard = DepthGuard::new(&self.depth);
- stacker::maybe_grow(RED_ZONE, STACK_SIZE, f)
97
98
+ if cfg!(madsim) {
99
+ f() // madsim does not support stack growth
100
+ } else {
101
+ stacker::maybe_grow(RED_ZONE, STACK_SIZE, f)
102
+ }
103
104
105
0 commit comments