Skip to content

Commit 8926457

Browse files
stepanchegfacebook-github-bot
authored andcommitted
Fix frame size test when O0
Summary: [External CI fails](https://github.com/facebookexperimental/starlark-rust/runs/7869187884?check_suite_focus=true) with error: native frame size is too large: 9424. We run tests locally with O1, but external CI runs with O0, so it has larger frame size. Ideally test should check size depending on opt-level, but there's no rust API for access it. Reviewed By: bobyangyf Differential Revision: D38769469 fbshipit-source-id: 9a92454cb30164580fa40116e2b7a2a40c058342
1 parent 5b3c52c commit 8926457

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

starlark/src/tests/call.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,12 +286,12 @@ G_F_PTR = g([])
286286
two < one,
287287
"stack grows down everywhere we support starlark-rust"
288288
);
289-
// At the moment of writing it is about 1K.
289+
// At the moment of writing it is about 1K in O1 and O2 modes, but about 10K in O0.
290290
// Note, actual frame size may be larger a frame contains for loops.
291291
let frame_native_size = one - two;
292292
assert!(frame_native_size > 20, "sanity check");
293293
assert!(
294-
frame_native_size < 2024,
294+
frame_native_size < 20000,
295295
"native frame size is too large: {}, evaluation may result in native stack overflow",
296296
frame_native_size,
297297
);

0 commit comments

Comments
 (0)