{"action":"created","issue":{"url":"https://api.github.com/repos/chapel-lang/chapel/issues/2010","labels_url":"https://api.github.com/repos/chapel-lang/chapel/issues/2010/labels{/name}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/issues/2010/comments","events_url":"https://api.github.com/repos/chapel-lang/chapel/issues/2010/events","html_url":"https://github.com/chapel-lang/chapel/pull/2010","id":83162069,"number":2010,"title":"Construct, not copy, records into arg bundles.","user":{"login":"vasslitvinov","id":8039635,"avatar_url":"https://avatars.githubusercontent.com/u/8039635?v=3","gravatar_id":"","url":"https://api.github.com/users/vasslitvinov","html_url":"https://github.com/vasslitvinov","followers_url":"https://api.github.com/users/vasslitvinov/followers","following_url":"https://api.github.com/users/vasslitvinov/following{/other_user}","gists_url":"https://api.github.com/users/vasslitvinov/gists{/gist_id}","starred_url":"https://api.github.com/users/vasslitvinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasslitvinov/subscriptions","organizations_url":"https://api.github.com/users/vasslitvinov/orgs","repos_url":"https://api.github.com/users/vasslitvinov/repos","events_url":"https://api.github.com/users/vasslitvinov/events{/privacy}","received_events_url":"https://api.github.com/users/vasslitvinov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"vasslitvinov","id":8039635,"avatar_url":"https://avatars.githubusercontent.com/u/8039635?v=3","gravatar_id":"","url":"https://api.github.com/users/vasslitvinov","html_url":"https://github.com/vasslitvinov","followers_url":"https://api.github.com/users/vasslitvinov/followers","following_url":"https://api.github.com/users/vasslitvinov/following{/other_user}","gists_url":"https://api.github.com/users/vasslitvinov/gists{/gist_id}","starred_url":"https://api.github.com/users/vasslitvinov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vasslitvinov/subscriptions","organizations_url":"https://api.github.com/users/vasslitvinov/orgs","repos_url":"https://api.github.com/users/vasslitvinov/repos","events_url":"https://api.github.com/users/vasslitvinov/events{/privacy}","received_events_url":"https://api.github.com/users/vasslitvinov/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-05-31T19:08:24Z","updated_at":"2015-06-03T04:08:11Z","closed_at":"2015-06-01T20:14:34Z","pull_request":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/2010","html_url":"https://github.com/chapel-lang/chapel/pull/2010","diff_url":"https://github.com/chapel-lang/chapel/pull/2010.diff","patch_url":"https://github.com/chapel-lang/chapel/pull/2010.patch"},"body":"We used to copy records into the task functions' argument bundles\r\nusing bit copy. The exception was for 'begin' task functions,\r\nwhere we would copy-construct the record field in the argument bundle\r\nthen destruct it within the task function.\r\n\r\nThis does not work with records with non-trivial constructors/destructors.\r\nSo this change extend copy-construction+destruction to all task functions.\r\n\r\nWe retain the prior situation, i.e. avoid constructing/destructing\r\nfor cobegins/coforalls, in the following cases:\r\n\r\n* For reference-counted types, whose constructors/destructors only\r\nmanipulate the reference counter.\r\n\r\n* For the first argument of an 'on' function, which is a\r\nchpl_localeID_t dummy.\r\n\r\n* When the record is known to be a POD. Currently this is indicated\r\nwith FLAG_COMPILER_GENERATED. See also markPODtypes().\r\n\r\nIn the last two cases, there is a danger of getting into an infinite\r\nloop when a destructor has an 'on' clause. I added a comment to clarify.\r\n\r\nI had to elaborate on insertBeforeDownEndCount(autoDestroyCall)\r\nto handle these:\r\n\r\n* In some cases the task function does not have an end count.\r\n\r\n* In some cases the _downEndCount call is nested in one or more\r\nPRIM_BLOCK_LOCAL blocks. This case seems to be specific to\r\nbeing in the middle of the parallel() pass.\r\n"},"comment":{"url":"https://api.github.com/repos/chapel-lang/chapel/issues/comments/108185050","html_url":"https://github.com/chapel-lang/chapel/pull/2010#issuecomment-108185050","issue_url":"https://api.github.com/repos/chapel-lang/chapel/issues/2010","id":108185050,"user":{"login":"bradcray","id":7536222,"avatar_url":"https://avatars.githubusercontent.com/u/7536222?v=3","gravatar_id":"","url":"https://api.github.com/users/bradcray","html_url":"https://github.com/bradcray","followers_url":"https://api.github.com/users/bradcray/followers","following_url":"https://api.github.com/users/bradcray/following{/other_user}","gists_url":"https://api.github.com/users/bradcray/gists{/gist_id}","starred_url":"https://api.github.com/users/bradcray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradcray/subscriptions","organizations_url":"https://api.github.com/users/bradcray/orgs","repos_url":"https://api.github.com/users/bradcray/repos","events_url":"https://api.github.com/users/bradcray/events{/privacy}","received_events_url":"https://api.github.com/users/bradcray/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T04:08:10Z","updated_at":"2015-06-03T04:08:10Z","body":"Hi @vasslitvinov -- \r\n\r\nIs there a reason that you didn't file a test to lock in the behavior of this fix, having made it?  Seems like a recipe for backsliding...  (Did I fail to file a future in originally reporting the issue that can now be retired?  Did I only send it around by email?)  @benharsh, did you check to see if this permitted us to remove the miniMD workaround?\r\n\r\nThanks,\r\n-Brad\r\n"}}