php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72661 ReflectionType::__toString crashes with iterable
Submitted: 2016-07-23 22:46 UTC Modified: -
From: thekid@php.net Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 7.1.0beta1 OS: Windows
Private report: No CVE-ID: None
 [2016-07-23 22:46 UTC] thekid@php.net
Description:
------------
Casting ReflectionType instances to string with the new iterable type causes PHP to crash

Test script:
---------------
$ ~/bin/php-7.1.0beta1-nts-Wind32-VC14-x64/php -r 'function test(iterable $arg) { } var_dump((string)(new ReflectionParameter("test", 0))->getType());'

Expected result:
----------------
"iterable"

Actual result:
--------------
Segmentation fault

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-24 03:01 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=a3a797dbd56a5b9f71eb2b5c82a5722314642640
Log: Fixed bug #72661 (ReflectionType::__toString crashes with iterable)
 [2016-07-24 03:01 UTC] laruence@php.net
-Status: Open +Status: Closed
 [2016-07-24 03:03 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=a3a797dbd56a5b9f71eb2b5c82a5722314642640
Log: Fixed bug #72661 (ReflectionType::__toString crashes with iterable)
 [2016-10-17 10:10 UTC] bwoebi@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=a3a797dbd56a5b9f71eb2b5c82a5722314642640
Log: Fixed bug #72661 (ReflectionType::__toString crashes with iterable)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 04:01:31 2024 UTC