Bug 39369 - ioquake3 SIGSEGVs when compiled with SSE optimizations
Summary: ioquake3 SIGSEGVs when compiled with SSE optimizations
Status: RESOLVED DUPLICATE of bug 37216
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.4.0
: P3 major
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-04 21:30 UTC by Thinker
Modified: 2009-09-17 08:59 UTC (History)
12 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thinker 2009-03-04 21:30:05 UTC
Backtrace is:

affected program bt:

Program received signal SIGSEGV, Segmentation fault.
R_SubdividePatchToGrid (width=3, height=3, points=0x21ef88)
    at code/renderer/tr_curve.c:411
411                                     VectorNormalize( dir );
(gdb) bt
#0  R_SubdividePatchToGrid (width=3, height=3, points=0x21ef88)
    at code/renderer/tr_curve.c:411
#1  0x00512334 in ParseMesh (ds=<value optimized out>, verts=0x14fdcc04, 
    surf=<value optimized out>) at code/renderer/tr_bsp.c:424
#2  0x005160da in RE_LoadWorldMap (name=0x153c4b58 "maps/q3dm0.bsp")
    at code/renderer/tr_bsp.c:1265
#3  0x004028d8 in CL_CgameSystemCalls (args=0x156d884c)
    at code/client/cl_cgame.c:553
#4  0x0059d5b6 in CallAsmCall (syscallNum=36, programStack=4193544, 
    opStack=0x22a150) at code/qcommon/vm_x86.c:193
#5  0x0059d588 in AsmCall ()
#6  0x00000024 in ?? ()
#7  0x003ffd08 in ?? ()
#8  0x0022a150 in ?? ()
#9  0x00000002 in ?? ()
#10 0x1ad63c2a in ?? ()
#11 0x0059d574 in AsmCall ()
#12 0x1ad671ce in ?? ()
#13 0x0059d574 in AsmCall ()
#14 0x1ad6010d in ?? ()
#15 0x0059d6c5 in VM_CallCompiled (vm=0x1e47e90, args=0x22b1e4)
    at code/qcommon/vm_x86.c:1192
#16 0x0049222a in VM_Call (vm=0x1e47e90, callnum=0) at code/qcommon/vm.c:771
#17 0x00401c67 in CL_InitCGame () at code/client/cl_cgame.c:748
#18 0x00420396 in CL_DownloadsComplete () at code/client/cl_main.c:1881
#19 0x004205ec in CL_InitDownloads () at code/client/cl_main.c:2045
#20 0x004244e5 in CL_ParseGamestate (msg=0x22f838)
    at code/client/cl_parse.c:532
#21 0x004250ac in CL_ParseServerMessage (msg=0x22f838)
    at code/client/cl_parse.c:894
#22 0x00422358 in CL_PacketEvent (from=
      {type = NA_LOOPBACK, ip = "\000\000\000", ip6 = '\0' <repeats 15 times>, port = 0, scope_id = 0}, msg=0x22f838) at code/client/cl_main.c:2485
#23 0x00443692 in Com_EventLoop () at code/qcommon/common.c:2208
#24 0x00443984 in Com_Frame () at code/qcommon/common.c:2935
#25 0x0054f00b in SDL_main (argc=4, argv=0x27015d8) at code/sys/sys_main.c:571
#26 0x005c80ab in console_main (argc=4, argv=0x27015d8)
    at ./src/main/win32/SDL_win32_main.c:217
#27 0x005c8289 in WinMain (hInst=0x400000, hPrev=0x0, 
    szCmdLine=0x2e2552 "+set fs_basepath d:/games/UrbanTerror", sw=10)
    at ./src/main/win32/SDL_win32_main.c:353
#28 0x005c7cc1 in main ()
(gdb)

(they seem to be out of ideas in their irc.)

Related source file in bt: http://svn.icculus.org/quake3/trunk/code/renderer/tr_curve.c?view=log

Related project: http://ioquake3.org

gcc is latest svn build by gcc 4.3.3, platform is mingw current/stable on vista current sp1.

any hint is appreciated.

similar behavior of instability on SSE optimizations occurs also in v 4.3.3, not in 3.4

options are typical -O3 -march=core2 or -O3 -msse,2,3, -g or not.
Comment 1 H.J. Lu 2009-03-20 14:11:45 UTC
Can you try adding "-mpreferred-stack-boundary=2"?
Comment 2 Uroš Bizjak 2009-03-23 08:24:19 UTC
This is probably the dup of PR37216.
Comment 3 Uroš Bizjak 2009-03-23 08:25:31 UTC
As a workaround, can you try to compile with -fno-common?
Comment 4 Uroš Bizjak 2009-09-17 08:59:36 UTC

*** This bug has been marked as a duplicate of 37216 ***