When invoking either ioq3ded or ioquake3 with the "-v" or "--version" switch, it'll segfault.
Starting program: /usr/games/bin/ioq3ded -v
ioq3 1.36_SVN2299 dedicated server (Jul 7 2012)
Program received signal SIGSEGV, Segmentation fault.
0x000055555561e9c6 in Sys_DefaultHomePath () at code/sys/sys_unix.c:70
70 if(com_homepath->string[0])
(gdb) bt
#0 0x000055555561e9c6 in Sys_DefaultHomePath () at code/sys/sys_unix.c:70
#1 0x0000555555618823 in Sys_PIDFileName () at code/sys/sys_main.c:143
#2 Sys_Exit (exitCode=0) at code/sys/sys_main.c:207
#3 0x00005555556196f2 in Sys_ParseArgs (argv=0x7fffffffdfe8,
argc=<optimized out>) at code/sys/sys_main.c:522
#4 main (argc=<optimized out>, argv=0x7fffffffdfe8) at code/sys/sys_main.c:608
The naive approach would be testing for "if (com_homepath && com_homepath->string[0])" in Sys_DefaultHomePath(). com_homepath is set in Com_Init(), which is called after Sys_ParseArgs() in main(). Com_Init() is also where Sys_WritePIDFile() is called, so the PID file does not yet exist when Sys_Exit() is called from Sys_ParseArgs() anyways.
When invoking either ioq3ded or ioquake3 with the "-v" or "--version" switch, it'll segfault. Starting program: /usr/games/bin/ioq3ded -v ioq3 1.36_SVN2299 dedicated server (Jul 7 2012) Program received signal SIGSEGV, Segmentation fault. 0x000055555561e9c6 in Sys_DefaultHomePath () at code/sys/sys_unix.c:70 70 if(com_homepath->string[0]) (gdb) bt #0 0x000055555561e9c6 in Sys_DefaultHomePath () at code/sys/sys_unix.c:70 #1 0x0000555555618823 in Sys_PIDFileName () at code/sys/sys_main.c:143 #2 Sys_Exit (exitCode=0) at code/sys/sys_main.c:207 #3 0x00005555556196f2 in Sys_ParseArgs (argv=0x7fffffffdfe8, argc=<optimized out>) at code/sys/sys_main.c:522 #4 main (argc=<optimized out>, argv=0x7fffffffdfe8) at code/sys/sys_main.c:608 The naive approach would be testing for "if (com_homepath && com_homepath->string[0])" in Sys_DefaultHomePath(). com_homepath is set in Com_Init(), which is called after Sys_ParseArgs() in main(). Com_Init() is also where Sys_WritePIDFile() is called, so the PID file does not yet exist when Sys_Exit() is called from Sys_ParseArgs() anyways.