You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Scummvm this commit [1] solved a memory leak that occurred because the return variable of GetPreferredLocales [1]
should be freed.
The relevant output from our code with ASAN enabled:
WARNING: Score::startLoop(): exiting due to debug few frames only!
=================================================================
==3621583==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 76 byte(s) in 2 object(s) allocated from:
#0 0x7f8272a6fa57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
#1 0x7f827287d4a5 in SDL_calloc_REAL /home/rvanlaar/sdl-memoryleak/SDL/src/stdlib/SDL_malloc.c:5404
SUMMARY: AddressSanitizer: 76 byte(s) leaked in 2 allocation(s).
The relevant output from Valgrind:
==60735== 38 bytes in 1 blocks are definitely lost in loss record 112 of 282
==60735== at 0x484DA83: calloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)
==60735== by 0x491D2A5: SDL_calloc_REAL (SDL_malloc.c:5311)
==60735== by 0x4991C53: build_locales_from_csv_string (SDL_locale.c:50)
==60735== by 0x4991C53: SDL_GetPreferredLocales_REAL (SDL_locale.c:100)
==60735== by 0x58C530: OSystem_SDL::getSystemLanguage() const (sdl.cpp:661)
==60735== by 0xC4246B: Common::TranslationManager::setLanguage(Common::String const&) (translation.cpp:89)
==60735== by 0x7BFC2D: GUI::GuiManager::GuiManager() (gui-manager.cpp:82)
==60735== by 0x79D1F5: Common::Singleton<GUI::GuiManager>::makeInstance() (singleton.h:60)
==60735== by 0x79CC7E: Common::Singleton<GUI::GuiManager>::instance() (singleton.h:83)
==60735== by 0x7BD44F: GUI::Dialog::Dialog(int, int, int, int, bool) (dialog.cpp:49)
==60735== by 0x7B97F1: GUI::ConsoleDialog::ConsoleDialog(float, float) (console.cpp:57)
==60735== by 0x7B3A31: GUI::Debugger::Debugger() (debugger.cpp:57)
==60735== by 0x5BB60F: Director::Debugger::Debugger() (debugger.cpp:46)
==60735==
My request if for ASAN to show more information in the case of this memory leak.
In Scummvm this commit [1] solved a memory leak that occurred because the return variable of GetPreferredLocales [1]
should be freed.
The relevant output from our code with ASAN enabled:
The relevant output from Valgrind:
My request if for ASAN to show more information in the case of this memory leak.
[1] scummvm/scummvm@ca23e7f
[2] https://wiki.libsdl.org/SDL2/SDL_GetPreferredLocales
The text was updated successfully, but these errors were encountered: