Bug ID 1197065
Summary gcc11: 0ad lua i586 segfault
Classification openSUSE
Product openSUSE Tumbleweed
Version Current
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Development
Assignee rguenther@suse.com
Reporter bwiedemann@suse.com
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

We encountered a segfault in i586 builds of 0ad/premake5/lua that even led
people to deactivate that build in
https://build.opensuse.org/request/show/961440

However, on closer inspection, this might be due to a compiler issue around
propagating constants that went away with -O2 or

+++ b/build/premake/premake5/contrib/lua/src/lua.h
-LUA_API void  (lua_rotate) (lua_State *L, int idx, int n);
+LUA_API __attribute__((noipa)) void  (lua_rotate) (lua_State *L, int idx, int
n);

+++ b/build/premake/premake5/contrib/lua/src/lapi.c
-LUA_API void lua_rotate (lua_State *L, int idx, int n) {
+LUA_API __attribute__((noipa)) void lua_rotate (lua_State *L, int idx, int n)
{


For reference the segfault was at
(gdb) bt
#0  reverse (L=<optimized out>, to=0x56774ffc, from=0x5677b9d4)
    at ../../contrib/lua/src/lapi.c:198
#1  lua_rotate.constprop.0 (L=<optimized out>, n=<optimized out>, idx=-2)
    at ../../contrib/lua/src/lapi.c:217
#2  0x565713d3 in luaL_requiref (L=0x567781a4, modname=0x566753d3 "_G",
    openf=0x565b2f90 <luaopen_base>, glb=1)
    at ../../contrib/lua/src/lauxlib.c:983
#3  0x5658e66f in luaL_openlibs (L=0x567781a4)
    at ../../contrib/lua/src/linit.c:64
#4  0x5656edc7 in main (argc=1, argv=0xffffd9c4)
    at ../../src/host/premake_main.c:15


You are receiving this mail because: