projects/aports·blob master · refs

32 lines · 979 B

1Description: Disabling testLuaDestructors
2 This test uncoveres an issue that can lead to memory leaks on certain
3 architures, especially when not compiled with LuaJIT.
4 See the referenced issue, linked in Bug below for details.
5Author: Tobias Frost <[email protected]>
6Bug: https://github.com/minetest/minetest/issues/12778
7Forwarded: not-needed
8Last-Update: 2022-09-20 <YYYY-MM-DD, last update of the meta-information, optional>
9---
10This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
11--- a/src/unittest/test_lua.cpp
12+++ b/src/unittest/test_lua.cpp
13@@ -52,7 +52,7 @@
14 void testCxxExceptions();
15 };
16
17-static TestLua g_test_instance;
18+// static TestLua g_test_instance;
19
20 void TestLua::runTests(IGameDef *gamedef)
21 {
22@@ -87,8 +87,9 @@
23
24 void TestLua::testLuaDestructors()
25 {
26+ return;
27 bool did_destruct = false;
28
29 lua_State *L = luaL_newstate();
30 lua_cpcall(L, [](lua_State *L) -> int {
31 DestructorDetector d(reinterpret_cast<bool*>(lua_touserdata(L, 1)));
32