{"action":"created","issue":{"url":"https://api.github.com/repos/mongodb/mongo-php-driver/issues/173","labels_url":"https://api.github.com/repos/mongodb/mongo-php-driver/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/mongodb/mongo-php-driver/issues/173/comments","events_url":"https://api.github.com/repos/mongodb/mongo-php-driver/issues/173/events","html_url":"https://github.com/mongodb/mongo-php-driver/issues/173","id":122610285,"number":173,"title":"Segmentation fault when creating Manager with empty arguments","user":{"login":"jeremyjannotta","id":423937,"avatar_url":"https://avatars.githubusercontent.com/u/423937?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremyjannotta","html_url":"https://github.com/jeremyjannotta","followers_url":"https://api.github.com/users/jeremyjannotta/followers","following_url":"https://api.github.com/users/jeremyjannotta/following{/other_user}","gists_url":"https://api.github.com/users/jeremyjannotta/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremyjannotta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremyjannotta/subscriptions","organizations_url":"https://api.github.com/users/jeremyjannotta/orgs","repos_url":"https://api.github.com/users/jeremyjannotta/repos","events_url":"https://api.github.com/users/jeremyjannotta/events{/privacy}","received_events_url":"https://api.github.com/users/jeremyjannotta/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-16T21:48:50Z","updated_at":"2015-12-28T15:47:46Z","closed_at":null,"body":"When executing phpunit to instantiate a Manager, I am seeing a consistent segmentation fault error like this:\r\n```\r\n/usr/local/bin/phpunit: line 3:  2440 Segmentation fault: 11  /usr/bin/env php -d allow_url_fopen=On -d detect_unicode=Off /usr/local/Cellar/phpunit/5.0.0/libexec/phpunit-5.0.0.phar\r\n```\r\nwhen creating a Manager with these empty arguments:\r\n```\r\n$manager = new \\MongoDB\\Driver\\Manager(\"mongodb://localhost:27017\", [], []);\r\n```\r\n\r\nBut after removing the empty `[]` arguments it works fine:\r\n```\r\n$manager = new \\MongoDB\\Driver\\Manager(\"mongodb://localhost:27017\");\r\n```\r\nThis was found when I noticed MongoDB\\Client passes in these default values.\r\n\r\nAlso perhaps related, I notice under when trying to access any method, like getServers(), I see this error:\r\n```\r\nFatal error: Allowed memory size of 1828716544 bytes exhausted (tried to allocate 18446744073273022950 bytes) in /Users/jeremyjannotta/Documents/dev/projects/mongodb/vendor/mongodb/mongodb/src/Client.php on line 32\r\n\r\nCall Stack:\r\n    0.0006     230272   1. {main}() /Users/jeremyjannotta/Documents/dev/projects/mongodb/index.php:0\r\n    0.0070     344288   2. MongoDB\\Client->__construct() /Users/jeremyjannotta/Documents/dev/projects/mongodb/index.php:6\r\n    0.0070     344576   3. MongoDB\\Driver\\Manager->__construct() /Users/jeremyjannotta/Documents/dev/projects/mongodb/vendor/mongodb/mongodb/src/Client.php:32\r\n```\r\n\r\nExecuting this on Mac OSX 10.11.2, PHP 5.6.14, PHPUnit 5.0.0, MongoDB driver v1.1.0."},"comment":{"url":"https://api.github.com/repos/mongodb/mongo-php-driver/issues/comments/167591482","html_url":"https://github.com/mongodb/mongo-php-driver/issues/173#issuecomment-167591482","issue_url":"https://api.github.com/repos/mongodb/mongo-php-driver/issues/173","id":167591482,"user":{"login":"alcaeus","id":383198,"avatar_url":"https://avatars.githubusercontent.com/u/383198?v=3","gravatar_id":"","url":"https://api.github.com/users/alcaeus","html_url":"https://github.com/alcaeus","followers_url":"https://api.github.com/users/alcaeus/followers","following_url":"https://api.github.com/users/alcaeus/following{/other_user}","gists_url":"https://api.github.com/users/alcaeus/gists{/gist_id}","starred_url":"https://api.github.com/users/alcaeus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alcaeus/subscriptions","organizations_url":"https://api.github.com/users/alcaeus/orgs","repos_url":"https://api.github.com/users/alcaeus/repos","events_url":"https://api.github.com/users/alcaeus/events{/privacy}","received_events_url":"https://api.github.com/users/alcaeus/received_events","type":"User","site_admin":false},"created_at":"2015-12-28T15:47:46Z","updated_at":"2015-12-28T15:47:46Z","body":"I just upgraded to 1.1.1 and was able to partly fix the issue.\r\nThe error still occurs when creating the manager with empty arrays for arguments (2nd example). The segmentation fault from the first example however is gone."}}