{"action":"created","issue":{"url":"https://api.github.com/repos/chapel-lang/chapel/issues/1181","labels_url":"https://api.github.com/repos/chapel-lang/chapel/issues/1181/labels{/name}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/issues/1181/comments","events_url":"https://api.github.com/repos/chapel-lang/chapel/issues/1181/events","html_url":"https://github.com/chapel-lang/chapel/pull/1181","id":55780396,"number":1181,"title":"Fix valgrind regressions from the standalone parallel iterators commit","user":{"login":"daviditen","id":7740834,"avatar_url":"https://avatars.githubusercontent.com/u/7740834?v=3","gravatar_id":"","url":"https://api.github.com/users/daviditen","html_url":"https://github.com/daviditen","followers_url":"https://api.github.com/users/daviditen/followers","following_url":"https://api.github.com/users/daviditen/following{/other_user}","gists_url":"https://api.github.com/users/daviditen/gists{/gist_id}","starred_url":"https://api.github.com/users/daviditen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daviditen/subscriptions","organizations_url":"https://api.github.com/users/daviditen/orgs","repos_url":"https://api.github.com/users/daviditen/repos","events_url":"https://api.github.com/users/daviditen/events{/privacy}","received_events_url":"https://api.github.com/users/daviditen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"daviditen","id":7740834,"avatar_url":"https://avatars.githubusercontent.com/u/7740834?v=3","gravatar_id":"","url":"https://api.github.com/users/daviditen","html_url":"https://github.com/daviditen","followers_url":"https://api.github.com/users/daviditen/followers","following_url":"https://api.github.com/users/daviditen/following{/other_user}","gists_url":"https://api.github.com/users/daviditen/gists{/gist_id}","starred_url":"https://api.github.com/users/daviditen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daviditen/subscriptions","organizations_url":"https://api.github.com/users/daviditen/orgs","repos_url":"https://api.github.com/users/daviditen/repos","events_url":"https://api.github.com/users/daviditen/events{/privacy}","received_events_url":"https://api.github.com/users/daviditen/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-01-28T16:37:12Z","updated_at":"2015-01-28T19:13:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/1181","html_url":"https://github.com/chapel-lang/chapel/pull/1181","diff_url":"https://github.com/chapel-lang/chapel/pull/1181.diff","patch_url":"https://github.com/chapel-lang/chapel/pull/1181.patch"},"body":"In some cases, the defaultInitializer function for a type gets removed as\r\nunused at the end of function resolution, but the type's defaultInitializer\r\nfield is left pointing at the removed function.  Later, checkResolved looks\r\nat the defaultInitializer for some return types involving iterators.  Before\r\nremoving the function, check if it is the defaultInitializer for any type and\r\nset the defaultInitializer field for that type to NULL if it is.\r\n\r\nTested on the regressed tests with valgrind, and the whole suite with\r\nlinux64+fifo and linux64+qthreads."},"comment":{"url":"https://api.github.com/repos/chapel-lang/chapel/issues/comments/71896005","html_url":"https://github.com/chapel-lang/chapel/pull/1181#issuecomment-71896005","issue_url":"https://api.github.com/repos/chapel-lang/chapel/issues/1181","id":71896005,"user":{"login":"hildeth","id":7853742,"avatar_url":"https://avatars.githubusercontent.com/u/7853742?v=3","gravatar_id":"","url":"https://api.github.com/users/hildeth","html_url":"https://github.com/hildeth","followers_url":"https://api.github.com/users/hildeth/followers","following_url":"https://api.github.com/users/hildeth/following{/other_user}","gists_url":"https://api.github.com/users/hildeth/gists{/gist_id}","starred_url":"https://api.github.com/users/hildeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hildeth/subscriptions","organizations_url":"https://api.github.com/users/hildeth/orgs","repos_url":"https://api.github.com/users/hildeth/repos","events_url":"https://api.github.com/users/hildeth/events{/privacy}","received_events_url":"https://api.github.com/users/hildeth/received_events","type":"User","site_admin":false},"created_at":"2015-01-28T19:13:14Z","updated_at":"2015-01-28T19:13:14Z","body":"Yes. As mentioned in my reply to Lydia, iterators overload the use of that field (which is bad).  But if you can accommodate both cases (method as well as function-that-returns-a-fully-constructed-object), then you'll actually be laying the groundwork for converting _defaultOf() to a method.  So it might be worth a modicum of extra effort.  \r\nDon't get bogged down, though.  Anything that works and is appropriately commented is fine with me (relative to the magnitude of the bug).\r\nThanks."}}