{"action":"created","comment":{"url":"https://api.github.com/repos/apache/arrow/pulls/comments/364043612","pull_request_review_id":339621431,"id":364043612,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM2NDA0MzYxMg==","diff_hunk":"@@ -14,18 +14,65 @@\n // limitations under the License.\n \n using System;\n+using System.Runtime.CompilerServices;\n using System.Runtime.InteropServices;\n \n namespace Apache.Arrow\n {\n     public static class SpanExtensions\n     {\n+        [MethodImpl(MethodImplOptions.AggressiveInlining)]\n         public static Span<T> CastTo<T>(this Span<byte> span)\n             where T: struct =>\n             MemoryMarshal.Cast<byte, T>(span);\n \n+        [MethodImpl(MethodImplOptions.AggressiveInlining)]\n         public static ReadOnlySpan<T> CastTo<T>(this ReadOnlySpan<byte> span)\n             where T: struct =>\n                 MemoryMarshal.Cast<byte, T>(span);\n+\n+\n+        [MethodImpl(MethodImplOptions.AggressiveInlining)]\n+        public static void CopyToFix<T>(this ReadOnlySpan<T> source, Span<T> target)\n+        {\n+            CopyToFix(source, 0, target, 0, source.Length);\n+        }\n+\n+        [MethodImpl(MethodImplOptions.AggressiveInlining)]\n+        public static void CopyToFix<T>(this ReadOnlySpan<T> source, T[] target)\n+        {\n+            CopyToFix(source, 0, target, 0, source.Length);\n+        }\n+\n+        [MethodImpl(MethodImplOptions.AggressiveInlining)]\n+        public static void CopyToFix<T>(this Span<T> source, Span<T> target)\n+        {\n+            CopyToFix(source, 0, target, 0, source.Length);\n+        }\n+\n+        [MethodImpl(MethodImplOptions.AggressiveInlining)]\n+        public static void CopyToFix<T>(this Memory<T> source, Memory<T> target)\n+        {\n+            CopyToFix(source.Span, 0, target.Span, 0, source.Length);\n+        }\n+\n+\n+        [MethodImpl(MethodImplOptions.AggressiveInlining)]\n+        public static void CopyToFix<T>(ReadOnlySpan<T> source, int sourceOffset, Span<T> target, int targetOffset, int length)\n+        {\n+            for (int i = 0; i < length; ++i)\n+            {\n+                target[targetOffset + i] = source[sourceOffset + i];","path":"csharp/src/Apache.Arrow/Extensions/SpanExtensions.cs","position":null,"original_position":52,"commit_id":"93259d906717d11af8f2470299b7fafff5d481cb","original_commit_id":"be3c1f7dd86469151b6344727506655fd5ce9faf","user":{"login":"abbotware","id":2100564,"node_id":"MDQ6VXNlcjIxMDA1NjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2100564?v=4","gravatar_id":"","url":"https://api.github.com/users/abbotware","html_url":"https://github.com/abbotware","followers_url":"https://api.github.com/users/abbotware/followers","following_url":"https://api.github.com/users/abbotware/following{/other_user}","gists_url":"https://api.github.com/users/abbotware/gists{/gist_id}","starred_url":"https://api.github.com/users/abbotware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbotware/subscriptions","organizations_url":"https://api.github.com/users/abbotware/orgs","repos_url":"https://api.github.com/users/abbotware/repos","events_url":"https://api.github.com/users/abbotware/events{/privacy}","received_events_url":"https://api.github.com/users/abbotware/received_events","type":"User","site_admin":false},"body":"I'll do some tests - I know the current implementation works.  With out the fix it would crash randomly with in the Arrow library - but almost immediately in the sample code i provided in: dotnet/coreclr#27590","created_at":"2020-01-08T02:44:34Z","updated_at":"2020-01-08T02:44:34Z","html_url":"https://github.com/apache/arrow/pull/6122#discussion_r364043612","pull_request_url":"https://api.github.com/repos/apache/arrow/pulls/6122","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/arrow/pulls/comments/364043612"},"html":{"href":"https://github.com/apache/arrow/pull/6122#discussion_r364043612"},"pull_request":{"href":"https://api.github.com/repos/apache/arrow/pulls/6122"}},"in_reply_to_id":363787631},"pull_request":{"url":"https://api.github.com/repos/apache/arrow/pulls/6122","id":358870609,"node_id":"MDExOlB1bGxSZXF1ZXN0MzU4ODcwNjA5","html_url":"https://github.com/apache/arrow/pull/6122","diff_url":"https://github.com/apache/arrow/pull/6122.diff","patch_url":"https://github.com/apache/arrow/pull/6122.patch","issue_url":"https://api.github.com/repos/apache/arrow/issues/6122","number":6122,"state":"open","locked":false,"title":"ARROW-7040: [C#] - System.Memory Span.CopyTo - Crashes","user":{"login":"abbotware","id":2100564,"node_id":"MDQ6VXNlcjIxMDA1NjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2100564?v=4","gravatar_id":"","url":"https://api.github.com/users/abbotware","html_url":"https://github.com/abbotware","followers_url":"https://api.github.com/users/abbotware/followers","following_url":"https://api.github.com/users/abbotware/following{/other_user}","gists_url":"https://api.github.com/users/abbotware/gists{/gist_id}","starred_url":"https://api.github.com/users/abbotware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbotware/subscriptions","organizations_url":"https://api.github.com/users/abbotware/orgs","repos_url":"https://api.github.com/users/abbotware/repos","events_url":"https://api.github.com/users/abbotware/events{/privacy}","received_events_url":"https://api.github.com/users/abbotware/received_events","type":"User","site_admin":false},"body":"Work around for random crashes due to bug in Jitter / System.Memory\r\nhttps://github.com/dotnet/coreclr/issues/27590\r\n\r\n","created_at":"2020-01-03T04:39:35Z","updated_at":"2020-01-08T02:44:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4e76287d9598d02753c46ea9247641b70e2865d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/arrow/pulls/6122/commits","review_comments_url":"https://api.github.com/repos/apache/arrow/pulls/6122/comments","review_comment_url":"https://api.github.com/repos/apache/arrow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/arrow/issues/6122/comments","statuses_url":"https://api.github.com/repos/apache/arrow/statuses/93259d906717d11af8f2470299b7fafff5d481cb","head":{"label":"abbotware:ARROW-7040","ref":"ARROW-7040","sha":"93259d906717d11af8f2470299b7fafff5d481cb","user":{"login":"abbotware","id":2100564,"node_id":"MDQ6VXNlcjIxMDA1NjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2100564?v=4","gravatar_id":"","url":"https://api.github.com/users/abbotware","html_url":"https://github.com/abbotware","followers_url":"https://api.github.com/users/abbotware/followers","following_url":"https://api.github.com/users/abbotware/following{/other_user}","gists_url":"https://api.github.com/users/abbotware/gists{/gist_id}","starred_url":"https://api.github.com/users/abbotware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbotware/subscriptions","organizations_url":"https://api.github.com/users/abbotware/orgs","repos_url":"https://api.github.com/users/abbotware/repos","events_url":"https://api.github.com/users/abbotware/events{/privacy}","received_events_url":"https://api.github.com/users/abbotware/received_events","type":"User","site_admin":false},"repo":{"id":208795392,"node_id":"MDEwOlJlcG9zaXRvcnkyMDg3OTUzOTI=","name":"arrow","full_name":"abbotware/arrow","private":false,"owner":{"login":"abbotware","id":2100564,"node_id":"MDQ6VXNlcjIxMDA1NjQ=","avatar_url":"https://avatars2.githubusercontent.com/u/2100564?v=4","gravatar_id":"","url":"https://api.github.com/users/abbotware","html_url":"https://github.com/abbotware","followers_url":"https://api.github.com/users/abbotware/followers","following_url":"https://api.github.com/users/abbotware/following{/other_user}","gists_url":"https://api.github.com/users/abbotware/gists{/gist_id}","starred_url":"https://api.github.com/users/abbotware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abbotware/subscriptions","organizations_url":"https://api.github.com/users/abbotware/orgs","repos_url":"https://api.github.com/users/abbotware/repos","events_url":"https://api.github.com/users/abbotware/events{/privacy}","received_events_url":"https://api.github.com/users/abbotware/received_events","type":"User","site_admin":false},"html_url":"https://github.com/abbotware/arrow","description":"Apache Arrow is a cross-language development platform for in-memory data. It specifies a standardized language-independent columnar memory format for flat and hierarchical data, organized for efficient analytic operations on modern hardware. It also provides computational libraries and zero-copy streaming messaging and interprocess communication. Languages currently supported include C, C++, Java, JavaScript, Python, and Ruby.","fork":true,"url":"https://api.github.com/repos/abbotware/arrow","forks_url":"https://api.github.com/repos/abbotware/arrow/forks","keys_url":"https://api.github.com/repos/abbotware/arrow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abbotware/arrow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abbotware/arrow/teams","hooks_url":"https://api.github.com/repos/abbotware/arrow/hooks","issue_events_url":"https://api.github.com/repos/abbotware/arrow/issues/events{/number}","events_url":"https://api.github.com/repos/abbotware/arrow/events","assignees_url":"https://api.github.com/repos/abbotware/arrow/assignees{/user}","branches_url":"https://api.github.com/repos/abbotware/arrow/branches{/branch}","tags_url":"https://api.github.com/repos/abbotware/arrow/tags","blobs_url":"https://api.github.com/repos/abbotware/arrow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abbotware/arrow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abbotware/arrow/git/refs{/sha}","trees_url":"https://api.github.com/repos/abbotware/arrow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abbotware/arrow/statuses/{sha}","languages_url":"https://api.github.com/repos/abbotware/arrow/languages","stargazers_url":"https://api.github.com/repos/abbotware/arrow/stargazers","contributors_url":"https://api.github.com/repos/abbotware/arrow/contributors","subscribers_url":"https://api.github.com/repos/abbotware/arrow/subscribers","subscription_url":"https://api.github.com/repos/abbotware/arrow/subscription","commits_url":"https://api.github.com/repos/abbotware/arrow/commits{/sha}","git_commits_url":"https://api.github.com/repos/abbotware/arrow/git/commits{/sha}","comments_url":"https://api.github.com/repos/abbotware/arrow/comments{/number}","issue_comment_url":"https://api.github.com/repos/abbotware/arrow/issues/comments{/number}","contents_url":"https://api.github.com/repos/abbotware/arrow/contents/{+path}","compare_url":"https://api.github.com/repos/abbotware/arrow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abbotware/arrow/merges","archive_url":"https://api.github.com/repos/abbotware/arrow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abbotware/arrow/downloads","issues_url":"https://api.github.com/repos/abbotware/arrow/issues{/number}","pulls_url":"https://api.github.com/repos/abbotware/arrow/pulls{/number}","milestones_url":"https://api.github.com/repos/abbotware/arrow/milestones{/number}","notifications_url":"https://api.github.com/repos/abbotware/arrow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abbotware/arrow/labels{/name}","releases_url":"https://api.github.com/repos/abbotware/arrow/releases{/id}","deployments_url":"https://api.github.com/repos/abbotware/arrow/deployments","created_at":"2019-09-16T12:34:31Z","updated_at":"2020-01-03T02:18:35Z","pushed_at":"2020-01-08T02:37:20Z","git_url":"git://github.com/abbotware/arrow.git","ssh_url":"git@github.com:abbotware/arrow.git","clone_url":"https://github.com/abbotware/arrow.git","svn_url":"https://github.com/abbotware/arrow","homepage":"https://arrow.apache.org","size":42301,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"096c78c91b3d8fa278f86db2dc207bbfd3bfda0d","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":51905353,"node_id":"MDEwOlJlcG9zaXRvcnk1MTkwNTM1Mw==","name":"arrow","full_name":"apache/arrow","private":false,"owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/apache/arrow","description":"Apache Arrow is a cross-language development platform for in-memory data. It specifies a standardized language-independent columnar memory format for flat and hierarchical data, organized for efficient analytic operations on modern hardware. It also provides computational libraries and zero-copy streaming messaging and interprocess communication. Languages currently supported include C, C++, Java, JavaScript, Python, and Ruby.","fork":false,"url":"https://api.github.com/repos/apache/arrow","forks_url":"https://api.github.com/repos/apache/arrow/forks","keys_url":"https://api.github.com/repos/apache/arrow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/arrow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/arrow/teams","hooks_url":"https://api.github.com/repos/apache/arrow/hooks","issue_events_url":"https://api.github.com/repos/apache/arrow/issues/events{/number}","events_url":"https://api.github.com/repos/apache/arrow/events","assignees_url":"https://api.github.com/repos/apache/arrow/assignees{/user}","branches_url":"https://api.github.com/repos/apache/arrow/branches{/branch}","tags_url":"https://api.github.com/repos/apache/arrow/tags","blobs_url":"https://api.github.com/repos/apache/arrow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/arrow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/arrow/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/arrow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/arrow/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/arrow/languages","stargazers_url":"https://api.github.com/repos/apache/arrow/stargazers","contributors_url":"https://api.github.com/repos/apache/arrow/contributors","subscribers_url":"https://api.github.com/repos/apache/arrow/subscribers","subscription_url":"https://api.github.com/repos/apache/arrow/subscription","commits_url":"https://api.github.com/repos/apache/arrow/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/arrow/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/arrow/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/arrow/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/arrow/contents/{+path}","compare_url":"https://api.github.com/repos/apache/arrow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/arrow/merges","archive_url":"https://api.github.com/repos/apache/arrow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/arrow/downloads","issues_url":"https://api.github.com/repos/apache/arrow/issues{/number}","pulls_url":"https://api.github.com/repos/apache/arrow/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/arrow/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/arrow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/arrow/labels{/name}","releases_url":"https://api.github.com/repos/apache/arrow/releases{/id}","deployments_url":"https://api.github.com/repos/apache/arrow/deployments","created_at":"2016-02-17T08:00:23Z","updated_at":"2020-01-07T23:47:49Z","pushed_at":"2020-01-08T02:37:23Z","git_url":"git://github.com/apache/arrow.git","ssh_url":"git@github.com:apache/arrow.git","clone_url":"https://github.com/apache/arrow.git","svn_url":"https://github.com/apache/arrow","homepage":"https://arrow.apache.org","size":42444,"stargazers_count":4940,"watchers_count":4940,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1240,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":81,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1240,"open_issues":81,"watchers":4940,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/arrow/pulls/6122"},"html":{"href":"https://github.com/apache/arrow/pull/6122"},"issue":{"href":"https://api.github.com/repos/apache/arrow/issues/6122"},"comments":{"href":"https://api.github.com/repos/apache/arrow/issues/6122/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/arrow/pulls/6122/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/arrow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/arrow/pulls/6122/commits"},"statuses":{"href":"https://api.github.com/repos/apache/arrow/statuses/93259d906717d11af8f2470299b7fafff5d481cb"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"abbotware"}}