Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ED_vsprintf and Q_sscanf crash on GNU/Linux x86_64 #3

Open
zturtleman opened this issue Aug 25, 2017 · 0 comments
Open

ED_vsprintf and Q_sscanf crash on GNU/Linux x86_64 #3

zturtleman opened this issue Aug 25, 2017 · 0 comments

Comments

@zturtleman
Copy link
Contributor

ED_vsprintf and Q_sscanf crash on map load / client start up on GNU/Linux x86_64. Ran with Quake3e git master. The game works after replacing the functions with system vsprintf and sscanf though.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff191e5a1 in Q_strlen (s=0x3000000008 <error: Cannot access memory at address 0x3000000008>) at ../../code/game/bg_misc.c:2099
2099		while ( *s != '\0' ) 
(gdb) bt
#0  0x00007ffff191e5a1 in Q_strlen (s=0x3000000008 <error: Cannot access memory at address 0x3000000008>) at ../../code/game/bg_misc.c:2099
#1  0x00007ffff191e9fc in AddString (buf_p=0x7fffffffb1b8, string=0x3000000008 <error: Cannot access memory at address 0x3000000008>, width=0, prec=-1) at ../../code/game/bg_misc.c:2279
#2  0x00007ffff191ec98 in ED_vsprintf (buffer=0x7fffffffb200 "gamename: me Initialization -------\n", fmt=0x7ffff1950669 "\n", argptr=0x7fffffffd200) at ../../code/game/bg_misc.c:2403
#3  0x00007ffff18f2d25 in G_Printf (fmt=0x7ffff195065d "gamename: %s\n") at ../../code/game/g_main.c:230
#4  0x00007ffff18f360f in G_InitGame (levelTime=0, randomSeed=12894, restart=0) at ../../code/game/g_main.c:489
#5  0x00007ffff18f2bc4 in vmMain (command=0, arg0=0, arg1=12894, arg2=0) at ../../code/game/g_main.c:189
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff191f04b in Q_sscanf (buffer=0x7ffff1cd8910 <level+4048> "", fmt=0x7ffff1956940 "") at ../../code/game/bg_misc.c:2652
2652				*(float *)*arg = _atof( &buffer );
(gdb) bt
#0  0x00007ffff191f04b in Q_sscanf (buffer=0x7ffff1cd8910 <level+4048> "", fmt=0x7ffff1956940 "") at ../../code/game/bg_misc.c:2652
#1  0x00007ffff193dab5 in G_ParseField (key=0x7ffff1cd88fc <level+4028> "origin", value=0x7ffff1cd8903 <level+4035> "", ent=0x7ffff1be01f8 <g_entities+69496>) at ../../code/game/g_spawn.c:351
#2  0x00007ffff193dc3b in G_SpawnGEntityFromSpawnVars () at ../../code/game/g_spawn.c:398
#3  0x00007ffff193e3a1 in G_SpawnEntitiesFromString () at ../../code/game/g_spawn.c:627
#4  0x00007ffff18f3873 in G_InitGame (levelTime=0, randomSeed=5487, restart=0) at ../../code/game/g_main.c:566
#5  0x00007ffff18f2ba4 in vmMain (command=0, arg0=0, arg1=5487, arg2=0) at ../../code/game/g_main.c:189
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant