{"action":"opened","issue":{"url":"https://api.github.com/repos/vermaseren/form/issues/115","repository_url":"https://api.github.com/repos/vermaseren/form","labels_url":"https://api.github.com/repos/vermaseren/form/issues/115/labels{/name}","comments_url":"https://api.github.com/repos/vermaseren/form/issues/115/comments","events_url":"https://api.github.com/repos/vermaseren/form/issues/115/events","html_url":"https://github.com/vermaseren/form/issues/115","id":169590034,"number":115,"title":"Memory leak at .clear","user":{"login":"tueda","id":1481665,"avatar_url":"https://avatars.githubusercontent.com/u/1481665?v=3","gravatar_id":"","url":"https://api.github.com/users/tueda","html_url":"https://github.com/tueda","followers_url":"https://api.github.com/users/tueda/followers","following_url":"https://api.github.com/users/tueda/following{/other_user}","gists_url":"https://api.github.com/users/tueda/gists{/gist_id}","starred_url":"https://api.github.com/users/tueda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tueda/subscriptions","organizations_url":"https://api.github.com/users/tueda/orgs","repos_url":"https://api.github.com/users/tueda/repos","events_url":"https://api.github.com/users/tueda/events{/privacy}","received_events_url":"https://api.github.com/users/tueda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-05T11:47:29Z","updated_at":"2016-08-05T11:47:29Z","closed_at":null,"body":"```\r\n.clear\r\n.end\r\n```\r\nValgrind output:\r\n```\r\n==13020== Memcheck, a memory error detector\r\n==13020== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.\r\n==13020== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info\r\n==13020== Command: ./vorm 1.frm\r\n==13020== \r\nFORM 4.1 (Aug  5 2016, v4.1-20131025-219-g29e9d3e) 64-bits  Run: Fri Aug  5 13:36:50 2016\r\n    .clear\r\n    .end\r\n  0.03 sec out of 0.03 sec\r\n==13020== \r\n==13020== HEAP SUMMARY:\r\n==13020==     in use at exit: 387,401,024 bytes in 121 blocks\r\n==13020==   total heap usage: 1,113 allocs, 992 frees, 387,455,054 bytes allocated\r\n==13020== \r\n==13020== 8 bytes in 1 blocks are definitely lost in loss record 9 of 118\r\n==13020==    at 0x4A06A2E: malloc (vg_replace_malloc.c:270)\r\n==13020==    by 0x5AAF51: Malloc1 (tools.c:2212)\r\n==13020==    by 0x581C11: IniVars (startup.c:1257)\r\n==13020==    by 0x582681: main (startup.c:1576)\r\n==13020== \r\n==13020== 8 bytes in 1 blocks are definitely lost in loss record 10 of 118\r\n==13020==    at 0x4A06A2E: malloc (vg_replace_malloc.c:270)\r\n==13020==    by 0x5AAF51: Malloc1 (tools.c:2212)\r\n==13020==    by 0x581C27: IniVars (startup.c:1258)\r\n==13020==    by 0x582681: main (startup.c:1576)\r\n==13020== \r\n==13020== 8 bytes in 1 blocks are definitely lost in loss record 11 of 118\r\n==13020==    at 0x4A06A2E: malloc (vg_replace_malloc.c:270)\r\n==13020==    by 0x5AAF51: Malloc1 (tools.c:2212)\r\n==13020==    by 0x581C3D: IniVars (startup.c:1259)\r\n==13020==    by 0x582681: main (startup.c:1576)\r\n==13020== \r\n==13020== 8 bytes in 1 blocks are definitely lost in loss record 12 of 118\r\n==13020==    at 0x4A06A2E: malloc (vg_replace_malloc.c:270)\r\n==13020==    by 0x5AAF51: Malloc1 (tools.c:2212)\r\n==13020==    by 0x581C11: IniVars (startup.c:1257)\r\n==13020==    by 0x457228: DoExecute (execute.c:953)\r\n==13020==    by 0x47E6EE: ExecModule (module.c:274)\r\n==13020==    by 0x51BA3F: PreProcessor (pre.c:896)\r\n==13020==    by 0x5826AE: main (startup.c:1581)\r\n==13020== \r\n==13020== 8 bytes in 1 blocks are definitely lost in loss record 13 of 118\r\n==13020==    at 0x4A06A2E: malloc (vg_replace_malloc.c:270)\r\n==13020==    by 0x5AAF51: Malloc1 (tools.c:2212)\r\n==13020==    by 0x581C27: IniVars (startup.c:1258)\r\n==13020==    by 0x457228: DoExecute (execute.c:953)\r\n==13020==    by 0x47E6EE: ExecModule (module.c:274)\r\n==13020==    by 0x51BA3F: PreProcessor (pre.c:896)\r\n==13020==    by 0x5826AE: main (startup.c:1581)\r\n==13020== \r\n==13020== 8 bytes in 1 blocks are definitely lost in loss record 14 of 118\r\n==13020==    at 0x4A06A2E: malloc (vg_replace_malloc.c:270)\r\n==13020==    by 0x5AAF51: Malloc1 (tools.c:2212)\r\n==13020==    by 0x581C3D: IniVars (startup.c:1259)\r\n==13020==    by 0x457228: DoExecute (execute.c:953)\r\n==13020==    by 0x47E6EE: ExecModule (module.c:274)\r\n==13020==    by 0x51BA3F: PreProcessor (pre.c:896)\r\n==13020==    by 0x5826AE: main (startup.c:1581)\r\n==13020== \r\n==13020== LEAK SUMMARY:\r\n==13020==    definitely lost: 48 bytes in 6 blocks\r\n==13020==    indirectly lost: 0 bytes in 0 blocks\r\n==13020==      possibly lost: 0 bytes in 0 blocks\r\n==13020==    still reachable: 387,400,976 bytes in 115 blocks\r\n==13020==         suppressed: 0 bytes in 0 blocks\r\n==13020== Reachable blocks (those to which a pointer was found) are not shown.\r\n==13020== To see them, rerun with: --leak-check=full --show-reachable=yes\r\n==13020== \r\n==13020== For counts of detected and suppressed errors, rerun with: -v\r\n==13020== ERROR SUMMARY: 6 errors from 6 contexts (suppressed: 6 from 6)\r\n```\r\n\r\nAnother example:\r\n```\r\nS x1,...,x5;\r\nL F = x1+x2+x5;\r\nmultiply replace_(x1,x3+x4);\r\n.clear\r\n.end\r\n```\r\nValgrind output:\r\n```\r\n==15035== Memcheck, a memory error detector\r\n==15035== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.\r\n==15035== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info\r\n==15035== Command: ./vorm 1.frm\r\n==15035== \r\nFORM 4.1 (Aug  5 2016, v4.1-20131025-219-g29e9d3e) 64-bits  Run: Fri Aug  5 13:46:37 2016\r\n    S x1,...,x5;\r\n    L F = x1+x2+x5;\r\n    multiply replace_(x1,x3+x4);\r\n    .clear\r\n\r\nTime =       0.15 sec    Generated terms =          4\r\n               F         Terms in output =          4\r\n                         Bytes used      =        120\r\n    .end\r\n  0.19 sec out of 0.19 sec\r\n==15035== \r\n==15035== HEAP SUMMARY:\r\n==15035==     in use at exit: 390,195,864 bytes in 134 blocks\r\n==15035==   total heap usage: 1,132 allocs, 998 frees, 413,135,270 bytes allocated\r\n==15035== \r\n==15035== 8 bytes in 1 blocks are definitely lost in loss record 9 of 131\r\n==15035==    at 0x4A06A2E: malloc (vg_replace_malloc.c:270)\r\n==15035==    by 0x5AAF51: Malloc1 (tools.c:2212)\r\n==15035==    by 0x581C11: IniVars (startup.c:1257)\r\n==15035==    by 0x457228: DoExecute (execute.c:953)\r\n==15035==    by 0x47E6EE: ExecModule (module.c:274)\r\n==15035==    by 0x51BA3F: PreProcessor (pre.c:896)\r\n==15035==    by 0x5826AE: main (startup.c:1581)\r\n==15035== \r\n==15035== 8 bytes in 1 blocks are definitely lost in loss record 10 of 131\r\n==15035==    at 0x4A06A2E: malloc (vg_replace_malloc.c:270)\r\n==15035==    by 0x5AAF51: Malloc1 (tools.c:2212)\r\n==15035==    by 0x581C27: IniVars (startup.c:1258)\r\n==15035==    by 0x457228: DoExecute (execute.c:953)\r\n==15035==    by 0x47E6EE: ExecModule (module.c:274)\r\n==15035==    by 0x51BA3F: PreProcessor (pre.c:896)\r\n==15035==    by 0x5826AE: main (startup.c:1581)\r\n==15035== \r\n==15035== 8 bytes in 1 blocks are definitely lost in loss record 11 of 131\r\n==15035==    at 0x4A06A2E: malloc (vg_replace_malloc.c:270)\r\n==15035==    by 0x5AAF51: Malloc1 (tools.c:2212)\r\n==15035==    by 0x581C3D: IniVars (startup.c:1259)\r\n==15035==    by 0x457228: DoExecute (execute.c:953)\r\n==15035==    by 0x47E6EE: ExecModule (module.c:274)\r\n==15035==    by 0x51BA3F: PreProcessor (pre.c:896)\r\n==15035==    by 0x5826AE: main (startup.c:1581)\r\n==15035== \r\n==15035== 8 bytes in 1 blocks are definitely lost in loss record 12 of 131\r\n==15035==    at 0x4A06A2E: malloc (vg_replace_malloc.c:270)\r\n==15035==    by 0x5AAF51: Malloc1 (tools.c:2212)\r\n==15035==    by 0x581C11: IniVars (startup.c:1257)\r\n==15035==    by 0x582681: main (startup.c:1576)\r\n==15035== \r\n==15035== 8 bytes in 1 blocks are definitely lost in loss record 13 of 131\r\n==15035==    at 0x4A06A2E: malloc (vg_replace_malloc.c:270)\r\n==15035==    by 0x5AAF51: Malloc1 (tools.c:2212)\r\n==15035==    by 0x581C27: IniVars (startup.c:1258)\r\n==15035==    by 0x582681: main (startup.c:1576)\r\n==15035== \r\n==15035== 8 bytes in 1 blocks are definitely lost in loss record 14 of 131\r\n==15035==    at 0x4A06A2E: malloc (vg_replace_malloc.c:270)\r\n==15035==    by 0x5AAF51: Malloc1 (tools.c:2212)\r\n==15035==    by 0x581C3D: IniVars (startup.c:1259)\r\n==15035==    by 0x582681: main (startup.c:1576)\r\n==15035== \r\n==15035== 824 bytes in 1 blocks are definitely lost in loss record 100 of 131\r\n==15035==    at 0x4A06A2E: malloc (vg_replace_malloc.c:270)\r\n==15035==    by 0x5AAF51: Malloc1 (tools.c:2212)\r\n==15035==    by 0x578F2E: SplitMerge (sort.c:3184)\r\n==15035==    by 0x5719CD: EndSort (sort.c:679)\r\n==15035==    by 0x52D8EB: Processor (proces.c:431)\r\n==15035==    by 0x456FB0: DoExecute (execute.c:808)\r\n==15035==    by 0x47E6EE: ExecModule (module.c:274)\r\n==15035==    by 0x51BA3F: PreProcessor (pre.c:896)\r\n==15035==    by 0x5826AE: main (startup.c:1581)\r\n==15035== \r\n==15035== LEAK SUMMARY:\r\n==15035==    definitely lost: 872 bytes in 7 blocks\r\n==15035==    indirectly lost: 0 bytes in 0 blocks\r\n==15035==      possibly lost: 0 bytes in 0 blocks\r\n==15035==    still reachable: 390,194,992 bytes in 127 blocks\r\n==15035==         suppressed: 0 bytes in 0 blocks\r\n==15035== Reachable blocks (those to which a pointer was found) are not shown.\r\n==15035== To see them, rerun with: --leak-check=full --show-reachable=yes\r\n==15035== \r\n==15035== For counts of detected and suppressed errors, rerun with: -v\r\n==15035== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 6 from 6)\r\n```"}}
{"actor":{"display_login":"tueda"}}