Skip to content

Commit 6b1eb15

Browse files
committed
disable under madsim
Signed-off-by: Bugen Zhao <[email protected]>
1 parent 0effb4b commit 6b1eb15

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/common/src/util/recursive.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
//! Track the recursion and grow the stack when necessary to enable fearless recursion.
16+
1517
use std::cell::RefCell;
1618

1719
// See documentation of `stacker` for the meaning of these constants.
@@ -92,7 +94,12 @@ impl Tracker {
9294
}
9395

9496
let _guard = DepthGuard::new(&self.depth);
95-
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+
}
96103
}
97104
}
98105

0 commit comments

Comments
 (0)