{"action":"created","comment":{"url":"https://api.github.com/repos/php/php-src/pulls/comments/73241260","id":73241260,"diff_hunk":"@@ -48,6 +48,8 @@ struct php_unserialize_data {\n \tvoid *last;\n \tvoid *first_dtor;\n \tvoid *last_dtor;\n+\tvoid *first_wakeup;","path":"ext/standard/php_var.h","position":4,"original_position":4,"commit_id":"11be29e6480a679174f5f2cf860270d796f1787c","original_commit_id":"11be29e6480a679174f5f2cf860270d796f1787c","user":{"login":"TysonAndre","id":1904430,"avatar_url":"https://avatars.githubusercontent.com/u/1904430?v=3","gravatar_id":"","url":"https://api.github.com/users/TysonAndre","html_url":"https://github.com/TysonAndre","followers_url":"https://api.github.com/users/TysonAndre/followers","following_url":"https://api.github.com/users/TysonAndre/following{/other_user}","gists_url":"https://api.github.com/users/TysonAndre/gists{/gist_id}","starred_url":"https://api.github.com/users/TysonAndre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TysonAndre/subscriptions","organizations_url":"https://api.github.com/users/TysonAndre/orgs","repos_url":"https://api.github.com/users/TysonAndre/repos","events_url":"https://api.github.com/users/TysonAndre/events{/privacy}","received_events_url":"https://api.github.com/users/TysonAndre/received_events","type":"User","site_admin":false},"body":"Could someone familiar with the php release process clarify something for me? I think that this might fall under incompatible ABI, and should instead be released in the 7.1 beta?\r\n\r\nE.g.\r\n\r\n1. An extension which uses php_serialize_data_t to call serialize is compiled against 7.0.9. A shared object is compiled.\r\n2. If this changes in 7.0.10, then that extension would break in 7.1.10 if the shared object wasn't recompiled against 7.0.10 (The struct the extension allocates on the stack only has enough space for the first 4 parameters)\r\n\r\nOr is it the case that shared objects are already expected to be recompiled every time the subversion changes?","created_at":"2016-08-02T21:28:06Z","updated_at":"2016-08-02T21:28:06Z","html_url":"https://github.com/php/php-src/pull/2004#discussion_r73241260","pull_request_url":"https://api.github.com/repos/php/php-src/pulls/2004","_links":{"self":{"href":"https://api.github.com/repos/php/php-src/pulls/comments/73241260"},"html":{"href":"https://github.com/php/php-src/pull/2004#discussion_r73241260"},"pull_request":{"href":"https://api.github.com/repos/php/php-src/pulls/2004"}}},"pull_request":{"url":"https://api.github.com/repos/php/php-src/pulls/2004","id":77761286,"html_url":"https://github.com/php/php-src/pull/2004","diff_url":"https://github.com/php/php-src/pull/2004.diff","patch_url":"https://github.com/php/php-src/pull/2004.patch","issue_url":"https://api.github.com/repos/php/php-src/issues/2004","number":2004,"state":"open","locked":false,"title":"Fix bug 72610 by deferring the calls to __wakeup to the very end.","user":{"login":"TysonAndre","id":1904430,"avatar_url":"https://avatars.githubusercontent.com/u/1904430?v=3","gravatar_id":"","url":"https://api.github.com/users/TysonAndre","html_url":"https://github.com/TysonAndre","followers_url":"https://api.github.com/users/TysonAndre/followers","following_url":"https://api.github.com/users/TysonAndre/following{/other_user}","gists_url":"https://api.github.com/users/TysonAndre/gists{/gist_id}","starred_url":"https://api.github.com/users/TysonAndre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TysonAndre/subscriptions","organizations_url":"https://api.github.com/users/TysonAndre/orgs","repos_url":"https://api.github.com/users/TysonAndre/repos","events_url":"https://api.github.com/users/TysonAndre/events{/privacy}","received_events_url":"https://api.github.com/users/TysonAndre/received_events","type":"User","site_admin":false},"body":"The PHP7 source code for all versions of php 7 was keeping **pointers**\r\nto object/array `zval`s, not copies of the object properties.\r\n\r\nThis causes [two bugs in __wakeup](https://bugs.php.net/bug.php?id=72610):\r\n\r\n- Modifying a object property (or property's property) during __wakeup will affect copies/references to that properties\r\n- If dynamic properties are added during __wakeup, pointers to other dynamic properties are invalidated\r\n\r\n\r\nThere are two ways to fix this. This PR chooses the second. (So does HHVM).\r\n\r\n- Keep copies of **all** zvals instead of pointers to zvals while\r\n  unserializing, increment reference counts.\r\n- Defer calls to __wakeup until the very end. This requires copying only\r\n  the objects of classes implementing __wakeup.\r\n  hhvm handles __wakeup this way.\r\n\r\n  https://github.com/facebook/hhvm/blob/2d5f00afbb033aec0cbc51cbe3a897af79cdcb28/hphp/runtime/base/variable-unserializer.cpp#L333\r\n  https://github.com/facebook/hhvm/blob/2d5f00afbb033aec0cbc51cbe3a897af79cdcb28/hphp/runtime/base/variable-unserializer.cpp#L965\r\n\r\nMake the publicly exposed APIs var_unserialize and var_unserialize_ex\r\nperform this finalization at the very end.\r\nMany extensions use var_unserialize to unserialize data\r\n(e.g. ext/session, or extensions outside of php-src),\r\nand this change is made in a way that shouldn't break them.\r\n\r\n- Move the inner zval deserialization code into a static method, so that\r\n  they won't accidentally be called and miss a call to __wakeup.\r\n- I can't see a use for that method right now, in extensions.","created_at":"2016-07-18T05:32:36Z","updated_at":"2016-08-02T21:28:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f404c34984fabdff35481d5edd15a5c6d314f175","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/php/php-src/pulls/2004/commits","review_comments_url":"https://api.github.com/repos/php/php-src/pulls/2004/comments","review_comment_url":"https://api.github.com/repos/php/php-src/pulls/comments{/number}","comments_url":"https://api.github.com/repos/php/php-src/issues/2004/comments","statuses_url":"https://api.github.com/repos/php/php-src/statuses/11be29e6480a679174f5f2cf860270d796f1787c","head":{"label":"TysonAndre:fix-bug-72610-unserialize-v2","ref":"fix-bug-72610-unserialize-v2","sha":"11be29e6480a679174f5f2cf860270d796f1787c","user":{"login":"TysonAndre","id":1904430,"avatar_url":"https://avatars.githubusercontent.com/u/1904430?v=3","gravatar_id":"","url":"https://api.github.com/users/TysonAndre","html_url":"https://github.com/TysonAndre","followers_url":"https://api.github.com/users/TysonAndre/followers","following_url":"https://api.github.com/users/TysonAndre/following{/other_user}","gists_url":"https://api.github.com/users/TysonAndre/gists{/gist_id}","starred_url":"https://api.github.com/users/TysonAndre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TysonAndre/subscriptions","organizations_url":"https://api.github.com/users/TysonAndre/orgs","repos_url":"https://api.github.com/users/TysonAndre/repos","events_url":"https://api.github.com/users/TysonAndre/events{/privacy}","received_events_url":"https://api.github.com/users/TysonAndre/received_events","type":"User","site_admin":false},"repo":{"id":42140356,"name":"php-src","full_name":"TysonAndre/php-src","owner":{"login":"TysonAndre","id":1904430,"avatar_url":"https://avatars.githubusercontent.com/u/1904430?v=3","gravatar_id":"","url":"https://api.github.com/users/TysonAndre","html_url":"https://github.com/TysonAndre","followers_url":"https://api.github.com/users/TysonAndre/followers","following_url":"https://api.github.com/users/TysonAndre/following{/other_user}","gists_url":"https://api.github.com/users/TysonAndre/gists{/gist_id}","starred_url":"https://api.github.com/users/TysonAndre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TysonAndre/subscriptions","organizations_url":"https://api.github.com/users/TysonAndre/orgs","repos_url":"https://api.github.com/users/TysonAndre/repos","events_url":"https://api.github.com/users/TysonAndre/events{/privacy}","received_events_url":"https://api.github.com/users/TysonAndre/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TysonAndre/php-src","description":"The PHP Interpreter","fork":true,"url":"https://api.github.com/repos/TysonAndre/php-src","forks_url":"https://api.github.com/repos/TysonAndre/php-src/forks","keys_url":"https://api.github.com/repos/TysonAndre/php-src/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TysonAndre/php-src/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TysonAndre/php-src/teams","hooks_url":"https://api.github.com/repos/TysonAndre/php-src/hooks","issue_events_url":"https://api.github.com/repos/TysonAndre/php-src/issues/events{/number}","events_url":"https://api.github.com/repos/TysonAndre/php-src/events","assignees_url":"https://api.github.com/repos/TysonAndre/php-src/assignees{/user}","branches_url":"https://api.github.com/repos/TysonAndre/php-src/branches{/branch}","tags_url":"https://api.github.com/repos/TysonAndre/php-src/tags","blobs_url":"https://api.github.com/repos/TysonAndre/php-src/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TysonAndre/php-src/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TysonAndre/php-src/git/refs{/sha}","trees_url":"https://api.github.com/repos/TysonAndre/php-src/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TysonAndre/php-src/statuses/{sha}","languages_url":"https://api.github.com/repos/TysonAndre/php-src/languages","stargazers_url":"https://api.github.com/repos/TysonAndre/php-src/stargazers","contributors_url":"https://api.github.com/repos/TysonAndre/php-src/contributors","subscribers_url":"https://api.github.com/repos/TysonAndre/php-src/subscribers","subscription_url":"https://api.github.com/repos/TysonAndre/php-src/subscription","commits_url":"https://api.github.com/repos/TysonAndre/php-src/commits{/sha}","git_commits_url":"https://api.github.com/repos/TysonAndre/php-src/git/commits{/sha}","comments_url":"https://api.github.com/repos/TysonAndre/php-src/comments{/number}","issue_comment_url":"https://api.github.com/repos/TysonAndre/php-src/issues/comments{/number}","contents_url":"https://api.github.com/repos/TysonAndre/php-src/contents/{+path}","compare_url":"https://api.github.com/repos/TysonAndre/php-src/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TysonAndre/php-src/merges","archive_url":"https://api.github.com/repos/TysonAndre/php-src/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TysonAndre/php-src/downloads","issues_url":"https://api.github.com/repos/TysonAndre/php-src/issues{/number}","pulls_url":"https://api.github.com/repos/TysonAndre/php-src/pulls{/number}","milestones_url":"https://api.github.com/repos/TysonAndre/php-src/milestones{/number}","notifications_url":"https://api.github.com/repos/TysonAndre/php-src/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TysonAndre/php-src/labels{/name}","releases_url":"https://api.github.com/repos/TysonAndre/php-src/releases{/id}","deployments_url":"https://api.github.com/repos/TysonAndre/php-src/deployments","created_at":"2015-09-08T21:36:24Z","updated_at":"2016-07-18T02:22:26Z","pushed_at":"2016-07-18T19:56:15Z","git_url":"git://github.com/TysonAndre/php-src.git","ssh_url":"git@github.com:TysonAndre/php-src.git","clone_url":"https://github.com/TysonAndre/php-src.git","svn_url":"https://github.com/TysonAndre/php-src","homepage":"http://www.php.net","size":256989,"stargazers_count":0,"watchers_count":0,"language":"C","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":"php:PHP-7.0","ref":"PHP-7.0","sha":"31cbe23a9a4a47b922cd1f6db1a393c5dbdaad36","user":{"login":"php","id":25158,"avatar_url":"https://avatars.githubusercontent.com/u/25158?v=3","gravatar_id":"","url":"https://api.github.com/users/php","html_url":"https://github.com/php","followers_url":"https://api.github.com/users/php/followers","following_url":"https://api.github.com/users/php/following{/other_user}","gists_url":"https://api.github.com/users/php/gists{/gist_id}","starred_url":"https://api.github.com/users/php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php/subscriptions","organizations_url":"https://api.github.com/users/php/orgs","repos_url":"https://api.github.com/users/php/repos","events_url":"https://api.github.com/users/php/events{/privacy}","received_events_url":"https://api.github.com/users/php/received_events","type":"Organization","site_admin":false},"repo":{"id":1903522,"name":"php-src","full_name":"php/php-src","owner":{"login":"php","id":25158,"avatar_url":"https://avatars.githubusercontent.com/u/25158?v=3","gravatar_id":"","url":"https://api.github.com/users/php","html_url":"https://github.com/php","followers_url":"https://api.github.com/users/php/followers","following_url":"https://api.github.com/users/php/following{/other_user}","gists_url":"https://api.github.com/users/php/gists{/gist_id}","starred_url":"https://api.github.com/users/php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/php/subscriptions","organizations_url":"https://api.github.com/users/php/orgs","repos_url":"https://api.github.com/users/php/repos","events_url":"https://api.github.com/users/php/events{/privacy}","received_events_url":"https://api.github.com/users/php/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/php/php-src","description":"The PHP Interpreter","fork":false,"url":"https://api.github.com/repos/php/php-src","forks_url":"https://api.github.com/repos/php/php-src/forks","keys_url":"https://api.github.com/repos/php/php-src/keys{/key_id}","collaborators_url":"https://api.github.com/repos/php/php-src/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/php/php-src/teams","hooks_url":"https://api.github.com/repos/php/php-src/hooks","issue_events_url":"https://api.github.com/repos/php/php-src/issues/events{/number}","events_url":"https://api.github.com/repos/php/php-src/events","assignees_url":"https://api.github.com/repos/php/php-src/assignees{/user}","branches_url":"https://api.github.com/repos/php/php-src/branches{/branch}","tags_url":"https://api.github.com/repos/php/php-src/tags","blobs_url":"https://api.github.com/repos/php/php-src/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/php/php-src/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/php/php-src/git/refs{/sha}","trees_url":"https://api.github.com/repos/php/php-src/git/trees{/sha}","statuses_url":"https://api.github.com/repos/php/php-src/statuses/{sha}","languages_url":"https://api.github.com/repos/php/php-src/languages","stargazers_url":"https://api.github.com/repos/php/php-src/stargazers","contributors_url":"https://api.github.com/repos/php/php-src/contributors","subscribers_url":"https://api.github.com/repos/php/php-src/subscribers","subscription_url":"https://api.github.com/repos/php/php-src/subscription","commits_url":"https://api.github.com/repos/php/php-src/commits{/sha}","git_commits_url":"https://api.github.com/repos/php/php-src/git/commits{/sha}","comments_url":"https://api.github.com/repos/php/php-src/comments{/number}","issue_comment_url":"https://api.github.com/repos/php/php-src/issues/comments{/number}","contents_url":"https://api.github.com/repos/php/php-src/contents/{+path}","compare_url":"https://api.github.com/repos/php/php-src/compare/{base}...{head}","merges_url":"https://api.github.com/repos/php/php-src/merges","archive_url":"https://api.github.com/repos/php/php-src/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/php/php-src/downloads","issues_url":"https://api.github.com/repos/php/php-src/issues{/number}","pulls_url":"https://api.github.com/repos/php/php-src/pulls{/number}","milestones_url":"https://api.github.com/repos/php/php-src/milestones{/number}","notifications_url":"https://api.github.com/repos/php/php-src/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/php/php-src/labels{/name}","releases_url":"https://api.github.com/repos/php/php-src/releases{/id}","deployments_url":"https://api.github.com/repos/php/php-src/deployments","created_at":"2011-06-16T01:52:25Z","updated_at":"2016-08-02T17:00:34Z","pushed_at":"2016-08-02T20:08:08Z","git_url":"git://github.com/php/php-src.git","ssh_url":"git@github.com:php/php-src.git","clone_url":"https://github.com/php/php-src.git","svn_url":"https://github.com/php/php-src","homepage":"http://www.php.net","size":412249,"stargazers_count":9657,"watchers_count":9657,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3388,"mirror_url":null,"open_issues_count":314,"forks":3388,"open_issues":314,"watchers":9657,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/php/php-src/pulls/2004"},"html":{"href":"https://github.com/php/php-src/pull/2004"},"issue":{"href":"https://api.github.com/repos/php/php-src/issues/2004"},"comments":{"href":"https://api.github.com/repos/php/php-src/issues/2004/comments"},"review_comments":{"href":"https://api.github.com/repos/php/php-src/pulls/2004/comments"},"review_comment":{"href":"https://api.github.com/repos/php/php-src/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/php/php-src/pulls/2004/commits"},"statuses":{"href":"https://api.github.com/repos/php/php-src/statuses/11be29e6480a679174f5f2cf860270d796f1787c"}}}}
{"actor":{"display_login":"TysonAndre"}}