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

Don't allow registry to be set to readonly #184

Merged
merged 4 commits into from
Nov 8, 2021
Merged

Don't allow registry to be set to readonly #184

merged 4 commits into from
Nov 8, 2021

Conversation

LoganDark
Copy link
Contributor

@LoganDark LoganDark commented Nov 8, 2021

Roblox does not do this, but I know for a fact that doing this causes Luau to crash and burn almost instantly (it's fun to use it to crash Roblox even). It would be nice to have some protection against doing it by accident.

@zeux
Copy link
Collaborator

zeux commented Nov 8, 2021

This should be an api_check as it's a contract for embedding code, and having lua_setreadonly throw from the static analysis perspective wouldn't be great for code flow analysis.

VM/src/lapi.cpp Outdated Show resolved Hide resolved
@LoganDark
Copy link
Contributor Author

This should be an api_check as it's a contract for embedding code, and having lua_setreadonly throw from the static analysis perspective wouldn't be great for code flow analysis.

Done

VM/src/lapi.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@zeux zeux left a comment

Choose a reason for hiding this comment

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

Thanks!

@zeux zeux merged commit 773fb5b into luau-lang:master Nov 8, 2021
@LoganDark LoganDark deleted the registry-readonly branch November 8, 2021 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants