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

Recursive struct induces stack overflow #3205

Open
mvertes opened this issue Nov 26, 2024 · 2 comments
Open

Recursive struct induces stack overflow #3205

mvertes opened this issue Nov 26, 2024 · 2 comments
Labels
🐞 bug Something isn't working 📦 🤖 gnovm Issues or PRs gnovm related

Comments

@mvertes
Copy link
Contributor

mvertes commented Nov 26, 2024

The following valid Go code fails in gno:

package main

import "fmt"

type node struct {
	parent *node
	child  []*node
	key    string
}

func main() {
	root := &node{key: "root"}
	root.child = nil
	fmt.Println("root:", root)
}

// Output:
// root: &{<nil> [] root}
@MikaelVallenet
Copy link
Member

related: #2850

@thehowl
Copy link
Member

thehowl commented Nov 28, 2024

@mvertes I suggest we close this in the vision of removing gonative: #1361.

Related #1155

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 📦 🤖 gnovm Issues or PRs gnovm related
Projects
Development

No branches or pull requests

5 participants