Thinkphp 3.1 语法错误导致apache崩溃

浏览:968 发布日期:2013/04/17 分类:求助交流
我用的是在mac上装的xampp,结果每当action或者model里面有语法错误的时候,都会导致apache子进程崩溃,log如下:
[notice] child pid 8233 exit signal Bus error (10)
在外面(比如index.php)里的语法错误就不会导致这种问题。这导致我调试的时候及其艰难。

本来以为是页面压缩输出的问题,在config里设置:
'OUTPUT_ENCODE' => false
问题依旧。在thinkphp2.0里没有问题。

我试着用gdb调试httpd进程,下面是出错地方的错误信息和backtrace。希望熟悉thinkphp源代码的朋友告诉我3.0、3.1又增加了哪些调用系统级函数的地方。

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x012f45eb in zend_mm_remove_from_free_list ()
(gdb) bt
#0 0x012f45eb in zend_mm_remove_from_free_list ()
#1 0x012f577d in _zend_mm_alloc_int ()
#2 0x012f6448 in _emalloc ()
#3 0x012f680d in _estrndup ()
#4 0x012d94a1 in lex_scan ()
#5 0x01305f45 in zendlex ()
#6 0x012d0e43 in zendparse ()
#7 0x012d7110 in compile_file ()
#8 0x011ab145 in phar_compile_file ()
#9 0x012d724d in compile_filename ()
#10 0x0136377a in ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER ()
#11 0x01344c21 in execute ()
#12 0x0130b7bb in zend_call_function ()
#13 0x0130ab27 in call_user_function_ex ()
#14 0x0130a9f2 in call_user_function ()
#15 0x0121aa4c in user_shutdown_function_call ()
#16 0x01326fea in zend_hash_apply ()
#17 0x0121adc9 in php_call_shutdown_functions ()
#18 0x012a75bc in php_request_shutdown ()
#19 0x013e200e in php_apache_request_dtor ()
#20 0x013e29dc in php_handler ()
#21 0x0001c732 in ap_run_handler ()
#22 0x0001cf78 in ap_invoke_handler ()
#23 0x0002ef63 in ap_internal_redirect ()
#24 0x0050d3d0 in handler_redirect ()
#25 0x0001c732 in ap_run_handler ()
#26 0x0001cf78 in ap_invoke_handler ()
#27 0x0002e68a in ap_process_request ()
#28 0x0002a84b in ap_process_http_connection ()
#29 0x00025802 in ap_run_process_connection ()
#30 0x00025c7c in ap_process_connection ()
#31 0x000351bd in child_main ()
#32 0x000353df in make_child ()
#33 0x000356a7 in perform_idle_server_maintenance ()
#34 0x00035cbe in ap_mpm_run ()
#35 0x00003e65 in main ()
最佳答案
评论( 相关
后面还有条评论,点击查看>>