possible stack corruption with solaris/x86 ?

darkshark atnight darksharkster at gmail.com
Wed Nov 2 17:18:31 EST 2005


I'm falling behind Vincent now in the solaris stakes :(

When starting a game, it crashes.  Seems the pointer, cvar_t
*showpackets, gets modified somewhere.   In VM_Call() the showpackets
pointer is ok, it points to good
data.  Then after VM_Call() does its vm->entryPoint showpackets is changed.
Debug info below: (using the v230 release)

(Oh mouse doesn't work, keeps itself to the bottom right corner, more
on that later)
Sean.
.

Breakpoint 2, VM_Call (vm=0x896f780, callnum=0) at ../qcommon/vm.c:737
737                     r = vm->entryPoint( callnum,  args[0], 
args[1],  args[2], args[3],
(gdb) print showpackets
$29 = (cvar_t *) 0x893c528
(gdb) n
------- Game Initialization -------
gamename: baseq3
gamedate: Nov  2 2005
Not logging to disk.
Gametype changed, clearing session data.
info_spectator_start doesn't have a spawn function
info_spectator_start doesn't have a spawn function
info_spectator_start doesn't have a spawn function
info_spectator_start doesn't have a spawn function
1 teams with 3 entities
14 items registered
-----------------------------------
Opened log botlib.log
------- BotLib Initialization -------
loaded weapons.c
loaded items.c
loaded syn.c
loaded rnd.c
loaded match.c
^3Warning: file rchat.c, line 635: variables from the match
template(s) could be invalid when outputting one of the chat messages
^3Warning: file rchat.c, line 732: the key say with prefix ! is inside
the key sayonara
^3Warning: file rchat.c, line 1243: variables from the match
template(s) could be invalid when outputting one of the chat messages
loaded rchat.c
------------ Map Loading ------------
trying to load maps/q3dm3.aas
loaded maps/q3dm3.aas
found 24 level items
-------------------------------------
32 bots parsed
30 arenas parsed
771             if ( oldVM != NULL ) // bk001220 -
assert(currentVM!=NULL) for oldVM==NULL
(gdb) print showpackets
$30 = (cvar_t *) 0x30
(gdb) where
#0  VM_Call (vm=0x896f780, callnum=0) at ../qcommon/vm.c:771
#1  0x080b41b8 in SV_InitGameVM (restart=qfalse) at ../server/sv_game.c:901
#2  0x080b42cc in SV_InitGameProgs () at ../server/sv_game.c:955
#3  0x080b4ed7 in SV_SpawnServer (server=0x8047360 "q3dm3", killBots=qtrue)
    at ../server/sv_init.c:442
#4  0x080acd65 in SV_Map_f () at ../server/sv_ccmds.c:187
#5  0x08096a6b in Cmd_ExecuteString (text=0x8047430 "spmap q3dm3")
    at ../qcommon/cmd.c:645
#6  0x080963f7 in Cbuf_Execute () at ../qcommon/cmd.c:220
#7  0x0809a510 in Com_Frame () at ../qcommon/common.c:2695
#8  0x08143fe0 in main (argc=7, argv=0x8047cdc) at ../unix/unix_main.c:1411
(gdb) delete
Delete all breakpoints? (y or n) y
(gdb) c
Continuing.
-----------------------------------
loaded skill 1 from bots/default_c.c
loaded skill 1 from bots/orbb_c.c
loaded bots/orbb_i.c
loaded bots/orbb_w.c
loaded orbb from bots/orbb_t.c
loaded cached skill 1.000000 from bots/default_c.c
loaded skill 1 from bots/mynx_c.c
loaded bots/mynx_i.c
loaded bots/mynx_w.c
loaded mynx from bots/mynx_t.c

Program received signal SIGSEGV, Segmentation fault.
0x080a537e in NET_SendPacket (sock=NS_SERVER, length=19, data=0x8022770, to=
      {type = NA_LOOPBACK, ip = "\000\000\000", ipx =
"\000\000\000\000\000\000\000\000\000", port = 0}) at
../qcommon/net_chan.c:622
622             if ( showpackets->integer && *(int *)data == -1 )       {
(gdb) c
Continuing.
Received signal 11, exiting...
----- CL_Shutdown -----



More information about the quake3 mailing list