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

Is f-strings' usage of debug compatible with rlua or will it cause unsafety? #123

Closed
AlphaModder opened this issue Mar 11, 2019 · 3 comments

Comments

@AlphaModder
Copy link

Hello! Thank you for such a high-quality and comprehensive library.

I'm interested in using hishamhm's implementation of string interpolation in a project with rlua.

This implementation depends on using the debug.getinfo, debug.getlocal, and debug.getupvalue functions to interpret expressions in the right environment. I've seen the big warning about debug in the README, so I'm wondering if this code would cause unsafety if used under rlua, despite not mutating anything through debug.

Thanks!

@kyren
Copy link
Contributor

kyren commented Mar 11, 2019

Depends on your definition of unsafety, really. If it has no bugs, then it probably won't make correct scripts cause memory unsafety. Even if it has no bugs, it could allow incorrect scripts to cause memory unsafety, but you could almost certainly do that already without enabling debug. Even if #116 was fixed, you could almost certainly still do it.

I need to update the README to make the point about the unsafety of the debug library and the safety of rlua a bit more subtle, since the safety situation around PUC-Lua is IMO pretty bleak.

@AlphaModder
Copy link
Author

Fair enough. I'm not using this for anything vaguely security-critical, so that's good enough for me.

@jugglerchris
Copy link
Collaborator

Closing as answered.

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

No branches or pull requests

3 participants