lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

>  I won't claim a compiler bug just yet---it might be caused by issues I outlined here.  It might also help 
>  with knowing the operating  system and compiler you saw the error with.

Good point. I'm compiling Lua as c++ using Visual Studio 2017 ( technically 2019 using the 2017 compiler ). I'm defining LUA_COMPAT_MODULE which brings in luaL_register. I removed LUA_COMPAT_MODULE and switched to compiling Lua as c and neither had any effect - the app still crashed.

I was also able to reproduce the bug on Linux as well ( gcc, I think 7.5.0, also compiled as c++ ) so I don't think it's a straight ahead compiler bug. We do have some slight modifications to our Lua library but mostly they are just to sandbox things by removing some 'dangerous' modules

As a sanity check I downloaded 5.3.2 and compiled it without modifications on Windows using VS2019 and it's still crashing. The crash happens in different locations depending on x86/x64 and Debug/Release. Things also crash with 5.4.4 but in different spots as well. I've uploaded a standalone VS project here ( solution is inside the LuaTest folder ) - This project doesn't use LUA_COMPAT_MODULE and Lua is compiled as c but the main application is still c++.