[xdebug-dev] Bug 0000321: PHP segfault with xdebug 2.0.1

From: <noreply[@]lists.xdebug.org>
Date: Mon, 22 Oct 2007 21:44:07 +0200

The following bug requires your FEEDBACK.
======================================================================
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000321
======================================================================
Reporter: zaa
Handler:
======================================================================
Project: Xdebug
Bug ID: 321
Category: Usage problems
Reproducibility: always
Severity: major
Priority: normal
Status: feedback
Operating System:
PHP Version: 5.2-dev
Xdebug Version: 2.0.1-dev
======================================================================
Date Submitted: 2007-10-22 11:13 CEST
Last Modified: 2007-10-22 21:44 CEST
======================================================================
Summary: PHP segfault with xdebug 2.0.1
Description:
As you know PHPUnit 3.x uses xdebug for code coverage.
Xdebug 2.0.0 works perfectly for such purposes, but we started to get
segmentation faults after I've installed xdebug 2.0.1 version instead of
2.0.0.

==========================================================
gdb `which php` php.core
GNU gdb 6.1.1 [FreeBSD]
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 "i386-marcel-freebsd"...
Core was generated by `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libcrypt.so.2...done.
Loaded symbols for /lib/libcrypt.so.2
Reading symbols from /usr/local/lib/libmcrypt.so.8...done.
Loaded symbols for /usr/local/lib/libmcrypt.so.8
Reading symbols from /usr/local/lib/libltdl.so.4...done.
Loaded symbols for /usr/local/lib/libltdl.so.4
Reading symbols from /usr/local/lib/libintl.so.8...done.
Loaded symbols for /usr/local/lib/libintl.so.8
Reading symbols from /usr/local/lib/libgd.so.4...done.
Loaded symbols for /usr/local/lib/libgd.so.4
Reading symbols from /usr/local/lib/libpng.so.5...done.
Loaded symbols for /usr/local/lib/libpng.so.5
Reading symbols from /lib/libz.so.2...done.
Loaded symbols for /lib/libz.so.2
Reading symbols from /usr/local/lib/libjpeg.so.9...done.
Loaded symbols for /usr/local/lib/libjpeg.so.9
Reading symbols from /usr/lib/libssl.so.3...done.
Loaded symbols for /usr/lib/libssl.so.3
Reading symbols from /lib/libcrypto.so.3...done.
Loaded symbols for /lib/libcrypto.so.3
Reading symbols from /usr/lib/libbz2.so.1...done.
Loaded symbols for /usr/lib/libbz2.so.1
Reading symbols from /lib/libm.so.3...done.
Loaded symbols for /lib/libm.so.3
Reading symbols from /usr/local/lib/libcurl.so.4...done.
Loaded symbols for /usr/local/lib/libcurl.so.4
Reading symbols from /usr/local/lib/libxml2.so.5...done.
Loaded symbols for /usr/local/lib/libxml2.so.5
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /lib/libc.so.5...done.
Loaded symbols for /lib/libc.so.5
Reading symbols from /usr/local/lib/libfreetype.so.9...done.
Loaded symbols for /usr/local/lib/libfreetype.so.9
Reading symbols from
/u/zaa/opt/lib/php/extensions/no-debug-non-zts-20060613/xdebug.201.so...done.
Loaded symbols for
/u/zaa/opt/lib/php/extensions/no-debug-non-zts-20060613/xdebug.201.so
Reading symbols from
/u/zaa/opt/lib/php/extensions/no-debug-non-zts-20060613/mysql.so...done.
Loaded symbols for
/u/zaa/opt/lib/php/extensions/no-debug-non-zts-20060613/mysql.so
Reading symbols from
/usr/local/mysql-5.0/lib/mysql/libmysqlclient.so.15...done.
Loaded symbols for /usr/local/mysql-5.0/lib/mysql/libmysqlclient.so.15
Reading symbols from /libexec/ld-elf.so.1...done.
Loaded symbols for /libexec/ld-elf.so.1
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000000 0x28997a61 in xdebug_set_in_ex (set=0x8e77310, position=54543306,
noisy=1) at /u/zaa/dev/xdebug-2.0.1/xdebug_set.c:72
72 return (*byte & (1 << bit));
(gdb) list
67 unsigned int bit;
68
69 byte = &(set->setinfo[position / 8]);
70 bit = position % 8;
71
72 return (*byte & (1 << bit));
73 }
(gdb) bt
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000000 0x28997a61 in xdebug_set_in_ex (set=0x8e77310, position=54543306,
noisy=1) at /u/zaa/dev/xdebug-2.0.1/xdebug_set.c:72
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000001 0x2898764d in xdebug_analyse_branch (opa=0x8eac720, position=54543306,
set=0x8e77310) at /u/zaa/dev/xdebug-2.0.1/xdebug_code_coverage.c:167
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000002 0x289876c3 in xdebug_analyse_branch (opa=0x8eac720, position=13,
set=0x8e77310) at /u/zaa/dev/xdebug-2.0.1/xdebug_code_coverage.c:185
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000003 0x289876a5 in xdebug_analyse_branch (opa=0x8eac720, position=8,
set=0x8e77310) at /u/zaa/dev/xdebug-2.0.1/xdebug_code_coverage.c:183
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000004 0x2898782f in prefill_from_oparray (fn=0x8e842e0
"/u/zaa/public_html/e5/include/external/MDB2/Driver/mysql.php",
opa=0x8eac720) at /u/zaa/dev/xdebug-2.0.1/xdebug_code_coverage.c:246
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000005 0x28987974 in prefill_from_function_table (opa=0x8eac720, num_args=1,
args=0xbfbf6c30 "&http://bugs.xdebug.org/bug_view_page.php?bug_id=0001093;l%a9%a9\b", hash_key=0xbfbf6bf0) at
/u/zaa/dev/xdebug-2.0.1/xdebug_code_coverage.c:268
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000006 0x082616c2 in zend_hash_apply_with_arguments (ht=0x8e87930,
apply_func=0x28987924 <prefill_from_function_table>, num_args=1) at
/u/zaa/dev/php-5.2.4/Zend/zend_hash.c:729
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000007 0x289879ee in prefill_from_class_table (class_entry=0x8c2178c,
num_args=1, args=0xbfbf6ca0 "<&http://bugs.xdebug.org/bug_view_page.php?bug_id=0001025;&http://bugs.xdebug.org/bug_view_page.php?bug_id=0001080;\b@e\232(&http://bugs.xdebug.org/bug_view_page.php?bug_id=0001068;l%a9%a9m4\230(",
hash_key=0xbfbf6c60) at
/u/zaa/dev/xdebug-2.0.1/xdebug_code_coverage.c:295
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000008 0x082616c2 in zend_hash_apply_with_arguments (ht=0x83b3140,
apply_func=0x28987984 <prefill_from_class_table>, num_args=1) at
/u/zaa/dev/php-5.2.4/Zend/zend_hash.c:729
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000009 0x28987a7c in xdebug_prefill_code_coverage (op_array=0x8a90a00) at
/u/zaa/dev/xdebug-2.0.1/xdebug_code_coverage.c:312
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000010 0x2898346d in xdebug_execute (op_array=0x8a90a00) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:1489
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000011 0x0824c8ca in zend_call_function (fci=0xbfbf6de0, fci_cache=0x0) at
/u/zaa/dev/php-5.2.4/Zend/zend_execute_API.c:990
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000012 0x0824d634 in call_user_function_ex (function_table=0x94b0b79,
object_pp=0x94b0b79, function_name=0x94b0b79, retval_ptr_ptr=0x94b0b79,
param_count=155913081, params=0x94b0b79, no_separation=155913081,
    symbol_table=0x94b0b79) at
/u/zaa/dev/php-5.2.4/Zend/zend_execute_API.c:617
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000013 0x082584ba in zend_error (type=2048, format=0x836d530 "Assigning the
return value of new by reference is deprecated") at
/u/zaa/dev/php-5.2.4/Zend/zend.c:1041
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000014 0x0823aa3b in zendparse () at
/u/zaa/dev/php-5.2.4/Zend/zend_language_parser.c:3869
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000015 0x0823f041 in compile_file (file_handle=0xbfbf8490, type=2) at
/u/zaa/dev/php-5.2.4/Zend/zend_language_scanner.c:3420
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000016 0x289856e2 in xdebug_compile_file (file_handle=0xbfbf8490, type=2) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:2341
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000017 0x082887f7 in ZEND_INCLUDE_OR_EVAL_SPEC_VAR_HANDLER
(execute_data=0xbfbf8750) at zend_vm_execute.h:7688
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000018 0x08271f35 in execute (op_array=0x8c9b33c) at zend_vm_execute.h:92
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000019 0x28983530 in xdebug_execute (op_array=0x8c9b33c) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:1509
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000020 0x08272181 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfbf8b10) at zend_vm_execute.h:234
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000021 0x08271f35 in execute (op_array=0x8c9f40c) at zend_vm_execute.h:92
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000022 0x28983530 in xdebug_execute (op_array=0x8c9f40c) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:1509
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000023 0x08272181 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfbf8dc0) at zend_vm_execute.h:234
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000024 0x08271f35 in execute (op_array=0x8c9b540) at zend_vm_execute.h:92
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000025 0x28983530 in xdebug_execute (op_array=0x8c9b540) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:1509
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000026 0x08272181 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfbf92f0) at zend_vm_execute.h:234
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000027 0x08271f35 in execute (op_array=0x885dde0) at zend_vm_execute.h:92
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000028 0x28983530 in xdebug_execute (op_array=0x885dde0) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:1509
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000029 0x08272181 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfbf97e0) at zend_vm_execute.h:234
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000030 0x08271f35 in execute (op_array=0x892b69c) at zend_vm_execute.h:92
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000031 0x28983530 in xdebug_execute (op_array=0x892b69c) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:1509
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000032 0x08272181 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfbfa050) at zend_vm_execute.h:234
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000033 0x08271f35 in execute (op_array=0x85e1108) at zend_vm_execute.h:92
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000034 0x28983530 in xdebug_execute (op_array=0x85e1108) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:1509
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000035 0x08272181 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfbfa230) at zend_vm_execute.h:234
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000036 0x08271f35 in execute (op_array=0x892b5d4) at zend_vm_execute.h:92
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000037 0x28983530 in xdebug_execute (op_array=0x892b5d4) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:1509
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000038 0x08272181 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfbfa3b0) at zend_vm_execute.h:234
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000039 0x08271f35 in execute (op_array=0x868a070) at zend_vm_execute.h:92
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000040 0x28983530 in xdebug_execute (op_array=0x868a070) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:1509
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000041 0x08272181 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfbfa940) at zend_vm_execute.h:234
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000042 0x08271f35 in execute (op_array=0x868b15c) at zend_vm_execute.h:92
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000043 0x28983530 in xdebug_execute (op_array=0x868b15c) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:1509
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000044 0x08272181 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfbfaed0) at zend_vm_execute.h:234
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000045 0x08271f35 in execute (op_array=0x868b15c) at zend_vm_execute.h:92
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000046 0x28983530 in xdebug_execute (op_array=0x868b15c) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:1509
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000047 0x08272181 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfbfb460) at zend_vm_execute.h:234
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000048 0x08271f35 in execute (op_array=0x868b15c) at zend_vm_execute.h:92
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000049 0x28983530 in xdebug_execute (op_array=0x868b15c) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:1509
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000050 0x08272181 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfbfc6f0) at zend_vm_execute.h:234
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000051 0x08271f35 in execute (op_array=0x871090c) at zend_vm_execute.h:92
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000052 0x28983530 in xdebug_execute (op_array=0x871090c) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:1509
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000053 0x08272181 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfbfc9a0) at zend_vm_execute.h:234
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000054 0x08271f35 in execute (op_array=0x8710684) at zend_vm_execute.h:92
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000055 0x28983530 in xdebug_execute (op_array=0x8710684) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:1509
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000056 0x08272181 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfbfcb60) at zend_vm_execute.h:234
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000057 0x08271f35 in execute (op_array=0x83c1d50) at zend_vm_execute.h:92
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000058 0x28983530 in xdebug_execute (op_array=0x83c1d50) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:1509
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000059 0x08272181 in zend_do_fcall_common_helper_SPEC
(execute_data=0xbfbfd120) at zend_vm_execute.h:234
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000060 0x08271f35 in execute (op_array=0x83c16fc) at zend_vm_execute.h:92
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000061 0x28983530 in xdebug_execute (op_array=0x83c16fc) at
/u/zaa/dev/xdebug-2.0.1/xdebug.c:1509
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000062 0x08258da1 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /u/zaa/dev/php-5.2.4/Zend/zend.c:1134
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000063 0x08220c35 in php_execute_script (primary_file=0xbfbfe8e0) at
/u/zaa/dev/php-5.2.4/main/main.c:1982
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000064 0x082d339a in main (argc=2, argv=0xbfbfe978) at
/u/zaa/dev/php-5.2.4/sapi/cli/php_cli.c:1140

======================================================================

----------------------------------------------------------------------
 zaa - 2007-10-22 11:25 CEST
----------------------------------------------------------------------
Just read http://bugs.php.net/bugs-generating-backtrace.php.
Here is output:

(gdb) frame 18
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000018 0x08271f35 in execute (op_array=0x8c9b33c) at zend_vm_execute.h:92
92 if (EX(opline)->handler(&execute_data TSRMLS_CC) >
0) {
(gdb) print (char
*)(executor_globals.function_state_ptr->function)->common.function_name
$1 = 0x8a835dc "x_log_error_handler"
(gdb)

----------------------------------------------------------------------
 rwilczek - 2007-10-22 11:50 CEST
----------------------------------------------------------------------
Same here for kernel
2.6.18.8-0.5-default http://bugs.xdebug.org/bug_view_page.php?bug_id=0000001 SMP Fri Jun 22 12:17:53 UTC 2007 x86_64 x86_64
x86_64 GNU/Linux
and PHP 5.2.0 with Suhosin-Patch 0.9.6.1 (cli)

Reported on phpunit.de too:
http://www.phpunit.de/ticket/234

edited on: 2007-10-22 11:50

----------------------------------------------------------------------
 mhorvath - 2007-10-22 19:15 CEST
----------------------------------------------------------------------
Same here for kernel
2.6.22-14-generic http://bugs.xdebug.org/bug_view_page.php?bug_id=0000001 SMP Sun Oct 14 21:45:15 GMT 2007 x86_64
and PHP 5.2.4 with Suhosin Patch 0.9.6.2

----------------------------------------------------------------------
 derick - 2007-10-22 21:44 CEST
----------------------------------------------------------------------
Is there a small reproducable case somewhere?

Bug History
Date Modified Username Field Change
======================================================================
2007-10-22 11:13zaa New Bug
2007-10-22 11:13zaa Bug Monitored: zaa
2007-10-22 11:25zaa Bugnote Added: 0000749
2007-10-22 11:46rwilczek Bugnote Added: 0000750
2007-10-22 11:50rwilczek Bugnote Edited: 0000750
2007-10-22 18:02rwilczek Bug Monitored: rwilczek
2007-10-22 19:15mhorvath Bugnote Added: 0000753
2007-10-22 21:44derick Bugnote Added: 0000754
2007-10-22 21:44derick Status new => feedback
======================================================================
Received on Mon Oct 22 2007 - 21:44:11 BST

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST