Skip to content

Fix deadlock in stdio.format calls in tostring metamethod #288

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

Merged
merged 2 commits into from
Mar 24, 2025

Conversation

daimond113
Copy link

Fixes a deadlock when calling stdio.format in a __tostring metamethod in a function such as print, which internally formats using the same function as stdio.format.

Fixes #273.

Copy link
Collaborator

@filiptibell filiptibell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good enough to solve this specific issue for now - thank you! In the future we should probably roll our own ansi formatter instead of relying on a third party crate and its global state/config, which would also resolve this.

@filiptibell filiptibell merged commit dc08b91 into lune-org:main Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tables with __tostring metamethods lead to infinite yield
2 participants