master: Segfault when connecting to a server
Environment: OS: Artix Linux Compiler: gcc 10.2.0
How to reproduce:
- connect to a server or start a local match
- disconnect
- connect to a server As far as I can see, it is neccessary to manually disconnect to trigger this segfault
GDB backtrace
#0 0x0000000000000000 in ()
#1 0x00005555557b8552 in PRVM_EDICT_NUM_ERROR (prog=0x5555566aef50 <prvm_prog_list+377168>, n=2813, filename=0x5555558fd710 "../../../csprogs.c", fileline=1172) at ../../../prvm_edict.c:3204
#2 0x000055555568617d in CL_VM_GetEntitySoundOrigin (entnum=35581, out=0x5555559e5158 <channels+440>) at ../../../csprogs.c:1172
#3 0x00005555555bafe3 in SND_Spatialize_WithSfx (ch=0x5555559e5140 <channels+416>, isstatic=false, sfx=0x55555cd73490) at ../../../snd_main.c:1241
#4 0x00005555555bcd48 in SND_Spatialize (ch=0x5555559e5140 <channels+416>, isstatic=false) at ../../../snd_main.c:1522
#5 0x00005555555bed2e in S_Update (listenermatrix=0x5555564a15e8 <r_refdef+8>) at ../../../snd_main.c:2183
#6 0x0000555555601312 in CL_Frame (time=0.0031835939989832696) at ../../../cl_main.c:2877
#7 0x00005555556eedf6 in Host_Frame (time=0.0031835939989832696) at ../../../host.c:347
#8 0x00005555556ef188 in Host_Main () at ../../../host.c:436
#9 0x000055555559c244 in main (argc=11, argv=0x7fffffffd3d8) at ../../../sys_sdl.c:222
up
brings me into https://gitlab.com/xonotic/darkplaces/-/blob/master/prvm_edict.c#L3204
For every print prog-><fieldname>
I seem to get either the value 0
or the address 0x0
. prog
seems to be empty at that point.