Open khvzak opened 5 days ago
Initially discovered in https://github.com/mlua-rs/mlua/discussions/485
Easy to reproduce using Luau cli:
$ luau > state = {i = 0} > print("before:", state.i); state.i = state.i + 1; print("after: ", state.i); before: 0 after: 0
Setting optimization level to 0 OR removing lua_setsafeenv call will give right result:
lua_setsafeenv
❯ luau -O0 > state = {i = 0} > print("before:", state.i); state.i = state.i + 1; print("after: ", state.i); before: 0 after: 1
Luau v0.652
Initially discovered in https://github.com/mlua-rs/mlua/discussions/485
Easy to reproduce using Luau cli:
Setting optimization level to 0 OR removing
lua_setsafeenv
call will give right result:Luau v0.652