Issue701

Title asan crash while saving game
Priority release-blocker Status resolved
Assigned To fluzz Keywords
Linked issues Watchers fluzz

Submitted on 2013-10-01 21h37 by matthiaskrgr, last changed by fluzz.

Messages
Author: matthiaskrgr Date: 2013-10-01   21h37
Was playing around with editor on level 24 , playtesting stuff.

When I saved the game (the "hero", not the map), the game crashed:

ASAN:SIGSEGV
=================================================================
==21525== ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc
0x7f4cec3ca202 sp 0x7fff88698740 bp 0x7fff88698cf0 T0)
AddressSanitizer can not provide additional info.
    #0 0x7f4cec3ca201 (/usr/lib/libc-2.18.so+0x48201)
    #1 0x7f4cec3f4128 (/usr/lib/libc-2.18.so+0x72128)
    #2 0x4ebf33 (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x4ebf33)
    #3 0x4ec468 (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x4ec468)
    #4 0x4e312e (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x4e312e)
    #5 0x4e32a0 (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x4e32a0)
    #6 0x4e3351 (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x4e3351)
    #7 0x4e5181 (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x4e5181)
    #8 0x4eb86c (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x4eb86c)
    #9 0x43a487 (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x43a487)
    #10 0x41bb8c (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x41bb8c)
    #11 0x41d853 (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x41d853)
    #12 0x41fccd (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x41fccd)
    #13 0x4ae109 (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x4ae109)
    #14 0x4ae655 (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x4ae655)
    #15 0x4aa4f7 (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x4aa4f7)
    #16 0x4b0086 (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x4b0086)
    #17 0x5063b7 (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x5063b7)
    #18 0x518e77 (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x518e77)
    #19 0x511ea3 (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x511ea3)
    #20 0x506424 (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x506424)
    #21 0x417774 (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x417774)
    #22 0x7f4cec3a3bc4 (/usr/lib/libc-2.18.so+0x21bc4)
    #23 0x417f1c (/home/matthias/vcs/git/freedroid/src/freedroidRPG+0x417f1c)

addr2line -e ./src/freedroidRPG 0x4ec468 0x4e312e 0x4e32a0 0x4e3351 0x4e5181
0x4eb86c 0x43a487 0x41bb8c 0x41d853 0x41fccd 0x4ae109 0x4ae655 0x4aa4f7 0x4b0086
0x5063b7 0x518e77 0x511ea3 0x506424 0x417774 0x417f1c 
/home/matthias/vcs/git/freedroid/src/string.c:126
/home/matthias/vcs/git/freedroid/src/savestruct.c:1934 (discriminator 2)
/home/matthias/vcs/git/freedroid/src/savestruct.c:1088
/home/matthias/vcs/git/freedroid/src/savestruct.c:1928 (discriminator 2)
/home/matthias/vcs/git/freedroid/src/savestruct.c:1447
/home/matthias/vcs/git/freedroid/src/savestruct_internal.c:527
/home/matthias/vcs/git/freedroid/src/saveloadgame.c:287
/home/matthias/vcs/git/freedroid/src/menu.c:958
/home/matthias/vcs/git/freedroid/src/menu.c:735
/home/matthias/vcs/git/freedroid/src/menu.c:764
/home/matthias/vcs/git/freedroid/src/keyboard.c:681
/home/matthias/vcs/git/freedroid/src/keyboard.c:818
/home/matthias/vcs/git/freedroid/src/input.c:119
/home/matthias/vcs/git/freedroid/src/main.c:89
/home/matthias/vcs/git/freedroid/src/lvledit/lvledit.c:251
/home/matthias/vcs/git/freedroid/src/lvledit/lvledit_menu.c:1089
/home/matthias/vcs/git/freedroid/src/lvledit/lvledit_input.c:193
/home/matthias/vcs/git/freedroid/src/lvledit/lvledit.c:281
/home/matthias/vcs/git/freedroid/src/main.c:185


@ 28627eda21c8fd1c383a85dfa4141593816df978
Author: fluzz Date: 2014-09-04   21h36
This can hardly be fixed without more infos.

It can possibly be due to vsnprintf() called with a size of 0, which seems to
behave strangely in sanitize-address mode.

Commit 0400249 protects against that case.
History
Date User Action Args
2014-09-04 21:36:08fluzzsetstatus: open -> resolved
assignedto: fluzz
messages: + msg2884
nosy: + fluzz
2014-08-29 15:21:44Xenuxsetpriority: important -> release-blocker
2013-10-01 21:37:13matthiaskrgrcreate