{"action":"opened","issue":{"url":"https://api.github.com/repos/vermaseren/form/issues/94","repository_url":"https://api.github.com/repos/vermaseren/form","labels_url":"https://api.github.com/repos/vermaseren/form/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/vermaseren/form/issues/94/comments","events_url":"https://api.github.com/repos/vermaseren/form/issues/94/events","html_url":"https://github.com/vermaseren/form/issues/94","id":155766617,"number":94,"title":"No check for Dirac gamma matrices without any arguments","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,"milestone":null,"comments":0,"created_at":"2016-05-19T15:31:16Z","updated_at":"2016-05-19T15:31:16Z","closed_at":null,"body":"There seems no check for Dirac gamma matrices without any arguments in the input, which leads to strange results:\r\n```\r\nL F1 = 123*g5_;\r\nL F2 = 123*g6_;\r\nL F3 = 123*g7_;\r\nL F4 = 123*g_;\r\nL F5 = 123*gi_;\r\nP;\r\n.end\r\n\r\n   F1 =\r\n      123*g_(123,5_);\r\n\r\n   F2 =\r\n      123*g_(123,6_);\r\n\r\n   F3 =\r\n      123*g_(123,7_);\r\n\r\n   F4 =\r\n      123*gi_(123);\r\n\r\n   F5 =\r\n      123*gi_(123);\r\n```\r\nIt can also cause memory errors when FORM tries to write the output:\r\n```\r\nCF f;\r\nL F = f(1000*g5_);\r\nP;\r\n.end\r\n\r\n   F =\r\n==14117== Invalid read of size 8\r\n==14117==    at 0x44738A: FindIndex (dict.c:313)\r\n==14117==    by 0x5696C9: WriteSubTerm (sch.c:1845)\r\n==14117==    by 0x569E80: WriteInnerTerm (sch.c:2036)\r\n==14117==    by 0x56AB76: WriteTerm (sch.c:2365)\r\n==14117==    by 0x56AC35: WriteExpression (sch.c:2394)\r\n==14117==    by 0x5682BB: WriteArgument (sch.c:1404)\r\n==14117==    by 0x569853: WriteSubTerm (sch.c:1881)\r\n==14117==    by 0x569E50: WriteInnerTerm (sch.c:2031)\r\n==14117==    by 0x56AB76: WriteTerm (sch.c:2365)\r\n==14117==    by 0x56B24E: WriteAll (sch.c:2569)\r\n==14117==    by 0x456FA9: DoExecute (execute.c:808)\r\n==14117==    by 0x47E6DE: ExecModule (module.c:274)\r\n==14117==  Address 0x50ca798 is 9,480 bytes inside a block of size 12,800 free'd\r\n==14117==    at 0x4A06430: free (vg_replace_malloc.c:446)\r\n==14117==    by 0x5AAC30: M_free (tools.c:2333)\r\n==14117==    by 0x47FC5C: AddName (names.c:129)\r\n==14117==    by 0x4861FF: AddSet (names.c:2003)\r\n==14117==    by 0x580CEE: StartVariables (startup.c:944)\r\n==14117==    by 0x582234: main (startup.c:1472)\r\n==14117== \r\n      f(1000*g_(i_,5_));\r\n```\r\n```\r\nCF f;\r\nL F = f(10000*g5_);\r\nP;\r\n.end\r\n\r\n   F =\r\n==14163== Use of uninitialised value of size 8\r\n==14163==    at 0x56409C: StrCopy (sch.c:69)\r\n==14163==    by 0x5696DB: WriteSubTerm (sch.c:1845)\r\n==14163==    by 0x569E80: WriteInnerTerm (sch.c:2036)\r\n==14163==    by 0x56AB76: WriteTerm (sch.c:2365)\r\n==14163==    by 0x56AC35: WriteExpression (sch.c:2394)\r\n==14163==    by 0x5682BB: WriteArgument (sch.c:1404)\r\n==14163==    by 0x569853: WriteSubTerm (sch.c:1881)\r\n==14163==    by 0x569E50: WriteInnerTerm (sch.c:2031)\r\n==14163==    by 0x56AB76: WriteTerm (sch.c:2365)\r\n==14163==    by 0x56B24E: WriteAll (sch.c:2569)\r\n==14163==    by 0x456FA9: DoExecute (execute.c:808)\r\n==14163==    by 0x47E6DE: ExecModule (module.c:274)\r\n==14163== \r\n      f(10000*g_(i_,5_));\r\n```"}}