Skip to content

Commit 06b14d6

Browse files
committed
YJIT: ZJIT: Use opt-level=1 on dev builds to avoid SystemStackError
Despite adding rb_ec_stack_check() to Rust code entry points, we've seen SystemStackError causing test failures due to debug builds consume too much native stack space. Let's use opt-level=1 so rustc/LLVM are more efficient with stack space usage, hopefully enough to fit in the margin in rb_ec_stack_check(). Continue to use opt-level=0 in the test profile.
1 parent 92c27fb commit 06b14d6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Cargo.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,15 @@ yjit = [ "dep:yjit" ]
3636
zjit = [ "dep:zjit" ]
3737

3838
[profile.dev]
39-
opt-level = 0
39+
opt-level = 1 # On 0, functions use so much stack space that we get stray `SystemStackError`s
4040
debug = true
4141
debug-assertions = true
4242
overflow-checks = true
4343

44+
[profile.test]
45+
inherits = "dev"
46+
opt-level = 0
47+
4448
[profile.dev_nodebug]
4549
inherits = "dev"
4650

0 commit comments

Comments
 (0)