From:             bobwei9 at hotmail dot com
Operating system: Mac OS X Mountain Lion
PHP version:      master-Git-2012-12-11 (Git)
Package:          SPL related
Bug Type:         Bug
Bug description:Crash when autoloading from spl

Description:
------------
When calling the index.php of a fresh MediaWiki (Version 1.18.0) install,
PHP segfaults. I know, 1.18.0 is an old version, but it shouldn't crash .

Test script:
---------------
normal MediaWiki 1.18.0 install

Expected result:
----------------
No segmentation fault...

Actual result:
--------------
wiki root# gdb --args php index.php
GNU gdb 6.3.50-20050815 (Apple version gdb-1821) (Fri Jun 29 16:14:03 UTC
2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for
shared libraries ............

........ done

(gdb) run
Starting program: /usr/bin/php index.php
Reading symbols for shared libraries
+++++++++++++++++++++.......................................................................................................................................
done
Reading symbols for shared libraries . done
PHP Warning:  PHP Startup: Unable to load dynamic library
'/usr/lib/php/extensions/debug-zts-20121204/apc.so' -
dlopen(/usr/lib/php/extensions/debug-zts-20121204/apc.so, 9): Symbol not
found: _apc_globals_id
  Referenced from: /usr/lib/php/extensions/debug-zts-20121204/apc.so
  Expected in: flat namespace
 in /usr/lib/php/extensions/debug-zts-20121204/apc.so in Unknown on line 0
<font size=3px color=#ff0000>
Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php/extensions/debug-zts-20121204/apc.so' -
dlopen(/usr/lib/php/extensions/debug-zts-20121204/apc.so, 9): Symbol not
found: _apc_globals_id
  Referenced from: /usr/lib/php/extensions/debug-zts-20121204/apc.so
  Expected in: flat namespace
 in /usr/lib/php/extensions/debug-zts-20121204/apc.so in Unknown on line 0
Reading symbols for shared libraries . done
PHP Warning:  PHP Startup: pthreads: Unable to initialize module
Module compiled with module API=20121113
PHP    compiled with module API=20121204
These options need to match
 in Unknown on line 0
</font><font size=3px color=#ff0000>
Warning: PHP Startup: pthreads: Unable to initialize module
Module compiled with module API=20121113
PHP    compiled with module API=20121204
These options need to match
 in Unknown on line 0
</font>PHP Notice:  Undefined index: HTTP_HOST in
/[...]/wiki/LocalSettings.php on line 44
<font size=3px color=#ff0000>
Notice: Undefined index: HTTP_HOST in /[...]/wiki/LocalSettings.php on line
44
</font>PHP Notice:  Undefined index: REQUEST_METHOD in
/[...]/wiki/includes/Setup.php on line 387

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x00000007000001f8
0x00000001008fb936 in instanceof_function_ex (instance_ce=0x700000008,
ce=0x10264a818, interfaces_only=0 '\0', tsrm_ls=0x101710ed0) at
zend_operators.c:1720
1720            for (i=0; i<instance_ce->num_interfaces; i++) {
(gdb) bt
#0  0x00000001008fb936 in instanceof_function_ex (instance_ce=0x700000008,
ce=0x10264a818, interfaces_only=0 '\0', tsrm_ls=0x101710ed0) at
zend_operators.c:1720
#1  0x00000001008fb9e5 in instanceof_function (instance_ce=0x700000008,
ce=0x10264a818, tsrm_ls=0x101710ed0) at zend_operators.c:1740
#2  0x00000001008fb919 in instanceof_function_ex (instance_ce=0x1025b8400,
ce=0x10264a818, interfaces_only=0 '\0', tsrm_ls=0x101710ed0) at
zend_operators.c:1721
#3  0x00000001008fb9e5 in instanceof_function (instance_ce=0x1025b8400,
ce=0x10264a818, tsrm_ls=0x101710ed0) at zend_operators.c:1740
#4  0x0000000100934457 in zend_call_method (object_pp=0x0,
obj_ce=0x10264a818, fn_proxy=0x1026735d0, function_name=0x102673558
"autoloader::autoload", function_name_len=21,
retval_ptr_ptr=0x7fff5fbfd698, param_count=1, arg1=0x1029fe810, arg2=0x0,
tsrm_ls=0x101710ed0) at zend_interfaces.c:89
#5  0x00000001005a6128 in zif_spl_autoload_call (ht=1,
return_value=0x1029fe890, return_value_ptr=0x7fff5fbfdf48, this_ptr=0x0,
return_value_used=1, tsrm_ls=0x101710ed0) at php_spl.c:436
#6  0x00000001008e7023 in zend_call_function (fci=0x7fff5fbfdee8,
fci_cache=0x7fff5fbfdec0, tsrm_ls=0x101710ed0) at zend_execute_API.c:979
#7  0x00000001008e814a in zend_lookup_class_ex (name=0x1029f2670 "Hooks",
name_length=5, key=0x1029f2278, use_autoload=1, ce=0x7fff5fbfdfe0,
tsrm_ls=0x101710ed0) at zend_execute_API.c:1129
#8  0x00000001008e9f2e in zend_fetch_class_by_name (class_name=0x1029f2670
"Hooks", class_name_len=5, key=0x1029f2278, fetch_type=0,
tsrm_ls=0x101710ed0) at zend_execute_API.c:1609
#9  0x0000000100978c23 in
ZEND_INIT_STATIC_METHOD_CALL_SPEC_CONST_CONST_HANDLER
(execute_data=0x102207280, tsrm_ls=0x101710ed0) at zend_vm_execute.h:3550
#10 0x0000000100963fe2 in execute_ex (execute_data=0x102207280,
tsrm_ls=0x101710ed0) at zend_vm_execute.h:356
#11 0x00000001009650fc in zend_execute (op_array=0x102239b30,
tsrm_ls=0x101710ed0) at zend_vm_execute.h:381
#12 0x0000000100905463 in zend_execute_scripts (type=8,
tsrm_ls=0x101710ed0, retval=0x0, file_count=3) at zend.c:1309
#13 0x00000001008215ac in php_execute_script (primary_file=0x7fff5fbff798,
tsrm_ls=0x101710ed0) at main.c:2468
#14 0x0000000100b2e98f in do_cli (argc=2, argv=0x7fff5fbffa88,
tsrm_ls=0x101710ed0) at php_cli.c:988
#15 0x0000000100b30a3e in main (argc=2, argv=0x7fff5fbffa88) at
php_cli.c:1364
(gdb) source /var/root/php-src/.gdbinit
(gdb) zbacktrace
[0x7fff5fbfd928] spl_autoload_call("Hooks") 
[0x102207280] wfRunHooks() /[...]/wiki/includes/GlobalFunctions.php:3631 
[0x102207108] wfRunHooks("Debug", array(2)[0x1029fe790])
/[...]/wiki/includes/GlobalFunctions.php:711 
[0x102206810]
wfDebug("Start\40request\12\12\40index.php\12HTTP\40HEADERS:\12\12")
/[...]/wiki/includes/Setup.php:396 
[0x102202e50] ??? /[...]/wiki/includes/WebStart.php:157 
[0x102202388] ??? /[...]/wiki/index.php:53 

-- 
Edit bug report at https://bugs.php.net/bug.php?id=63741&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63741&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63741&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=63741&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=63741&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=63741&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=63741&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=63741&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=63741&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=63741&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=63741&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=63741&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=63741&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=63741&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63741&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=63741&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=63741&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=63741&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63741&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=63741&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63741&r=mysqlcfg

Reply via email to