Red Hat Bugzilla – Bug 1461595
Sumwars segfaults with current lua
Last modified: 2017-06-14 18:00:41 EDT
Description of problem:
Sumwars on F26 crashes with a segmentation violation during startup.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
A segmentation violation crash.
The game should start.
I installed the debuginfo packages and took a quick look. I believe the below code src/code/eventsystem.cpp is guilty. It initializes m_lua differently depending on the LUA_VERSION_NUM value. But the lua in F26 sets this value to 503. None of the cases match, and m_lua remains 0. The following call of luaL_openlibs can't handle that, it expects it to have a valid value. Googling a little, it seems the 502 version is to be used in 503 too. Most likely, changing to "LUA_VERSION_NUM >= 502" is a better fix.
if (m_lua !=0)
#if LUA_VERSION_NUM == 501
m_lua = lua_open();
#elif LUA_VERSION_NUM == 502
m_lua = luaL_newstate();