{"action":"created","comment":{"url":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/comments/24275163","id":24275163,"diff_hunk":"@@ -459,10 +459,19 @@ else version (X86_64)\n     {\n     }\n \n+    import core.stdc.stdlib : alloca;\n+\n     ///\n-    void va_copy(out va_list dest, va_list src)\n+    void va_copy(out va_list dest, va_list src, void* storage = alloca(__va_list_tag.sizeof))","path":"src/core/stdc/stdarg.d","position":8,"original_position":8,"commit_id":"ee94dbddf7700a5e5864d485e66002e31e6fa670","original_commit_id":"ee94dbddf7700a5e5864d485e66002e31e6fa670","user":{"login":"yebblies","id":580100,"avatar_url":"https://avatars.githubusercontent.com/u/580100?v=3","gravatar_id":"","url":"https://api.github.com/users/yebblies","html_url":"https://github.com/yebblies","followers_url":"https://api.github.com/users/yebblies/followers","following_url":"https://api.github.com/users/yebblies/following{/other_user}","gists_url":"https://api.github.com/users/yebblies/gists{/gist_id}","starred_url":"https://api.github.com/users/yebblies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yebblies/subscriptions","organizations_url":"https://api.github.com/users/yebblies/orgs","repos_url":"https://api.github.com/users/yebblies/repos","events_url":"https://api.github.com/users/yebblies/events{/privacy}","received_events_url":"https://api.github.com/users/yebblies/received_events","type":"User","site_admin":false},"body":"> What's worrisome here is - this is a neat trick but could break easily. alloca is finicky and I'm note sure we have enough guarantees at the language definition level to ensure the call goes onto the callee stack.\r\n\r\nThe thing is, currently `va_copy` never works on posix 64-bit.  The alloca arg hack works.  I don't know what alloca could ever do apart from allocating in the caller's stack frame.\r\n\r\n> Unrelated tactical suggestion: (*dest).sizeof is more self-explanatory.\r\n\r\nI'm really not sure it is.  I don't want anyone looking at this code and thinking they know what it does.  The other `va_*` functions are rather nasty, and forcing any would-be modifier to go and look at the actual definitions is a good thing.\r\n\r\n> also s/out/ref/ for efficiency?\r\n\r\nThen it wouldn't match the signatures for the other platforms.","created_at":"2015-02-06T21:53:57Z","updated_at":"2015-02-06T21:53:57Z","html_url":"https://github.com/D-Programming-Language/druntime/pull/1158#discussion_r24275163","pull_request_url":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1158","_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/comments/24275163"},"html":{"href":"https://github.com/D-Programming-Language/druntime/pull/1158#discussion_r24275163"},"pull_request":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1158"}}},"pull_request":{"url":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1158","id":28800001,"html_url":"https://github.com/D-Programming-Language/druntime/pull/1158","diff_url":"https://github.com/D-Programming-Language/druntime/pull/1158.diff","patch_url":"https://github.com/D-Programming-Language/druntime/pull/1158.patch","issue_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1158","number":1158,"state":"open","locked":false,"title":"Partial fix for Issue 14131 - va_copy is broken on posix X86_64","user":{"login":"yebblies","id":580100,"avatar_url":"https://avatars.githubusercontent.com/u/580100?v=3","gravatar_id":"","url":"https://api.github.com/users/yebblies","html_url":"https://github.com/yebblies","followers_url":"https://api.github.com/users/yebblies/followers","following_url":"https://api.github.com/users/yebblies/following{/other_user}","gists_url":"https://api.github.com/users/yebblies/gists{/gist_id}","starred_url":"https://api.github.com/users/yebblies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yebblies/subscriptions","organizations_url":"https://api.github.com/users/yebblies/orgs","repos_url":"https://api.github.com/users/yebblies/repos","events_url":"https://api.github.com/users/yebblies/events{/privacy}","received_events_url":"https://api.github.com/users/yebblies/received_events","type":"User","site_admin":false},"body":"@ibuclaw @andralex \r\n\r\nThis doesn't fix the underlying problem, but by allocating new storage with alloca it allows most cases to work, which is a lot better that the current situation.\r\n\r\nhttps://issues.dlang.org/show_bug.cgi?id=14131","created_at":"2015-02-06T10:52:46Z","updated_at":"2015-02-06T21:53:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"97a962f3f13fd35b19e697b0756eb21859eddae6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1158/commits","review_comments_url":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1158/comments","review_comment_url":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/comments/{number}","comments_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1158/comments","statuses_url":"https://api.github.com/repos/D-Programming-Language/druntime/statuses/ee94dbddf7700a5e5864d485e66002e31e6fa670","head":{"label":"yebblies:va_copy","ref":"va_copy","sha":"ee94dbddf7700a5e5864d485e66002e31e6fa670","user":{"login":"yebblies","id":580100,"avatar_url":"https://avatars.githubusercontent.com/u/580100?v=3","gravatar_id":"","url":"https://api.github.com/users/yebblies","html_url":"https://github.com/yebblies","followers_url":"https://api.github.com/users/yebblies/followers","following_url":"https://api.github.com/users/yebblies/following{/other_user}","gists_url":"https://api.github.com/users/yebblies/gists{/gist_id}","starred_url":"https://api.github.com/users/yebblies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yebblies/subscriptions","organizations_url":"https://api.github.com/users/yebblies/orgs","repos_url":"https://api.github.com/users/yebblies/repos","events_url":"https://api.github.com/users/yebblies/events{/privacy}","received_events_url":"https://api.github.com/users/yebblies/received_events","type":"User","site_admin":false},"repo":{"id":1863685,"name":"druntime","full_name":"yebblies/druntime","owner":{"login":"yebblies","id":580100,"avatar_url":"https://avatars.githubusercontent.com/u/580100?v=3","gravatar_id":"","url":"https://api.github.com/users/yebblies","html_url":"https://github.com/yebblies","followers_url":"https://api.github.com/users/yebblies/followers","following_url":"https://api.github.com/users/yebblies/following{/other_user}","gists_url":"https://api.github.com/users/yebblies/gists{/gist_id}","starred_url":"https://api.github.com/users/yebblies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yebblies/subscriptions","organizations_url":"https://api.github.com/users/yebblies/orgs","repos_url":"https://api.github.com/users/yebblies/repos","events_url":"https://api.github.com/users/yebblies/events{/privacy}","received_events_url":"https://api.github.com/users/yebblies/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yebblies/druntime","description":"Low level runtime library for the D programming language","fork":true,"url":"https://api.github.com/repos/yebblies/druntime","forks_url":"https://api.github.com/repos/yebblies/druntime/forks","keys_url":"https://api.github.com/repos/yebblies/druntime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yebblies/druntime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yebblies/druntime/teams","hooks_url":"https://api.github.com/repos/yebblies/druntime/hooks","issue_events_url":"https://api.github.com/repos/yebblies/druntime/issues/events{/number}","events_url":"https://api.github.com/repos/yebblies/druntime/events","assignees_url":"https://api.github.com/repos/yebblies/druntime/assignees{/user}","branches_url":"https://api.github.com/repos/yebblies/druntime/branches{/branch}","tags_url":"https://api.github.com/repos/yebblies/druntime/tags","blobs_url":"https://api.github.com/repos/yebblies/druntime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yebblies/druntime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yebblies/druntime/git/refs{/sha}","trees_url":"https://api.github.com/repos/yebblies/druntime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yebblies/druntime/statuses/{sha}","languages_url":"https://api.github.com/repos/yebblies/druntime/languages","stargazers_url":"https://api.github.com/repos/yebblies/druntime/stargazers","contributors_url":"https://api.github.com/repos/yebblies/druntime/contributors","subscribers_url":"https://api.github.com/repos/yebblies/druntime/subscribers","subscription_url":"https://api.github.com/repos/yebblies/druntime/subscription","commits_url":"https://api.github.com/repos/yebblies/druntime/commits{/sha}","git_commits_url":"https://api.github.com/repos/yebblies/druntime/git/commits{/sha}","comments_url":"https://api.github.com/repos/yebblies/druntime/comments{/number}","issue_comment_url":"https://api.github.com/repos/yebblies/druntime/issues/comments/{number}","contents_url":"https://api.github.com/repos/yebblies/druntime/contents/{+path}","compare_url":"https://api.github.com/repos/yebblies/druntime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yebblies/druntime/merges","archive_url":"https://api.github.com/repos/yebblies/druntime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yebblies/druntime/downloads","issues_url":"https://api.github.com/repos/yebblies/druntime/issues{/number}","pulls_url":"https://api.github.com/repos/yebblies/druntime/pulls{/number}","milestones_url":"https://api.github.com/repos/yebblies/druntime/milestones{/number}","notifications_url":"https://api.github.com/repos/yebblies/druntime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yebblies/druntime/labels{/name}","releases_url":"https://api.github.com/repos/yebblies/druntime/releases{/id}","created_at":"2011-06-08T05:11:52Z","updated_at":"2015-01-24T10:46:03Z","pushed_at":"2015-02-06T12:46:51Z","git_url":"git://github.com/yebblies/druntime.git","ssh_url":"git@github.com:yebblies/druntime.git","clone_url":"https://github.com/yebblies/druntime.git","svn_url":"https://github.com/yebblies/druntime","homepage":"d-programming-language.org","size":8640,"stargazers_count":1,"watchers_count":1,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"D-Programming-Language:master","ref":"master","sha":"8c13443c436a453e01c6319f74e2e6d54f44a547","user":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"repo":{"id":1257087,"name":"druntime","full_name":"D-Programming-Language/druntime","owner":{"login":"D-Programming-Language","id":565913,"avatar_url":"https://avatars.githubusercontent.com/u/565913?v=3","gravatar_id":"","url":"https://api.github.com/users/D-Programming-Language","html_url":"https://github.com/D-Programming-Language","followers_url":"https://api.github.com/users/D-Programming-Language/followers","following_url":"https://api.github.com/users/D-Programming-Language/following{/other_user}","gists_url":"https://api.github.com/users/D-Programming-Language/gists{/gist_id}","starred_url":"https://api.github.com/users/D-Programming-Language/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/D-Programming-Language/subscriptions","organizations_url":"https://api.github.com/users/D-Programming-Language/orgs","repos_url":"https://api.github.com/users/D-Programming-Language/repos","events_url":"https://api.github.com/users/D-Programming-Language/events{/privacy}","received_events_url":"https://api.github.com/users/D-Programming-Language/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/D-Programming-Language/druntime","description":"Low level runtime library for the D programming language","fork":false,"url":"https://api.github.com/repos/D-Programming-Language/druntime","forks_url":"https://api.github.com/repos/D-Programming-Language/druntime/forks","keys_url":"https://api.github.com/repos/D-Programming-Language/druntime/keys{/key_id}","collaborators_url":"https://api.github.com/repos/D-Programming-Language/druntime/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/D-Programming-Language/druntime/teams","hooks_url":"https://api.github.com/repos/D-Programming-Language/druntime/hooks","issue_events_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/events{/number}","events_url":"https://api.github.com/repos/D-Programming-Language/druntime/events","assignees_url":"https://api.github.com/repos/D-Programming-Language/druntime/assignees{/user}","branches_url":"https://api.github.com/repos/D-Programming-Language/druntime/branches{/branch}","tags_url":"https://api.github.com/repos/D-Programming-Language/druntime/tags","blobs_url":"https://api.github.com/repos/D-Programming-Language/druntime/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/D-Programming-Language/druntime/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/D-Programming-Language/druntime/git/refs{/sha}","trees_url":"https://api.github.com/repos/D-Programming-Language/druntime/git/trees{/sha}","statuses_url":"https://api.github.com/repos/D-Programming-Language/druntime/statuses/{sha}","languages_url":"https://api.github.com/repos/D-Programming-Language/druntime/languages","stargazers_url":"https://api.github.com/repos/D-Programming-Language/druntime/stargazers","contributors_url":"https://api.github.com/repos/D-Programming-Language/druntime/contributors","subscribers_url":"https://api.github.com/repos/D-Programming-Language/druntime/subscribers","subscription_url":"https://api.github.com/repos/D-Programming-Language/druntime/subscription","commits_url":"https://api.github.com/repos/D-Programming-Language/druntime/commits{/sha}","git_commits_url":"https://api.github.com/repos/D-Programming-Language/druntime/git/commits{/sha}","comments_url":"https://api.github.com/repos/D-Programming-Language/druntime/comments{/number}","issue_comment_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues/comments/{number}","contents_url":"https://api.github.com/repos/D-Programming-Language/druntime/contents/{+path}","compare_url":"https://api.github.com/repos/D-Programming-Language/druntime/compare/{base}...{head}","merges_url":"https://api.github.com/repos/D-Programming-Language/druntime/merges","archive_url":"https://api.github.com/repos/D-Programming-Language/druntime/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/D-Programming-Language/druntime/downloads","issues_url":"https://api.github.com/repos/D-Programming-Language/druntime/issues{/number}","pulls_url":"https://api.github.com/repos/D-Programming-Language/druntime/pulls{/number}","milestones_url":"https://api.github.com/repos/D-Programming-Language/druntime/milestones{/number}","notifications_url":"https://api.github.com/repos/D-Programming-Language/druntime/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/D-Programming-Language/druntime/labels{/name}","releases_url":"https://api.github.com/repos/D-Programming-Language/druntime/releases{/id}","created_at":"2011-01-15T07:01:38Z","updated_at":"2015-02-06T16:59:15Z","pushed_at":"2015-02-06T16:59:15Z","git_url":"git://github.com/D-Programming-Language/druntime.git","ssh_url":"git@github.com:D-Programming-Language/druntime.git","clone_url":"https://github.com/D-Programming-Language/druntime.git","svn_url":"https://github.com/D-Programming-Language/druntime","homepage":"dlang.org","size":16620,"stargazers_count":345,"watchers_count":345,"language":"D","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":224,"mirror_url":null,"open_issues_count":27,"forks":224,"open_issues":27,"watchers":345,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1158"},"html":{"href":"https://github.com/D-Programming-Language/druntime/pull/1158"},"issue":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1158"},"comments":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/issues/1158/comments"},"review_comments":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1158/comments"},"review_comment":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/pulls/1158/commits"},"statuses":{"href":"https://api.github.com/repos/D-Programming-Language/druntime/statuses/ee94dbddf7700a5e5864d485e66002e31e6fa670"}}}}