{"action":"created","comment":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/44500797","id":44500797,"diff_hunk":"@@ -2293,11 +2297,19 @@ BOOL DelegateInvokeStubManager::TraceManager(Thread *thread, TraceDestination *t\n         if (pStub->GetPatchOffset() != 0)\n         {\n             // This stub has a hidden return buffer argument.\n+#ifdef UNIX_AMD64_ABI\n+            orDelegate = (DELEGATEREF)ObjectToOBJECTREF((Object*)(size_t)(pContext->Rsi));","path":"src/vm/stubmgr.cpp","position":18,"original_position":18,"commit_id":"ad1865ff10dd35ed8a476e4dde04b06a4b36652f","original_commit_id":"ad1865ff10dd35ed8a476e4dde04b06a4b36652f","user":{"login":"jkotas","id":6668460,"avatar_url":"https://avatars.githubusercontent.com/u/6668460?v=3","gravatar_id":"","url":"https://api.github.com/users/jkotas","html_url":"https://github.com/jkotas","followers_url":"https://api.github.com/users/jkotas/followers","following_url":"https://api.github.com/users/jkotas/following{/other_user}","gists_url":"https://api.github.com/users/jkotas/gists{/gist_id}","starred_url":"https://api.github.com/users/jkotas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkotas/subscriptions","organizations_url":"https://api.github.com/users/jkotas/orgs","repos_url":"https://api.github.com/users/jkotas/repos","events_url":"https://api.github.com/users/jkotas/events{/privacy}","received_events_url":"https://api.github.com/users/jkotas/received_events","type":"User","site_admin":false},"body":"StubManagerHelpers::GetSecondArg","created_at":"2015-11-11T04:31:00Z","updated_at":"2015-11-11T04:31:00Z","html_url":"https://github.com/dotnet/coreclr/pull/2013#discussion_r44500797","pull_request_url":"https://api.github.com/repos/dotnet/coreclr/pulls/2013","_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments/44500797"},"html":{"href":"https://github.com/dotnet/coreclr/pull/2013#discussion_r44500797"},"pull_request":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/2013"}}},"pull_request":{"url":"https://api.github.com/repos/dotnet/coreclr/pulls/2013","id":50344519,"html_url":"https://github.com/dotnet/coreclr/pull/2013","diff_url":"https://github.com/dotnet/coreclr/pull/2013.diff","patch_url":"https://github.com/dotnet/coreclr/pull/2013.patch","issue_url":"https://api.github.com/repos/dotnet/coreclr/issues/2013","number":2013,"state":"open","locked":false,"title":"Fix Thread.Start while debugging bug on OSX.","user":{"login":"mikem8361","id":10454379,"avatar_url":"https://avatars.githubusercontent.com/u/10454379?v=3","gravatar_id":"","url":"https://api.github.com/users/mikem8361","html_url":"https://github.com/mikem8361","followers_url":"https://api.github.com/users/mikem8361/followers","following_url":"https://api.github.com/users/mikem8361/following{/other_user}","gists_url":"https://api.github.com/users/mikem8361/gists{/gist_id}","starred_url":"https://api.github.com/users/mikem8361/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikem8361/subscriptions","organizations_url":"https://api.github.com/users/mikem8361/orgs","repos_url":"https://api.github.com/users/mikem8361/repos","events_url":"https://api.github.com/users/mikem8361/events{/privacy}","received_events_url":"https://api.github.com/users/mikem8361/received_events","type":"User","site_admin":false},"body":"The OSX exception logic is running on a separate thread from the one that the exception happened. The CatchHardwareExceptionHolder::IsEnabled used to check for h/w exception holders assumed it was running on the thread the exception/holders happened not the exception notification thread. Moved the h/w exception holder count to the CPalThread object instead of a TLS thread variable so the OSX exception code can check it given a CPalThread instance.\r\n\r\nThe main problem was that the stubmgr when creating a thread (for the start notification) put a breakpoint in ThePreStubPatch which is in the coreclr text section and because the h/w exception holder check was broken, it thought the breakpoint wasn't the debugger's and aborted the coreclr process.  The other part of this fix is to put a h/w exception holder around the called to ThePreStubPatch in prestub.cpp.\r\n\r\nThe stubmgr's delegate invoke subclass used the wrong registers for Linux/OSX to read the \"this\" and parameter registers. Added the proper ifdefs and registers (ecx -> rdi, rdx -> rsi) for the Unix platforms.\r\n\r\nOn both Linux and OSX, the h/w exception holder check in the exception routing logic needed to check if the int3/trap is in DBG_DebugBreak so asserts always abort/core dump. Move DBG_DebugBreak to an assembly worker so the start/end address can be used for this check.","created_at":"2015-11-11T03:33:27Z","updated_at":"2015-11-11T04:31:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99542621e6710e3d3a409ecdfc7bb6e258ef140c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dotnet/coreclr/pulls/2013/commits","review_comments_url":"https://api.github.com/repos/dotnet/coreclr/pulls/2013/comments","review_comment_url":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dotnet/coreclr/issues/2013/comments","statuses_url":"https://api.github.com/repos/dotnet/coreclr/statuses/ad1865ff10dd35ed8a476e4dde04b06a4b36652f","head":{"label":"mikem8361:createthread","ref":"createthread","sha":"ad1865ff10dd35ed8a476e4dde04b06a4b36652f","user":{"login":"mikem8361","id":10454379,"avatar_url":"https://avatars.githubusercontent.com/u/10454379?v=3","gravatar_id":"","url":"https://api.github.com/users/mikem8361","html_url":"https://github.com/mikem8361","followers_url":"https://api.github.com/users/mikem8361/followers","following_url":"https://api.github.com/users/mikem8361/following{/other_user}","gists_url":"https://api.github.com/users/mikem8361/gists{/gist_id}","starred_url":"https://api.github.com/users/mikem8361/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikem8361/subscriptions","organizations_url":"https://api.github.com/users/mikem8361/orgs","repos_url":"https://api.github.com/users/mikem8361/repos","events_url":"https://api.github.com/users/mikem8361/events{/privacy}","received_events_url":"https://api.github.com/users/mikem8361/received_events","type":"User","site_admin":false},"repo":{"id":30617310,"name":"coreclr","full_name":"mikem8361/coreclr","owner":{"login":"mikem8361","id":10454379,"avatar_url":"https://avatars.githubusercontent.com/u/10454379?v=3","gravatar_id":"","url":"https://api.github.com/users/mikem8361","html_url":"https://github.com/mikem8361","followers_url":"https://api.github.com/users/mikem8361/followers","following_url":"https://api.github.com/users/mikem8361/following{/other_user}","gists_url":"https://api.github.com/users/mikem8361/gists{/gist_id}","starred_url":"https://api.github.com/users/mikem8361/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikem8361/subscriptions","organizations_url":"https://api.github.com/users/mikem8361/orgs","repos_url":"https://api.github.com/users/mikem8361/repos","events_url":"https://api.github.com/users/mikem8361/events{/privacy}","received_events_url":"https://api.github.com/users/mikem8361/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikem8361/coreclr","description":"This repo contains the .NET Core runtime, called CoreCLR. It is an execution engine for .NET apps, performing functions such as IL byte code loading, compilation to machine code and garbage collection. The repo contains the complete up-to-date CoreCLR codebase.","fork":true,"url":"https://api.github.com/repos/mikem8361/coreclr","forks_url":"https://api.github.com/repos/mikem8361/coreclr/forks","keys_url":"https://api.github.com/repos/mikem8361/coreclr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikem8361/coreclr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikem8361/coreclr/teams","hooks_url":"https://api.github.com/repos/mikem8361/coreclr/hooks","issue_events_url":"https://api.github.com/repos/mikem8361/coreclr/issues/events{/number}","events_url":"https://api.github.com/repos/mikem8361/coreclr/events","assignees_url":"https://api.github.com/repos/mikem8361/coreclr/assignees{/user}","branches_url":"https://api.github.com/repos/mikem8361/coreclr/branches{/branch}","tags_url":"https://api.github.com/repos/mikem8361/coreclr/tags","blobs_url":"https://api.github.com/repos/mikem8361/coreclr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikem8361/coreclr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikem8361/coreclr/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikem8361/coreclr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikem8361/coreclr/statuses/{sha}","languages_url":"https://api.github.com/repos/mikem8361/coreclr/languages","stargazers_url":"https://api.github.com/repos/mikem8361/coreclr/stargazers","contributors_url":"https://api.github.com/repos/mikem8361/coreclr/contributors","subscribers_url":"https://api.github.com/repos/mikem8361/coreclr/subscribers","subscription_url":"https://api.github.com/repos/mikem8361/coreclr/subscription","commits_url":"https://api.github.com/repos/mikem8361/coreclr/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikem8361/coreclr/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikem8361/coreclr/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikem8361/coreclr/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikem8361/coreclr/contents/{+path}","compare_url":"https://api.github.com/repos/mikem8361/coreclr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikem8361/coreclr/merges","archive_url":"https://api.github.com/repos/mikem8361/coreclr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikem8361/coreclr/downloads","issues_url":"https://api.github.com/repos/mikem8361/coreclr/issues{/number}","pulls_url":"https://api.github.com/repos/mikem8361/coreclr/pulls{/number}","milestones_url":"https://api.github.com/repos/mikem8361/coreclr/milestones{/number}","notifications_url":"https://api.github.com/repos/mikem8361/coreclr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikem8361/coreclr/labels{/name}","releases_url":"https://api.github.com/repos/mikem8361/coreclr/releases{/id}","created_at":"2015-02-10T22:11:46Z","updated_at":"2015-05-02T18:49:00Z","pushed_at":"2015-11-11T01:30:09Z","git_url":"git://github.com/mikem8361/coreclr.git","ssh_url":"git@github.com:mikem8361/coreclr.git","clone_url":"https://github.com/mikem8361/coreclr.git","svn_url":"https://github.com/mikem8361/coreclr","homepage":"","size":42413,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dotnet:master","ref":"master","sha":"3615cea82c08cea385e11b0ac522cd944534c199","user":{"login":"dotnet","id":9141961,"avatar_url":"https://avatars.githubusercontent.com/u/9141961?v=3","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://avatars.githubusercontent.com/u/9141961?v=3","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 mscorlib. It includes the garbage collector, JIT compiler, base .NET data types and many low-level classes.","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}","created_at":"2015-01-30T22:10:02Z","updated_at":"2015-11-11T04:15:06Z","pushed_at":"2015-11-11T03:33:28Z","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":"http://dotnet.github.io/core/","size":78153,"stargazers_count":5368,"watchers_count":5368,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1130,"mirror_url":null,"open_issues_count":328,"forks":1130,"open_issues":328,"watchers":5368,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/2013"},"html":{"href":"https://github.com/dotnet/coreclr/pull/2013"},"issue":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/2013"},"comments":{"href":"https://api.github.com/repos/dotnet/coreclr/issues/2013/comments"},"review_comments":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/2013/comments"},"review_comment":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dotnet/coreclr/pulls/2013/commits"},"statuses":{"href":"https://api.github.com/repos/dotnet/coreclr/statuses/ad1865ff10dd35ed8a476e4dde04b06a4b36652f"}}}}