GitHub PullRequestReviewCommentEvent at 2014-07-09 00:40:03
Repository: hhvm
Actor: tstarling
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/facebook/hhvm/pulls/comments/14688820","id":14688820,"diff_hunk":"@@ -36,9 +36,15 @@ class ZendObjectStore final : public RequestEventHandler {\n       : m_free_list_head(0)\n     {}\n \n-    virtual void requestInit() {};\n+    virtual void requestInit() {}\n     virtual void requestShutdown();\n \n+    // Defer shutdown until after other requestShutdown hooks are done\n+    // freeing their objects.\n+    virtual int priority() const {\n+      return 10;","path":"hphp/runtime/ext_zend_compat/hhvm/zend-object-store.h","position":11,"original_position":11,"commit_id":"060a6aad610aff27cc79968bd6434527ef3514b9","original_commit_id":"060a6aad610aff27cc79968bd6434527ef3514b9","user":{"login":"tstarling","id":389141,"avatar_url":"https://avatars.githubusercontent.com/u/389141?","gravatar_id":null,"url":"https://api.github.com/users/tstarling","html_url":"https://github.com/tstarling","followers_url":"https://api.github.com/users/tstarling/followers","following_url":"https://api.github.com/users/tstarling/following{/other_user}","gists_url":"https://api.github.com/users/tstarling/gists{/gist_id}","starred_url":"https://api.github.com/users/tstarling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tstarling/subscriptions","organizations_url":"https://api.github.com/users/tstarling/orgs","repos_url":"https://api.github.com/users/tstarling/repos","events_url":"https://api.github.com/users/tstarling/events{/privacy}","received_events_url":"https://api.github.com/users/tstarling/received_events","type":"User","site_admin":false},"body":"I couldn't find anything else that used this priority value, I don't know what it was introduced for. Assuming nothing else uses it, it just has to be larger than zero. I chose 10 because it's the smallest BASIC line number greater than zero. I introduced priority in my dev branch in https://github.com/tstarling/hiphop-php/commit/ba5cbeb90b73f8fe0183f32124b708014a42c781 to fix a crash.\r\n\r\nThe crash involved early destruction of ZendObjectStore::tl_instance.m_node.m_p, then recreation of the same later in the shutdown sequence due to a call to ZendObjectStore::tl_instance.get() from another shutdown handler, resulting in an assertion in ExecutionContext::registerRequestEventHandler() due to duplicate event handler registration. Note that ExecutionContext::onRequestShutdown() doesn't remove handlers after they are called, it only clears the container after they have all been called.\r\n\r\nAn alternative would be to not use RequestLocal for ZendObjectStore, and instead delete it explicitly later in hphp_context_exit().","created_at":"2014-07-09T00:40:03Z","updated_at":"2014-07-09T00:40:03Z","html_url":"https://github.com/facebook/hhvm/pull/3121#discussion_r14688820","pull_request_url":"https://api.github.com/repos/facebook/hhvm/pulls/3121","_links":{"self":{"href":"https://api.github.com/repos/facebook/hhvm/pulls/comments/14688820"},"html":{"href":"https://github.com/facebook/hhvm/pull/3121#discussion_r14688820"},"pull_request":{"href":"https://api.github.com/repos/facebook/hhvm/pulls/3121"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/hhvm/pulls/3121","id":18025246,"html_url":"https://github.com/facebook/hhvm/pull/3121","diff_url":"https://github.com/facebook/hhvm/pull/3121.diff","patch_url":"https://github.com/facebook/hhvm/pull/3121.patch","issue_url":"https://api.github.com/repos/facebook/hhvm/issues/3121","number":3121,"state":"open","title":"EZC: fix crash due to EG(exception) being transmitted between requests","user":{"login":"tstarling","id":389141,"avatar_url":"https://avatars.githubusercontent.com/u/389141?","gravatar_id":null,"url":"https://api.github.com/users/tstarling","html_url":"https://github.com/tstarling","followers_url":"https://api.github.com/users/tstarling/followers","following_url":"https://api.github.com/users/tstarling/following{/other_user}","gists_url":"https://api.github.com/users/tstarling/gists{/gist_id}","starred_url":"https://api.github.com/users/tstarling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tstarling/subscriptions","organizations_url":"https://api.github.com/users/tstarling/orgs","repos_url":"https://api.github.com/users/tstarling/repos","events_url":"https://api.github.com/users/tstarling/events{/privacy}","received_events_url":"https://api.github.com/users/tstarling/received_events","type":"User","site_admin":false},"body":"When an exception was thrown from EZC, EG(exception) was left holding a\r\nreference to the smart-allocated exception object, even after the end of\r\nthe request. At the end of the request, the object storage was freed by\r\nresetAllocator(), then when zend_wrap_func() was entered in the next\r\nrequest, EG(exception) would be freed again, causing a crash.\r\n\r\nFixed by installing request event handlers. The requestInit() handler is\r\nanalogous to Zend's init_executor().","created_at":"2014-07-07T03:03:51Z","updated_at":"2014-07-09T00:40:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"92788f8d39cfe012bafa56c4d49e5b0f52048527","assignee":{"login":"fredemmott","id":360927,"avatar_url":"https://avatars.githubusercontent.com/u/360927?","gravatar_id":"626dcba04ffe56343d03d9c4f869b75e","url":"https://api.github.com/users/fredemmott","html_url":"https://github.com/fredemmott","followers_url":"https://api.github.com/users/fredemmott/followers","following_url":"https://api.github.com/users/fredemmott/following{/other_user}","gists_url":"https://api.github.com/users/fredemmott/gists{/gist_id}","starred_url":"https://api.github.com/users/fredemmott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredemmott/subscriptions","organizations_url":"https://api.github.com/users/fredemmott/orgs","repos_url":"https://api.github.com/users/fredemmott/repos","events_url":"https://api.github.com/users/fredemmott/events{/privacy}","received_events_url":"https://api.github.com/users/fredemmott/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/facebook/hhvm/pulls/3121/commits","review_comments_url":"https://api.github.com/repos/facebook/hhvm/pulls/3121/comments","review_comment_url":"https://api.github.com/repos/facebook/hhvm/pulls/comments/{number}","comments_url":"https://api.github.com/repos/facebook/hhvm/issues/3121/comments","statuses_url":"https://api.github.com/repos/facebook/hhvm/statuses/060a6aad610aff27cc79968bd6434527ef3514b9","head":{"label":"tstarling:ezc-init-eg-exception","ref":"ezc-init-eg-exception","sha":"060a6aad610aff27cc79968bd6434527ef3514b9","user":{"login":"tstarling","id":389141,"avatar_url":"https://avatars.githubusercontent.com/u/389141?","gravatar_id":null,"url":"https://api.github.com/users/tstarling","html_url":"https://github.com/tstarling","followers_url":"https://api.github.com/users/tstarling/followers","following_url":"https://api.github.com/users/tstarling/following{/other_user}","gists_url":"https://api.github.com/users/tstarling/gists{/gist_id}","starred_url":"https://api.github.com/users/tstarling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tstarling/subscriptions","organizations_url":"https://api.github.com/users/tstarling/orgs","repos_url":"https://api.github.com/users/tstarling/repos","events_url":"https://api.github.com/users/tstarling/events{/privacy}","received_events_url":"https://api.github.com/users/tstarling/received_events","type":"User","site_admin":false},"repo":{"id":2413747,"name":"hiphop-php","full_name":"tstarling/hiphop-php","owner":{"login":"tstarling","id":389141,"avatar_url":"https://avatars.githubusercontent.com/u/389141?","gravatar_id":null,"url":"https://api.github.com/users/tstarling","html_url":"https://github.com/tstarling","followers_url":"https://api.github.com/users/tstarling/followers","following_url":"https://api.github.com/users/tstarling/following{/other_user}","gists_url":"https://api.github.com/users/tstarling/gists{/gist_id}","starred_url":"https://api.github.com/users/tstarling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tstarling/subscriptions","organizations_url":"https://api.github.com/users/tstarling/orgs","repos_url":"https://api.github.com/users/tstarling/repos","events_url":"https://api.github.com/users/tstarling/events{/privacy}","received_events_url":"https://api.github.com/users/tstarling/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tstarling/hiphop-php","description":"Source code transformer from PHP to C++","fork":true,"url":"https://api.github.com/repos/tstarling/hiphop-php","forks_url":"https://api.github.com/repos/tstarling/hiphop-php/forks","keys_url":"https://api.github.com/repos/tstarling/hiphop-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tstarling/hiphop-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tstarling/hiphop-php/teams","hooks_url":"https://api.github.com/repos/tstarling/hiphop-php/hooks","issue_events_url":"https://api.github.com/repos/tstarling/hiphop-php/issues/events{/number}","events_url":"https://api.github.com/repos/tstarling/hiphop-php/events","assignees_url":"https://api.github.com/repos/tstarling/hiphop-php/assignees{/user}","branches_url":"https://api.github.com/repos/tstarling/hiphop-php/branches{/branch}","tags_url":"https://api.github.com/repos/tstarling/hiphop-php/tags","blobs_url":"https://api.github.com/repos/tstarling/hiphop-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tstarling/hiphop-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tstarling/hiphop-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/tstarling/hiphop-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tstarling/hiphop-php/statuses/{sha}","languages_url":"https://api.github.com/repos/tstarling/hiphop-php/languages","stargazers_url":"https://api.github.com/repos/tstarling/hiphop-php/stargazers","contributors_url":"https://api.github.com/repos/tstarling/hiphop-php/contributors","subscribers_url":"https://api.github.com/repos/tstarling/hiphop-php/subscribers","subscription_url":"https://api.github.com/repos/tstarling/hiphop-php/subscription","commits_url":"https://api.github.com/repos/tstarling/hiphop-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/tstarling/hiphop-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/tstarling/hiphop-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/tstarling/hiphop-php/issues/comments/{number}","contents_url":"https://api.github.com/repos/tstarling/hiphop-php/contents/{+path}","compare_url":"https://api.github.com/repos/tstarling/hiphop-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tstarling/hiphop-php/merges","archive_url":"https://api.github.com/repos/tstarling/hiphop-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tstarling/hiphop-php/downloads","issues_url":"https://api.github.com/repos/tstarling/hiphop-php/issues{/number}","pulls_url":"https://api.github.com/repos/tstarling/hiphop-php/pulls{/number}","milestones_url":"https://api.github.com/repos/tstarling/hiphop-php/milestones{/number}","notifications_url":"https://api.github.com/repos/tstarling/hiphop-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tstarling/hiphop-php/labels{/name}","releases_url":"https://api.github.com/repos/tstarling/hiphop-php/releases{/id}","created_at":"2011-09-19T07:24:13Z","updated_at":"2014-06-25T03:06:42Z","pushed_at":"2014-07-07T11:35:14Z","git_url":"git://github.com/tstarling/hiphop-php.git","ssh_url":"git@github.com:tstarling/hiphop-php.git","clone_url":"https://github.com/tstarling/hiphop-php.git","svn_url":"https://github.com/tstarling/hiphop-php","homepage":"","size":127624,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":false,"has_downloads":false,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"e491ce7ea02d55ea35cc56f63209951d79bf1e6e","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?","gravatar_id":"18a83f753fa76b3ea0d594247f4c93b1","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":455600,"name":"hhvm","full_name":"facebook/hhvm","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?","gravatar_id":"18a83f753fa76b3ea0d594247f4c93b1","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/hhvm","description":"HHVM is an open-source virtual machine designed for executing programs written in Hack and PHP. HHVM uses a just-in-time (JIT) compilation approach to achieve superior performance while maintaining the flexibility that PHP developers are accustomed to.","fork":false,"url":"https://api.github.com/repos/facebook/hhvm","forks_url":"https://api.github.com/repos/facebook/hhvm/forks","keys_url":"https://api.github.com/repos/facebook/hhvm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/hhvm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/hhvm/teams","hooks_url":"https://api.github.com/repos/facebook/hhvm/hooks","issue_events_url":"https://api.github.com/repos/facebook/hhvm/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/hhvm/events","assignees_url":"https://api.github.com/repos/facebook/hhvm/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/hhvm/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/hhvm/tags","blobs_url":"https://api.github.com/repos/facebook/hhvm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/hhvm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/hhvm/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/hhvm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/hhvm/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/hhvm/languages","stargazers_url":"https://api.github.com/repos/facebook/hhvm/stargazers","contributors_url":"https://api.github.com/repos/facebook/hhvm/contributors","subscribers_url":"https://api.github.com/repos/facebook/hhvm/subscribers","subscription_url":"https://api.github.com/repos/facebook/hhvm/subscription","commits_url":"https://api.github.com/repos/facebook/hhvm/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/hhvm/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/hhvm/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/hhvm/issues/comments/{number}","contents_url":"https://api.github.com/repos/facebook/hhvm/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/hhvm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/hhvm/merges","archive_url":"https://api.github.com/repos/facebook/hhvm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/hhvm/downloads","issues_url":"https://api.github.com/repos/facebook/hhvm/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/hhvm/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/hhvm/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/hhvm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/hhvm/labels{/name}","releases_url":"https://api.github.com/repos/facebook/hhvm/releases{/id}","created_at":"2010-01-02T01:17:06Z","updated_at":"2014-07-08T19:14:03Z","pushed_at":"2014-07-09T00:12:03Z","git_url":"git://github.com/facebook/hhvm.git","ssh_url":"git@github.com:facebook/hhvm.git","clone_url":"https://github.com/facebook/hhvm.git","svn_url":"https://github.com/facebook/hhvm","homepage":"http://hhvm.com","size":245280,"stargazers_count":9336,"watchers_count":9336,"language":"C++","has_issues":true,"has_downloads":false,"has_wiki":true,"forks_count":1562,"mirror_url":null,"open_issues_count":321,"forks":1562,"open_issues":321,"watchers":9336,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/hhvm/pulls/3121"},"html":{"href":"https://github.com/facebook/hhvm/pull/3121"},"issue":{"href":"https://api.github.com/repos/facebook/hhvm/issues/3121"},"comments":{"href":"https://api.github.com/repos/facebook/hhvm/issues/3121/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/hhvm/pulls/3121/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/hhvm/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/facebook/hhvm/pulls/3121/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/hhvm/statuses/060a6aad610aff27cc79968bd6434527ef3514b9"}}}}