View Issue Details

IDProjectCategoryView StatusLast Update
0001151XdebugUncategorizedpublic2015-05-29 12:42
Reporterfrancois Assigned Toderick  
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
PlatformVmware Workstation W 7OSCentosOS Version6.4
Product Version2.3.2 
Target Version2.3.3Fixed in Version2.3.3 
Summary0001151: Crash when another extension calls call_user_function() during RINIT
Description

(PHP 5.6.4) When trying to use xdebug and the phk PECL extension, php during first RINIT without executing anything.

Trace shows :

Program received signal SIGSEGV, Segmentation fault.
0x001373b7 in xdebug_add_stack_frame (zdata=0xbfffe524, op_array=0x0, type=1)
at /K/Work/Dev/xdebug-2.3.2/xdebug_stack.c:992
992 XDEBUG_LLIST_TAIL(XG(stack)) &&

#0 0x001373b7 in xdebug_add_stack_frame (zdata=0xbfffe524, op_array=0x0,
type=1) at /K/Work/Dev/xdebug-2.3.2/xdebug_stack.c:992
#1 0x0011dd76 in xdebug_execute_internal (current_execute_data=0xbfffe524,
fci=0xbfffe5dc, return_value_used=1)
at /K/Work/Dev/xdebug-2.3.2/xdebug.c:1616
0000002 0x083e893b in zend_call_function (fci=0xbfffe5dc, fci_cache=0xbfffe510)
at /pdata/soft/php/php-5.6.4/Zend/zend_execute_API.c:852
0000003 0x083e7c8a in call_user_function_ex (function_table=0x88bd8d8,
object_pp=0xbfffe6a0, function_name=0xb7fc4e4c, retval_ptr_ptr=0xbfffe630,
param_count=1, params=0xb7fc4ed0, no_separation=1, symbol_table=0x0)
at /pdata/soft/php/php-5.6.4/Zend/zend_execute_API.c:620
0000004 0x083e7b17 in call_user_function (function_table=0x88bd8d8,
object_pp=0xbfffe6a0, function_name=0xb7fc4e4c, retval_ptr=0xb7fc4e0c,
param_count=1, params=0xbfffe700)
at /pdata/soft/php/php-5.6.4/Zend/zend_execute_API.c:593
0000005 0x00386821 in ut_call_user_function (obj_zp=0x0,
func=0x399952 "spl_autoload_register", func_len=21, ret=0xb7fc4e0c,
nb_args=1, args=0xbfffe700) at /proj/phk/pecl/public/utils.c:519
0000006 0x00386472 in ut_call_user_function_void (obj_zp=0x0,
func=0x399952 "spl_autoload_register", func_len=21, nb_args=1,
args=0xbfffe700) at /proj/phk/pecl/public/utils.c:410
0000007 0x00389da7 in Automap_Loader_register_hook ()
at /proj/phk/pecl/public/Automap_Loader.c:50
0000008 0x0038a528 in RINIT_Automap_Loader ()
at /proj/phk/pecl/public/Automap_Loader.c:157
0000009 0x00398b85 in zm_activate_phk (type=1, module_number=31)
at /proj/phk/pecl/public/php_phk.c:155
0000010 0x08401c73 in zend_activate_modules ()
at /pdata/soft/php/php-5.6.4/Zend/zend_API.c:2414
0000011 0x0837b46d in php_request_startup ()
at /pdata/soft/php/php-5.6.4/main/main.c:1672
0000012 0x0849672f in do_cli (argc=1, argv=0x88bd460)
at /pdata/soft/php/php-5.6.4/sapi/cli/php_cli.c:965
0000013 0x0849790f in main (argc=1, argv=0x88bd460)
at /pdata/soft/php/php-5.6.4/sapi/cli/php_cli.c:1378

Crash happens when phk tries to register its autoloader to spl_autoload_register() using call_user_function(). If I remove this call, everything works fine.

Problem because I don't know another way to register an autoloader from an extension.

Steps To Reproduce

Download the 'phk' PECL extension (clone it from github:flaupretre/pecl-phk, don't get it from PECL). In the 'develop' branch, look for the 'xdebug_2.3.2_crash' tag. This is the version I experienced the problem with. Compile and install. Activate in php.ini along with xdebug. Run the 'php' CLI command.

TagsNo tags attached.
Operating System
PHP Version5.6.0-5.6.4

Activities

francois

2015-05-29 12:26

reporter   ~0003091

No need to clone a specific version. The phk package released on PECL (3.0.0) shows the same problem.

derick

2015-05-29 12:42

administrator   ~0003092

https://github.com/xdebug/xdebug/pull/178

Issue History

Date Modified Username Field Change
2015-05-14 22:25 francois New Issue
2015-05-29 12:21 derick Assigned To => derick
2015-05-29 12:21 derick Status new => assigned
2015-05-29 12:21 derick Target Version => 2.3.3
2015-05-29 12:26 francois Note Added: 0003091
2015-05-29 12:42 derick Note Added: 0003092
2015-05-29 12:42 derick Status assigned => closed
2015-05-29 12:42 derick Resolution open => fixed
2015-05-29 12:42 derick Fixed in Version => 2.3.3
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized