{"action":"created","issue":{"url":"https://api.github.com/repos/yanyiwu/cppjieba/issues/53","labels_url":"https://api.github.com/repos/yanyiwu/cppjieba/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/yanyiwu/cppjieba/issues/53/comments","events_url":"https://api.github.com/repos/yanyiwu/cppjieba/issues/53/events","html_url":"https://github.com/yanyiwu/cppjieba/pull/53","id":129442847,"number":53,"title":"可能存在内存泄漏？","user":{"login":"qinwf","id":7472151,"avatar_url":"https://avatars.githubusercontent.com/u/7472151?v=3","gravatar_id":"","url":"https://api.github.com/users/qinwf","html_url":"https://github.com/qinwf","followers_url":"https://api.github.com/users/qinwf/followers","following_url":"https://api.github.com/users/qinwf/following{/other_user}","gists_url":"https://api.github.com/users/qinwf/gists{/gist_id}","starred_url":"https://api.github.com/users/qinwf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qinwf/subscriptions","organizations_url":"https://api.github.com/users/qinwf/orgs","repos_url":"https://api.github.com/users/qinwf/repos","events_url":"https://api.github.com/users/qinwf/events{/privacy}","received_events_url":"https://api.github.com/users/qinwf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-01-28T12:50:51Z","updated_at":"2016-01-29T00:29:58Z","closed_at":"2016-01-29T00:28:21Z","pull_request":{"url":"https://api.github.com/repos/yanyiwu/cppjieba/pulls/53","html_url":"https://github.com/yanyiwu/cppjieba/pull/53","diff_url":"https://github.com/yanyiwu/cppjieba/pull/53.diff","patch_url":"https://github.com/yanyiwu/cppjieba/pull/53.patch"},"body":"最近R包仓库上的管理者通知代码要在 GCC 5 和 Clang 3.8 上编译的上跑测试。最近这两个编译器都带了 UBSAN 和 内存泄漏等测试。我跑 R 接口的时候发现有内存泄漏。\r\n\r\n这里改了一下 cppjieba 的 travis 和 CMakeLists.txt 的文件，在 travis 上跑，发现也有内存泄漏。\r\n\r\ntravis 运行结果 \r\n\r\nClang-3.6 with UBSAN https://travis-ci.org/qinwf/cppjieba/jobs/105404339, \r\n\r\nGCC-5 with UBSAN https://travis-ci.org/qinwf/cppjieba/jobs/105404340.\r\n\r\n具体泄漏的内容，通过 travis 上的 make test 可能看不到。直接运行 ./test/test.run ./load_test 在程序 exit 的时候就可以看到了。\r\n\r\n```\r\nTest project /cppjieba/build\r\n    Start 1: ./test/test.run\r\n1/3 Test #1: ./test/test.run ..................***Failed   29.35 sec\r\n    Start 2: ./load_test\r\n2/3 Test #2: ./load_test ......................***Failed   46.60 sec\r\n    Start 3: ./demo\r\n3/3 Test #3: ./demo ...........................   Passed    3.57 sec\r\n```"},"comment":{"url":"https://api.github.com/repos/yanyiwu/cppjieba/issues/comments/176495912","html_url":"https://github.com/yanyiwu/cppjieba/pull/53#issuecomment-176495912","issue_url":"https://api.github.com/repos/yanyiwu/cppjieba/issues/53","id":176495912,"user":{"login":"qinwf","id":7472151,"avatar_url":"https://avatars.githubusercontent.com/u/7472151?v=3","gravatar_id":"","url":"https://api.github.com/users/qinwf","html_url":"https://github.com/qinwf","followers_url":"https://api.github.com/users/qinwf/followers","following_url":"https://api.github.com/users/qinwf/following{/other_user}","gists_url":"https://api.github.com/users/qinwf/gists{/gist_id}","starred_url":"https://api.github.com/users/qinwf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qinwf/subscriptions","organizations_url":"https://api.github.com/users/qinwf/orgs","repos_url":"https://api.github.com/users/qinwf/repos","events_url":"https://api.github.com/users/qinwf/events{/privacy}","received_events_url":"https://api.github.com/users/qinwf/received_events","type":"User","site_admin":false},"created_at":"2016-01-29T00:29:58Z","updated_at":"2016-01-29T00:29:58Z","body":"old: https://travis-ci.org/yanyiwu/cppjieba/builds/105407321\r\n\r\nnew: https://travis-ci.org/yanyiwu/cppjieba/jobs/105565937"}}