ID: 36906 Updated by: [EMAIL PROTECTED] -Summary: stream_context_get_options cause segfault Reported By: sqchen at citiz dot net -Status: Feedback +Status: Verified Bug Type: Streams related -Operating System: redhat 7.3 +Operating System: *nix -PHP Version: 5.1.2 +PHP Version: 5.* New Comment:
Verified in HEAD, 5.0 and 5.1 cvs. #0 0x0816d92d in php_stream_context_del_link (context=0x83ce324, stream=0x83b7b24) at /usr/src/php51/main/streams/streams.c:1984 #1 0x08169df7 in _php_stream_free (stream=0x83b7b24, close_options=11) at /usr/src/php51/main/streams/streams.c:326 #2 0x0816c1c3 in stream_resource_regular_dtor (rsrc=0x83ce1a4) at /usr/src/php51/main/streams/streams.c:1373 #3 0x081a7fb5 in list_entry_destructor (ptr=0x83ce1a4) at /usr/src/php51/Zend/zend_list.c:184 #4 0x081a618c in zend_hash_apply_deleter (ht=0x829c7d4, p=0x83c5a24) at /usr/src/php51/Zend/zend_hash.c:576 #5 0x081a63af in zend_hash_graceful_reverse_destroy (ht=0x829c7d4) at /usr/src/php51/Zend/zend_hash.c:642 #6 0x081a80f9 in zend_destroy_rsrc_list (ht=0x829c7d4) at /usr/src/php51/Zend/zend_list.c:240 #7 0x0819c517 in zend_deactivate () at /usr/src/php51/Zend/zend.c:860 #8 0x0815899a in php_request_shutdown (dummy=0x0) at /usr/src/php51/main/main.c:1283 #9 0x082011c3 in main (argc=1, argv=0xbfbfea54) at /usr/src/php51/sapi/cli/php_cli.c:1245 Previous Comments: ------------------------------------------------------------------------ [2006-04-05 20:45:50] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5.1-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.1-win32-latest.zip Cannot reproduce. ------------------------------------------------------------------------ [2006-03-29 08:02:59] sqchen at citiz dot net Description: ------------ stream_context_get_options cause segfault, php version is 5.1.2 Reproduce code: --------------- <?php $dir=opendir(dirname(__FILE__)); stream_context_set_option($dir, "pathname", "path", "/u/quans/"); var_dump(stream_context_get_options($dir)); ?> Actual result: -------------- array(1) { ["pathname"]=> array(1) { ["path"]=> string(9) "/u/quans/" } } Segmentation fault ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=36906&edit=1