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

[lua] Printing of recursive values causes stack overflow #7903

Closed
Simn opened this issue Mar 1, 2019 · 5 comments · Fixed by #8113
Closed

[lua] Printing of recursive values causes stack overflow #7903

Simn opened this issue Mar 1, 2019 · 5 comments · Fixed by #8113
Assignees
Labels
platform-lua Everything related to Lua
Milestone

Comments

@Simn
Copy link
Member

Simn commented Mar 1, 2019

From #7901:

class Main {
	var ref:Main;

	public function new() {}

	static public function main() {
		var m = new Main();
		m.ref = m;
		trace(Std.string(m));
	}
}
@Simn
Copy link
Member Author

Simn commented May 22, 2019

Would be good to fix this for 4.0.

@jdonaldson
Copy link
Member

I looked at it and came up with the same fix as @RealyUniqueName. Any reason not to push that one Alex?

@RealyUniqueName
Copy link
Member

It's already in #8113. Just waiting other targets to be fixed.

@jdonaldson
Copy link
Member

Great, I'll close this one then.

@Simn
Copy link
Member Author

Simn commented May 23, 2019

Oh sorry, #8113 didn't mention lua.

Simn pushed a commit that referenced this issue Jun 6, 2019
…nces (#8113)

* [lua] fixed stack overflow in stringification of recursive obejcts (fixes #7903)

* [java] fix infinite string recursion

see #8113

* [cs] fix infinite string recursion

see #8113

* added a test for recursive enums; [php] fixed stringification of recursive enums

* [flash] fixed infinite recrusin on stringification of recursive objects

* ...and a test for recursive arrays

* [java] fixed toString for recursive arrays

* [cs] fixed toString for recursive arrays

* [neko] fixed toString for recursive arrays
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform-lua Everything related to Lua
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants