This repository was archived by the owner on Sep 12, 2025. It is now read-only.

Description
AIUI this can be used to cause the interpreter to exhibit UB.
load and loadfile need to be wrapped so that the mode flag does not do anything, but unlike pcall / xpcall wrapping, this really seems to break the API of those functions.
There has to be the ability to turn these wrappers off, just like there is the ability to force load the debug library, and similarly it will have to be behind an unsafe flag.
The load and loadfile wrappers shouldn't be too bad, and configuring them could be as simple as adding a flag to StdLib that disables wrapping load / loadfile, though that breaks the StdLib <=> 'library' equivalence.
Probably this has to be a new 0.x version bump as well 😞