Issue813

Title memory leaks while playing tutorial
Priority important Status open
Assigned To Keywords
Linked issues Watchers

Submitted on 2015-05-25 12h01 by matthiaskrgr, last changed by matthiaskrgr.

Messages
Author: matthiaskrgr Date: 2015-05-25   12h01
Found via gcc 5 ASAN while playing through the entire tutorial:

@  a936df6c8a67cf7661ba41e2057b827ca0473a4b

=================================================================
==6532==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 4200 byte(s) in 105 object(s) allocated from:
    #0 0x7f30b34fbb79 in __interceptor_calloc
/build/gcc-multilib/src/gcc-5-20150519/libsanitizer/asan/asan_malloc_linux.cc:54
    #1 0x7f30aa3e70b1  (/usr/lib/xorg/modules/dri/i965_dri.so+0x27f0b1)

Direct leak of 640 byte(s) in 1 object(s) allocated from:
    #0 0x7f30b34fb9da in __interceptor_malloc
/build/gcc-multilib/src/gcc-5-20150519/libsanitizer/asan/asan_malloc_linux.cc:38
    #1 0x7f30b048be14 in XGetVisualInfo (/usr/lib/libX11.so.6+0x3fe14)
    #2 0x8e  (<unknown module>)

Direct leak of 304 byte(s) in 12 object(s) allocated from:
    #0 0x7f30b34fbb79 in __interceptor_calloc
/build/gcc-multilib/src/gcc-5-20150519/libsanitizer/asan/asan_malloc_linux.cc:54
    #1 0x438eca in dynarray_init /home/matthias/vcs/git/freedroid/src/dynarray.c:37
    #2 0x43955a in copy_upgrade_sockets
/home/matthias/vcs/git/freedroid/src/item_upgrades.c:78
    #3 0x429330 in CopyItem /home/matthias/vcs/git/freedroid/src/items.c:638
    #4 0x429330 in DropHeldItemToInventory
/home/matthias/vcs/git/freedroid/src/items.c:1441
    #5 0x42affd in HandleInventoryScreen
/home/matthias/vcs/git/freedroid/src/items.c:1644
    #6 0x49e193 in Game /home/matthias/vcs/git/freedroid/src/main.c:92
    #7 0x418f04 in main /home/matthias/vcs/git/freedroid/src/main.c:185
    #8 0x7f30b1bbc78f in __libc_start_main (/usr/lib/libc.so.6+0x2078f)

Direct leak of 224 byte(s) in 9 object(s) allocated from:
    #0 0x7f30b34fbb79 in __interceptor_calloc
/build/gcc-multilib/src/gcc-5-20150519/libsanitizer/asan/asan_malloc_linux.cc:54
    #1 0x438eca in dynarray_init /home/matthias/vcs/git/freedroid/src/dynarray.c:37
    #2 0x43955a in copy_upgrade_sockets
/home/matthias/vcs/git/freedroid/src/item_upgrades.c:78
    #3 0x4292de in CopyItem /home/matthias/vcs/git/freedroid/src/items.c:638
    #4 0x4292de in DropHeldItemToInventory
/home/matthias/vcs/git/freedroid/src/items.c:1464
    #5 0x42affd in HandleInventoryScreen
/home/matthias/vcs/git/freedroid/src/items.c:1644
    #6 0x49e193 in Game /home/matthias/vcs/git/freedroid/src/main.c:92
    #7 0x418f04 in main /home/matthias/vcs/git/freedroid/src/main.c:185
    #8 0x7f30b1bbc78f in __libc_start_main (/usr/lib/libc.so.6+0x2078f)

Direct leak of 152 byte(s) in 2 object(s) allocated from:
    #0 0x7f30b34fbd5a in __interceptor_realloc
/build/gcc-multilib/src/gcc-5-20150519/libsanitizer/asan/asan_malloc_linux.cc:59
    #1 0x7f30b04a0e40  (/usr/lib/libX11.so.6+0x54e40)

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x7f30b34fbb79 in __interceptor_calloc
/build/gcc-multilib/src/gcc-5-20150519/libsanitizer/asan/asan_malloc_linux.cc:54
    #1 0x486561 in MyMalloc /home/matthias/vcs/git/freedroid/src/text_public.c:68
    #2 0x4d44dd in add_volatile_obstacle
/home/matthias/vcs/git/freedroid/src/obstacle.c:333
    #3 0x48a18e in enemy_spray_blood
/home/matthias/vcs/git/freedroid/src/enemy.c:955
    #4 0x48dacf in hit_enemy /home/matthias/vcs/git/freedroid/src/enemy.c:1104
    #5 0x471a34 in check_bullet_enemy_collisions
/home/matthias/vcs/git/freedroid/src/bullet.c:755
    #6 0x47231b in CheckBulletCollisions
/home/matthias/vcs/git/freedroid/src/bullet.c:836
    #7 0x4726ef in move_this_bullet_and_check_its_collisions
/home/matthias/vcs/git/freedroid/src/bullet.c:92
    #8 0x4726ef in MoveBullets /home/matthias/vcs/git/freedroid/src/bullet.c:204
    #9 0x49d337 in DoAllMovementAndAnimations
/home/matthias/vcs/git/freedroid/src/main.c:64
    #10 0x49e1a9 in Game /home/matthias/vcs/git/freedroid/src/main.c:105
    #11 0x418f04 in main /home/matthias/vcs/git/freedroid/src/main.c:185
    #12 0x7f30b1bbc78f in __libc_start_main (/usr/lib/libc.so.6+0x2078f)

Direct leak of 48 byte(s) in 2 object(s) allocated from:
    #0 0x7f30b34fbb79 in __interceptor_calloc
/build/gcc-multilib/src/gcc-5-20150519/libsanitizer/asan/asan_malloc_linux.cc:54
    #1 0x438eca in dynarray_init /home/matthias/vcs/git/freedroid/src/dynarray.c:37
    #2 0x527b96 in read_upgrade_socket_dynarray
/home/matthias/vcs/git/freedroid/src/savestruct.c:2013
    #3 0x52846e in read_item /home/matthias/vcs/git/freedroid/src/savestruct.c:995
    #4 0x528f6e in read_item_array
/home/matthias/vcs/git/freedroid/src/savestruct.c:1995
    #5 0x52a210 in read_tux_t /home/matthias/vcs/git/freedroid/src/savestruct.c:1829
    #6 0x4c7952 in tux_ctor
/home/matthias/vcs/git/freedroid/src/savestruct_internal.c:556
    #7 0x530249 in luaD_precall /home/matthias/vcs/git/freedroid/lua/ldo.c:317

Direct leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x7f30b34fbb79 in __interceptor_calloc
/build/gcc-multilib/src/gcc-5-20150519/libsanitizer/asan/asan_malloc_linux.cc:54
    #1 0x438eca in dynarray_init /home/matthias/vcs/git/freedroid/src/dynarray.c:37
    #2 0x43955a in copy_upgrade_sockets
/home/matthias/vcs/git/freedroid/src/item_upgrades.c:78
    #3 0x4295a8 in CopyItem /home/matthias/vcs/git/freedroid/src/items.c:638
    #4 0x4295a8 in DropHeldItemToInventory
/home/matthias/vcs/git/freedroid/src/items.c:1411
    #5 0x42affd in HandleInventoryScreen
/home/matthias/vcs/git/freedroid/src/items.c:1644
    #6 0x49e193 in Game /home/matthias/vcs/git/freedroid/src/main.c:92
    #7 0x418f04 in main /home/matthias/vcs/git/freedroid/src/main.c:185
    #8 0x7f30b1bbc78f in __libc_start_main (/usr/lib/libc.so.6+0x2078f)

Direct leak of 26 byte(s) in 2 object(s) allocated from:
    #0 0x7f30b34fb9da in __interceptor_malloc
/build/gcc-multilib/src/gcc-5-20150519/libsanitizer/asan/asan_malloc_linux.cc:38
    #1 0x7f30b1c1c069 in __strdup (/usr/lib/libc.so.6+0x80069)
    #2 0x7f0047505263  (<unknown module>)

Direct leak of 26 byte(s) in 2 object(s) allocated from:
    #0 0x7f30b34fb9da in __interceptor_malloc
/build/gcc-multilib/src/gcc-5-20150519/libsanitizer/asan/asan_malloc_linux.cc:38
    #1 0x7f30b1c1c069 in __strdup (/usr/lib/libc.so.6+0x80069)
    #2 0x7400047505263  (<unknown module>)

Direct leak of 1 byte(s) in 1 object(s) allocated from:
    #0 0x7f30b34fb9da in __interceptor_malloc
/build/gcc-multilib/src/gcc-5-20150519/libsanitizer/asan/asan_malloc_linux.cc:38
    #1 0x7f30b04aab08 in _XlcDefaultMapModifiers (/usr/lib/libX11.so.6+0x5eb08)

Indirect leak of 1520 byte(s) in 19 object(s) allocated from:
    #0 0x7f30b34fbb79 in __interceptor_calloc
/build/gcc-multilib/src/gcc-5-20150519/libsanitizer/asan/asan_malloc_linux.cc:54
    #1 0x7f30b04a0e0e  (/usr/lib/libX11.so.6+0x54e0e)

Indirect leak of 518 byte(s) in 28 object(s) allocated from:
    #0 0x7f30b34fb9da in __interceptor_malloc
/build/gcc-multilib/src/gcc-5-20150519/libsanitizer/asan/asan_malloc_linux.cc:38
    #1 0x7f30b1c1c069 in __strdup (/usr/lib/libc.so.6+0x80069)

Indirect leak of 128 byte(s) in 16 object(s) allocated from:
    #0 0x7f30b34fb9da in __interceptor_malloc
/build/gcc-multilib/src/gcc-5-20150519/libsanitizer/asan/asan_malloc_linux.cc:38
    #1 0x7f30b04a1895  (/usr/lib/libX11.so.6+0x55895)

Indirect leak of 80 byte(s) in 3 object(s) allocated from:
    #0 0x7f30b34fbd5a in __interceptor_realloc
/build/gcc-multilib/src/gcc-5-20150519/libsanitizer/asan/asan_malloc_linux.cc:59
    #1 0x7f30b04a17d8  (/usr/lib/libX11.so.6+0x557d8)

SUMMARY: AddressSanitizer: 7947 byte(s) leaked in 204 allocation(s).
History
Date User Action Args
2015-05-25 12:01:11matthiaskrgrcreate