{"action":"closed","issue":{"url":"https://api.github.com/repos/sebastianbergmann/php-code-coverage/issues/474","repository_url":"https://api.github.com/repos/sebastianbergmann/php-code-coverage","labels_url":"https://api.github.com/repos/sebastianbergmann/php-code-coverage/issues/474/labels{/name}","comments_url":"https://api.github.com/repos/sebastianbergmann/php-code-coverage/issues/474/comments","events_url":"https://api.github.com/repos/sebastianbergmann/php-code-coverage/issues/474/events","html_url":"https://github.com/sebastianbergmann/php-code-coverage/issues/474","id":184235958,"number":474,"title":"Out of memory errors with phpdbg coverage","user":{"login":"yuloh","id":9440455,"avatar_url":"https://avatars.githubusercontent.com/u/9440455?v=3","gravatar_id":"","url":"https://api.github.com/users/yuloh","html_url":"https://github.com/yuloh","followers_url":"https://api.github.com/users/yuloh/followers","following_url":"https://api.github.com/users/yuloh/following{/other_user}","gists_url":"https://api.github.com/users/yuloh/gists{/gist_id}","starred_url":"https://api.github.com/users/yuloh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuloh/subscriptions","organizations_url":"https://api.github.com/users/yuloh/orgs","repos_url":"https://api.github.com/users/yuloh/repos","events_url":"https://api.github.com/users/yuloh/events{/privacy}","received_events_url":"https://api.github.com/users/yuloh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-20T13:53:01Z","updated_at":"2016-10-20T14:10:01Z","closed_at":"2016-10-20T14:10:01Z","body":"Hello,\r\n\r\nWhile generating coverage data with phpdbg, I am experiencing an issue where php's memory usage climbs exponentially until exhaustion.  This only happens in some cases and depends on the code being tested or executed in the test.\r\n\r\nReproduction steps:\r\n\r\n```bash\r\ngit clone https://github.com/yuloh/phpdbg-bug-demo/tree/fix-test\r\ncd phpdbg-bug-demo\r\ncomposer install\r\nphpdbg -qrr vendor/bin/phpunit --coverage-text\r\n```\r\n\r\nExpected results:\r\n\r\nThe tests should run and generate coverage.\r\n\r\nActual results:\r\n\r\nIf the `memory_limit` is set, the tests will quickly reach the memory limit and the process is killed.\r\nIf the `memory_limit` is set to `-1`, the tests will slowly consume more memory while using > 90% CPU.\r\n\r\nI raised the issue with phpdbg here:\r\n\r\nhttps://github.com/krakjoe/phpdbg/issues/159\r\n\r\nif I'm understanding correctly, phpdbg's oplog is being passed `SebastianBergmann\\RecursionContext\\Context::containsArray`.  The call itself generates more opcodes, causing an infinite loop."}}
{"actor":{"display_login":"yuloh"}}