|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-07-23 21:46 UTC] swalk at prp dot physik dot tu-darmstadt dot de
Description:
------------
If i have any custom wrapper registered, and try to include or php_check_syntax() a file with a parse error in it, php segfaults during shutdown.
Reproduce code:
---------------
$ php -r 'class a {} stream_register_wrapper("a","a"); php_check_syntax("http://localhost/test.txt");'
Segmentation fault
test.txt contains just:
<?php foo
Expected result:
----------------
No output and no segfault :)
Actual result:
--------------
(gdb) bt
#0 0x00000019 in ?? ()
#1 0x08165371 in _php_stream_free (stream=0x82b7bc4, close_options=11)
at /home/et/cvs.php.net/php-src/main/streams/streams.c:351
#2 0x081666b3 in stream_resource_regular_dtor (rsrc=0x82b78d4)
at /home/et/cvs.php.net/php-src/main/streams/streams.c:1343
#3 0x081916ae in list_entry_destructor (ptr=0x82b78d4)
at /home/et/cvs.php.net/php-src/Zend/zend_list.c:173
#4 0x08190279 in zend_hash_apply_deleter (ht=0x8211534, p=0x82b77bc)
at /home/et/cvs.php.net/php-src/Zend/zend_hash.c:574
#5 0x08190309 in zend_hash_graceful_reverse_destroy (ht=0x8211534)
at /home/et/cvs.php.net/php-src/Zend/zend_hash.c:640
#6 0x08180fb7 in shutdown_executor ()
at /home/et/cvs.php.net/php-src/Zend/zend_execute_API.c:282
#7 0x0818a25b in zend_deactivate () at /home/et/cvs.php.net/php-src/Zend/zend.c:819
#8 0x08158981 in php_request_shutdown (dummy=0x0)
at /home/et/cvs.php.net/php-src/main/main.c:1212
#9 0x081b725f in main (argc=5, argv=0xbffff2e4)
at /home/et/cvs.php.net/php-src/sapi/cli/php_cli.c:1046
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Nov 20 23:00:01 2025 UTC |
Still the same. et@edea:~/downloads/sources/testing/php5-200407291830$ sapi/cli/php -r 'class a {} stream_register_wrapper("a","a"); php_check_syntax("http://localhost/test.txt");' Segmentation fault