View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0005024 | Spring engine | General | public | 2016-01-04 15:46 | 2016-01-13 00:43 | ||||
Reporter | abma | ||||||||
Assigned To | abma | ||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 100.0+git | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0005024: AddressSanitizer: (minor) memleaks | ||||||||
Description | (related to 0004998) the "Direct" leaks should be fixed. AddressSanitizer detects some memleaks: | ||||||||
Additional Information | http://buildbot.springrts.com/builders/validationtests/builds/5013/steps/validation%20test/logs/stdio Direct leak of 88 byte(s) in 1 object(s) allocated from: 0 0x7fe443b3fb49 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98b49) 1 0x7fe42ad81d26 (<unknown module>) 2 0x7fe42ad7dbb9 (<unknown module>) 3 0x7fe42ad7e45f (<unknown module>) 4 0x7fe42ad7f18f (<unknown module>) 5 0xdf5e2b in CAIInterfaceLibrary::FetchSkirmishAILibrary(CSkirmishAILibraryInfo const&) ../../rts/ExternalAI/AIInterfaceLibrary.cpp:201 6 0xe68f4d in CSkirmishAI::CSkirmishAI(int, int, SkirmishAIKey const&, SSkirmishAICallback const*) ../../rts/ExternalAI/SkirmishAI.cpp:24 7 0xe8e1ad in CSkirmishAIWrapper::LoadSkirmishAI(bool) ../../rts/ExternalAI/SkirmishAIWrapper.cpp:133 8 0xe8f797 in CSkirmishAIWrapper::Init() ../../rts/ExternalAI/SkirmishAIWrapper.cpp:193 9 0xe22a97 in CEngineOutHandler::CreateSkirmishAI(unsigned long) ../../rts/ExternalAI/EngineOutHandler.cpp:591 10 0xe70c74 in CSkirmishAIHandler::CreateLocalSkirmishAI(unsigned long) ../../rts/ExternalAI/SkirmishAIHandler.cpp:197 11 0x529c13 in CGame::LoadSkirmishAIs() ../../rts/Game/Game.cpp:675 12 0x5408b3 in CGame::LoadGame(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) ../../rts/Game/Game.cpp:395 13 0x598b0e in CLoadScreen::Init() ../../rts/Game/LoadScreen.cpp:129 14 0x599d00 in CLoadScreen::CreateInstance(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ILoadSaveHandler*) ../../rts/Game/LoadScreen.cpp:193 15 0x5b5253 in CPreGame::UpdateClientNet() ../../rts/Game/PreGame.cpp:340 16 0x5b6cbd in CPreGame::Update() ../../rts/Game/PreGame.cpp:172 17 0xcf8119 in SpringApp::Update() ../../rts/System/SpringApp.cpp:956 18 0xd0268f in SpringApp::Run() ../../rts/System/SpringApp.cpp:992 19 0xc958ab in Run(int, char**) ../../rts/System/Main.cpp:48 20 0x7fe4412aea3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f) Direct leak of 24 byte(s) in 1 object(s) allocated from: 0 0x7fe443b408b2 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x998b2) 1 0xcee7e1 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<Threading::ThreadControls*>(Threading::ThreadControls*) /usr/include/c++/5/bits/shared_ptr_base.h:574 2 0xce4410 in std::__shared_ptr<Threading::ThreadControls, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<Threading::ThreadControls>(Threading::ThreadControls*) /usr/include/c++/5/bits/shared_ptr_base.h:882 3 0xce4410 in std::shared_ptr<Threading::ThreadControls>::shared_ptr<Threading::ThreadControls>(Threading::ThreadControls*) /usr/include/c++/5/bits/shared_ptr.h:117 4 0xce4410 in Threading::SetMainThread() ../../rts/System/Platform/Threading.cpp:423 5 0xc9588c in Run(int, char**) ../../rts/System/Main.cpp:43 6 0x7fe4412aea3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f) Direct leak of 16 byte(s) in 1 object(s) allocated from: 0 0x7fe443b408b2 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x998b2) 1 0xaa8756 in CGlobalRenderingMemberRegistrator::RegisterMembers(creg::Class*) ../../rts/Rendering/GlobalRendering.cpp:40 2 0xd528f1 in creg::System::InitializeClasses() ../../rts/System/creg/creg.cpp:90 3 0xd01a30 in SpringApp::Initialize() ../../rts/System/SpringApp.cpp:234 4 0xd0258e in SpringApp::Run() ../../rts/System/SpringApp.cpp:980 5 0xc958ab in Run(int, char**) ../../rts/System/Main.cpp:48 6 0x7fe4412aea3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f) Direct leak of 16 byte(s) in 1 object(s) allocated from: 0 0x7fe443b408b2 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x998b2) 1 0x115d223 in CAirCAIMemberRegistrator::RegisterMembers(creg::Class*) ../../rts/Sim/Units/CommandAI/AirCAI.cpp:39 2 0xd528f1 in creg::System::InitializeClasses() ../../rts/System/creg/creg.cpp:90 3 0xd01a30 in SpringApp::Initialize() ../../rts/System/SpringApp.cpp:234 4 0xd0258e in SpringApp::Run() ../../rts/System/SpringApp.cpp:980 5 0xc958ab in Run(int, char**) ../../rts/System/Main.cpp:48 6 0x7fe4412aea3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f) Indirect leak of 1088 byte(s) in 1 object(s) allocated from: 0 0x7fe443b408b2 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x998b2) 1 0xce43dc in Threading::SetMainThread() ../../rts/System/Platform/Threading.cpp:423 2 0xc9588c in Run(int, char**) ../../rts/System/Main.cpp:43 3 0x7fe4412aea3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f) SUMMARY: AddressSanitizer: 1232 byte(s) leaked in 5 allocation(s). | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
abma (administrator) 2016-01-04 21:00 |
1 fixed: https://github.com/spring/spring/commit/81e8a0cac33e71458afced0afce00c51656d6e62 3 to go: http://buildbot.springrts.com/builders/validationtests/builds/5015/steps/validation%20test/logs/stdio :-) |
abma (administrator) 2016-01-11 23:12 Last edited: 2016-01-11 23:13 |
i've disabled the memleak check. basicly only one memleak is left: http://buildbot.springrts.com/builders/validationtests/builds/5047/steps/validation%20test/logs/stdio Direct leak of 16 byte(s) in 1 object(s) allocated from: 0 0x7f83501448b2 in operator new(unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x998b2) 1 0xaaa8f6 in CGlobalRenderingMemberRegistrator::RegisterMembers(creg::Class*) ../../rts/Rendering/GlobalRendering.cpp:40 2 0xd53e41 in creg::System::InitializeClasses() ../../rts/System/creg/creg.cpp:90 3 0xd02f80 in SpringApp::Initialize() ../../rts/System/SpringApp.cpp:234 4 0xd03ade in SpringApp::Run() ../../rts/System/SpringApp.cpp:980 5 0xc96a4b in Run(int, char**) ../../rts/System/Main.cpp:48 6 0x7f834d8b2a3f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20a3f) (the other one seems a duplicate) https://github.com/spring/spring/commit/2852d3c708245b382c55a7eac2acc7ea628bd793 |
Kloot (developer) 2016-01-11 23:15 Last edited: 2016-01-11 23:15 |
FWIW I looked at that one too, but tracing creg code is like stepping into the asylum. |
abma (administrator) 2016-01-12 01:35 |
yeah, i failed to understand the problem :-| seems unrealistic for 101.0, maybe someone picks this up later |
abma (administrator) 2016-01-13 00:29 |
removing in rts/Sim/Units/CommandAI/AirCAI.cpp CR_RESERVED(16), and in rts/Rendering/GlobalRendering.cpp CR_IGNORED(teamNanospray), fixes the memleaks for me |
abma (administrator) 2016-01-13 00:43 |
Fix 5aa59720252ed8300eaba6d375bb3491b104fcca committed to develop branch: fix 0005024: memleaks in creg: 1. teamNanospray was added twice 2. ???, repo: spring changeset id: 6228 |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2016-01-04 15:46 | abma | New Issue | |
2016-01-04 15:47 | abma | Additional Information Updated | View Revisions |
2016-01-04 15:48 | abma | Description Updated | View Revisions |
2016-01-04 21:00 | abma | Note Added: 0015444 | |
2016-01-11 23:12 | abma | Note Added: 0015481 | |
2016-01-11 23:12 | abma | Note Edited: 0015481 | View Revisions |
2016-01-11 23:13 | abma | Note Edited: 0015481 | View Revisions |
2016-01-11 23:15 | Kloot | Note Added: 0015482 | |
2016-01-11 23:15 | Kloot | Note Edited: 0015482 | View Revisions |
2016-01-12 01:33 | abma | Target Version | 101.0 => |
2016-01-12 01:35 | abma | Note Added: 0015483 | |
2016-01-13 00:29 | abma | Note Added: 0015498 | |
2016-01-13 00:43 | abma | Changeset attached | => spring develop 5aa59720 |
2016-01-13 00:43 | abma | Note Added: 0015499 | |
2016-01-13 00:43 | abma | Assigned To | => abma |
2016-01-13 00:43 | abma | Status | new => resolved |
2016-01-13 00:43 | abma | Resolution | open => fixed |