Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] VCL function recursion causes panic #293

Open
2 tasks done
richardmarshall opened this issue Apr 3, 2024 · 0 comments · May be fixed by #294
Open
2 tasks done

[BUG] VCL function recursion causes panic #293

richardmarshall opened this issue Apr 3, 2024 · 0 comments · May be fixed by #294
Assignees
Labels
bug Something isn't working

Comments

@richardmarshall
Copy link
Collaborator

Kind of proposals

  • Simulator
  • Testing

Describe the problem

Currently if a recursion loop is created the interpreter will not detect this and end up panicking with a stack overflow error.

VCL code that cause the problem / reproduceable

sub f1 {
        call f2;
}

sub f2 {
        call f1;
}
sub test {
        testing.call_subroutine("f1");
}
% falco test main.vcl 
Running tests...runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc03f1ea348 stack=[0xc03f1ea000, 0xc05f1ea000]
fatal error: stack overflow
...

Expected behavior

The interpreter should return an error and not panic.

@richardmarshall richardmarshall added the bug Something isn't working label Apr 3, 2024
@richardmarshall richardmarshall self-assigned this Apr 3, 2024
@richardmarshall richardmarshall changed the title [BUG] [BUG] VCP function recursion causes panic Apr 3, 2024
@richardmarshall richardmarshall changed the title [BUG] VCP function recursion causes panic [BUG] VCL function recursion causes panic Apr 3, 2024
@richardmarshall richardmarshall linked a pull request Apr 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant