-
Notifications
You must be signed in to change notification settings - Fork 951
infinite recursion trying to create recursive function type #2172
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
Comments
This triggers on |
Yeah, I've been aware of this bug for a long time but somehow nobody triggered it, so I was hoping it would never happen. The issue here is that the function pointer type here is recursive: it has a parameter with a pointer to itself. But you probably figured that out already. Unfortunately, I'm not aware of any way to construct such a type in LLVM: the only type that allows such recursion are structs. |
This doesn't normally happen on WebAssembly because function pointers are implemented differently there. Check |
Here is a fix: #2175 |
I think the request was fulfilled in the new release, so closing. Please reopen if needed. Thanks! |
Tinygo does not like
fnType
in the below program:tinygo errors with a stack overflow; the callstack is filled with
The text was updated successfully, but these errors were encountered: