{"action":"closed","issue":{"url":"https://api.github.com/repos/universal-ctags/ctags/issues/1687","repository_url":"https://api.github.com/repos/universal-ctags/ctags","labels_url":"https://api.github.com/repos/universal-ctags/ctags/issues/1687/labels{/name}","comments_url":"https://api.github.com/repos/universal-ctags/ctags/issues/1687/comments","events_url":"https://api.github.com/repos/universal-ctags/ctags/issues/1687/events","html_url":"https://github.com/universal-ctags/ctags/issues/1687","id":296851330,"number":1687,"title":"C: Leaking memory when giving C++ input","user":{"login":"masatake","id":77077,"avatar_url":"https://avatars2.githubusercontent.com/u/77077?v=4","gravatar_id":"","url":"https://api.github.com/users/masatake","html_url":"https://github.com/masatake","followers_url":"https://api.github.com/users/masatake/followers","following_url":"https://api.github.com/users/masatake/following{/other_user}","gists_url":"https://api.github.com/users/masatake/gists{/gist_id}","starred_url":"https://api.github.com/users/masatake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masatake/subscriptions","organizations_url":"https://api.github.com/users/masatake/orgs","repos_url":"https://api.github.com/users/masatake/repos","events_url":"https://api.github.com/users/masatake/events{/privacy}","received_events_url":"https://api.github.com/users/masatake/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"pragmaware","id":8988456,"avatar_url":"https://avatars1.githubusercontent.com/u/8988456?v=4","gravatar_id":"","url":"https://api.github.com/users/pragmaware","html_url":"https://github.com/pragmaware","followers_url":"https://api.github.com/users/pragmaware/followers","following_url":"https://api.github.com/users/pragmaware/following{/other_user}","gists_url":"https://api.github.com/users/pragmaware/gists{/gist_id}","starred_url":"https://api.github.com/users/pragmaware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pragmaware/subscriptions","organizations_url":"https://api.github.com/users/pragmaware/orgs","repos_url":"https://api.github.com/users/pragmaware/repos","events_url":"https://api.github.com/users/pragmaware/events{/privacy}","received_events_url":"https://api.github.com/users/pragmaware/received_events","type":"User","site_admin":false},"assignees":[{"login":"pragmaware","id":8988456,"avatar_url":"https://avatars1.githubusercontent.com/u/8988456?v=4","gravatar_id":"","url":"https://api.github.com/users/pragmaware","html_url":"https://github.com/pragmaware","followers_url":"https://api.github.com/users/pragmaware/followers","following_url":"https://api.github.com/users/pragmaware/following{/other_user}","gists_url":"https://api.github.com/users/pragmaware/gists{/gist_id}","starred_url":"https://api.github.com/users/pragmaware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pragmaware/subscriptions","organizations_url":"https://api.github.com/users/pragmaware/orgs","repos_url":"https://api.github.com/users/pragmaware/repos","events_url":"https://api.github.com/users/pragmaware/events{/privacy}","received_events_url":"https://api.github.com/users/pragmaware/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-02-13T19:07:59Z","updated_at":"2018-02-17T21:01:07Z","closed_at":"2018-02-17T21:01:07Z","author_association":"OWNER","body":"```\r\n[root@dev256 tmp]# cat /tmp/foo3.c  \r\nstruct a::b {int c;};\r\n[root@dev256 tmp]# valgrind --leak-check=full /home/yamato/tmp/ctags/ctags /tmp/foo3.c \r\n==2573== Memcheck, a memory error detector\r\n==2573== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.\r\n==2573== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info\r\n==2573== Command: /home/yamato/tmp/ctags/ctags /tmp/foo3.c\r\n==2573==\r\n==2573==\r\n==2573== HEAP SUMMARY:\r\n==2573==     in use at exit: 7,800 bytes in 3 blocks\r\n==2573==   total heap usage: 3,040 allocs, 3,037 frees, 251,994 bytes allocated\r\n==2573==\r\n==2573== 7,800 (7,744 direct, 56 indirect) bytes in 1 blocks are definitely lost in loss record 3 of\\\r\n 3\r\n==2573==    at 0x4C2FB6B: malloc (vg_replace_malloc.c:299)\r\n==2573==    by 0x41AE98: eMalloc (routines.c:214)\r\n==2573==    by 0x4368EA: createToken (cxx_token.c:30)\r\n==2573==    by 0x40DD9B: objPoolGet (objpool.c:65)\r\n==2573==    by 0x4330D2: cxxParserParseNextToken (cxx_parser_tokenizer.c:1106)\r\n==2573==    by 0x42EFAA: cxxParserParseAndCondenseSubchainsUpToOneOf (cxx_parser.c:192)\r\n==2573==    by 0x42FB7E: cxxParserParseUpToOneOf (cxx_parser.c:318)\r\n==2573==    by 0x42FB7E: cxxParserParseClassStructOrUnionInternal (cxx_parser.c:956)\r\n==2573==    by 0x42FB7E: cxxParserParseClassStructOrUnion (cxx_parser.c:1337)\r\n==2573==    by 0x430B8B: cxxParserParseBlockInternal (cxx_parser_block.c:312)\r\n==2573==    by 0x430B8B: cxxParserParseBlock (cxx_parser_block.c:656)\r\n==2573==    by 0x42EF52: cxxParserMain (cxx_parser.c:1702)\r\n==2573==    by 0x418349: createTagsForFile (parse.c:2804)\r\n==2573==    by 0x418349: createTagsWithFallback1 (parse.c:2898)\r\n==2573==    by 0x41857A: createTagsWithFallback (parse.c:2982)\r\n==2573==    by 0x41857A: parseFileWithMio (parse.c:3162)\r\n==2573==    by 0x40CF01: createTagsForEntry (main.c:258)\r\n==2573==\r\n==2573== LEAK SUMMARY:\r\n==2573==    definitely lost: 7,744 bytes in 1 blocks\r\n==2573==    indirectly lost: 56 bytes in 2 blocks\r\n==2573==      possibly lost: 0 bytes in 0 blocks\r\n==2573==    still reachable: 0 bytes in 0 blocks\r\n==2573==         suppressed: 0 bytes in 0 blocks\r\n==2573==\r\n==2573== For counts of detected and suppressed errors, rerun with: -v\r\n==2573== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)\r\n```\r\n\r\n(The original input is /usr/src/debug/mingw-gcc-7.2.0-1.fc27.x86_64/gcc/gimple-ssa-sprintf.c.\r\nI wonder why .c is used for C++ source. )"}}
{"actor":{"display_login":"masatake"}}