================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 1 at 0x7f575b47bc20 by main thread: #0 call src/events.cpp:57 (wesnoth-debug+0x66b1e10) #1 events::pump() src/events.cpp:430 (wesnoth-debug+0x66b7757) #2 gui2::window::show(bool, unsigned int) src/gui/widgets/window.cpp:550 (wesnoth-debug+0x3c46b24) #3 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:89 (wesnoth-debug+0x42a3237) #4 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #5 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #6 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #7 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #8 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #9 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #10 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #11 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #12 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) Previous read of size 1 at 0x7f575b47bc20 by thread T7: #0 events::call_in_main_thread(std::function const&) src/events.cpp:761 (wesnoth-debug+0x66bb837) #1 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #2 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #3 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #4 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #5 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #6 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #7 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #8 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #9 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #10 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #11 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #12 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #13 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #14 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #15 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #16 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #17 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #18 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #19 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #20 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #21 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #22 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #23 (libboost_thread.so.1.62.0+0x11f95) As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 operator() src/scripting/lua_gui2.cpp:257 (wesnoth-debug+0x4a90616) #3 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x4a9bcb6) #4 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #5 call src/events.cpp:56 (wesnoth-debug+0x66b1ddf) #6 events::pump() src/events.cpp:430 (wesnoth-debug+0x66b7757) #7 gui2::window::show(bool, unsigned int) src/gui/widgets/window.cpp:550 (wesnoth-debug+0x3c46b24) #8 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:89 (wesnoth-debug+0x42a3237) #9 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #10 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #11 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #12 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #13 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #14 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #15 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #16 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #17 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) Location is stack of thread T7. Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/events.cpp:57 in call ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Read of size 8 at 0x7b6c0000ee18 by thread T7: #0 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:437 (wesnoth-debug+0x61b61be) #1 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #2 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #3 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #4 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #5 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #6 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #7 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #8 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #9 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #10 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #11 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #12 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #13 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #14 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #15 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #16 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #17 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #18 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #19 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #20 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #21 (libboost_thread.so.1.62.0+0x11f95) Previous write of size 8 at 0x7b6c0000ee18 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 1552 at 0x7b6c0000ee00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 lua_newstate(void* (*)(void*, void*, unsigned long, unsigned long), void*) src/lua/lstate.cpp:299 (wesnoth-debug+0x61df7a2) #3 luaL_newstate() src/lua/lauxlib.cpp:1027 (wesnoth-debug+0x61a80b0) #4 lua_kernel_base::lua_kernel_base() src/scripting/lua_kernel_base.cpp:372 (wesnoth-debug+0x4ab0773) #5 game_lua_kernel::game_lua_kernel(game_state&, play_controller&, reports&) src/scripting/game_lua_kernel.cpp:4020 (wesnoth-debug+0x4a2863c) #6 game_state::game_state(config const&, play_controller&, std::shared_ptr const&) src/game_state.cpp:51 (wesnoth-debug+0x410a8f4) #7 operator() src/play_controller.cpp:208 (wesnoth-debug+0x48fcaa7) #8 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #9 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #10 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #11 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #12 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/ldo.cpp:437 in luaD_precall(lua_State*, lua_TValue*, int) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b6c0000ee28 by thread T7: #0 luaD_poscall(lua_State*, CallInfo*, lua_TValue*, int) src/lua/ldo.cpp:388 (wesnoth-debug+0x61b5b18) #1 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:437 (wesnoth-debug+0x61b61ef) #2 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #3 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #4 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #5 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #6 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #7 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #8 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #9 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #10 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #11 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #12 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #13 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #14 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #15 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #16 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #17 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #18 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #19 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #20 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #21 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #22 (libboost_thread.so.1.62.0+0x11f95) Previous write of size 8 at 0x7b6c0000ee28 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 1552 at 0x7b6c0000ee00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 lua_newstate(void* (*)(void*, void*, unsigned long, unsigned long), void*) src/lua/lstate.cpp:299 (wesnoth-debug+0x61df7a2) #3 luaL_newstate() src/lua/lauxlib.cpp:1027 (wesnoth-debug+0x61a80b0) #4 lua_kernel_base::lua_kernel_base() src/scripting/lua_kernel_base.cpp:372 (wesnoth-debug+0x4ab0773) #5 game_lua_kernel::game_lua_kernel(game_state&, play_controller&, reports&) src/scripting/game_lua_kernel.cpp:4020 (wesnoth-debug+0x4a2863c) #6 game_state::game_state(config const&, play_controller&, std::shared_ptr const&) src/game_state.cpp:51 (wesnoth-debug+0x410a8f4) #7 operator() src/play_controller.cpp:208 (wesnoth-debug+0x48fcaa7) #8 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #9 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #10 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #11 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #12 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/ldo.cpp:388 in luaD_poscall(lua_State*, CallInfo*, lua_TValue*, int) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Read of size 8 at 0x7b7400058df0 by thread T7: #0 moveresults src/lua/ldo.cpp:341 (wesnoth-debug+0x61b53bb) #1 luaD_poscall(lua_State*, CallInfo*, lua_TValue*, int) src/lua/ldo.cpp:390 (wesnoth-debug+0x61b5b3d) #2 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:437 (wesnoth-debug+0x61b61ef) #3 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #4 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #5 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #6 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #7 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #8 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #9 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #10 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #11 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #12 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #13 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #14 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #15 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #16 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #17 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #18 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #19 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #20 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #21 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #22 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #23 (libboost_thread.so.1.62.0+0x11f95) Previous write of size 8 at 0x7b7400058df0 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 2144 at 0x7b7400058c00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaD_reallocstack(lua_State*, int) src/lua/ldo.cpp:182 (wesnoth-debug+0x61b394c) #4 luaD_growstack(lua_State*, int) src/lua/ldo.cpp:205 (wesnoth-debug+0x61b3d2a) #5 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:424 (wesnoth-debug+0x61b5e23) #6 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #7 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #8 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #9 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #10 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #11 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #12 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #13 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #14 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #15 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #16 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #17 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #18 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #19 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #20 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #21 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #22 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #23 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #24 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #25 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #26 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/ldo.cpp:341 in moveresults ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b7400058dc0 by thread T7: #0 luaV_execute(lua_State*) src/lua/lvm.cpp:839 (wesnoth-debug+0x61fe2db) #1 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #2 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #3 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #4 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #5 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #6 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #7 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #8 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #9 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #10 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #11 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #12 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #13 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #14 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #15 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #16 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #17 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #18 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #19 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #20 (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b7400058dc0 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 2144 at 0x7b7400058c00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaD_reallocstack(lua_State*, int) src/lua/ldo.cpp:182 (wesnoth-debug+0x61b394c) #4 luaD_growstack(lua_State*, int) src/lua/ldo.cpp:205 (wesnoth-debug+0x61b3d2a) #5 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:424 (wesnoth-debug+0x61b5e23) #6 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #7 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #8 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #9 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #10 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #11 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #12 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #13 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #14 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #15 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #16 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #17 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #18 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #19 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #20 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #21 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #22 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #23 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #24 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #25 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #26 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/lvm.cpp:839 in luaV_execute(lua_State*) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b7400058f20 by thread T7: #0 luaT_callTM(lua_State*, lua_TValue const*, lua_TValue const*, lua_TValue const*, lua_TValue*, int) src/lua/ltm.cpp:106 (wesnoth-debug+0x61f3215) #1 luaV_finishget(lua_State*, lua_TValue const*, lua_TValue*, lua_TValue*, lua_TValue const*) src/lua/lvm.cpp:182 (wesnoth-debug+0x61f7f35) #2 luaV_execute(lua_State*) src/lua/lvm.cpp:845 (wesnoth-debug+0x61fe5c3) #3 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #4 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #5 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #6 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #7 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #8 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #9 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #10 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #11 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #12 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #13 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #14 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #15 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #16 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #17 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #18 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #19 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #20 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #21 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #22 (libboost_thread.so.1.62.0+0x11f95) Previous write of size 8 at 0x7b7400058f20 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 2144 at 0x7b7400058c00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaD_reallocstack(lua_State*, int) src/lua/ldo.cpp:182 (wesnoth-debug+0x61b394c) #4 luaD_growstack(lua_State*, int) src/lua/ldo.cpp:205 (wesnoth-debug+0x61b3d2a) #5 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:424 (wesnoth-debug+0x61b5e23) #6 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #7 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #8 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #9 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #10 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #11 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #12 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #13 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #14 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #15 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #16 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #17 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #18 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #19 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #20 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #21 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #22 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #23 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #24 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #25 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #26 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/ltm.cpp:106 in luaT_callTM(lua_State*, lua_TValue const*, lua_TValue const*, lua_TValue const*, lua_TValue*, int) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b7400058f30 by thread T7: #0 luaT_callTM(lua_State*, lua_TValue const*, lua_TValue const*, lua_TValue const*, lua_TValue*, int) src/lua/ltm.cpp:107 (wesnoth-debug+0x61f32b4) #1 luaV_finishget(lua_State*, lua_TValue const*, lua_TValue*, lua_TValue*, lua_TValue const*) src/lua/lvm.cpp:182 (wesnoth-debug+0x61f7f35) #2 luaV_execute(lua_State*) src/lua/lvm.cpp:845 (wesnoth-debug+0x61fe5c3) #3 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #4 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #5 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #6 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #7 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #8 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #9 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #10 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #11 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #12 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #13 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #14 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #15 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #16 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #17 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #18 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #19 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #20 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #21 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #22 (libboost_thread.so.1.62.0+0x11f95) Previous write of size 8 at 0x7b7400058f30 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 2144 at 0x7b7400058c00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaD_reallocstack(lua_State*, int) src/lua/ldo.cpp:182 (wesnoth-debug+0x61b394c) #4 luaD_growstack(lua_State*, int) src/lua/ldo.cpp:205 (wesnoth-debug+0x61b3d2a) #5 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:424 (wesnoth-debug+0x61b5e23) #6 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #7 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #8 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #9 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #10 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #11 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #12 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #13 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #14 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #15 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #16 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #17 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #18 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #19 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #20 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #21 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #22 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #23 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #24 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #25 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #26 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/ltm.cpp:107 in luaT_callTM(lua_State*, lua_TValue const*, lua_TValue const*, lua_TValue const*, lua_TValue*, int) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b7400058f40 by thread T7: #0 luaT_callTM(lua_State*, lua_TValue const*, lua_TValue const*, lua_TValue const*, lua_TValue*, int) src/lua/ltm.cpp:108 (wesnoth-debug+0x61f3353) #1 luaV_finishget(lua_State*, lua_TValue const*, lua_TValue*, lua_TValue*, lua_TValue const*) src/lua/lvm.cpp:182 (wesnoth-debug+0x61f7f35) #2 luaV_execute(lua_State*) src/lua/lvm.cpp:845 (wesnoth-debug+0x61fe5c3) #3 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #4 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #5 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #6 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #7 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #8 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #9 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #10 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #11 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #12 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #13 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #14 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #15 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #16 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #17 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #18 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #19 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #20 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #21 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #22 (libboost_thread.so.1.62.0+0x11f95) Previous write of size 8 at 0x7b7400058f40 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 2144 at 0x7b7400058c00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaD_reallocstack(lua_State*, int) src/lua/ldo.cpp:182 (wesnoth-debug+0x61b394c) #4 luaD_growstack(lua_State*, int) src/lua/ldo.cpp:205 (wesnoth-debug+0x61b3d2a) #5 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:424 (wesnoth-debug+0x61b5e23) #6 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #7 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #8 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #9 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #10 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #11 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #12 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #13 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #14 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #15 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #16 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #17 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #18 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #19 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #20 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #21 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #22 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #23 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #24 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #25 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #26 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/ltm.cpp:108 in luaT_callTM(lua_State*, lua_TValue const*, lua_TValue const*, lua_TValue const*, lua_TValue*, int) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Read of size 2 at 0x7b6c0000eece by thread T7: #0 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:496 (wesnoth-debug+0x61b6e39) #1 luaT_callTM(lua_State*, lua_TValue const*, lua_TValue const*, lua_TValue const*, lua_TValue*, int) src/lua/ltm.cpp:114 (wesnoth-debug+0x61f3599) #2 luaV_finishget(lua_State*, lua_TValue const*, lua_TValue*, lua_TValue*, lua_TValue const*) src/lua/lvm.cpp:182 (wesnoth-debug+0x61f7f35) #3 luaV_execute(lua_State*) src/lua/lvm.cpp:845 (wesnoth-debug+0x61fe5c3) #4 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #5 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #6 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #7 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #8 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #9 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #10 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #11 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #12 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #13 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #14 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #15 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #16 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #17 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #18 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #19 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #20 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #21 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #22 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #23 (libboost_thread.so.1.62.0+0x11f95) Previous write of size 2 at 0x7b6c0000eece by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 1552 at 0x7b6c0000ee00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 lua_newstate(void* (*)(void*, void*, unsigned long, unsigned long), void*) src/lua/lstate.cpp:299 (wesnoth-debug+0x61df7a2) #3 luaL_newstate() src/lua/lauxlib.cpp:1027 (wesnoth-debug+0x61a80b0) #4 lua_kernel_base::lua_kernel_base() src/scripting/lua_kernel_base.cpp:372 (wesnoth-debug+0x4ab0773) #5 game_lua_kernel::game_lua_kernel(game_state&, play_controller&, reports&) src/scripting/game_lua_kernel.cpp:4020 (wesnoth-debug+0x4a2863c) #6 game_state::game_state(config const&, play_controller&, std::shared_ptr const&) src/game_state.cpp:51 (wesnoth-debug+0x410a8f4) #7 operator() src/play_controller.cpp:208 (wesnoth-debug+0x48fcaa7) #8 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #9 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #10 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #11 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #12 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/ldo.cpp:496 in luaD_call(lua_State*, lua_TValue*, int) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b14001561c0 by thread T7: #0 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:427 (wesnoth-debug+0x61b6050) #1 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:498 (wesnoth-debug+0x61b6ef8) #2 luaT_callTM(lua_State*, lua_TValue const*, lua_TValue const*, lua_TValue const*, lua_TValue*, int) src/lua/ltm.cpp:114 (wesnoth-debug+0x61f3599) #3 luaV_finishget(lua_State*, lua_TValue const*, lua_TValue*, lua_TValue*, lua_TValue const*) src/lua/lvm.cpp:182 (wesnoth-debug+0x61f7f35) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:845 (wesnoth-debug+0x61fe5c3) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b14001561c0 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 72 at 0x7b14001561c0 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaE_extendCI(lua_State*) src/lua/lstate.cpp:109 (wesnoth-debug+0x61dd72b) #4 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:425 (wesnoth-debug+0x61b5f5c) #5 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #6 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #7 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #8 lua_callk(lua_State*, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:924 (wesnoth-debug+0x619fdaa) #9 lua_kernel_base::intf_dofile(lua_State*) src/scripting/lua_kernel_base.cpp:769 (wesnoth-debug+0x4ab499e) #10 int dispatch<&lua_kernel_base::intf_dofile>(lua_State*) src/scripting/lua_kernel_base.cpp:367 (wesnoth-debug+0x4ab7f1c) #11 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #12 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #13 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #14 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #15 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #16 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #17 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #18 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #19 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #20 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #21 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #22 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #23 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #24 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #25 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #26 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #27 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #28 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #29 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #30 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #31 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #32 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/ldo.cpp:427 in luaD_precall(lua_State*, lua_TValue*, int) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b14001561c8 by thread T7: #0 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:428 (wesnoth-debug+0x61b60d4) #1 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:498 (wesnoth-debug+0x61b6ef8) #2 luaT_callTM(lua_State*, lua_TValue const*, lua_TValue const*, lua_TValue const*, lua_TValue*, int) src/lua/ltm.cpp:114 (wesnoth-debug+0x61f3599) #3 luaV_finishget(lua_State*, lua_TValue const*, lua_TValue*, lua_TValue*, lua_TValue const*) src/lua/lvm.cpp:182 (wesnoth-debug+0x61f7f35) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:845 (wesnoth-debug+0x61fe5c3) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Previous write of size 8 at 0x7b14001561c8 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 72 at 0x7b14001561c0 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaE_extendCI(lua_State*) src/lua/lstate.cpp:109 (wesnoth-debug+0x61dd72b) #4 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:425 (wesnoth-debug+0x61b5f5c) #5 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #6 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #7 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #8 lua_callk(lua_State*, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:924 (wesnoth-debug+0x619fdaa) #9 lua_kernel_base::intf_dofile(lua_State*) src/scripting/lua_kernel_base.cpp:769 (wesnoth-debug+0x4ab499e) #10 int dispatch<&lua_kernel_base::intf_dofile>(lua_State*) src/scripting/lua_kernel_base.cpp:367 (wesnoth-debug+0x4ab7f1c) #11 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #12 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #13 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #14 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #15 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #16 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #17 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #18 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #19 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #20 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #21 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #22 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #23 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #24 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #25 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #26 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #27 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #28 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #29 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #30 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #31 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #32 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/ldo.cpp:428 in luaD_precall(lua_State*, lua_TValue*, int) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 4 at 0x7b7400058f50 by thread T7: #0 lua_pushboolean(lua_State*, int) src/lua/lapi.cpp:558 (wesnoth-debug+0x619abe1) #1 lua_kernel_base::impl_game_config_get(lua_State*) src/scripting/lua_kernel_base.cpp:838 (wesnoth-debug+0x4ab523a) #2 game_lua_kernel::impl_game_config_get(lua_State*) src/scripting/game_lua_kernel.cpp:1311 (wesnoth-debug+0x49f6b47) #3 int dispatch<&lua_kernel_base::impl_game_config_get>(lua_State*) src/scripting/lua_kernel_base.cpp:367 (wesnoth-debug+0x4ab8583) #4 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:498 (wesnoth-debug+0x61b6ef8) #6 luaT_callTM(lua_State*, lua_TValue const*, lua_TValue const*, lua_TValue const*, lua_TValue*, int) src/lua/ltm.cpp:114 (wesnoth-debug+0x61f3599) #7 luaV_finishget(lua_State*, lua_TValue const*, lua_TValue*, lua_TValue*, lua_TValue const*) src/lua/lvm.cpp:182 (wesnoth-debug+0x61f7f35) #8 luaV_execute(lua_State*) src/lua/lvm.cpp:845 (wesnoth-debug+0x61fe5c3) #9 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #10 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #11 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #12 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #13 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #14 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #15 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #16 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #17 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #18 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #19 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #20 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #21 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #22 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #23 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #24 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #25 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #26 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #27 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #28 (libboost_thread.so.1.62.0+0x11f95) Previous write of size 8 at 0x7b7400058f50 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 2144 at 0x7b7400058c00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaD_reallocstack(lua_State*, int) src/lua/ldo.cpp:182 (wesnoth-debug+0x61b394c) #4 luaD_growstack(lua_State*, int) src/lua/ldo.cpp:205 (wesnoth-debug+0x61b3d2a) #5 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:424 (wesnoth-debug+0x61b5e23) #6 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #7 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #8 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #9 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #10 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #11 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #12 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #13 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #14 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #15 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #16 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #17 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #18 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #19 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #20 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #21 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #22 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #23 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #24 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #25 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #26 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/lapi.cpp:558 in lua_pushboolean(lua_State*, int) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 4 at 0x7b7400058f58 by thread T7: #0 lua_pushboolean(lua_State*, int) src/lua/lapi.cpp:558 (wesnoth-debug+0x619ac1c) #1 lua_kernel_base::impl_game_config_get(lua_State*) src/scripting/lua_kernel_base.cpp:838 (wesnoth-debug+0x4ab523a) #2 game_lua_kernel::impl_game_config_get(lua_State*) src/scripting/game_lua_kernel.cpp:1311 (wesnoth-debug+0x49f6b47) #3 int dispatch<&lua_kernel_base::impl_game_config_get>(lua_State*) src/scripting/lua_kernel_base.cpp:367 (wesnoth-debug+0x4ab8583) #4 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:498 (wesnoth-debug+0x61b6ef8) #6 luaT_callTM(lua_State*, lua_TValue const*, lua_TValue const*, lua_TValue const*, lua_TValue*, int) src/lua/ltm.cpp:114 (wesnoth-debug+0x61f3599) #7 luaV_finishget(lua_State*, lua_TValue const*, lua_TValue*, lua_TValue*, lua_TValue const*) src/lua/lvm.cpp:182 (wesnoth-debug+0x61f7f35) #8 luaV_execute(lua_State*) src/lua/lvm.cpp:845 (wesnoth-debug+0x61fe5c3) #9 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #10 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #11 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #12 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #13 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #14 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #15 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #16 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #17 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #18 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #19 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #20 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #21 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #22 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #23 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #24 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #25 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #26 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #27 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #28 (libboost_thread.so.1.62.0+0x11f95) Previous write of size 8 at 0x7b7400058f58 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 2144 at 0x7b7400058c00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaD_reallocstack(lua_State*, int) src/lua/ldo.cpp:182 (wesnoth-debug+0x61b394c) #4 luaD_growstack(lua_State*, int) src/lua/ldo.cpp:205 (wesnoth-debug+0x61b3d2a) #5 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:424 (wesnoth-debug+0x61b5e23) #6 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #7 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #8 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #9 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #10 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #11 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #12 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #13 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #14 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #15 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #16 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #17 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #18 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #19 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #20 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #21 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #22 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #23 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #24 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #25 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #26 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/lapi.cpp:558 in lua_pushboolean(lua_State*, int) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Read of size 8 at 0x7b6c0000ef48 by thread T7: #0 reallymarkobject src/lua/lgc.cpp:262 (wesnoth-debug+0x61bdd6e) #1 luaC_upvalbarrier_(lua_State*, UpVal*) src/lua/lgc.cpp:190 (wesnoth-debug+0x61bd129) #2 luaF_close(lua_State*, lua_TValue*) src/lua/lfunc.cpp:93 (wesnoth-debug+0x61bbdc1) #3 luaV_execute(lua_State*) src/lua/lvm.cpp:1178 (wesnoth-debug+0x62059d6) #4 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #5 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #6 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #7 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #8 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #9 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #10 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #11 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #12 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #13 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #14 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #15 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #16 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #17 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #18 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #19 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #20 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #21 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #22 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #23 (libboost_thread.so.1.62.0+0x11f95) Previous write of size 8 at 0x7b6c0000ef48 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 1552 at 0x7b6c0000ee00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 lua_newstate(void* (*)(void*, void*, unsigned long, unsigned long), void*) src/lua/lstate.cpp:299 (wesnoth-debug+0x61df7a2) #3 luaL_newstate() src/lua/lauxlib.cpp:1027 (wesnoth-debug+0x61a80b0) #4 lua_kernel_base::lua_kernel_base() src/scripting/lua_kernel_base.cpp:372 (wesnoth-debug+0x4ab0773) #5 game_lua_kernel::game_lua_kernel(game_state&, play_controller&, reports&) src/scripting/game_lua_kernel.cpp:4020 (wesnoth-debug+0x4a2863c) #6 game_state::game_state(config const&, play_controller&, std::shared_ptr const&) src/game_state.cpp:51 (wesnoth-debug+0x410a8f4) #7 operator() src/play_controller.cpp:208 (wesnoth-debug+0x48fcaa7) #8 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #9 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #10 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #11 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #12 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/lgc.cpp:262 in reallymarkobject ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b0800174160 by thread T7: #0 luaF_close(lua_State*, lua_TValue*) src/lua/lfunc.cpp:92 (wesnoth-debug+0x61bbcea) #1 luaV_execute(lua_State*) src/lua/lvm.cpp:1178 (wesnoth-debug+0x62059d6) #2 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #3 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #4 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #5 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #6 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #7 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #8 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #9 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #10 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #11 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #12 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #13 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #14 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #15 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #16 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #17 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #18 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #19 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #20 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #21 (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b0800174160 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 32 at 0x7b0800174160 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaF_findupval(lua_State*, lua_TValue*) src/lua/lfunc.cpp:69 (wesnoth-debug+0x61bb701) #4 pushclosure src/lua/lvm.cpp:642 (wesnoth-debug+0x61fc8eb) #5 luaV_execute(lua_State*) src/lua/lvm.cpp:1289 (wesnoth-debug+0x62076d8) #6 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #7 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #8 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #9 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #10 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #11 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #12 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #13 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #14 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #15 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #16 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #17 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #18 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #19 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #20 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #21 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #22 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #23 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #24 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #25 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/lfunc.cpp:92 in luaF_close(lua_State*, lua_TValue*) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Read of size 8 at 0x7b6c0000eef0 by thread T7: #0 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:97 (wesnoth-debug+0x61c8ce9) #1 luaC_newobj(lua_State*, int, unsigned long) src/lua/lgc.cpp:210 (wesnoth-debug+0x61bd3ef) #2 luaH_new(lua_State*) src/lua/ltable.cpp:403 (wesnoth-debug+0x61eee3b) #3 luaV_execute(lua_State*) src/lua/lvm.cpp:870 (wesnoth-debug+0x61ff1c9) #4 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #5 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #6 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #7 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #8 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #9 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #10 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #11 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #12 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #13 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #14 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #15 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #16 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #17 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #18 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #19 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #20 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #21 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #22 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #23 (libboost_thread.so.1.62.0+0x11f95) Previous write of size 8 at 0x7b6c0000eef0 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 1552 at 0x7b6c0000ee00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 lua_newstate(void* (*)(void*, void*, unsigned long, unsigned long), void*) src/lua/lstate.cpp:299 (wesnoth-debug+0x61df7a2) #3 luaL_newstate() src/lua/lauxlib.cpp:1027 (wesnoth-debug+0x61a80b0) #4 lua_kernel_base::lua_kernel_base() src/scripting/lua_kernel_base.cpp:372 (wesnoth-debug+0x4ab0773) #5 game_lua_kernel::game_lua_kernel(game_state&, play_controller&, reports&) src/scripting/game_lua_kernel.cpp:4020 (wesnoth-debug+0x4a2863c) #6 game_state::game_state(config const&, play_controller&, std::shared_ptr const&) src/game_state.cpp:51 (wesnoth-debug+0x410a8f4) #7 operator() src/play_controller.cpp:208 (wesnoth-debug+0x48fcaa7) #8 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #9 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #10 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #11 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #12 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/lmem.cpp:97 in luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Read of size 8 at 0x7b6c0000ef30 by thread T7: #0 luaC_newobj(lua_State*, int, unsigned long) src/lua/lgc.cpp:213 (wesnoth-debug+0x61bd4e7) #1 luaH_new(lua_State*) src/lua/ltable.cpp:403 (wesnoth-debug+0x61eee3b) #2 luaV_execute(lua_State*) src/lua/lvm.cpp:870 (wesnoth-debug+0x61ff1c9) #3 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #4 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #5 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #6 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #7 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #8 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #9 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #10 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #11 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #12 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #13 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #14 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #15 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #16 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #17 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #18 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #19 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #20 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #21 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #22 (libboost_thread.so.1.62.0+0x11f95) Previous write of size 8 at 0x7b6c0000ef30 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 1552 at 0x7b6c0000ee00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 lua_newstate(void* (*)(void*, void*, unsigned long, unsigned long), void*) src/lua/lstate.cpp:299 (wesnoth-debug+0x61df7a2) #3 luaL_newstate() src/lua/lauxlib.cpp:1027 (wesnoth-debug+0x61a80b0) #4 lua_kernel_base::lua_kernel_base() src/scripting/lua_kernel_base.cpp:372 (wesnoth-debug+0x4ab0773) #5 game_lua_kernel::game_lua_kernel(game_state&, play_controller&, reports&) src/scripting/game_lua_kernel.cpp:4020 (wesnoth-debug+0x4a2863c) #6 game_state::game_state(config const&, play_controller&, std::shared_ptr const&) src/game_state.cpp:51 (wesnoth-debug+0x410a8f4) #7 operator() src/play_controller.cpp:208 (wesnoth-debug+0x48fcaa7) #8 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #9 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #10 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #11 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #12 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/lgc.cpp:213 in luaC_newobj(lua_State*, int, unsigned long) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b7400058d10 by thread T7: #0 luaV_execute(lua_State*) src/lua/lvm.cpp:809 (wesnoth-debug+0x61fdb91) #1 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #2 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #3 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #4 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #5 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #6 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #7 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #8 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #9 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #10 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #11 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #12 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #13 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #14 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #15 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #16 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #17 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #18 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #19 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #20 (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b7400058d10 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 2144 at 0x7b7400058c00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaD_reallocstack(lua_State*, int) src/lua/ldo.cpp:182 (wesnoth-debug+0x61b394c) #4 luaD_growstack(lua_State*, int) src/lua/ldo.cpp:205 (wesnoth-debug+0x61b3d2a) #5 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:424 (wesnoth-debug+0x61b5e23) #6 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #7 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #8 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #9 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #10 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #11 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #12 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #13 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #14 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #15 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #16 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #17 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #18 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #19 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #20 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #21 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #22 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #23 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #24 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #25 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #26 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/lvm.cpp:809 in luaV_execute(lua_State*) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b7400058d20 by thread T7: #0 luaV_execute(lua_State*) src/lua/lvm.cpp:804 (wesnoth-debug+0x61fdaba) #1 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #2 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #3 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #4 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #5 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #6 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #7 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #8 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #9 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #10 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #11 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #12 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #13 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #14 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #15 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #16 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #17 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #18 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #19 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #20 (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b7400058d20 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 2144 at 0x7b7400058c00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaD_reallocstack(lua_State*, int) src/lua/ldo.cpp:182 (wesnoth-debug+0x61b394c) #4 luaD_growstack(lua_State*, int) src/lua/ldo.cpp:205 (wesnoth-debug+0x61b3d2a) #5 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:424 (wesnoth-debug+0x61b5e23) #6 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #7 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #8 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #9 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #10 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #11 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #12 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #13 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #14 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #15 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #16 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #17 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #18 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #19 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #20 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #21 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #22 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #23 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #24 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #25 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #26 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/lvm.cpp:804 in luaV_execute(lua_State*) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b7400058d30 by thread T7: #0 adjust_varargs src/lua/ldo.cpp:301 (wesnoth-debug+0x61b4e85) #1 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:447 (wesnoth-debug+0x61b656d) #2 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #3 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #4 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #5 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #6 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #7 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #8 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #9 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #10 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #11 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #12 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #13 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #14 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #15 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #16 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #17 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #18 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #19 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #20 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #21 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #22 (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b7400058d30 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 2144 at 0x7b7400058c00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaD_reallocstack(lua_State*, int) src/lua/ldo.cpp:182 (wesnoth-debug+0x61b394c) #4 luaD_growstack(lua_State*, int) src/lua/ldo.cpp:205 (wesnoth-debug+0x61b3d2a) #5 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:424 (wesnoth-debug+0x61b5e23) #6 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #7 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #8 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #9 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #10 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #11 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #12 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #13 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #14 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #15 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #16 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #17 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #18 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #19 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #20 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #21 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #22 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #23 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #24 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #25 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #26 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/ldo.cpp:301 in adjust_varargs ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b7400058de8 by thread T7: #0 luaV_execute(lua_State*) src/lua/lvm.cpp:833 (wesnoth-debug+0x61fe02b) #1 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #2 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #3 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #4 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #5 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #6 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #7 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #8 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #9 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #10 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #11 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #12 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #13 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #14 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #15 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #16 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #17 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #18 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #19 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #20 (libboost_thread.so.1.62.0+0x11f95) Previous read of size 4 at 0x7b7400058de8 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 2144 at 0x7b7400058c00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaD_reallocstack(lua_State*, int) src/lua/ldo.cpp:182 (wesnoth-debug+0x61b394c) #4 luaD_growstack(lua_State*, int) src/lua/ldo.cpp:205 (wesnoth-debug+0x61b3d2a) #5 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:424 (wesnoth-debug+0x61b5e23) #6 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #7 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #8 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #9 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #10 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #11 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #12 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #13 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #14 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #15 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #16 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #17 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #18 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #19 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #20 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #21 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #22 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #23 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #24 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #25 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #26 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/lvm.cpp:833 in luaV_execute(lua_State*) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 2 at 0x7b1400155bc0 by thread T7: #0 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:426 (wesnoth-debug+0x61b6017) #1 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #2 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #3 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #4 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #5 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #6 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #7 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #8 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #9 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #10 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #11 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #12 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #13 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #14 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #15 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #16 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #17 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #18 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #19 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #20 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #21 (libboost_thread.so.1.62.0+0x11f95) Previous read of size 2 at 0x7b1400155bc0 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 72 at 0x7b1400155b80 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaE_extendCI(lua_State*) src/lua/lstate.cpp:109 (wesnoth-debug+0x61dd72b) #4 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:425 (wesnoth-debug+0x61b5f5c) #5 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:468 (wesnoth-debug+0x61b6cc8) #6 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #7 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #8 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #9 lua_callk(lua_State*, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:924 (wesnoth-debug+0x619fdaa) #10 lua_kernel_base::intf_dofile(lua_State*) src/scripting/lua_kernel_base.cpp:769 (wesnoth-debug+0x4ab499e) #11 int dispatch<&lua_kernel_base::intf_dofile>(lua_State*) src/scripting/lua_kernel_base.cpp:367 (wesnoth-debug+0x4ab7f1c) #12 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #13 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #14 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #15 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #16 lua_callk(lua_State*, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:924 (wesnoth-debug+0x619fdaa) #17 lua_kernel_base::intf_dofile(lua_State*) src/scripting/lua_kernel_base.cpp:769 (wesnoth-debug+0x4ab499e) #18 int dispatch<&lua_kernel_base::intf_dofile>(lua_State*) src/scripting/lua_kernel_base.cpp:367 (wesnoth-debug+0x4ab7f1c) #19 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #20 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #21 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #22 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #23 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #24 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #25 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #26 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #27 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #28 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #29 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #30 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #31 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #32 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #33 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #34 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #35 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #36 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #37 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #38 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #39 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #40 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/ldo.cpp:426 in luaD_precall(lua_State*, lua_TValue*, int) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b1400155b80 by thread T7: #0 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:427 (wesnoth-debug+0x61b6050) #1 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #2 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #3 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #4 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #5 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #6 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #7 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #8 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #9 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #10 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #11 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #12 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #13 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #14 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #15 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #16 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #17 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #18 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #19 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #20 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #21 (libboost_thread.so.1.62.0+0x11f95) Previous write of size 8 at 0x7b1400155b80 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 72 at 0x7b1400155b80 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaE_extendCI(lua_State*) src/lua/lstate.cpp:109 (wesnoth-debug+0x61dd72b) #4 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:425 (wesnoth-debug+0x61b5f5c) #5 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:468 (wesnoth-debug+0x61b6cc8) #6 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #7 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #8 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #9 lua_callk(lua_State*, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:924 (wesnoth-debug+0x619fdaa) #10 lua_kernel_base::intf_dofile(lua_State*) src/scripting/lua_kernel_base.cpp:769 (wesnoth-debug+0x4ab499e) #11 int dispatch<&lua_kernel_base::intf_dofile>(lua_State*) src/scripting/lua_kernel_base.cpp:367 (wesnoth-debug+0x4ab7f1c) #12 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #13 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #14 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #15 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #16 lua_callk(lua_State*, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:924 (wesnoth-debug+0x619fdaa) #17 lua_kernel_base::intf_dofile(lua_State*) src/scripting/lua_kernel_base.cpp:769 (wesnoth-debug+0x4ab499e) #18 int dispatch<&lua_kernel_base::intf_dofile>(lua_State*) src/scripting/lua_kernel_base.cpp:367 (wesnoth-debug+0x4ab7f1c) #19 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #20 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #21 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #22 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #23 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #24 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #25 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #26 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #27 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #28 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #29 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #30 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #31 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #32 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #33 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #34 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #35 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #36 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #37 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #38 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #39 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #40 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/ldo.cpp:427 in luaD_precall(lua_State*, lua_TValue*, int) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 2 at 0x7b1400155bc2 by thread T7: #0 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:430 (wesnoth-debug+0x61b6111) #1 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #2 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #3 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #4 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #5 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #6 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #7 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #8 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #9 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #10 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #11 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #12 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #13 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #14 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #15 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #16 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #17 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #18 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #19 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #20 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #21 (libboost_thread.so.1.62.0+0x11f95) Previous read of size 2 at 0x7b1400155bc2 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 72 at 0x7b1400155b80 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaE_extendCI(lua_State*) src/lua/lstate.cpp:109 (wesnoth-debug+0x61dd72b) #4 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:425 (wesnoth-debug+0x61b5f5c) #5 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:468 (wesnoth-debug+0x61b6cc8) #6 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #7 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #8 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #9 lua_callk(lua_State*, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:924 (wesnoth-debug+0x619fdaa) #10 lua_kernel_base::intf_dofile(lua_State*) src/scripting/lua_kernel_base.cpp:769 (wesnoth-debug+0x4ab499e) #11 int dispatch<&lua_kernel_base::intf_dofile>(lua_State*) src/scripting/lua_kernel_base.cpp:367 (wesnoth-debug+0x4ab7f1c) #12 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #13 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #14 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #15 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #16 lua_callk(lua_State*, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:924 (wesnoth-debug+0x619fdaa) #17 lua_kernel_base::intf_dofile(lua_State*) src/scripting/lua_kernel_base.cpp:769 (wesnoth-debug+0x4ab499e) #18 int dispatch<&lua_kernel_base::intf_dofile>(lua_State*) src/scripting/lua_kernel_base.cpp:367 (wesnoth-debug+0x4ab7f1c) #19 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #20 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #21 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #22 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #23 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #24 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #25 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #26 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #27 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #28 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #29 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #30 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #31 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #32 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #33 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #34 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #35 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #36 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #37 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #38 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #39 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #40 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/ldo.cpp:430 in luaD_precall(lua_State*, lua_TValue*, int) ================== 20180527 00:55:41 info wml: [IftU] COMPAT: Checking for add-on No_Randomness_Mod... 20180527 00:55:41 info wml: [IftU] COMPAT: Checking for add-on Damage_Distribution_Mod... 20180527 00:55:41 info wml: [IftU] COMPAT: Checking for add-on Move_Units_Between_Campaigns... 20180527 00:55:41 info wml: [IftU] COMPAT: Add-on compatibility check finished! ================== WARNING: ThreadSanitizer: data race (pid=29308) Read of size 4 at 0x7b600003fb28 by thread T7: #0 traversestrongtable src/lua/lgc.cpp:440 (wesnoth-debug+0x61bfe5b) #1 traversetable src/lua/lgc.cpp:468 (wesnoth-debug+0x61c05fb) #2 propagatemark src/lua/lgc.cpp:568 (wesnoth-debug+0x61c2323) #3 propagateall src/lua/lgc.cpp:604 (wesnoth-debug+0x61c27f8) #4 atomic src/lua/lgc.cpp:1000 (wesnoth-debug+0x61c5c86) #5 singlestep src/lua/lgc.cpp:1065 (wesnoth-debug+0x61c6764) #6 luaC_step(lua_State*) src/lua/lgc.cpp:1137 (wesnoth-debug+0x61c6ef4) #7 luaX_newstring(LexState*, char const*, unsigned long) src/lua/llex.cpp:137 (wesnoth-debug+0x6211493) #8 llex src/lua/llex.cpp:529 (wesnoth-debug+0x62194c2) #9 luaX_next(LexState*) src/lua/llex.cpp:556 (wesnoth-debug+0x6219a2d) #10 statement src/lua/lparser.cpp:1572 (wesnoth-debug+0x61dc7ea) #11 statlist src/lua/lparser.cpp:605 (wesnoth-debug+0x61d68f5) #12 body src/lua/lparser.cpp:796 (wesnoth-debug+0x61d81b1) #13 funcstat src/lua/lparser.cpp:1482 (wesnoth-debug+0x61dbe20) #14 statement src/lua/lparser.cpp:1568 (wesnoth-debug+0x61dc7d9) #15 statlist src/lua/lparser.cpp:605 (wesnoth-debug+0x61d68f5) #16 mainfunc src/lua/lparser.cpp:1620 (wesnoth-debug+0x61dcba5) #17 luaY_parser(lua_State*, Zio*, Mbuffer*, Dyndata*, char const*, int) src/lua/lparser.cpp:1643 (wesnoth-debug+0x61dd170) #18 f_parser src/lua/ldo.cpp:776 (wesnoth-debug+0x61b93dc) #19 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #20 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #21 luaD_protectedparser(lua_State*, Zio*, char const*, char const*) src/lua/ldo.cpp:793 (wesnoth-debug+0x61b9740) #22 lua_load(lua_State*, char const* (*)(lua_State*, void*, unsigned long*), void*, char const*, char const*) src/lua/lapi.cpp:998 (wesnoth-debug+0x61a08c0) #23 lua_fileops::lua_filestream::lua_loadfile(lua_State*, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) src/scripting/lua_fileops.cpp:220 (wesnoth-debug+0x4a8d528) #24 lua_fileops::load_file(lua_State*) src/scripting/lua_fileops.cpp:243 (wesnoth-debug+0x4a8ba37) #25 lua_kernel_base::intf_dofile(lua_State*) src/scripting/lua_kernel_base.cpp:763 (wesnoth-debug+0x4ab4930) #26 int dispatch<&lua_kernel_base::intf_dofile>(lua_State*) src/scripting/lua_kernel_base.cpp:367 (wesnoth-debug+0x4ab7f1c) #27 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #28 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #29 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #30 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #31 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #32 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #33 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #34 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #35 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #36 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #37 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #38 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #39 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #40 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #41 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #42 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #43 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #44 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #45 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #46 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #47 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #48 (libboost_thread.so.1.62.0+0x11f95) Previous write of size 8 at 0x7b600003fb28 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 1024 at 0x7b600003f800 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 setnodevector src/lua/ltable.cpp:320 (wesnoth-debug+0x61ee2c5) #4 luaH_resize(lua_State*, Table*, unsigned int, unsigned int) src/lua/ltable.cpp:343 (wesnoth-debug+0x61ee6eb) #5 rehash src/lua/ltable.cpp:392 (wesnoth-debug+0x61eede8) #6 luaH_newkey(lua_State*, Table*, lua_TValue const*) src/lua/ltable.cpp:460 (wesnoth-debug+0x61ef6bd) #7 luaV_finishset(lua_State*, lua_TValue const*, lua_TValue*, lua_TValue*, lua_TValue const*) src/lua/lvm.cpp:214 (wesnoth-debug+0x61f8384) #8 auxsetstr src/lua/lapi.cpp:751 (wesnoth-debug+0x619d5e4) #9 lua_setfield(lua_State*, int, char const*) src/lua/lapi.cpp:778 (wesnoth-debug+0x619dcfd) #10 luaL_newmetatable(lua_State*, char const*) src/lua/lauxlib.cpp:307 (wesnoth-debug+0x61a4645) #11 lua_common::register_vconfig_metatable[abi:cxx11](lua_State*) src/scripting/lua_common.cpp:434 (wesnoth-debug+0x4a7e761) #12 game_lua_kernel::game_lua_kernel(game_state&, play_controller&, reports&) src/scripting/game_lua_kernel.cpp:4189 (wesnoth-debug+0x4a29a0a) #13 game_state::game_state(config const&, play_controller&, std::shared_ptr const&) src/game_state.cpp:51 (wesnoth-debug+0x410a8f4) #14 operator() src/play_controller.cpp:208 (wesnoth-debug+0x48fcaa7) #15 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #16 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #17 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #18 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #19 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/lgc.cpp:440 in traversestrongtable ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 4 at 0x7b600003fb38 by thread T7: #0 removeentry src/lua/lgc.cpp:128 (wesnoth-debug+0x61bca5e) #1 traversestrongtable src/lua/lgc.cpp:441 (wesnoth-debug+0x61bfe72) #2 traversetable src/lua/lgc.cpp:468 (wesnoth-debug+0x61c05fb) #3 propagatemark src/lua/lgc.cpp:568 (wesnoth-debug+0x61c2323) #4 propagateall src/lua/lgc.cpp:604 (wesnoth-debug+0x61c27f8) #5 atomic src/lua/lgc.cpp:1000 (wesnoth-debug+0x61c5c86) #6 singlestep src/lua/lgc.cpp:1065 (wesnoth-debug+0x61c6764) #7 luaC_step(lua_State*) src/lua/lgc.cpp:1137 (wesnoth-debug+0x61c6ef4) #8 luaX_newstring(LexState*, char const*, unsigned long) src/lua/llex.cpp:137 (wesnoth-debug+0x6211493) #9 llex src/lua/llex.cpp:529 (wesnoth-debug+0x62194c2) #10 luaX_next(LexState*) src/lua/llex.cpp:556 (wesnoth-debug+0x6219a2d) #11 statement src/lua/lparser.cpp:1572 (wesnoth-debug+0x61dc7ea) #12 statlist src/lua/lparser.cpp:605 (wesnoth-debug+0x61d68f5) #13 body src/lua/lparser.cpp:796 (wesnoth-debug+0x61d81b1) #14 funcstat src/lua/lparser.cpp:1482 (wesnoth-debug+0x61dbe20) #15 statement src/lua/lparser.cpp:1568 (wesnoth-debug+0x61dc7d9) #16 statlist src/lua/lparser.cpp:605 (wesnoth-debug+0x61d68f5) #17 mainfunc src/lua/lparser.cpp:1620 (wesnoth-debug+0x61dcba5) #18 luaY_parser(lua_State*, Zio*, Mbuffer*, Dyndata*, char const*, int) src/lua/lparser.cpp:1643 (wesnoth-debug+0x61dd170) #19 f_parser src/lua/ldo.cpp:776 (wesnoth-debug+0x61b93dc) #20 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #21 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #22 luaD_protectedparser(lua_State*, Zio*, char const*, char const*) src/lua/ldo.cpp:793 (wesnoth-debug+0x61b9740) #23 lua_load(lua_State*, char const* (*)(lua_State*, void*, unsigned long*), void*, char const*, char const*) src/lua/lapi.cpp:998 (wesnoth-debug+0x61a08c0) #24 lua_fileops::lua_filestream::lua_loadfile(lua_State*, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) src/scripting/lua_fileops.cpp:220 (wesnoth-debug+0x4a8d528) #25 lua_fileops::load_file(lua_State*) src/scripting/lua_fileops.cpp:243 (wesnoth-debug+0x4a8ba37) #26 lua_kernel_base::intf_dofile(lua_State*) src/scripting/lua_kernel_base.cpp:763 (wesnoth-debug+0x4ab4930) #27 int dispatch<&lua_kernel_base::intf_dofile>(lua_State*) src/scripting/lua_kernel_base.cpp:367 (wesnoth-debug+0x4ab7f1c) #28 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #29 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #30 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #31 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #32 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #33 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #34 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #35 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #36 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #37 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #38 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #39 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #40 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #41 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #42 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #43 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #44 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #45 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #46 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #47 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #48 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #49 (libboost_thread.so.1.62.0+0x11f95) Previous read of size 4 at 0x7b600003fb38 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 1024 at 0x7b600003f800 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 setnodevector src/lua/ltable.cpp:320 (wesnoth-debug+0x61ee2c5) #4 luaH_resize(lua_State*, Table*, unsigned int, unsigned int) src/lua/ltable.cpp:343 (wesnoth-debug+0x61ee6eb) #5 rehash src/lua/ltable.cpp:392 (wesnoth-debug+0x61eede8) #6 luaH_newkey(lua_State*, Table*, lua_TValue const*) src/lua/ltable.cpp:460 (wesnoth-debug+0x61ef6bd) #7 luaV_finishset(lua_State*, lua_TValue const*, lua_TValue*, lua_TValue*, lua_TValue const*) src/lua/lvm.cpp:214 (wesnoth-debug+0x61f8384) #8 auxsetstr src/lua/lapi.cpp:751 (wesnoth-debug+0x619d5e4) #9 lua_setfield(lua_State*, int, char const*) src/lua/lapi.cpp:778 (wesnoth-debug+0x619dcfd) #10 luaL_newmetatable(lua_State*, char const*) src/lua/lauxlib.cpp:307 (wesnoth-debug+0x61a4645) #11 lua_common::register_vconfig_metatable[abi:cxx11](lua_State*) src/scripting/lua_common.cpp:434 (wesnoth-debug+0x4a7e761) #12 game_lua_kernel::game_lua_kernel(game_state&, play_controller&, reports&) src/scripting/game_lua_kernel.cpp:4189 (wesnoth-debug+0x4a29a0a) #13 game_state::game_state(config const&, play_controller&, std::shared_ptr const&) src/game_state.cpp:51 (wesnoth-debug+0x410a8f4) #14 operator() src/play_controller.cpp:208 (wesnoth-debug+0x48fcaa7) #15 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #16 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #17 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #18 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #19 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/lgc.cpp:128 in removeentry ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b6c0000f3f0 by thread T7: #0 luaS_clearcache(global_State*) src/lua/lstring.cpp:108 (wesnoth-debug+0x61e10c3) #1 atomic src/lua/lgc.cpp:1022 (wesnoth-debug+0x61c606a) #2 singlestep src/lua/lgc.cpp:1065 (wesnoth-debug+0x61c6764) #3 luaC_step(lua_State*) src/lua/lgc.cpp:1137 (wesnoth-debug+0x61c6ef4) #4 luaX_newstring(LexState*, char const*, unsigned long) src/lua/llex.cpp:137 (wesnoth-debug+0x6211493) #5 llex src/lua/llex.cpp:529 (wesnoth-debug+0x62194c2) #6 luaX_next(LexState*) src/lua/llex.cpp:556 (wesnoth-debug+0x6219a2d) #7 statement src/lua/lparser.cpp:1572 (wesnoth-debug+0x61dc7ea) #8 statlist src/lua/lparser.cpp:605 (wesnoth-debug+0x61d68f5) #9 body src/lua/lparser.cpp:796 (wesnoth-debug+0x61d81b1) #10 funcstat src/lua/lparser.cpp:1482 (wesnoth-debug+0x61dbe20) #11 statement src/lua/lparser.cpp:1568 (wesnoth-debug+0x61dc7d9) #12 statlist src/lua/lparser.cpp:605 (wesnoth-debug+0x61d68f5) #13 mainfunc src/lua/lparser.cpp:1620 (wesnoth-debug+0x61dcba5) #14 luaY_parser(lua_State*, Zio*, Mbuffer*, Dyndata*, char const*, int) src/lua/lparser.cpp:1643 (wesnoth-debug+0x61dd170) #15 f_parser src/lua/ldo.cpp:776 (wesnoth-debug+0x61b93dc) #16 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #17 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #18 luaD_protectedparser(lua_State*, Zio*, char const*, char const*) src/lua/ldo.cpp:793 (wesnoth-debug+0x61b9740) #19 lua_load(lua_State*, char const* (*)(lua_State*, void*, unsigned long*), void*, char const*, char const*) src/lua/lapi.cpp:998 (wesnoth-debug+0x61a08c0) #20 lua_fileops::lua_filestream::lua_loadfile(lua_State*, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) src/scripting/lua_fileops.cpp:220 (wesnoth-debug+0x4a8d528) #21 lua_fileops::load_file(lua_State*) src/scripting/lua_fileops.cpp:243 (wesnoth-debug+0x4a8ba37) #22 lua_kernel_base::intf_dofile(lua_State*) src/scripting/lua_kernel_base.cpp:763 (wesnoth-debug+0x4ab4930) #23 int dispatch<&lua_kernel_base::intf_dofile>(lua_State*) src/scripting/lua_kernel_base.cpp:367 (wesnoth-debug+0x4ab7f1c) #24 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #25 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #26 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #27 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #28 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #29 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #30 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #31 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #32 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #33 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #34 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #35 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #36 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #37 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #38 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #39 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #40 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #41 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #42 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #43 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #44 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #45 (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b6c0000f3f0 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is heap block of size 1552 at 0x7b6c0000ee00 allocated by thread T7: #0 realloc (libtsan.so.0+0x2ac7b) #1 l_alloc src/lua/lauxlib.cpp:1015 (wesnoth-debug+0x61a7fc4) #2 lua_newstate(void* (*)(void*, void*, unsigned long, unsigned long), void*) src/lua/lstate.cpp:299 (wesnoth-debug+0x61df7a2) #3 luaL_newstate() src/lua/lauxlib.cpp:1027 (wesnoth-debug+0x61a80b0) #4 lua_kernel_base::lua_kernel_base() src/scripting/lua_kernel_base.cpp:372 (wesnoth-debug+0x4ab0773) #5 game_lua_kernel::game_lua_kernel(game_state&, play_controller&, reports&) src/scripting/game_lua_kernel.cpp:4020 (wesnoth-debug+0x4a2863c) #6 game_state::game_state(config const&, play_controller&, std::shared_ptr const&) src/game_state.cpp:51 (wesnoth-debug+0x410a8f4) #7 operator() src/play_controller.cpp:208 (wesnoth-debug+0x48fcaa7) #8 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #9 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #10 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #11 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #12 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race src/lua/lstring.cpp:108 in luaS_clearcache(global_State*) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b04000baaa0 by thread T7: #0 free (libtsan.so.0+0x2ad2a) #1 l_alloc src/lua/lauxlib.cpp:1011 (wesnoth-debug+0x61a7faa) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaH_free(lua_State*, Table*) src/lua/ltable.cpp:417 (wesnoth-debug+0x61ef163) #4 freeobj src/lua/lgc.cpp:708 (wesnoth-debug+0x61c344f) #5 sweeplist src/lua/lgc.cpp:744 (wesnoth-debug+0x61c3831) #6 sweepstep src/lua/lgc.cpp:1033 (wesnoth-debug+0x61c6256) #7 singlestep src/lua/lgc.cpp:1071 (wesnoth-debug+0x61c6874) #8 luaC_step(lua_State*) src/lua/lgc.cpp:1137 (wesnoth-debug+0x61c6ef4) #9 luaX_newstring(LexState*, char const*, unsigned long) src/lua/llex.cpp:137 (wesnoth-debug+0x6211493) #10 llex src/lua/llex.cpp:529 (wesnoth-debug+0x62194c2) #11 luaX_next(LexState*) src/lua/llex.cpp:556 (wesnoth-debug+0x6219a2d) #12 statement src/lua/lparser.cpp:1572 (wesnoth-debug+0x61dc7ea) #13 statlist src/lua/lparser.cpp:605 (wesnoth-debug+0x61d68f5) #14 body src/lua/lparser.cpp:796 (wesnoth-debug+0x61d81b1) #15 funcstat src/lua/lparser.cpp:1482 (wesnoth-debug+0x61dbe20) #16 statement src/lua/lparser.cpp:1568 (wesnoth-debug+0x61dc7d9) #17 statlist src/lua/lparser.cpp:605 (wesnoth-debug+0x61d68f5) #18 mainfunc src/lua/lparser.cpp:1620 (wesnoth-debug+0x61dcba5) #19 luaY_parser(lua_State*, Zio*, Mbuffer*, Dyndata*, char const*, int) src/lua/lparser.cpp:1643 (wesnoth-debug+0x61dd170) #20 f_parser src/lua/ldo.cpp:776 (wesnoth-debug+0x61b93dc) #21 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #22 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #23 luaD_protectedparser(lua_State*, Zio*, char const*, char const*) src/lua/ldo.cpp:793 (wesnoth-debug+0x61b9740) #24 lua_load(lua_State*, char const* (*)(lua_State*, void*, unsigned long*), void*, char const*, char const*) src/lua/lapi.cpp:998 (wesnoth-debug+0x61a08c0) #25 lua_fileops::lua_filestream::lua_loadfile(lua_State*, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) src/scripting/lua_fileops.cpp:220 (wesnoth-debug+0x4a8d528) #26 lua_fileops::load_file(lua_State*) src/scripting/lua_fileops.cpp:243 (wesnoth-debug+0x4a8ba37) #27 lua_kernel_base::intf_dofile(lua_State*) src/scripting/lua_kernel_base.cpp:763 (wesnoth-debug+0x4ab4930) #28 int dispatch<&lua_kernel_base::intf_dofile>(lua_State*) src/scripting/lua_kernel_base.cpp:367 (wesnoth-debug+0x4ab7f1c) #29 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #30 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #31 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #32 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #33 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #34 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #35 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #36 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #37 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #38 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #39 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #40 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #41 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #42 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #43 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #44 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #45 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #46 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #47 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #48 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #49 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #50 (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b04000baaa0 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x2ad2a) in free ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b1000069050 by thread T7: #0 free (libtsan.so.0+0x2ad2a) #1 l_alloc src/lua/lauxlib.cpp:1011 (wesnoth-debug+0x61a7faa) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 luaH_free(lua_State*, Table*) src/lua/ltable.cpp:418 (wesnoth-debug+0x61ef17d) #4 freeobj src/lua/lgc.cpp:708 (wesnoth-debug+0x61c344f) #5 sweeplist src/lua/lgc.cpp:744 (wesnoth-debug+0x61c3831) #6 sweepstep src/lua/lgc.cpp:1033 (wesnoth-debug+0x61c6256) #7 singlestep src/lua/lgc.cpp:1071 (wesnoth-debug+0x61c6874) #8 luaC_step(lua_State*) src/lua/lgc.cpp:1137 (wesnoth-debug+0x61c6ef4) #9 luaX_newstring(LexState*, char const*, unsigned long) src/lua/llex.cpp:137 (wesnoth-debug+0x6211493) #10 llex src/lua/llex.cpp:529 (wesnoth-debug+0x62194c2) #11 luaX_next(LexState*) src/lua/llex.cpp:556 (wesnoth-debug+0x6219a2d) #12 statement src/lua/lparser.cpp:1572 (wesnoth-debug+0x61dc7ea) #13 statlist src/lua/lparser.cpp:605 (wesnoth-debug+0x61d68f5) #14 body src/lua/lparser.cpp:796 (wesnoth-debug+0x61d81b1) #15 funcstat src/lua/lparser.cpp:1482 (wesnoth-debug+0x61dbe20) #16 statement src/lua/lparser.cpp:1568 (wesnoth-debug+0x61dc7d9) #17 statlist src/lua/lparser.cpp:605 (wesnoth-debug+0x61d68f5) #18 mainfunc src/lua/lparser.cpp:1620 (wesnoth-debug+0x61dcba5) #19 luaY_parser(lua_State*, Zio*, Mbuffer*, Dyndata*, char const*, int) src/lua/lparser.cpp:1643 (wesnoth-debug+0x61dd170) #20 f_parser src/lua/ldo.cpp:776 (wesnoth-debug+0x61b93dc) #21 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #22 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #23 luaD_protectedparser(lua_State*, Zio*, char const*, char const*) src/lua/ldo.cpp:793 (wesnoth-debug+0x61b9740) #24 lua_load(lua_State*, char const* (*)(lua_State*, void*, unsigned long*), void*, char const*, char const*) src/lua/lapi.cpp:998 (wesnoth-debug+0x61a08c0) #25 lua_fileops::lua_filestream::lua_loadfile(lua_State*, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) src/scripting/lua_fileops.cpp:220 (wesnoth-debug+0x4a8d528) #26 lua_fileops::load_file(lua_State*) src/scripting/lua_fileops.cpp:243 (wesnoth-debug+0x4a8ba37) #27 lua_kernel_base::intf_dofile(lua_State*) src/scripting/lua_kernel_base.cpp:763 (wesnoth-debug+0x4ab4930) #28 int dispatch<&lua_kernel_base::intf_dofile>(lua_State*) src/scripting/lua_kernel_base.cpp:367 (wesnoth-debug+0x4ab7f1c) #29 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #30 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #31 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #32 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #33 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #34 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #35 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #36 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #37 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #38 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #39 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #40 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #41 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #42 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #43 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #44 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #45 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #46 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #47 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #48 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #49 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #50 (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b1000069050 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x2ad2a) in free ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b0c000c4c98 by thread T7: #0 free (libtsan.so.0+0x2ad2a) #1 l_alloc src/lua/lauxlib.cpp:1011 (wesnoth-debug+0x61a7faa) #2 luaM_realloc_(lua_State*, void*, unsigned long, unsigned long) src/lua/lmem.cpp:86 (wesnoth-debug+0x61c8b9c) #3 freeobj src/lua/lgc.cpp:713 (wesnoth-debug+0x61c3554) #4 sweeplist src/lua/lgc.cpp:744 (wesnoth-debug+0x61c3831) #5 sweepstep src/lua/lgc.cpp:1033 (wesnoth-debug+0x61c6256) #6 singlestep src/lua/lgc.cpp:1071 (wesnoth-debug+0x61c6874) #7 luaC_step(lua_State*) src/lua/lgc.cpp:1137 (wesnoth-debug+0x61c6ef4) #8 luaX_newstring(LexState*, char const*, unsigned long) src/lua/llex.cpp:137 (wesnoth-debug+0x6211493) #9 llex src/lua/llex.cpp:529 (wesnoth-debug+0x62194c2) #10 luaX_next(LexState*) src/lua/llex.cpp:556 (wesnoth-debug+0x6219a2d) #11 statement src/lua/lparser.cpp:1572 (wesnoth-debug+0x61dc7ea) #12 statlist src/lua/lparser.cpp:605 (wesnoth-debug+0x61d68f5) #13 body src/lua/lparser.cpp:796 (wesnoth-debug+0x61d81b1) #14 funcstat src/lua/lparser.cpp:1482 (wesnoth-debug+0x61dbe20) #15 statement src/lua/lparser.cpp:1568 (wesnoth-debug+0x61dc7d9) #16 statlist src/lua/lparser.cpp:605 (wesnoth-debug+0x61d68f5) #17 mainfunc src/lua/lparser.cpp:1620 (wesnoth-debug+0x61dcba5) #18 luaY_parser(lua_State*, Zio*, Mbuffer*, Dyndata*, char const*, int) src/lua/lparser.cpp:1643 (wesnoth-debug+0x61dd170) #19 f_parser src/lua/ldo.cpp:776 (wesnoth-debug+0x61b93dc) #20 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #21 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #22 luaD_protectedparser(lua_State*, Zio*, char const*, char const*) src/lua/ldo.cpp:793 (wesnoth-debug+0x61b9740) #23 lua_load(lua_State*, char const* (*)(lua_State*, void*, unsigned long*), void*, char const*, char const*) src/lua/lapi.cpp:998 (wesnoth-debug+0x61a08c0) #24 lua_fileops::lua_filestream::lua_loadfile(lua_State*, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) src/scripting/lua_fileops.cpp:220 (wesnoth-debug+0x4a8d528) #25 lua_fileops::load_file(lua_State*) src/scripting/lua_fileops.cpp:243 (wesnoth-debug+0x4a8ba37) #26 lua_kernel_base::intf_dofile(lua_State*) src/scripting/lua_kernel_base.cpp:763 (wesnoth-debug+0x4ab4930) #27 int dispatch<&lua_kernel_base::intf_dofile>(lua_State*) src/scripting/lua_kernel_base.cpp:367 (wesnoth-debug+0x4ab7f1c) #28 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #29 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #30 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #31 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #32 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #33 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #34 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #35 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #36 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #37 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #38 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #39 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #40 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #41 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #42 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #43 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #44 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #45 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #46 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #47 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #48 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #49 (libboost_thread.so.1.62.0+0x11f95) Previous read of size 8 at 0x7b0c000c4c98 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x2ad2a) in free ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Read of size 8 at 0x556f740639c0 by thread T7: #0 std::__cxx11::_List_base >::_M_inc_size(unsigned long) /usr/include/c++/7/bits/stl_list.h:354 (wesnoth-debug+0x66c9295) #1 void std::__cxx11::list >::_M_insert(std::_List_iterator, events::sdl_handler*&&) /usr/include/c++/7/bits/stl_list.h:1803 (wesnoth-debug+0x69865fe) #2 std::__cxx11::list >::push_back(events::sdl_handler*&&) /usr/include/c++/7/bits/stl_list.h:1123 (wesnoth-debug+0x69852ef) #3 video2::draw_layering::draw_layering(bool) src/video.cpp:52 (wesnoth-debug+0x697fc80) #4 display::display(display_context const*, std::weak_ptr, reports&, config const&, config const&, bool) src/display.cpp:229 (wesnoth-debug+0x661013c) #5 game_display::game_display(game_board&, std::weak_ptr, reports&, config const&, config const&, bool) src/game_display.cpp:80 (wesnoth-debug+0x40646da) #6 operator() src/play_controller.cpp:237 (wesnoth-debug+0x48fefff) #7 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #8 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #9 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #10 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #11 (libboost_thread.so.1.62.0+0x11f95) Previous write of size 8 at 0x556f740639c0 by main thread: [failed to restore the stack] As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 lua_gui2::show_dialog(lua_State*) src/scripting/lua_gui2.cpp:246 (wesnoth-debug+0x4a90865) #3 luaD_precall(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:434 (wesnoth-debug+0x61b6186) #4 luaV_execute(lua_State*) src/lua/lvm.cpp:1134 (wesnoth-debug+0x6204ef5) #5 luaD_call(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:499 (wesnoth-debug+0x61b6f0d) #6 luaD_callnoyield(lua_State*, lua_TValue*, int) src/lua/ldo.cpp:509 (wesnoth-debug+0x61b7072) #7 f_call src/lua/lapi.cpp:942 (wesnoth-debug+0x619ffe2) #8 luaD_rawrunprotected(lua_State*, void (*)(lua_State*, void*), void*) src/lua/ldo.cpp:142 (wesnoth-debug+0x61b2dc6) #9 luaD_pcall(lua_State*, void (*)(lua_State*, void*), void*, long, long) src/lua/ldo.cpp:729 (wesnoth-debug+0x61b8d87) #10 lua_pcallk(lua_State*, int, int, int, long, int (*)(lua_State*, int, long)) src/lua/lapi.cpp:968 (wesnoth-debug+0x61a0211) #11 luaW_pcall_internal(lua_State*, int, int) src/scripting/lua_common.cpp:956 (wesnoth-debug+0x4a81ea4) #12 lua_kernel_base::protected_call(lua_State*, int, int, std::function) src/scripting/lua_kernel_base.cpp:643 (wesnoth-debug+0x4ab2aca) #13 lua_kernel_base::protected_call(int, int, std::function) src/scripting/lua_kernel_base.cpp:638 (wesnoth-debug+0x4ab2a51) #14 lua_kernel_base::throwing_run(char const*, int) src/scripting/lua_kernel_base.cpp:721 (wesnoth-debug+0x4ab3bc3) #15 lua_kernel_base::run(char const*, int) src/scripting/lua_kernel_base.cpp:728 (wesnoth-debug+0x4ab3d61) #16 lua_kernel_base::run_lua_tag(config const&) src/scripting/lua_kernel_base.cpp:711 (wesnoth-debug+0x4ab35e3) #17 game_lua_kernel::initialize(config const&) src/scripting/game_lua_kernel.cpp:4327 (wesnoth-debug+0x4a2b5bf) #18 game_state::init(config const&, play_controller&) src/game_state.cpp:210 (wesnoth-debug+0x4110668) #19 operator() src/play_controller.cpp:219 (wesnoth-debug+0x48fd709) #20 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (wesnoth-debug+0x492918c) #21 std::function::operator()() const /usr/include/c++/7/bits/std_function.h:706 (wesnoth-debug+0x39a426d) #22 operator() src/gui/dialogs/loading_screen.cpp:116 (wesnoth-debug+0x427459d) #23 run /usr/include/boost/thread/detail/thread.hpp:116 (wesnoth-debug+0x4279c57) #24 (libboost_thread.so.1.62.0+0x11f95) Location is global 'video2::draw_layers[abi:cxx11]' of size 24 at 0x556f740639b0 (wesnoth-debug+0x00000c31c9c0) Thread T7 (tid=29702, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 boost::thread::start_thread_noexcept() (libboost_thread.so.1.62.0+0x112f8) #2 thread > /usr/include/boost/thread/detail/thread.hpp:265 (wesnoth-debug+0x4277da5) #3 gui2::dialogs::loading_screen::pre_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:123 (wesnoth-debug+0x42748c1) #4 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:85 (wesnoth-debug+0x42a2eca) #5 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #6 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #7 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #8 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #9 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #10 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #11 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #12 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #13 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) SUMMARY: ThreadSanitizer: data race /usr/include/c++/7/bits/stl_list.h:354 in std::__cxx11::_List_base >::_M_inc_size(unsigned long) ================== ================== WARNING: ThreadSanitizer: data race (pid=29308) Write of size 8 at 0x7b1400125d68 by main thread: #0 operator delete(void*) (libtsan.so.0+0x6f3d1) #1 __gnu_cxx::new_allocator > >::deallocate(std::_Rb_tree_node >*, unsigned long) /usr/include/c++/7/ext/new_allocator.h:125 (wesnoth-debug+0x422bfc7) #2 std::allocator_traits > > >::deallocate(std::allocator > >&, std::_Rb_tree_node >*, unsigned long) /usr/include/c++/7/bits/alloc_traits.h:462 (wesnoth-debug+0x422bd0b) #3 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_put_node(std::_Rb_tree_node >*) /usr/include/c++/7/bits/stl_tree.h:592 (wesnoth-debug+0x422b736) #4 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_drop_node(std::_Rb_tree_node >*) /usr/include/c++/7/bits/stl_tree.h:659 (wesnoth-debug+0x422a30f) #5 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::_M_erase_aux(std::_Rb_tree_const_iterator >) /usr/include/c++/7/bits/stl_tree.h:2477 (wesnoth-debug+0x422b57b) #6 std::_Rb_tree, std::_Select1st >, std::less, std::allocator > >::erase[abi:cxx11](std::_Rb_tree_iterator >) (wesnoth-debug+0x422a199) #7 std::map, std::allocator > >::erase[abi:cxx11](std::_Rb_tree_iterator >) (wesnoth-debug+0x42295b1) #8 gui2::remove_timer(unsigned long) src/gui/core/timer.cpp:170 (wesnoth-debug+0x42285f6) #9 gui2::dialogs::loading_screen::clear_timer() src/gui/dialogs/loading_screen.cpp:233 (wesnoth-debug+0x4277855) #10 gui2::dialogs::loading_screen::post_show(gui2::window&) src/gui/dialogs/loading_screen.cpp:138 (wesnoth-debug+0x427531e) #11 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:108 (wesnoth-debug+0x42a38bb) #12 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #13 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #14 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #15 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #16 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #17 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #18 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #19 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #20 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) Previous read of size 4 at 0x7b1400125d6c by thread T1: #0 timer_callback src/gui/core/timer.cpp:106 (wesnoth-debug+0x4227a37) #1 (libSDL2-2.0.so.0+0x67fc8) As if synchronized via sleep: #0 nanosleep (libtsan.so.0+0x49490) #1 (libSDL2-2.0.so.0+0xdd914) #2 gui2::dialogs::modal_dialog::show(unsigned int) src/gui/dialogs/modal_dialog.cpp:89 (wesnoth-debug+0x42a3237) #3 gui2::dialogs::loading_screen::display(std::function) src/gui/dialogs/loading_screen.cpp:223 (wesnoth-debug+0x42771c8) #4 play_controller::init(config const&) src/play_controller.cpp:204 (wesnoth-debug+0x4902559) #5 play_controller::play_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/play_controller.cpp:181 (wesnoth-debug+0x48facfa) #6 playsingle_controller::playsingle_controller(config const&, saved_game&, config const&, std::shared_ptr const&, bool) src/playsingle_controller.cpp:79 (wesnoth-debug+0x5a5c1a0) #7 campaign_controller::playsingle_scenario(end_level_data&) src/game_initialization/playcampaign.cpp:189 (wesnoth-debug+0x5676e7a) #8 campaign_controller::play_game() src/game_initialization/playcampaign.cpp:281 (wesnoth-debug+0x5678a70) #9 game_launcher::launch_game(game_launcher::RELOAD_GAME_DATA) src/game_launcher.cpp:983 (wesnoth-debug+0x40f6333) #10 do_gameloop src/wesnoth.cpp:897 (wesnoth-debug+0x3ca4dcf) #11 main src/wesnoth.cpp:1143 (wesnoth-debug+0x3ca5b33) Thread T1 'SDLTimer' (tid=29310, running) created by main thread at: #0 pthread_create (libtsan.so.0+0x2b6db) #1 (libSDL2-2.0.so.0+0xd8e36) #2 __libc_start_main (libc.so.6+0x21a86) SUMMARY: ThreadSanitizer: data race (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x6f3d1) in operator delete(void*) ==================