Skip to content

Commit

Permalink
disable under madsim
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Apr 16, 2024
1 parent 0effb4b commit 6b1eb15
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/common/src/util/recursive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

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

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

let _guard = DepthGuard::new(&self.depth);
stacker::maybe_grow(RED_ZONE, STACK_SIZE, f)

if cfg!(madsim) {
f() // madsim does not support stack growth
} else {
stacker::maybe_grow(RED_ZONE, STACK_SIZE, f)
}
}
}

Expand Down

0 comments on commit 6b1eb15

Please sign in to comment.