Skip to content

Commit

Permalink
Lua rules: increase execution limit to 500k
Browse files Browse the repository at this point in the history
While 100k was plenty, it's easy to write code that accidentally goes over it.
500k should be safe to where the program does not hang indefinitely on most PCs.
  • Loading branch information
black-sliver committed Jan 2, 2024
1 parent 37d39cb commit 7bc1403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/tracker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ static int RunLuaFunction_inner(lua_State *L, const std::string name)
++argc;
}

constexpr int exec_limit = 100000;
constexpr int exec_limit = 500000;
lua_sethook(L, lua_timeout_hook, LUA_MASKCOUNT, exec_limit);
auto res = lua_pcall(L, argc, 1, -argc-2);
lua_sethook(L, nullptr, 0, 0);
Expand Down

0 comments on commit 7bc1403

Please sign in to comment.