zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit bdaa915a02eefe2fb2e400069fcb79b41dcabb94 (tree)
parent acf1aa10c2dcd485496c0db1d9c5378b2c23dd96
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Tue, 26 Jul 2022 20:12:40 -0700

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.

Diffstat:
Dtest/cases/compile_errors/endless_loop_in_function_evaluation.zig | 15---------------
1 file changed, 0 insertions(+), 15 deletions(-)

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