Edit report at http://bugs.php.net/bug.php?id=51243&edit=1

 ID:               51243
 Updated by:       tony2...@php.net
 Reported by:      tsamukawa at maru dot jp
 Summary:          syntax error in autoload causes segmentation fault
-Status:           Open
+Status:           Feedback
 Type:             Bug
 Package:          Scripting Engine problem
 Operating System: CentOS5.*
 PHP Version:      5.3.2

 New Comment:

Not reproducible.

The only result I'm able to get is this:

Parse error: syntax error, unexpected T_STRING, expecting T_FUNCTION in
/tmp/C.php on line 4


Previous Comments:
------------------------------------------------------------------------
[2010-03-11 02:34:07] tsamukawa at maru dot jp

I have 2 different backtraces generated.

1st bt is geneated by running same script as the sample.

2nd bt is by script uses calling spl_autoload_register() from inside of
another user-defined function. 



---------------------------------------------------------------------------------------

Program received signal SIGSEGV, Segmentation fault.

0xb77c8b44 in autoload_func_info_dtor (alfi=0x7373616c) at
/s/php-5.3.2/ext/spl/php_spl.c:362

362             if (alfi->obj) {

(gdb) bt

#0  0xb77c8b44 in autoload_func_info_dtor (alfi=0x7373616c) at
/s/php-5.3.2/ext/spl/php_spl.c:362

#1  0xb7966728 in zend_hash_destroy (ht=0x8412154) at
/s/php-5.3.2/Zend/zend_hash.c:526

#2  0xb77cb7a5 in zm_deactivate_spl (type=1, module_number=20) at
/s/php-5.3.2/ext/spl/php_spl.c:904

#3  0xb795fffc in module_registry_cleanup (module=0x82abd10) at
/s/php-5.3.2/Zend/zend_API.c:2150

#4  0xb7966f96 in zend_hash_reverse_apply (ht=0xb7ecaaa0,
apply_func=0xb795ffcd <module_registry_cleanup>) at /s/php-

5.3.2/Zend/zend_hash.c:755

#5  0xb7957950 in zend_deactivate_modules () at
/s/php-5.3.2/Zend/zend.c:866

#6  0xb78eb409 in php_request_shutdown (dummy=0x0) at
/s/php-5.3.2/main/main.c:1607

#7  0xb7a21b2d in php_apache_request_dtor (r=0x83971e0) at
/s/php-5.3.2/sapi/apache2handler/sapi_apache2.c:495

#8  0xb7a2241e in php_handler (r=0x83971e0) at
/s/php-5.3.2/sapi/apache2handler/sapi_apache2.c:667

#9  0x0807f629 in ap_run_handler (r=0x83971e0) at config.c:157

#10 0x08082797 in ap_invoke_handler (r=0x83971e0) at config.c:372

#11 0x080d64f8 in ap_process_request (r=0x83971e0) at
http_request.c:282

#12 0x080d36db in ap_process_http_connection (c=0x83d9810) at
http_core.c:190

#13 0x08086769 in ap_run_process_connection (c=0x83d9810) at
connection.c:43

#14 0x08104f1d in child_main (child_num_arg=<value optimized out>) at
prefork.c:662

#15 0x08105163 in make_child (s=0x8152c98, slot=0) at prefork.c:702

#16 0x08105f3c in ap_mpm_run (_pconf=0x814a550, plog=0x81a47f8,
s=0x8152c98) at prefork.c:978

#17 0x0806cf25 in main (argc=135562568, argv=0x83d7630) at main.c:740



---------------------------------------------------------------------------------------

Program received signal SIGSEGV, Segmentation fault.

0xb7ffb402 in __kernel_vsyscall ()

(gdb) bt

#0  0xb7ffb402 in __kernel_vsyscall ()

#1  0x459e61b6 in kill () from /lib/libc.so.6

#2  0xb79e15a1 in zend_mm_panic (message=0xb7f3a690 "zend_mm_heap
corrupted") at /s/php-5.3.2/Zend/zend_alloc.c:92

#3  0xb79e3a2e in _zend_mm_alloc_int (heap=0x8284880, size=49,
__zend_filename=0xb7f3834b "Zend/zend_language_scanner.l", 

__zend_lineno=690, __zend_orig_filename=0x0,

    __zend_orig_lineno=0) at /s/php-5.3.2/Zend/zend_alloc.c:1827

#4  0xb79e50ff in _emalloc (size=49, __zend_filename=0xb7f3834b
"Zend/zend_language_scanner.l", __zend_lineno=690, 

__zend_orig_filename=0x0, __zend_orig_lineno=0)

    at /s/php-5.3.2/Zend/zend_alloc.c:2340

#5  0xb79cc147 in zend_multibyte_read_script (buf=0xb7fee000
"<?php\n\nclass C{\n  functio pr(){ print 123; }\n}\n\n", n=48) 

at Zend/zend_language_scanner.l:690

#6  0xb79cb083 in open_file_for_scanning (file_handle=0xbfe06a00) at
Zend/zend_language_scanner.l:263

#7  0xb79cb290 in compile_file (file_handle=0xbfe06a00, type=8) at
Zend/zend_language_scanner.l:331

#8  0xb77d6015 in phar_compile_file (file_handle=0xbfe06a00, type=8) at
/s/php-5.3.2/ext/phar/phar.c:3390

#9  0xb79cb46a in compile_filename (type=8, filename=0x844809c) at
Zend/zend_language_scanner.l:386

#10 0xb7a438d6 in ZEND_INCLUDE_OR_EVAL_SPEC_TMP_HANDLER
(execute_data=0x8448048) at /s/php-5.3.2/Zend/zend_vm_execute.h:5184

#11 0xb7a33be4 in execute (op_array=0x8413e2c) at
/s/php-5.3.2/Zend/zend_vm_execute.h:104

#12 0xb79f8f5c in zend_call_function (fci=0xbfe06d54,
fci_cache=0xbfe06d24) at /s/php-5.3.2/Zend/zend_execute_API.c:947

#13 0xb7a21e08 in zend_call_method (object_pp=0x841363c,
obj_ce=0x84139e4, fn_proxy=0x8413638, function_name=0x84113d4 

"loader::autoload\001", function_name_len=21, 

    retval_ptr_ptr=0xbfe06df4, param_count=1, arg1=0x8412060, arg2=0x0)
at /s/php-5.3.2/Zend/zend_interfaces.c:97

#14 0xb7877cfc in zif_spl_autoload_call (ht=1, return_value=0x8411fd0,
return_value_ptr=0xbfe06fe0, this_ptr=0x0, 

return_value_used=1) at /s/php-5.3.2/ext/spl/php_spl.c:395

#15 0xb79f90f4 in zend_call_function (fci=0xbfe06fbc,
fci_cache=0xbfe06fa8) at /s/php-5.3.2/Zend/zend_execute_API.c:969

#16 0xb79f985d in zend_lookup_class_ex (name=0x8414cb0 "C",
name_length=1, use_autoload=1, ce=0xbfe0704c) at /s/php-

5.3.2/Zend/zend_execute_API.c:1100

#17 0xb79fa4b0 in zend_fetch_class (class_name=0x8414cb0 "C",
class_name_len=1, fetch_type=4) at /s/php-

5.3.2/Zend/zend_execute_API.c:1542

#18 0xb7a36966 in ZEND_FETCH_CLASS_SPEC_CONST_HANDLER
(execute_data=0x8447f48) at /s/php-5.3.2/Zend/zend_vm_execute.h:724

#19 0xb7a33be4 in execute (op_array=0x83f4e60) at
/s/php-5.3.2/Zend/zend_vm_execute.h:104

#20 0xb7a0739d in zend_execute_scripts (type=8, retval=0x0,
file_count=3) at /s/php-5.3.2/Zend/zend.c:1194

#21 0xb799b4b6 in php_execute_script (primary_file=0xbfe0941c) at
/s/php-5.3.2/main/main.c:2260

#22 0xb7ad1392 in php_handler (r=0x8401f40) at
/s/php-5.3.2/sapi/apache2handler/sapi_apache2.c:655

#23 0x0807f629 in ap_run_handler (r=0x8401f40) at config.c:157

#24 0x08082797 in ap_invoke_handler (r=0x8401f40) at config.c:372

#25 0x080d64f8 in ap_process_request (r=0x8401f40) at
http_request.c:282

#26 0x080d36db in ap_process_http_connection (c=0x83d9808) at
http_core.c:190

#27 0x08086769 in ap_run_process_connection (c=0x83d9808) at
connection.c:43

#28 0x08104f1d in child_main (child_num_arg=<value optimized out>) at
prefork.c:662

#29 0x08105163 in make_child (s=0x8152c98, slot=0) at prefork.c:702

#30 0x08105f3c in ap_mpm_run (_pconf=0x814a550, plog=0x81a47f8,
s=0x8152c98) at prefork.c:978

#31 0x0806cf25 in main (argc=135562568, argv=0x83d7628) at main.c:740

------------------------------------------------------------------------
[2010-03-10 22:13:58] j...@php.net

After disabling ALL 3rd party extensions (opcode caches, debuggers,
etc.) provide a new backtrace of the crash.

------------------------------------------------------------------------
[2010-03-10 06:18:57] tsamukawa at maru dot jp

I tryed this script from CLI repeatedly, no segmentation fault was
occured .

------------------------------------------------------------------------
[2010-03-10 06:05:45] tsamukawa at maru dot jp

I tested without using eaccelerator and xdebug mudule.

But problem does not fixed.

------------------------------------------------------------------------
[2010-03-09 21:40:04] ka...@php.net

Try disable eaccelerator and/or xdebug and see if it stopped the
segfault

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=51243


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=51243&edit=1

Reply via email to