authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-07-26 20:12:40-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-07-26 20:12:40-07:00
logbdaa915a02eefe2fb2e400069fcb79b41dcabb94
tree74df0e101e5a24610f30694b6c473d3f8e2cf565
parentacf1aa10c2dcd485496c0db1d9c5378b2c23dd96

test-cases: remove failing test

This causes a stack overflow in a debug build of stage3 unfortunately. I will open an issue to track this test coverage, which we absolutely should get working - users of the compiler should get a compile error, not a segfault if they hit the default branch quota from abusing recursive inline functions. Note that the problem does not occur in a release build of stage3 which has significantly reduced stack usage. On Linux, I tried bumping up the stack size from 32 MiB to 64 MiB and it did not solve the problem. I'm not sure why not. It seems like it should be fine. Note that we also have a problem of running test-cases in multi-threaded mode which is currently the default. Currently Zig threads are spawned with 16 MiB stack space.

1 files changed, 0 insertions(+), 15 deletions(-)

test/cases/compile_errors/endless_loop_in_function_evaluation.zig deleted-15
......@@ -1,15 +0,0 @@
1const seventh_fib_number = fibonacci(7);
2fn fibonacci(x: i32) i32 {
3 return fibonacci(x - 1) + fibonacci(x - 2);
4}
5
6export fn entry() usize { return @sizeOf(@TypeOf(&seventh_fib_number)); }
7
8// error
9// backend=stage2
10// target=native
11//
12// :3:21: error: evaluation exceeded 1000 backwards branches
13// :3:21: note: use @setEvalBranchQuota() to raise the branch limit from 1000
14// :3:21: note: called from here (999 times)
15// :1:37: note: called from here