ID: 42364 User updated by: kfou at free dot fr Reported By: kfou at free dot fr -Status: Feedback +Status: Open Bug Type: Reproducible crash Operating System: Windows and Linux -PHP Version: 5.2.4RC2 +PHP Version: 5.2.4RC3-dev New Comment:
Same problem using last win32 build: $ php --version PHP 5.2.4RC3-dev (cli) (built: Aug 21 2007 12:04:26) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies $ gdb --quiet php(gdb) run test.php Starting program: c:\php/php.exe test.php Program received signal SIGSEGV, Segmentation fault. 0x100ddc90 in ?? () Previous Comments: ------------------------------------------------------------------------ [2007-08-21 17:18:34] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows (zip): http://snaps.php.net/win32/php5.2-win32-latest.zip For Windows (installer): http://snaps.php.net/win32/php5.2-win32-installer-latest.msi ------------------------------------------------------------------------ [2007-08-21 17:15:50] kfou at free dot fr Description: ------------ Calling getRealPath on an DirectoryIterator make PHP crash, getPath works fine. The problem also happens with php 5.2.3 Reproduce code: --------------- <?php $it = new DirectoryIterator("/tmp"); foreach ($it as $e) { $path = $e->getRealPath(); } ?> Actual result: -------------- (gdb) run test.php Starting program: /home/wwwdev/php/bin/php test.php Failed to read a valid object file image from memory. Program received signal SIGSEGV, Segmentation fault. tsrm_realpath (path=0x0, real_path=0xbfb0f20c "6É\025\b\001") at /home/wwwdev/php5.2-200708201630/TSRM/tsrm_virtual_cwd.c:1266 1266 if (!*path) { (gdb) bt #0 tsrm_realpath (path=0x0, real_path=0xbfb0f20c "6É\025\b\001") at /home/wwwdev/php5.2-200708201630/TSRM/tsrm_virtual_cwd.c:1266 #1 0x080a1c8c in zim_spl_SplFileInfo_getRealPath (ht=0, return_value=0xb7d0519c, return_value_ptr=0x0, this_ptr=0xb7d04598, return_value_used=1) at /home/wwwdev/php5.2-200708201630/ext/spl/spl_directory.c:861 #2 0x08175cc2 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfb103e0) at /home/wwwdev/php5.2-200708201630/Zend/zend_vm_execute.h:202 #3 0x08174b58 in execute (op_array=0xb7d04a40) at /home/wwwdev/php5.2-200708201630/Zend/zend_vm_execute.h:94 #4 0x081575f4 in zend_execute_scripts (type=8, retval=<value optimized out>, file_count=3) at /home/wwwdev/php5.2-200708201630/Zend/zend.c:1134 #5 0x08117c00 in php_execute_script (primary_file=0xbfb1279c) at /home/wwwdev/php5.2-200708201630/main/main.c:1982 #6 0x081d1674 in main (argc=2, argv=0xbfb128a4) at /home/wwwdev/php5.2-200708201630/sapi/cli/php_cli.c:1140 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42364&edit=1