|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-08-22 13:41 UTC] felipe@php.net
[2012-08-22 13:45 UTC] felipe@php.net
[2012-08-22 13:45 UTC] felipe@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: felipe
[2014-10-07 23:22 UTC] stas@php.net
[2014-10-07 23:33 UTC] stas@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 05:00:01 2025 UTC |
Description: ------------ When importing a traitmethod 'as private', ReflectionClass::getTraitAliases() segfaults. Test script: --------------- File testme.php: <?php trait myTrait { public function run() {} } class myClass { use myTrait { MyTrait::run as private; } } $class = new \ReflectionClass('myClass'); $class->getTraitAliases(); ?> Commandline: /usr/bin/php testme.php Expected result: ---------------- no segmentation fault Actual result: -------------- Segmentation fault gdb /usr/bin/php core ... This GDB was configured as "x86_64-suse-linux". ... Reading symbols from /usr/bin/php...done. [New LWP 27460] ... Core was generated by `php testme.php'. Program terminated with signal 11, Segmentation fault. #0 0x00000000009c7c66 in zend_symtable_update (ht=0x7f907f86f918, arKey=0x0, nKeyLength=1515870811, pData=0x7ffff0ad0990, nDataSize=8, pDest=0x0) at /root/php-5.4.6/Zend/zend_hash.h:350 350 /root/php-5.4.6/Zend/zend_hash.h: Datei oder Verzeichnis nicht gefunden. in /root/php-5.4.6/Zend/zend_hash.h bt #0 0x00000000009c7c66 in zend_symtable_update (ht=0x7f907f86f918, arKey=0x0, nKeyLength=1515870811, pData=0x7ffff0ad0990, nDataSize=8, pDest=0x0) at /root/php-5.4.6/Zend/zend_hash.h:350 #1 0x00000000009ccc81 in add_assoc_stringl_ex (arg=0x7f907f86f1c0, key=0x0, key_len=1515870811, str=0x7f907f86f238 "MyTrait::run", length=12, duplicate=0) at /root/php-5.4.6/Zend/zend_API.c:1234 #2 0x000000000074373e in zim_reflection_class_getTraitAliases (ht=0, return_value=0x7f907f86f1c0, return_value_ptr=0x0, this_ptr=0x7f90855eeed0, return_value_used=0) at /root/php-5.4.6/ext/reflection/php_reflection.c:4475 #3 0x0000000000a05c70 in zend_do_fcall_common_helper_SPEC (execute_data=0x7f90855b20e8) at /root/php-5.4.6/Zend/zend_vm_execute.h:642 #4 0x0000000000a06b1d in ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER (execute_data=0x7f90855b20e8) at /root/php-5.4.6/Zend/zend_vm_execute.h:752 #5 0x0000000000a0464f in execute (op_array=0x7f90855efec8) at /root/php-5.4.6/Zend/zend_vm_execute.h:410 #6 0x00000000009c792a in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /root/php-5.4.6/Zend/zend.c:1289 #7 0x000000000093c7e4 in php_execute_script (primary_file=0x7ffff0ad4290) at /root/php-5.4.6/main/main.c:2473 #8 0x0000000000b0d616 in do_cli (argc=2, argv=0x7ffff0ad4648) at /root/php-5.4.6/sapi/cli/php_cli.c:988 #9 0x0000000000b0e6be in main (argc=2, argv=0x7ffff0ad4648) at /root/php-5.4.6/sapi/cli/php_cli.c:1364