{"action":"created","issue":{"url":"https://api.github.com/repos/freeorion/freeorion/issues/2297","repository_url":"https://api.github.com/repos/freeorion/freeorion","labels_url":"https://api.github.com/repos/freeorion/freeorion/issues/2297/labels{/name}","comments_url":"https://api.github.com/repos/freeorion/freeorion/issues/2297/comments","events_url":"https://api.github.com/repos/freeorion/freeorion/issues/2297/events","html_url":"https://github.com/freeorion/freeorion/issues/2297","id":365842614,"node_id":"MDU6SXNzdWUzNjU4NDI2MTQ=","number":2297,"title":"Memory leak? AddressSanitizer fails","user":{"login":"agrrr3","id":3252041,"node_id":"MDQ6VXNlcjMyNTIwNDE=","avatar_url":"https://avatars3.githubusercontent.com/u/3252041?v=4","gravatar_id":"","url":"https://api.github.com/users/agrrr3","html_url":"https://github.com/agrrr3","followers_url":"https://api.github.com/users/agrrr3/followers","following_url":"https://api.github.com/users/agrrr3/following{/other_user}","gists_url":"https://api.github.com/users/agrrr3/gists{/gist_id}","starred_url":"https://api.github.com/users/agrrr3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agrrr3/subscriptions","organizations_url":"https://api.github.com/users/agrrr3/orgs","repos_url":"https://api.github.com/users/agrrr3/repos","events_url":"https://api.github.com/users/agrrr3/events{/privacy}","received_events_url":"https://api.github.com/users/agrrr3/received_events","type":"User","site_admin":false},"labels":[{"id":193301672,"node_id":"MDU6TGFiZWwxOTMzMDE2NzI=","url":"https://api.github.com/repos/freeorion/freeorion/labels/category:bug","name":"category:bug","color":"5319e7","default":false},{"id":430445128,"node_id":"MDU6TGFiZWw0MzA0NDUxMjg=","url":"https://api.github.com/repos/freeorion/freeorion/labels/component:internal","name":"component:internal","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/freeorion/freeorion/milestones/23","html_url":"https://github.com/freeorion/freeorion/milestone/23","labels_url":"https://api.github.com/repos/freeorion/freeorion/milestones/23/labels","id":2872605,"node_id":"MDk6TWlsZXN0b25lMjg3MjYwNQ==","number":23,"title":"Next Release","description":"Bugs, features and pull requests that should be fixed/finalized for the next release.","creator":{"login":"Vezzra","id":10279417,"node_id":"MDQ6VXNlcjEwMjc5NDE3","avatar_url":"https://avatars2.githubusercontent.com/u/10279417?v=4","gravatar_id":"","url":"https://api.github.com/users/Vezzra","html_url":"https://github.com/Vezzra","followers_url":"https://api.github.com/users/Vezzra/followers","following_url":"https://api.github.com/users/Vezzra/following{/other_user}","gists_url":"https://api.github.com/users/Vezzra/gists{/gist_id}","starred_url":"https://api.github.com/users/Vezzra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vezzra/subscriptions","organizations_url":"https://api.github.com/users/Vezzra/orgs","repos_url":"https://api.github.com/users/Vezzra/repos","events_url":"https://api.github.com/users/Vezzra/events{/privacy}","received_events_url":"https://api.github.com/users/Vezzra/received_events","type":"User","site_admin":false},"open_issues":199,"closed_issues":68,"state":"open","created_at":"2017-10-29T13:18:34Z","updated_at":"2018-10-17T19:08:43Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2018-10-02T10:52:15Z","updated_at":"2018-10-18T21:35:49Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"### Environment\r\n* Branch: master\r\n* OS: debian buster\r\n* **Fetched as**\r\n  * Compiled from source; cmake; gcc (debian buster package 4:8.1.0-1) \r\n\r\n\r\n### Description\r\n\r\nI tried to hunt down a suspected memory leak for the preferred targetting branch and enable the address and undefined behavior sanitizers in the build. That found a suspected problem, but the problem is also in current master:\r\n```\r\n[100%] Built target freeorion\r\nAddressSanitizer:DEADLYSIGNAL\r\n=================================================================\r\n==2895==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x7f2774350ac0 bp 0x7ffddaa231a0 sp 0x7ffddaa23180 T0)\r\n==2895==The signal is caused by a READ memory access.\r\n==2895==Hint: address points to the zero page.\r\n    #0 0x7f2774350abf in boost::serialization::void_cast_detail::void_caster_primitive<BoutBeginEvent, CombatEvent>::void_caster_primitive() (/home/axel-testing/freeorion/freeorion_build_sanitized/libfreeorioncommon.so+0x68bbabf)\r\n    #1 0x7f27743299bf in boost::serialization::detail::singleton_wrapper<boost::serialization::void_cast_detail::void_caster_primitive<BoutBeginEvent, CombatEvent> >::singleton_wrapper() (/home/axel-testing/freeorion/freeorion_build_sanitized/libfreeorioncommon.so+0x68949bf)\r\n    #2 0x7f2774329a9a in boost::serialization::singleton<boost::serialization::void_cast_detail::void_caster_primitive<BoutBeginEvent, CombatEvent> >::get_instance() (/home/axel-testing/freeorion/freeorion_build_sanitized/libfreeorioncommon.so+0x6894a9a)\r\n    #3 0x7f2774248aea in __static_initialization_and_destruction_0(int, int) (/home/axel-testing/freeorion/freeorion_build_sanitized/libfreeorioncommon.so+0x67b3aea)\r\n    #4 0x7f2774252ea2 in _GLOBAL__sub_I_CombatEvents.cpp (/home/axel-testing/freeorion/freeorion_build_sanitized/libfreeorioncommon.so+0x67bdea2)\r\n    #5 0x7f277f8130c9  (/lib64/ld-linux-x86-64.so.2+0xf0c9)\r\n    #6 0x7f277f8131d5  (/lib64/ld-linux-x86-64.so.2+0xf1d5)\r\n    #7 0x7f277f805249  (/lib64/ld-linux-x86-64.so.2+0x1249)\r\n\r\nAddressSanitizer can not provide additional info.\r\nSUMMARY: AddressSanitizer: SEGV (/home/axel-testing/freeorion/freeorion_build_sanitized/libfreeorioncommon.so+0x68bbabf) in boost::serialization::void_cast_detail::void_caster_primitive<BoutBeginEvent, CombatEvent>::void_caster_primitive()\r\n==2895==ABORTING\r\n\r\n```\r\n\r\nMy main problem is that this one hides my memory leak and i really have no clue whats going wrong there, so i cant just fix it.\r\n\r\n### Expected Result\r\nNo warning from the sanitizers.\r\n\r\n### Steps to reproduce\r\n* Check out or cherry-pick my branch or enable the sanitizers yourself\r\n* setup remote agrrr3 https://github.com/agrrr3/freeorion.git\r\n* `git checkout agrrr3/AddressSanitationCombatEventsPointsToTheZeroPage`\r\n* depending on your distribution you need to install the right libraries for the sanitizers libasan and libubsan; debian gcc already has these by default\r\n* `mkdir build`\r\n* `cd build`\r\n* `cmake ../`\r\n* `make && ./freeorion`\r\n\r\nIs there a better way to share the code? I thought a pull request is the wrong thing to do."},"comment":{"url":"https://api.github.com/repos/freeorion/freeorion/issues/comments/431172234","html_url":"https://github.com/freeorion/freeorion/issues/2297#issuecomment-431172234","issue_url":"https://api.github.com/repos/freeorion/freeorion/issues/2297","id":431172234,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTE3MjIzNA==","user":{"login":"Dilvish-fo","id":10995939,"node_id":"MDQ6VXNlcjEwOTk1OTM5","avatar_url":"https://avatars2.githubusercontent.com/u/10995939?v=4","gravatar_id":"","url":"https://api.github.com/users/Dilvish-fo","html_url":"https://github.com/Dilvish-fo","followers_url":"https://api.github.com/users/Dilvish-fo/followers","following_url":"https://api.github.com/users/Dilvish-fo/following{/other_user}","gists_url":"https://api.github.com/users/Dilvish-fo/gists{/gist_id}","starred_url":"https://api.github.com/users/Dilvish-fo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dilvish-fo/subscriptions","organizations_url":"https://api.github.com/users/Dilvish-fo/orgs","repos_url":"https://api.github.com/users/Dilvish-fo/repos","events_url":"https://api.github.com/users/Dilvish-fo/events{/privacy}","received_events_url":"https://api.github.com/users/Dilvish-fo/received_events","type":"User","site_admin":false},"created_at":"2018-10-18T21:35:49Z","updated_at":"2018-10-18T21:35:49Z","author_association":"MEMBER","body":"So is this resolved now?"}}
{"actor":{"display_login":"Dilvish-fo"}}