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

Small memory leak detected by ASan #13832

Open
appgurueu opened this issue Sep 22, 2023 · 0 comments
Open

Small memory leak detected by ASan #13832

appgurueu opened this issue Sep 22, 2023 · 0 comments
Labels
Bug Issues that were confirmed to be a bug @ Client rendering Low priority

Comments

@appgurueu
Copy link
Contributor

appgurueu commented Sep 22, 2023

Minetest version

Minetest 5.8.0-dev-debug-95056f978-dirty (Linux)
Using Irrlicht 1.9.0mt12
Using Lua 5.1.5
BUILD_TYPE=Debug
RUN_IN_PLACE=0
USE_CURL=1
USE_GETTEXT=0
USE_SOUND=1
STATIC_SHAREDIR="/usr/local/share/minetest"

Active renderer

No response

Irrlicht device

No response

Operating system and version

I hate issue forms. I would have to admit that I'm an Ubuntu user here even though it adds absolutely nothing to the issue.

CPU model

No response

GPU model

No response

OpenGL version

No response

Summary

ASan report:

==94522==ERROR: LeakSanitizer: detected memory leaks
 
Direct leak of 56 byte(s) in 1 object(s) allocated from:
    #0 0x7fa5b1dd91e7 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x56411d786326 in irr::gui::CGUITTFont::load(irr::core::string<char> const&, unsigned int, bool, bool) /home/lars/minetest/src/irrlicht_changes/CGUITTFont.cpp:323
    #2 0x56411d78469f in irr::gui::CGUITTFont::createTTFont(irr::gui::IGUIEnvironment*, irr::core::string<char> const&, unsigned int, bool, bool, unsigned int, unsigned int) /home/lars/minetest/src/irrlicht_changes/CGUITTFont.cpp:229
    #3 0x56411d2a839a in FontEngine::initFont(FontSpec const&) /home/lars/minetest/src/client/fontengine.cpp:252
    #4 0x56411d2a5985 in FontEngine::getFont(FontSpec, bool) /home/lars/minetest/src/client/fontengine.cpp:120
    #5 0x56411d2a5531 in FontEngine::getFont(FontSpec) /home/lars/minetest/src/client/fontengine.cpp:95
    #6 0x56411d11100c in FontEngine::getFont(unsigned int, FontMode) /home/lars/minetest/src/client/fontengine.h:74
    #7 0x56411d31f1fe in GameUI::init() /home/lars/minetest/src/client/gameui.cpp:94
    #8 0x56411d2b758c in Game::initGui() /home/lars/minetest/src/client/game.cpp:1533
    #9 0x56411d2b68f0 in Game::createClient(GameStartData const&) /home/lars/minetest/src/client/game.cpp:1499
    #10 0x56411d2b1792 in Game::startup(bool*, InputHandler*, RenderingEngine*, GameStartData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, bool*, ChatBackend*) /home/lars/minetest/src/client/game.cpp:1155
    #11 0x56411d2e9b02 in the_game(bool*, InputHandler*, RenderingEngine*, GameStartData const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, ChatBackend&, bool*) /home/lars/minetest/src/client/game.cpp:4523
    #12 0x56411d1b1918 in ClientLauncher::run(GameStartData&, Settings const&) /home/lars/minetest/src/client/clientlauncher.cpp:263
    #13 0x56411de703df in main /home/lars/minetest/src/main.cpp:266
    #14 0x7fa5b0df0d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
 
Direct leak of 56 byte(s) in 1 object(s) allocated from:
    #0 0x7fa5b1dd91e7 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0x56411d786326 in irr::gui::CGUITTFont::load(irr::core::string<char> const&, unsigned int, bool, bool) /home/lars/minetest/src/irrlicht_changes/CGUITTFont.cpp:323
    #2 0x56411d78469f in irr::gui::CGUITTFont::createTTFont(irr::gui::IGUIEnvironment*, irr::core::string<char> const&, unsigned int, bool, bool, unsigned int, unsigned int) /home/lars/minetest/src/irrlicht_changes/CGUITTFont.cpp:229
    #3 0x56411d2a839a in FontEngine::initFont(FontSpec const&) /home/lars/minetest/src/client/fontengine.cpp:252
    #4 0x56411d2a5985 in FontEngine::getFont(FontSpec, bool) /home/lars/minetest/src/client/fontengine.cpp:120
    #5 0x56411d2a5531 in FontEngine::getFont(FontSpec) /home/lars/minetest/src/client/fontengine.cpp:95
    #6 0x56411d11100c in FontEngine::getFont(unsigned int, FontMode) /home/lars/minetest/src/client/fontengine.h:74
    #7 0x56411d2a7033 in FontEngine::updateFontCache() /home/lars/minetest/src/client/fontengine.cpp:202
    #8 0x56411d2a6a7c in FontEngine::readSettings() /home/lars/minetest/src/client/fontengine.cpp:184
    #9 0x56411d2a495f in FontEngine::FontEngine(irr::gui::IGUIEnvironment*) /home/lars/minetest/src/client/fontengine.cpp:54
    #10 0x56411d1b0336 in ClientLauncher::run(GameStartData&, Settings const&) /home/lars/minetest/src/client/clientlauncher.cpp:172
    #11 0x56411de703df in main /home/lars/minetest/src/main.cpp:266
    #12 0x7fa5b0df0d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
 
SUMMARY: AddressSanitizer: 112 byte(s) leaked in 2 allocation(s).

Steps to reproduce

Compile Minetest with ASan (cmake -D CMAKE_CXX_FLAGS="-fsanitize=address" .), join game, leave, quit Minetest.

@appgurueu appgurueu added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label Sep 22, 2023
@sfan5 sfan5 added Bug Issues that were confirmed to be a bug Low priority and removed Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible labels Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that were confirmed to be a bug @ Client rendering Low priority
Projects
None yet
Development

No branches or pull requests

3 participants