|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-29 15:16 UTC] iliaa@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 01 03:00:01 2025 UTC |
Description: ------------ Calling readdir() causes PHP to crash. Reproduce code: --------------- class mystream { function dir_opendir($url, $options) { return true; } } stream_wrapper_register("test", "mystream"); $dir = opendir("test://a"); readdir($dir); Expected result: ---------------- PHP should not crash. Actual result: -------------- (gdb) run Starting program: /home/angio/php-5.1.4/sapi/cli/php ~/test.php Warning: readdir(): mystream::dir_readdir is not implemented! in /home/angio/test.php on line 14 Program received signal SIGSEGV, Segmentation fault. 0x0824e632 in zend_object_store_get_object (zobject=0x3) at /home/angio/php-5.1.4/Zend/zend_objects_API.c:215 215 return EG(objects_store).object_buckets[handle].bucket.obj.object; (gdb) where #0 0x0824e632 in zend_object_store_get_object (zobject=0x3) at /home/angio/php-5.1.4/Zend/zend_objects_API.c:215 #1 0x08225030 in zend_call_function (fci=0xbfbeb4b0, fci_cache=0x0) at /home/angio/php-5.1.4/Zend/zend_execute_API.c:661 #2 0x0822524e in call_user_function_ex (function_table=0x3, object_pp=0x3, function_name=0x3, retval_ptr_ptr=0x3, param_count=3, params=0x3, no_separation=3, symbol_table=0x3) at /home/angio/php-5.1.4/Zend/zend_execute_API.c:579 #3 0x082095bf in php_userstreamop_closedir (stream=0x3, close_handle=1) at /home/angio/php-5.1.4/main/streams/userspace.c:1266 #4 0x082009d4 in _php_stream_free (stream=0x842c164, close_options=11) at /home/angio/php-5.1.4/main/streams/streams.c:342 #5 0x0820129c in stream_resource_regular_dtor (rsrc=0x3) at /home/angio/php-5.1.4/main/streams/streams.c:1373 #6 0x0823e8bf in list_entry_destructor (ptr=0x842bf7c) at /home/angio/php-5.1.4/Zend/zend_list.c:184 #7 0x0823d2ba in zend_hash_apply_deleter (ht=0x8374bc0, p=0x842c06c) at /home/angio/php-5.1.4/Zend/zend_hash.c:576 #8 0x0823d387 in zend_hash_graceful_reverse_destroy (ht=0x8374bc0) at /home/angio/php-5.1.4/Zend/zend_hash.c:642 #9 0x0823165e in zend_deactivate () at /home/angio/php-5.1.4/Zend/zend.c:860 #10 0x081ec005 in php_request_shutdown (dummy=0x0) at /home/angio/php-5.1.4/main/main.c:1287 #11 0x082b34db in main (argc=2, argv=0xbfbec1f4) at /home/angio/php-5.1.4/sapi/cli/php_cli.c:1245