{"action":"created","comment":{"url":"https://api.github.com/repos/ocaml/ocaml/pulls/comments/65370432","id":65370432,"diff_hunk":"@@ -142,15 +142,24 @@ let join_array rs =\n   let some_res = ref None in\n   for i = 0 to Array.length rs - 1 do\n     let (r, _) = rs.(i) in\n-    if r <> None then some_res := r\n+    match r with\n+    | None -> ()\n+    | Some r ->\n+      match !some_res with\n+      | None -> some_res := Some (r, Array.map (fun r -> r.typ) r)\n+      | Some (r', types) ->\n+        let types =\n+          Array.map2 (fun r typ -> Cmm.lub_component r.typ typ) r types\n+        in\n+        some_res := Some (r', types)\n   done;\n   match !some_res with\n     None -> None\n-  | Some template ->\n+  | Some (template, types) ->\n       let size_res = Array.length template in\n       let res = Array.make size_res Reg.dummy in\n       for i = 0 to size_res - 1 do\n-        res.(i) <- Reg.create template.(i).typ\n+        res.(i) <- Reg.create types.(i)\n       done;","path":"asmcomp/selectgen.ml","position":25,"original_position":25,"commit_id":"43babd869910a33a3f99b58a3e589cb07c23afc9","original_commit_id":"43babd869910a33a3f99b58a3e589cb07c23afc9","user":{"login":"mshinwell","id":1315488,"avatar_url":"https://avatars.githubusercontent.com/u/1315488?v=3","gravatar_id":"","url":"https://api.github.com/users/mshinwell","html_url":"https://github.com/mshinwell","followers_url":"https://api.github.com/users/mshinwell/followers","following_url":"https://api.github.com/users/mshinwell/following{/other_user}","gists_url":"https://api.github.com/users/mshinwell/gists{/gist_id}","starred_url":"https://api.github.com/users/mshinwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshinwell/subscriptions","organizations_url":"https://api.github.com/users/mshinwell/orgs","repos_url":"https://api.github.com/users/mshinwell/repos","events_url":"https://api.github.com/users/mshinwell/events{/privacy}","received_events_url":"https://api.github.com/users/mshinwell/received_events","type":"User","site_admin":false},"body":"I didn't really want to rewrite the existing code, so I left this as-is.","created_at":"2016-06-01T14:26:58Z","updated_at":"2016-06-01T14:26:58Z","html_url":"https://github.com/ocaml/ocaml/pull/600#discussion_r65370432","pull_request_url":"https://api.github.com/repos/ocaml/ocaml/pulls/600","_links":{"self":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/comments/65370432"},"html":{"href":"https://github.com/ocaml/ocaml/pull/600#discussion_r65370432"},"pull_request":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/600"}}},"pull_request":{"url":"https://api.github.com/repos/ocaml/ocaml/pulls/600","id":72159038,"html_url":"https://github.com/ocaml/ocaml/pull/600","diff_url":"https://github.com/ocaml/ocaml/pull/600.diff","patch_url":"https://github.com/ocaml/ocaml/pull/600.patch","issue_url":"https://api.github.com/repos/ocaml/ocaml/issues/600","number":600,"state":"open","locked":false,"title":"Ensure that register typing constraints are respected (again)","user":{"login":"mshinwell","id":1315488,"avatar_url":"https://avatars.githubusercontent.com/u/1315488?v=3","gravatar_id":"","url":"https://api.github.com/users/mshinwell","html_url":"https://github.com/mshinwell","followers_url":"https://api.github.com/users/mshinwell/followers","following_url":"https://api.github.com/users/mshinwell/following{/other_user}","gists_url":"https://api.github.com/users/mshinwell/gists{/gist_id}","starred_url":"https://api.github.com/users/mshinwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshinwell/subscriptions","organizations_url":"https://api.github.com/users/mshinwell/orgs","repos_url":"https://api.github.com/users/mshinwell/repos","events_url":"https://api.github.com/users/mshinwell/events{/privacy}","received_events_url":"https://api.github.com/users/mshinwell/received_events","type":"User","site_admin":false},"body":"Whilst trying to figure out why the GDB branch is producing wrong code, I noticed that `Selectgen.join_array` suffers from the same problem that was fixed for `Selectgen.join` in #555.  The testcase in this patch segfaults at the moment.  The fix is as for #555.","created_at":"2016-06-01T10:45:13Z","updated_at":"2016-06-01T14:26:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f45270a5439c04a9f85312f20cc4b0c90ac79e6","assignee":null,"milestone":{"url":"https://api.github.com/repos/ocaml/ocaml/milestones/2","html_url":"https://github.com/ocaml/ocaml/milestones/4.04","labels_url":"https://api.github.com/repos/ocaml/ocaml/milestones/2/labels","id":1464889,"number":2,"title":"4.04","description":"","creator":{"login":"damiendoligez","id":19104,"avatar_url":"https://avatars.githubusercontent.com/u/19104?v=3","gravatar_id":"","url":"https://api.github.com/users/damiendoligez","html_url":"https://github.com/damiendoligez","followers_url":"https://api.github.com/users/damiendoligez/followers","following_url":"https://api.github.com/users/damiendoligez/following{/other_user}","gists_url":"https://api.github.com/users/damiendoligez/gists{/gist_id}","starred_url":"https://api.github.com/users/damiendoligez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damiendoligez/subscriptions","organizations_url":"https://api.github.com/users/damiendoligez/orgs","repos_url":"https://api.github.com/users/damiendoligez/repos","events_url":"https://api.github.com/users/damiendoligez/events{/privacy}","received_events_url":"https://api.github.com/users/damiendoligez/received_events","type":"User","site_admin":false},"open_issues":83,"closed_issues":31,"state":"open","created_at":"2015-12-17T12:44:22Z","updated_at":"2016-06-01T10:45:13Z","due_on":"2016-07-10T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/ocaml/ocaml/pulls/600/commits","review_comments_url":"https://api.github.com/repos/ocaml/ocaml/pulls/600/comments","review_comment_url":"https://api.github.com/repos/ocaml/ocaml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ocaml/ocaml/issues/600/comments","statuses_url":"https://api.github.com/repos/ocaml/ocaml/statuses/43babd869910a33a3f99b58a3e589cb07c23afc9","head":{"label":"mshinwell:join_array","ref":"join_array","sha":"43babd869910a33a3f99b58a3e589cb07c23afc9","user":{"login":"mshinwell","id":1315488,"avatar_url":"https://avatars.githubusercontent.com/u/1315488?v=3","gravatar_id":"","url":"https://api.github.com/users/mshinwell","html_url":"https://github.com/mshinwell","followers_url":"https://api.github.com/users/mshinwell/followers","following_url":"https://api.github.com/users/mshinwell/following{/other_user}","gists_url":"https://api.github.com/users/mshinwell/gists{/gist_id}","starred_url":"https://api.github.com/users/mshinwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshinwell/subscriptions","organizations_url":"https://api.github.com/users/mshinwell/orgs","repos_url":"https://api.github.com/users/mshinwell/repos","events_url":"https://api.github.com/users/mshinwell/events{/privacy}","received_events_url":"https://api.github.com/users/mshinwell/received_events","type":"User","site_admin":false},"repo":{"id":8355887,"name":"ocaml","full_name":"mshinwell/ocaml","owner":{"login":"mshinwell","id":1315488,"avatar_url":"https://avatars.githubusercontent.com/u/1315488?v=3","gravatar_id":"","url":"https://api.github.com/users/mshinwell","html_url":"https://github.com/mshinwell","followers_url":"https://api.github.com/users/mshinwell/followers","following_url":"https://api.github.com/users/mshinwell/following{/other_user}","gists_url":"https://api.github.com/users/mshinwell/gists{/gist_id}","starred_url":"https://api.github.com/users/mshinwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshinwell/subscriptions","organizations_url":"https://api.github.com/users/mshinwell/orgs","repos_url":"https://api.github.com/users/mshinwell/repos","events_url":"https://api.github.com/users/mshinwell/events{/privacy}","received_events_url":"https://api.github.com/users/mshinwell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mshinwell/ocaml","description":"Read-only mirror of INRIA SVN","fork":true,"url":"https://api.github.com/repos/mshinwell/ocaml","forks_url":"https://api.github.com/repos/mshinwell/ocaml/forks","keys_url":"https://api.github.com/repos/mshinwell/ocaml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mshinwell/ocaml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mshinwell/ocaml/teams","hooks_url":"https://api.github.com/repos/mshinwell/ocaml/hooks","issue_events_url":"https://api.github.com/repos/mshinwell/ocaml/issues/events{/number}","events_url":"https://api.github.com/repos/mshinwell/ocaml/events","assignees_url":"https://api.github.com/repos/mshinwell/ocaml/assignees{/user}","branches_url":"https://api.github.com/repos/mshinwell/ocaml/branches{/branch}","tags_url":"https://api.github.com/repos/mshinwell/ocaml/tags","blobs_url":"https://api.github.com/repos/mshinwell/ocaml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mshinwell/ocaml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mshinwell/ocaml/git/refs{/sha}","trees_url":"https://api.github.com/repos/mshinwell/ocaml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mshinwell/ocaml/statuses/{sha}","languages_url":"https://api.github.com/repos/mshinwell/ocaml/languages","stargazers_url":"https://api.github.com/repos/mshinwell/ocaml/stargazers","contributors_url":"https://api.github.com/repos/mshinwell/ocaml/contributors","subscribers_url":"https://api.github.com/repos/mshinwell/ocaml/subscribers","subscription_url":"https://api.github.com/repos/mshinwell/ocaml/subscription","commits_url":"https://api.github.com/repos/mshinwell/ocaml/commits{/sha}","git_commits_url":"https://api.github.com/repos/mshinwell/ocaml/git/commits{/sha}","comments_url":"https://api.github.com/repos/mshinwell/ocaml/comments{/number}","issue_comment_url":"https://api.github.com/repos/mshinwell/ocaml/issues/comments{/number}","contents_url":"https://api.github.com/repos/mshinwell/ocaml/contents/{+path}","compare_url":"https://api.github.com/repos/mshinwell/ocaml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mshinwell/ocaml/merges","archive_url":"https://api.github.com/repos/mshinwell/ocaml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mshinwell/ocaml/downloads","issues_url":"https://api.github.com/repos/mshinwell/ocaml/issues{/number}","pulls_url":"https://api.github.com/repos/mshinwell/ocaml/pulls{/number}","milestones_url":"https://api.github.com/repos/mshinwell/ocaml/milestones{/number}","notifications_url":"https://api.github.com/repos/mshinwell/ocaml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mshinwell/ocaml/labels{/name}","releases_url":"https://api.github.com/repos/mshinwell/ocaml/releases{/id}","deployments_url":"https://api.github.com/repos/mshinwell/ocaml/deployments","created_at":"2013-02-22T11:07:50Z","updated_at":"2014-06-06T12:45:32Z","pushed_at":"2016-06-01T10:43:19Z","git_url":"git://github.com/mshinwell/ocaml.git","ssh_url":"git@github.com:mshinwell/ocaml.git","clone_url":"https://github.com/mshinwell/ocaml.git","svn_url":"https://github.com/mshinwell/ocaml","homepage":null,"size":208703,"stargazers_count":2,"watchers_count":2,"language":"OCaml","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"trunk"}},"base":{"label":"ocaml:trunk","ref":"trunk","sha":"f54c38ba0c88a74b710ff392cf466c0427dc7b26","user":{"login":"ocaml","id":1841483,"avatar_url":"https://avatars.githubusercontent.com/u/1841483?v=3","gravatar_id":"","url":"https://api.github.com/users/ocaml","html_url":"https://github.com/ocaml","followers_url":"https://api.github.com/users/ocaml/followers","following_url":"https://api.github.com/users/ocaml/following{/other_user}","gists_url":"https://api.github.com/users/ocaml/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml/subscriptions","organizations_url":"https://api.github.com/users/ocaml/orgs","repos_url":"https://api.github.com/users/ocaml/repos","events_url":"https://api.github.com/users/ocaml/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml/received_events","type":"Organization","site_admin":false},"repo":{"id":6786166,"name":"ocaml","full_name":"ocaml/ocaml","owner":{"login":"ocaml","id":1841483,"avatar_url":"https://avatars.githubusercontent.com/u/1841483?v=3","gravatar_id":"","url":"https://api.github.com/users/ocaml","html_url":"https://github.com/ocaml","followers_url":"https://api.github.com/users/ocaml/followers","following_url":"https://api.github.com/users/ocaml/following{/other_user}","gists_url":"https://api.github.com/users/ocaml/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml/subscriptions","organizations_url":"https://api.github.com/users/ocaml/orgs","repos_url":"https://api.github.com/users/ocaml/repos","events_url":"https://api.github.com/users/ocaml/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ocaml/ocaml","description":"The core OCaml system: compilers, runtime system, base libraries","fork":false,"url":"https://api.github.com/repos/ocaml/ocaml","forks_url":"https://api.github.com/repos/ocaml/ocaml/forks","keys_url":"https://api.github.com/repos/ocaml/ocaml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ocaml/ocaml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ocaml/ocaml/teams","hooks_url":"https://api.github.com/repos/ocaml/ocaml/hooks","issue_events_url":"https://api.github.com/repos/ocaml/ocaml/issues/events{/number}","events_url":"https://api.github.com/repos/ocaml/ocaml/events","assignees_url":"https://api.github.com/repos/ocaml/ocaml/assignees{/user}","branches_url":"https://api.github.com/repos/ocaml/ocaml/branches{/branch}","tags_url":"https://api.github.com/repos/ocaml/ocaml/tags","blobs_url":"https://api.github.com/repos/ocaml/ocaml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ocaml/ocaml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ocaml/ocaml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ocaml/ocaml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ocaml/ocaml/statuses/{sha}","languages_url":"https://api.github.com/repos/ocaml/ocaml/languages","stargazers_url":"https://api.github.com/repos/ocaml/ocaml/stargazers","contributors_url":"https://api.github.com/repos/ocaml/ocaml/contributors","subscribers_url":"https://api.github.com/repos/ocaml/ocaml/subscribers","subscription_url":"https://api.github.com/repos/ocaml/ocaml/subscription","commits_url":"https://api.github.com/repos/ocaml/ocaml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ocaml/ocaml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ocaml/ocaml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ocaml/ocaml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ocaml/ocaml/contents/{+path}","compare_url":"https://api.github.com/repos/ocaml/ocaml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ocaml/ocaml/merges","archive_url":"https://api.github.com/repos/ocaml/ocaml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ocaml/ocaml/downloads","issues_url":"https://api.github.com/repos/ocaml/ocaml/issues{/number}","pulls_url":"https://api.github.com/repos/ocaml/ocaml/pulls{/number}","milestones_url":"https://api.github.com/repos/ocaml/ocaml/milestones{/number}","notifications_url":"https://api.github.com/repos/ocaml/ocaml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ocaml/ocaml/labels{/name}","releases_url":"https://api.github.com/repos/ocaml/ocaml/releases{/id}","deployments_url":"https://api.github.com/repos/ocaml/ocaml/deployments","created_at":"2012-11-20T22:18:22Z","updated_at":"2016-06-01T12:39:17Z","pushed_at":"2016-06-01T10:45:13Z","git_url":"git://github.com/ocaml/ocaml.git","ssh_url":"git@github.com:ocaml/ocaml.git","clone_url":"https://github.com/ocaml/ocaml.git","svn_url":"https://github.com/ocaml/ocaml","homepage":"","size":233397,"stargazers_count":802,"watchers_count":802,"language":"OCaml","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":252,"mirror_url":null,"open_issues_count":100,"forks":252,"open_issues":100,"watchers":802,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/600"},"html":{"href":"https://github.com/ocaml/ocaml/pull/600"},"issue":{"href":"https://api.github.com/repos/ocaml/ocaml/issues/600"},"comments":{"href":"https://api.github.com/repos/ocaml/ocaml/issues/600/comments"},"review_comments":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/600/comments"},"review_comment":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/600/commits"},"statuses":{"href":"https://api.github.com/repos/ocaml/ocaml/statuses/43babd869910a33a3f99b58a3e589cb07c23afc9"}}}}
{"actor":{"display_login":"mshinwell"}}