{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/64601707","id":64601707,"diff_hunk":"@@ -35,37 +41,69 @@ impl RWLock {\n         //\n         // We roughly maintain the deadlocking behavior by panicking to ensure\n         // that this lock acquisition does not succeed.\n-        if r == libc::EDEADLK {\n+        //\n+        // We also check whether there this lock is already write locked. This\n+        // is only possible if it was write locked by the current thread and\n+        // the implementation allows recursive locks. The POSIX standard doesn't\n+        // require recursive locks to deadlock, but we can't allow that because","path":"src/libstd/sys/unix/rwlock.rs","position":35,"original_position":35,"commit_id":"28c6862e2257b2274dec7e17dbf4a71ef45af840","original_commit_id":"28c6862e2257b2274dec7e17dbf4a71ef45af840","user":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"body":"s/recursive locks/rwlocks/","created_at":"2016-05-25T16:06:48Z","updated_at":"2016-05-25T16:06:48Z","html_url":"https://github.com/rust-lang/rust/pull/33861#discussion_r64601707","pull_request_url":"https://api.github.com/repos/rust-lang/rust/pulls/33861","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/64601707"},"html":{"href":"https://github.com/rust-lang/rust/pull/33861#discussion_r64601707"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/33861"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/33861","id":71331407,"html_url":"https://github.com/rust-lang/rust/pull/33861","diff_url":"https://github.com/rust-lang/rust/pull/33861.diff","patch_url":"https://github.com/rust-lang/rust/pull/33861.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/33861","number":33861,"state":"open","locked":false,"title":"Make sure Mutex and RwLock can't be re-locked on the same thread","user":{"login":"Amanieu","id":278509,"avatar_url":"https://avatars.githubusercontent.com/u/278509?v=3","gravatar_id":"","url":"https://api.github.com/users/Amanieu","html_url":"https://github.com/Amanieu","followers_url":"https://api.github.com/users/Amanieu/followers","following_url":"https://api.github.com/users/Amanieu/following{/other_user}","gists_url":"https://api.github.com/users/Amanieu/gists{/gist_id}","starred_url":"https://api.github.com/users/Amanieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Amanieu/subscriptions","organizations_url":"https://api.github.com/users/Amanieu/orgs","repos_url":"https://api.github.com/users/Amanieu/repos","events_url":"https://api.github.com/users/Amanieu/events{/privacy}","received_events_url":"https://api.github.com/users/Amanieu/received_events","type":"User","site_admin":false},"body":"Fixes #33770 \r\n\r\nr? @alexcrichton ","created_at":"2016-05-25T05:11:54Z","updated_at":"2016-05-25T16:06:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef8535d1c659fc40380f66578b66ede6d53b6abc","assignee":{"login":"alexcrichton","id":64996,"avatar_url":"https://avatars.githubusercontent.com/u/64996?v=3","gravatar_id":"","url":"https://api.github.com/users/alexcrichton","html_url":"https://github.com/alexcrichton","followers_url":"https://api.github.com/users/alexcrichton/followers","following_url":"https://api.github.com/users/alexcrichton/following{/other_user}","gists_url":"https://api.github.com/users/alexcrichton/gists{/gist_id}","starred_url":"https://api.github.com/users/alexcrichton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexcrichton/subscriptions","organizations_url":"https://api.github.com/users/alexcrichton/orgs","repos_url":"https://api.github.com/users/alexcrichton/repos","events_url":"https://api.github.com/users/alexcrichton/events{/privacy}","received_events_url":"https://api.github.com/users/alexcrichton/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/33861/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/33861/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rust/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/33861/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/28c6862e2257b2274dec7e17dbf4a71ef45af840","head":{"label":"Amanieu:lock_elision_fix","ref":"lock_elision_fix","sha":"28c6862e2257b2274dec7e17dbf4a71ef45af840","user":{"login":"Amanieu","id":278509,"avatar_url":"https://avatars.githubusercontent.com/u/278509?v=3","gravatar_id":"","url":"https://api.github.com/users/Amanieu","html_url":"https://github.com/Amanieu","followers_url":"https://api.github.com/users/Amanieu/followers","following_url":"https://api.github.com/users/Amanieu/following{/other_user}","gists_url":"https://api.github.com/users/Amanieu/gists{/gist_id}","starred_url":"https://api.github.com/users/Amanieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Amanieu/subscriptions","organizations_url":"https://api.github.com/users/Amanieu/orgs","repos_url":"https://api.github.com/users/Amanieu/repos","events_url":"https://api.github.com/users/Amanieu/events{/privacy}","received_events_url":"https://api.github.com/users/Amanieu/received_events","type":"User","site_admin":false},"repo":{"id":45469588,"name":"rust","full_name":"Amanieu/rust","owner":{"login":"Amanieu","id":278509,"avatar_url":"https://avatars.githubusercontent.com/u/278509?v=3","gravatar_id":"","url":"https://api.github.com/users/Amanieu","html_url":"https://github.com/Amanieu","followers_url":"https://api.github.com/users/Amanieu/followers","following_url":"https://api.github.com/users/Amanieu/following{/other_user}","gists_url":"https://api.github.com/users/Amanieu/gists{/gist_id}","starred_url":"https://api.github.com/users/Amanieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Amanieu/subscriptions","organizations_url":"https://api.github.com/users/Amanieu/orgs","repos_url":"https://api.github.com/users/Amanieu/repos","events_url":"https://api.github.com/users/Amanieu/events{/privacy}","received_events_url":"https://api.github.com/users/Amanieu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Amanieu/rust","description":"A safe, concurrent, practical language.","fork":true,"url":"https://api.github.com/repos/Amanieu/rust","forks_url":"https://api.github.com/repos/Amanieu/rust/forks","keys_url":"https://api.github.com/repos/Amanieu/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Amanieu/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Amanieu/rust/teams","hooks_url":"https://api.github.com/repos/Amanieu/rust/hooks","issue_events_url":"https://api.github.com/repos/Amanieu/rust/issues/events{/number}","events_url":"https://api.github.com/repos/Amanieu/rust/events","assignees_url":"https://api.github.com/repos/Amanieu/rust/assignees{/user}","branches_url":"https://api.github.com/repos/Amanieu/rust/branches{/branch}","tags_url":"https://api.github.com/repos/Amanieu/rust/tags","blobs_url":"https://api.github.com/repos/Amanieu/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Amanieu/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Amanieu/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/Amanieu/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Amanieu/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/Amanieu/rust/languages","stargazers_url":"https://api.github.com/repos/Amanieu/rust/stargazers","contributors_url":"https://api.github.com/repos/Amanieu/rust/contributors","subscribers_url":"https://api.github.com/repos/Amanieu/rust/subscribers","subscription_url":"https://api.github.com/repos/Amanieu/rust/subscription","commits_url":"https://api.github.com/repos/Amanieu/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/Amanieu/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/Amanieu/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/Amanieu/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/Amanieu/rust/contents/{+path}","compare_url":"https://api.github.com/repos/Amanieu/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Amanieu/rust/merges","archive_url":"https://api.github.com/repos/Amanieu/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Amanieu/rust/downloads","issues_url":"https://api.github.com/repos/Amanieu/rust/issues{/number}","pulls_url":"https://api.github.com/repos/Amanieu/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/Amanieu/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/Amanieu/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Amanieu/rust/labels{/name}","releases_url":"https://api.github.com/repos/Amanieu/rust/releases{/id}","deployments_url":"https://api.github.com/repos/Amanieu/rust/deployments","created_at":"2015-11-03T13:52:04Z","updated_at":"2016-03-13T16:41:55Z","pushed_at":"2016-05-25T05:09:42Z","git_url":"git://github.com/Amanieu/rust.git","ssh_url":"git@github.com:Amanieu/rust.git","clone_url":"https://github.com/Amanieu/rust.git","svn_url":"https://github.com/Amanieu/rust","homepage":"http://www.rust-lang.org","size":295533,"stargazers_count":0,"watchers_count":0,"language":"Rust","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":0,"default_branch":"master"}},"base":{"label":"rust-lang:master","ref":"master","sha":"8393d99c356e51128e0125aa23a7824d6ff513b2","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":724712,"name":"rust","full_name":"rust-lang/rust","owner":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang/rust","description":"A safe, concurrent, practical language.","fork":false,"url":"https://api.github.com/repos/rust-lang/rust","forks_url":"https://api.github.com/repos/rust-lang/rust/forks","keys_url":"https://api.github.com/repos/rust-lang/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rust/teams","hooks_url":"https://api.github.com/repos/rust-lang/rust/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rust/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rust/events","assignees_url":"https://api.github.com/repos/rust-lang/rust/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rust/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rust/tags","blobs_url":"https://api.github.com/repos/rust-lang/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rust/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rust/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rust/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rust/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rust/subscription","commits_url":"https://api.github.com/repos/rust-lang/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang/rust/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rust/merges","archive_url":"https://api.github.com/repos/rust-lang/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rust/downloads","issues_url":"https://api.github.com/repos/rust-lang/rust/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rust/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rust/releases{/id}","deployments_url":"https://api.github.com/repos/rust-lang/rust/deployments","created_at":"2010-06-16T20:39:03Z","updated_at":"2016-05-25T15:43:35Z","pushed_at":"2016-05-25T14:23:02Z","git_url":"git://github.com/rust-lang/rust.git","ssh_url":"git@github.com:rust-lang/rust.git","clone_url":"https://github.com/rust-lang/rust.git","svn_url":"https://github.com/rust-lang/rust","homepage":"https://www.rust-lang.org","size":496187,"stargazers_count":16800,"watchers_count":16800,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3198,"mirror_url":null,"open_issues_count":2527,"forks":3198,"open_issues":2527,"watchers":16800,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/33861"},"html":{"href":"https://github.com/rust-lang/rust/pull/33861"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/33861"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/33861/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/33861/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/33861/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/28c6862e2257b2274dec7e17dbf4a71ef45af840"}}}}
{"actor":{"display_login":"alexcrichton"}}