Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Init memleak fixes #3398

Closed
wzdev-ci opened this issue Apr 10, 2012 · 3 comments
Closed

Init memleak fixes #3398

wzdev-ci opened this issue Apr 10, 2012 · 3 comments

Comments

@wzdev-ci
Copy link
Contributor

keyword_init keyword_memleak keyword_startup keyword_valgrind resolution_duplicate type_bug | by T_X


Copy and Pasta from: Warzone2100/warzone2100#30


These should fix some non critical memory leaks which were caused by memory allocated during startup but Not being properly freed during shutdown. They are shown when starting warzone2100 with "valgrind --leak-check=full" and hitting "Quit Game" right afterwards.

Refs #3395 (http://developer.wz2100.net/ticket/3395).

After those four patches, the following two valgrind errors are still left during this minimal startup phase for me:

==12304## 40 bytes in 1 blocks are still reachable in loss record 209 of 64212304## at 0x402894D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)12304## by 0x781916: __glcGetThreadArea (in /mnt/dev/warzone2100/src/warzone2100)12304## by 0x77EDF0: __glcLock (in /mnt/dev/warzone2100/src/warzone2100)12304## by 0x78487A: __glcContextCreate (in /mnt/dev/warzone2100/src/warzone2100)12304## by 0x77F3FE: glcGenContext (in /mnt/dev/warzone2100/src/warzone2100)12304## by 0x756AFC: iV_initializeGLC() (textdraw.cpp:123)12304## by 0x756DFC: iV_TextInit() (textdraw.cpp:205)12304## by 0x5A89FF: systemInitialise() (init.cpp:521)12304## by 0x5D115B: realmain(int, char**) (main.cpp:1278)12304## by 0x792183: main (main_sdl.cpp:24)12304## ==12304== 84 bytes in 2 blocks are still reachable in loss record 381 of 64212304## at 0x402894D: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)12304## by 0x400AA85: _dl_new_object (dl-object.c:161)12304## by 0x4005FB5: _dl_map_object_from_fd (dl-load.c:957)12304## by 0x40076B7: _dl_map_object (dl-load.c:2468)12304## by 0x400CF61: openaux (dl-deps.c:65)12304## by 0x400D925: _dl_catch_error (dl-error.c:178)12304## by 0x400C02B: _dl_map_object_deps (dl-deps.c:247)12304## by 0x4011EB7: dl_open_worker (dl-open.c:263)12304## by 0x400D925: _dl_catch_error (dl-error.c:178)12304## by 0x4011899: _dl_open (dl-open.c:633)12304## by 0x8E1DF65: dlopen_doit (dlopen.c:67)12304## by 0x400D925: _dl_catch_error (dl-error.c:178)12304==

But I can't tell yet, whether they are warzone2100's fault or external issues. For the former, looking at the QuesoGLC 0.7.2 documentation and source code as well as some printf'ing in the Warzone2100 code it looked more like a bug in the external glcDeleteContext() function which as far as I can tell is properly called from the warzone2100 side. For the latter - no idea where that comes from.


Issue migrated from trac:3398 at 2022-04-16 09:43:56 -0700

@wzdev-ci
Copy link
Contributor Author

T_X commented


Please close this one - my mistake.

@wzdev-ci
Copy link
Contributor Author

cybersphinx changed status from new to closed

@wzdev-ci
Copy link
Contributor Author

cybersphinx changed resolution from `` to duplicate

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant