php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62597 segfault in php_stream_wrapper_log_error with ZTS build
Submitted: 2012-07-18 12:12 UTC Modified: 2012-07-18 12:16 UTC
From: laruence@php.net Assigned: laruence
Status: Closed Package: Streams related
PHP Version: 5.4.4 OS:
Private report: No CVE-ID:
 [2012-07-18 12:12 UTC] laruence@php.net
Description:
------------
backtrace:

Cannot access memory at address 0x9
(gdb) bt
#0  0x000000000096a873 in zend_hash_del_key_or_index (ht=0x1bb60f70, 
arKey=0x7fff0e483018 " ڠ\001", nKeyLength=8, h=7563748164900642, 
    flag=0) at /home/huixinchen/opensource/php-5.4/Zend/zend_hash.c:508
#1  0x00000000008b54b9 in php_stream_wrapper_log_error (wrapper=0x8c1c82, 
options=32767, tsrm_ls=0x1bae1090, fmt=0x0)
    at /home/huixinchen/opensource/php-5.4/main/streams/streams.c:250
#2  0x00000000008bae78 in php_stream_context_set (stream=0x0, context=0xe483140)
    at /home/huixinchen/opensource/php-5.4/main/streams/streams.c:2154
#3  0x00000000006b3e27 in phar_open_from_filename (
    fname=0x2b9248f8bb90 "/home/huixinchen/opensource/php-
5.4/ext/phar/tests/cache_list/frontcontroller1.php [cache_list]", fname_len=95, 
    alias=0x0, alias_len=0, options=0, pphar=0x7fff0e483208, error=0x0, 
tsrm_ls=0x1bae1090)
    at /home/huixinchen/opensource/php-5.4/ext/phar/phar.c:1522
#4  0x00000000006adf43 in phar_split_cache_list (tsrm_ls=0x1bae1090) at 
/home/huixinchen/opensource/php-5.4/ext/phar/phar.c:177
#5  0x00000000006ae222 in phar_destroy_phar_data (phar=0x1bc42980, 
tsrm_ls=0x1baf69d0)
    at /home/huixinchen/opensource/php-5.4/ext/phar/phar.c:217
#6  0x0000000000976bd2 in zend_unregister_ini_entries (module_number=1643, 
tsrm_ls=0x1baebaa0)
    at /home/huixinchen/opensource/php-5.4/Zend/zend_ini.c:226
#7  0x00000000006bb8ef in zm_shutdown_phar (type=1, module_number=22, 
tsrm_ls=0x1bae1090)
    at /home/huixinchen/opensource/php-5.4/ext/phar/phar.c:3562
#8  0x000000000095f34e in zend_sort_modules (base=0x95f34e, 
count=140733433000848, siz=4294967318, compare=0x1bae1090, tsrm_ls=0x6bb8ef)
    at /home/huixinchen/opensource/php-5.4/Zend/zend_API.c:1674
#9  0x000000000096b1a2 in zend_hash_apply_with_argument (ht=0x1227420, 
apply_func=0x95f14b <zend_startup_module_ex+176>, 
    argument=0x1bae1090, tsrm_ls=0x95f3de) at /home/huixinchen/opensource/php-
5.4/Zend/zend_hash.c:737
#10 0x000000000095f974 in zend_register_module_ex (module=0x20, 
tsrm_ls=0x1bb1ff80)
    at /home/huixinchen/opensource/php-5.4/Zend/zend_API.c:1821
#11 0x0000000000894b32 in php_module_startup (sf=0x120e760, 
additional_modules=0x120e8a0, num_additional_modules=1)
    at /home/huixinchen/opensource/php-5.4/main/main.c:2203
#12 0x0000000000adeb97 in do_cli (argc=32767, argv=0x0, tsrm_ls=0x90cf1d) at 
/home/huixinchen/opensource/php-5.4/sapi/cli/php_cli.c:1039
#13 0x0000000000ae1e48 in php_http_parser_execute (parser=0x7fff0e484cef, 
settings=0x6f00f0b0ff, data=0x0, len=0)
    at /home/huixinchen/opensource/php-5.4/sapi/cli/php_http_parser.c:1128
#14 0x000000305441d994 in ?? ()
#15 0x0000000000424ab0 in __do_global_dtors_aux ()

Test script:
---------------
ext/phar/tests/*.phpt

Actual result:
--------------
segfault

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-07-18 12:15 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=2d9d2cadadf0fdf12a01b4a689d0554e1450904f
Log: Fixed bug #62597 (segfault in php_stream_wrapper_log_error with ZTS build)
 [2012-07-18 12:16 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=2d9d2cadadf0fdf12a01b4a689d0554e1450904f
Log: Fixed bug #62597 (segfault in php_stream_wrapper_log_error with ZTS build)
 [2012-07-18 12:16 UTC] laruence@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.


 [2012-07-18 12:16 UTC] laruence@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Mon Apr 21 07:02:06 2014 UTC