|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-01-27 07:58 UTC] laruence@php.net
[2015-01-27 07:58 UTC] laruence@php.net
-Status: Open
+Status: Closed
[2016-07-20 11:39 UTC] davey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
Description: ------------ Running our internal testsuite in with php7 (master git up-to-date) in a normal build works fine, with --enable-debug with get the following error: php: /home/arjen/phpng/php-src/ext/spl/spl_directory.c:966: zim_spl_DirectoryIterator_getExtension: Assertion `p > fname->val' failed. (gdb) bt #0 0x00007ffff38d2a97 in raise () from /usr/lib/libc.so.6 #1 0x00007ffff38d3e6a in abort () from /usr/lib/libc.so.6 #2 0x00007ffff38cb8bd in __assert_fail_base () from /usr/lib/libc.so.6 #3 0x00007ffff38cb972 in __assert_fail () from /usr/lib/libc.so.6 #4 0x00000000007d018e in zim_spl_DirectoryIterator_getExtension (execute_data=0x7ffff0ad41f0, return_value=0x7ffff0ad4150) at /home/arjen/phpng/php-src/ext/spl/spl_directory.c:966 #5 0x000000000098f246 in ZEND_DO_FCALL_SPEC_HANDLER (execute_data=0x7ffff0ad4040) at /home/arjen/phpng/php-src/Zend/zend_vm_execute.h:596 #6 0x000000000098e7e8 in execute_ex (execute_data=0x7ffff0ad4040) at /home/arjen/phpng/php-src/Zend/zend_vm_execute.h:352 #7 0x000000000098e941 in zend_execute (op_array=0x13fcd40, return_value=0x0) at /home/arjen/phpng/php-src/Zend/zend_vm_execute.h:381 #8 0x0000000000941c99 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/arjen/phpng/php-src/Zend/zend.c:1271 #9 0x00000000008b923a in php_execute_script (primary_file=0x7fffffffdff0) at /home/arjen/phpng/php-src/main/main.c:2554 #10 0x00000000009e4acd in do_cli (argc=2, argv=0x1267520) at /home/arjen/phpng/php-src/sapi/cli/php_cli.c:982 #11 0x00000000009e5a76 in main (argc=2, argv=0x1267520) at /home/arjen/phpng/php-src/sapi/cli/php_cli.c:1361 If it fails, the currenct DirectoryIterator entry is a '.' entry. Test script: --------------- <?php $it = new DirectoryIterator(__DIR__); foreach ($it as $entry) { var_dump($entry->getPathname(), $entry->getExtension()); } Expected result: ---------------- No assertion. Empty string for directory entries without extension: "Returns a string containing the file extension, or an empty string if the file has no extension." Actual result: -------------- php: /home/arjen/phpng/php-src/ext/spl/spl_directory.c:966: zim_spl_DirectoryIterator_getExtension: Assertion `p > fname->val' failed. (gdb) bt #0 0x00007ffff38d2a97 in raise () from /usr/lib/libc.so.6 #1 0x00007ffff38d3e6a in abort () from /usr/lib/libc.so.6 #2 0x00007ffff38cb8bd in __assert_fail_base () from /usr/lib/libc.so.6 #3 0x00007ffff38cb972 in __assert_fail () from /usr/lib/libc.so.6 #4 0x00000000007d018e in zim_spl_DirectoryIterator_getExtension (execute_data=0x7ffff0ad41f0, return_value=0x7ffff0ad4150) at /home/arjen/phpng/php-src/ext/spl/spl_directory.c:966 #5 0x000000000098f246 in ZEND_DO_FCALL_SPEC_HANDLER (execute_data=0x7ffff0ad4040) at /home/arjen/phpng/php-src/Zend/zend_vm_execute.h:596 #6 0x000000000098e7e8 in execute_ex (execute_data=0x7ffff0ad4040) at /home/arjen/phpng/php-src/Zend/zend_vm_execute.h:352 #7 0x000000000098e941 in zend_execute (op_array=0x13fcd40, return_value=0x0) at /home/arjen/phpng/php-src/Zend/zend_vm_execute.h:381 #8 0x0000000000941c99 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/arjen/phpng/php-src/Zend/zend.c:1271 #9 0x00000000008b923a in php_execute_script (primary_file=0x7fffffffdff0) at /home/arjen/phpng/php-src/main/main.c:2554 #10 0x00000000009e4acd in do_cli (argc=2, argv=0x1267520) at /home/arjen/phpng/php-src/sapi/cli/php_cli.c:982 #11 0x00000000009e5a76 in main (argc=2, argv=0x1267520) at /home/arjen/phpng/php-src/sapi/cli/php_cli.c:1361