{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/185134252","pull_request_review_id":116462824,"id":185134252,"diff_hunk":"@@ -0,0 +1,1195 @@\n+// Licensed to the .NET Foundation under one or more agreements.\n+// The .NET Foundation licenses this file to you under the MIT license.\n+// See the LICENSE file in the project root for more information.\n+\n+using System;\n+using System.Runtime.InteropServices;\n+\n+////////////////////////////////////////////////////////////////////////////////\n+// Types\n+////////////////////////////////////////////////////////////////////////////////\n+\n+public struct FourByteStruct \n+{\n+    public int a;\n+}\n+\n+public struct EightByteStruct\n+{\n+    public int a;\n+    public int b;\n+}\n+\n+public struct EightByteStructB\n+{\n+    public long a;\n+}\n+\n+public struct SixteenByteStruct\n+{\n+    public long a;\n+    public long b;\n+}\n+\n+public struct SixteenByteStructB\n+{\n+    public int a;\n+    public int b;\n+    public int c;\n+    public int d;\n+}\n+\n+public struct ThirtyTwoByteStruct\n+{\n+    public long a;\n+    public long b;\n+    public long c;\n+    public long d;\n+}\n+\n+public struct FourByteStructFloat\n+{\n+    public float a;\n+}\n+\n+public struct EightByteStructFloat\n+{\n+    public float a;\n+    public float b;\n+}\n+\n+public struct EightByteStructFloatB\n+{\n+    public double a;\n+}\n+\n+struct SixteenByteStructFloat\n+{\n+    public double a;\n+    public double b;\n+}\n+\n+public struct SixteenByteStructFloatB\n+{\n+    public float a;\n+    public float b;\n+    public float c;\n+    public float d;\n+}\n+\n+public struct ThirtyTwoByteStructFloat\n+{\n+    public double a;\n+    public double b;\n+    public double c;\n+    public double d;\n+}\n+\n+////////////////////////////////////////////////////////////////////////////////\n+// Main\n+////////////////////////////////////////////////////////////////////////////////\n+\n+class VarArg\n+{\n+    [DllImport(\"varargnative\", CallingConvention = CallingConvention.Cdecl)]\n+    extern static int test_passing_ints(int count, __arglist);\n+\n+    [DllImport(\"varargnative\", CallingConvention = CallingConvention.Cdecl)]\n+    extern static long test_passing_longs(int count, __arglist);\n+\n+    [DllImport(\"varargnative\", CallingConvention = CallingConvention.Cdecl)]\n+    extern static float test_passing_floats(int count, __arglist);\n+\n+    [DllImport(\"varargnative\", CallingConvention = CallingConvention.Cdecl)]\n+    extern static double test_passing_doubles(int count, __arglist);\n+\n+    [DllImport(\"varargnative\", CallingConvention = CallingConvention.Cdecl)]\n+    extern static long test_passing_int_and_longs(int int_count, int long_count, __arglist);\n+\n+    [DllImport(\"varargnative\", CallingConvention = CallingConvention.Cdecl)]\n+    extern static double test_passing_floats_and_doubles(int float_count, int double_count, __arglist);\n+\n+    [DllImport(\"varargnative\", CallingConvention = CallingConvention.Cdecl)]\n+    extern static int check_string_from_format(string expected, string format, __arglist);\n+\n+    [DllImport(\"varargnative\", CallingConvention = CallingConvention.Cdecl)]\n+    extern static int check_passing_struct(int count, __arglist);\n+\n+    [DllImport(\"msvcrt\", CallingConvention = CallingConvention.Cdecl)]\n+    extern static void printf(string s, __arglist);\n+\n+    /// <summary>\n+    /// Given an input set create an arglist to pass to a vararg C function.\n+    /// \n+    /// The C function will simply loop over the arguments, compute the sum\n+    /// then return the value.\n+    /// \n+    /// Do a quick check on the value returned, and return whether they equal.\n+    /// \n+    /// </summary>\n+    /// <param name=\"expectedValues\"></param>\n+    /// <returns>bool</returns>\n+    static bool TestPassingInts(int[] expectedValues)\n+    {\n+        int expectedSum = test_passing_ints(expectedValues.Length, __arglist(expectedValues[0], expectedValues[1], expectedValues[2], expectedValues[3]));","path":"tests/src/JIT/Directed/arglist/vararg.cs","position":134,"original_position":134,"commit_id":"b5e010c97a68980d293f44fbb386df9c5f30f820","original_commit_id":"b5e010c97a68980d293f44fbb386df9c5f30f820","user":{"login":"BruceForstall","id":10901265,"avatar_url":"https://avatars3.githubusercontent.com/u/10901265?v=4","gravatar_id":"","url":"https://api.github.com/users/BruceForstall","html_url":"https://github.com/BruceForstall","followers_url":"https://api.github.com/users/BruceForstall/followers","following_url":"https://api.github.com/users/BruceForstall/following{/other_user}","gists_url":"https://api.github.com/users/BruceForstall/gists{/gist_id}","starred_url":"https://api.github.com/users/BruceForstall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BruceForstall/subscriptions","organizations_url":"https://api.github.com/users/BruceForstall/orgs","repos_url":"https://api.github.com/users/BruceForstall/repos","events_url":"https://api.github.com/users/BruceForstall/events{/privacy}","received_events_url":"https://api.github.com/users/BruceForstall/received_events","type":"User","site_admin":false},"body":"same question applies several times below as well","created_at":"2018-04-30T23:02:38Z","updated_at":"2018-04-30T23:13:37Z","html_url":"https://github.com/dotnet/coreclr/pull/17707#discussion_r185134252","pull_request_url":"https://api.github.com/repos/dotnet/coreclr/pulls/17707","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/185134252"},"html":{"href":"https://github.com/dotnet/coreclr/pull/17707#discussion_r185134252"},"pull_request":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/17707"}},"in_reply_to_id":185134153},"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/17707","id":183158480,"html_url":"https://github.com/dotnet/coreclr/pull/17707","diff_url":"https://github.com/dotnet/coreclr/pull/17707.diff","patch_url":"https://github.com/dotnet/coreclr/pull/17707.patch","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/17707","number":17707,"state":"open","locked":false,"title":"Add native vararg test","user":{"login":"jashook","id":2723327,"avatar_url":"https://avatars0.githubusercontent.com/u/2723327?v=4","gravatar_id":"","url":"https://api.github.com/users/jashook","html_url":"https://github.com/jashook","followers_url":"https://api.github.com/users/jashook/followers","following_url":"https://api.github.com/users/jashook/following{/other_user}","gists_url":"https://api.github.com/users/jashook/gists{/gist_id}","starred_url":"https://api.github.com/users/jashook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jashook/subscriptions","organizations_url":"https://api.github.com/users/jashook/orgs","repos_url":"https://api.github.com/users/jashook/repos","events_url":"https://api.github.com/users/jashook/events{/privacy}","received_events_url":"https://api.github.com/users/jashook/received_events","type":"User","site_admin":false},"body":"This is a desktop test for x64 and x86. It will be excluded for coreclr; however, decided it is worth adding to the test tree in case we ever need the coverage.\r\n\r\nThis test will fail on full framework, open bugs are:\r\n\r\n#17702\r\n#17609","created_at":"2018-04-20T20:07:28Z","updated_at":"2018-04-30T23:13:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f8b0dfb0c417110ce4e2b50e8bb9e7e1eb5e15c3","assignee":null,"assignees":[],"requested_reviewers":[{"login":"janvorli","id":10758568,"avatar_url":"https://avatars3.githubusercontent.com/u/10758568?v=4","gravatar_id":"","url":"https://api.github.com/users/janvorli","html_url":"https://github.com/janvorli","followers_url":"https://api.github.com/users/janvorli/followers","following_url":"https://api.github.com/users/janvorli/following{/other_user}","gists_url":"https://api.github.com/users/janvorli/gists{/gist_id}","starred_url":"https://api.github.com/users/janvorli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janvorli/subscriptions","organizations_url":"https://api.github.com/users/janvorli/orgs","repos_url":"https://api.github.com/users/janvorli/repos","events_url":"https://api.github.com/users/janvorli/events{/privacy}","received_events_url":"https://api.github.com/users/janvorli/received_events","type":"User","site_admin":false},{"login":"briansull","id":11621884,"avatar_url":"https://avatars2.githubusercontent.com/u/11621884?v=4","gravatar_id":"","url":"https://api.github.com/users/briansull","html_url":"https://github.com/briansull","followers_url":"https://api.github.com/users/briansull/followers","following_url":"https://api.github.com/users/briansull/following{/other_user}","gists_url":"https://api.github.com/users/briansull/gists{/gist_id}","starred_url":"https://api.github.com/users/briansull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briansull/subscriptions","organizations_url":"https://api.github.com/users/briansull/orgs","repos_url":"https://api.github.com/users/briansull/repos","events_url":"https://api.github.com/users/briansull/events{/privacy}","received_events_url":"https://api.github.com/users/briansull/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":891894769,"url":"https://api.github.com/repos/dotnet/coreclr/labels/2%20-%20In%20Progress","name":"2 - In Progress","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/coreclr/pulls/17707/commits","review_comments_url":"https://api.github.com/repos/dotnet/coreclr/pulls/17707/comments","review_comment_url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/17707/comments","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/b5e010c97a68980d293f44fbb386df9c5f30f820","head":{"label":"jashook:add_native_vararg_test","ref":"add_native_vararg_test","sha":"b5e010c97a68980d293f44fbb386df9c5f30f820","user":{"login":"jashook","id":2723327,"avatar_url":"https://avatars0.githubusercontent.com/u/2723327?v=4","gravatar_id":"","url":"https://api.github.com/users/jashook","html_url":"https://github.com/jashook","followers_url":"https://api.github.com/users/jashook/followers","following_url":"https://api.github.com/users/jashook/following{/other_user}","gists_url":"https://api.github.com/users/jashook/gists{/gist_id}","starred_url":"https://api.github.com/users/jashook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jashook/subscriptions","organizations_url":"https://api.github.com/users/jashook/orgs","repos_url":"https://api.github.com/users/jashook/repos","events_url":"https://api.github.com/users/jashook/events{/privacy}","received_events_url":"https://api.github.com/users/jashook/received_events","type":"User","site_admin":false},"repo":{"id":49985278,"name":"coreclr","full_name":"jashook/coreclr","owner":{"login":"jashook","id":2723327,"avatar_url":"https://avatars0.githubusercontent.com/u/2723327?v=4","gravatar_id":"","url":"https://api.github.com/users/jashook","html_url":"https://github.com/jashook","followers_url":"https://api.github.com/users/jashook/followers","following_url":"https://api.github.com/users/jashook/following{/other_user}","gists_url":"https://api.github.com/users/jashook/gists{/gist_id}","starred_url":"https://api.github.com/users/jashook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jashook/subscriptions","organizations_url":"https://api.github.com/users/jashook/orgs","repos_url":"https://api.github.com/users/jashook/repos","events_url":"https://api.github.com/users/jashook/events{/privacy}","received_events_url":"https://api.github.com/users/jashook/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jashook/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR, and the base library, called mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes.","fork":true,"url":"https://api.github.com/repos/jashook/coreclr","forks_url":"https://api.github.com/repos/jashook/coreclr/forks","keys_url":"https://api.github.com/repos/jashook/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jashook/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jashook/coreclr/teams","hooks_url":"https://api.github.com/repos/jashook/coreclr/hooks","issue_events_url":"https://api.github.com/repos/jashook/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/jashook/coreclr/events","assignees_url":"https://api.github.com/repos/jashook/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/jashook/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/jashook/coreclr/tags","blobs_url":"https://api.github.com/repos/jashook/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jashook/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jashook/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/jashook/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jashook/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/jashook/coreclr/languages","stargazers_url":"https://api.github.com/repos/jashook/coreclr/stargazers","contributors_url":"https://api.github.com/repos/jashook/coreclr/contributors","subscribers_url":"https://api.github.com/repos/jashook/coreclr/subscribers","subscription_url":"https://api.github.com/repos/jashook/coreclr/subscription","commits_url":"https://api.github.com/repos/jashook/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/jashook/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/jashook/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/jashook/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/jashook/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/jashook/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jashook/coreclr/merges","archive_url":"https://api.github.com/repos/jashook/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jashook/coreclr/downloads","issues_url":"https://api.github.com/repos/jashook/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/jashook/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/jashook/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/jashook/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jashook/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/jashook/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/jashook/coreclr/deployments","created_at":"2016-01-19T21:45:03Z","updated_at":"2016-01-19T21:46:13Z","pushed_at":"2018-04-20T20:03:13Z","git_url":"git://github.com/jashook/coreclr.git","ssh_url":"git@github.com:jashook/coreclr.git","clone_url":"https://github.com/jashook/coreclr.git","svn_url":"https://github.com/jashook/coreclr","homepage":"http://dotnet.github.io/","size":216424,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"06147bcebcdf56eb7e56edfda603b77be2a751f3","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"repo":{"id":30092893,"name":"coreclr","full_name":"dotnet/coreclr","owner":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars0.githubusercontent.com/u/9141961?v=4","gravatar_id":"","url":"https://api.github.com/users/dotnet","html_url":"https://github.com/dotnet","followers_url":"https://api.github.com/users/dotnet/followers","following_url":"https://api.github.com/users/dotnet/following{/other_user}","gists_url":"https://api.github.com/users/dotnet/gists{/gist_id}","starred_url":"https://api.github.com/users/dotnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dotnet/subscriptions","organizations_url":"https://api.github.com/users/dotnet/orgs","repos_url":"https://api.github.com/users/dotnet/repos","events_url":"https://api.github.com/users/dotnet/events{/privacy}","received_events_url":"https://api.github.com/users/dotnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dotnet/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR, and the base library, called System.Private.Corelib (or mscorlib). It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes. We welcome contributions.","fork":false,"url":"https://api.github.com/repos/dotnet/coreclr","forks_url":"https://api.github.com/repos/dotnet/coreclr/forks","keys_url":"https://api.github.com/repos/dotnet/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dotnet/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dotnet/coreclr/teams","hooks_url":"https://api.github.com/repos/dotnet/coreclr/hooks","issue_events_url":"https://api.github.com/repos/dotnet/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/dotnet/coreclr/events","assignees_url":"https://api.github.com/repos/dotnet/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/dotnet/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/dotnet/coreclr/tags","blobs_url":"https://api.github.com/repos/dotnet/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dotnet/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dotnet/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/dotnet/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/dotnet/coreclr/languages","stargazers_url":"https://api.github.com/repos/dotnet/coreclr/stargazers","contributors_url":"https://api.github.com/repos/dotnet/coreclr/contributors","subscribers_url":"https://api.github.com/repos/dotnet/coreclr/subscribers","subscription_url":"https://api.github.com/repos/dotnet/coreclr/subscription","commits_url":"https://api.github.com/repos/dotnet/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/dotnet/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/dotnet/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/dotnet/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/dotnet/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/dotnet/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dotnet/coreclr/merges","archive_url":"https://api.github.com/repos/dotnet/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dotnet/coreclr/downloads","issues_url":"https://api.github.com/repos/dotnet/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/dotnet/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/dotnet/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/dotnet/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dotnet/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/dotnet/coreclr/releases{/id}","deployments_url":"https://api.github.com/repos/dotnet/coreclr/deployments","created_at":"2015-01-30T22:10:02Z","updated_at":"2018-04-30T22:51:20Z","pushed_at":"2018-04-30T23:10:13Z","git_url":"git://github.com/dotnet/coreclr.git","ssh_url":"git@github.com:dotnet/coreclr.git","clone_url":"https://github.com/dotnet/coreclr.git","svn_url":"https://github.com/dotnet/coreclr","homepage":"https://github.com/dotnet/core","size":218209,"stargazers_count":9253,"watchers_count":9253,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2319,"mirror_url":null,"archived":false,"open_issues_count":1612,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":2319,"open_issues":1612,"watchers":9253,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/17707"},"html":{"href":"https://github.com/dotnet/coreclr/pull/17707"},"issue":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/17707"},"comments":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/17707/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/17707/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/17707/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/coreclr/statuses/b5e010c97a68980d293f44fbb386df9c5f30f820"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"BruceForstall"}}