View Issue Details

IDProjectCategoryView StatusLast Update
0000363XdebugUncategorizedpublic2009-07-09 17:57
Reporterkingoleg Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Summary0000363: Segmentation fault on coverage report
Description

Unit test with coverage report (phing) failed on include/include_once/require/require_once statement.

Remove xdebug or unused for test class disable crash.

Additional Information

I have a project under phing. It makes tests and coverage reports using phpunit3 and xdebug. Some time age I found a crash when running test target. I create test project to illustrate a problem.

TagsNo tags attached.
Operating SystemUbuntu
PHP Version5.2.5

Activities

derick

2008-04-14 17:30

administrator   ~0000831

I get:
PHP Fatal error: Class 'Mail' not found in /usr/local/lib/php/Mail/smtp.php on line 27
No crashes, but also no coverage report.

kingoleg

2008-04-14 17:54

reporter   ~0000832

This is expected behavior. What is versions you are running?

kingoleg

2008-04-16 08:57

reporter   ~0000833

I and two my colleagues have Segmentation fail as well on different environments. I get it again and again. How I can create log from xdebug to send you? I realy what to resolve this issue.

I runnin Ubuntu 64 bit, PHP 5.2.3-1ubuntu6.3 (cli) Zend Engine v2.2.0 with Xdebug v2.0.3 (2.0.2 has save problem), 'pecl list -a' show xdebug version 2.0.2 (why?), PHPUnit 3.2.17, phing 2.3.0

derick

2008-04-18 18:18

administrator   ~0000834

A backtrace and a trace with valgrind would really help. Instead of running phing directly, run the following commands:

gdb --args php -d html_errors=off -qC /usr/local/lib/php/phing.php -logger phing.listener.AnsiColorLogger test

then in the gdb prompt, type "run" and return. When it crashes it stops and you can enter "bt full". Please copy the whole output and put it online somewhere with a link in the report here.

Please also run with valgrind:

valgrind php -d html_errors=off -qC /usr/local/lib/php/phing.php -logger phing.listener.AnsiColorLogger test

and copy the output somewhere as well. Please copy all output in both cases.

kingoleg

2008-04-18 19:57

reporter   ~0000840

oleg@shoom-gnome:~/workspace/phing$ gdb --args php -d html_errors=off -qC /usr/share/php/phing.php -logger phing.listener.AnsiColorLogger test
GNU gdb 6.6-debian
Copyright (C) 2006 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-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /usr/bin/php -d html_errors=off -qC /usr/share/php/phing.php -logger phing.listener.AnsiColorLogger test
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 47941555022800 (LWP 16419)]
(no debugging symbols found)
(no debugging symbols found)
Buildfile: /home/oleg/workspace/phing/build.xml
[property] Loading /home/oleg/workspace/phing/./build.properties

Telme > clean:

[delete] Deleting directory /home/oleg/workspace/phing/build

Telme > init:

[mkdir] Created dir: /home/oleg/workspace/phing/build

Telme > _test:

[mkdir] Created dir: /home/oleg/workspace/phing/build/reports
[mkdir] Created dir: /home/oleg/workspace/phing/build/reports/tests
[mkdir] Created dir: /home/oleg/workspace/phing/build/reports/coverage
 [echo] Running tests...

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47941555022800 (LWP 16419)]
0x00002b9a435de5a4 in xdebug_set_in_ex (set=0x25ce970, position=572372338, noisy=1) at /tmp/pear/temp/xdebug/xdebug_set.c:72
72 return (byte & (1 << bit));
(gdb) bt full
#0 0x00002b9a435de5a4 in xdebug_set_in_ex (set=0x25ce970, position=572372338, noisy=1) at /tmp/pear/temp/xdebug/xdebug_set.c:72
byte = (unsigned char
) 0x6a0a03e <Address 0x6a0a03e out of bounds>
bit = 2
#1 0x00002b9a435cbcff in xdebug_analyse_branch (opa=0x21216e8, position=572372338, set=0x25ce970) at /tmp/pear/temp/xdebug/xdebug_code_coverage.c:168
jump_pos1 = -1
jump_pos2 = -1
0000002 0x00002b9a435cbd64 in xdebug_analyse_branch (opa=0x21216e8, position=15, set=0x25ce970) at /tmp/pear/temp/xdebug/xdebug_code_coverage.c:186
jump_pos1 = 16
jump_pos2 = 153722867280622962
0000003 0x00002b9a435cbf2b in prefill_from_oparray (fn=0x211f708 "/usr/share/php/Mail/smtp.php", opa=0x21216e8)
at /tmp/pear/temp/xdebug/xdebug_code_coverage.c:251
cache_key = "@▒D\001\000\000\000\000▒P▒j▒\177\000\000\020P▒j▒\177\000\000@$▒\000\000\000\000\000@$▒\000\000\000\000\000▒Ng\000\000\000\000\000\2009▒j▒\177\000\000\000\000\000\000\000\000\000\000▒S\v\002", '\0' <repeats 12 times>, "\001\000\000\000\000\000\000\000▒o\217\000\000\000\000\000\003\000\000\000\000\000\000\000\001\000\000\000▒▒;▒\001\000\000\000\001\000\000\000 :▒j\002\000\000\000\030\000\000\000\000\000\000\000\003\000\000\000\002\000\000\000@\000\000\000\000\000\000\000\200\231▒B\232+\000\0000:▒j▒\177\000\000\000\000\000\000\002\000\000\000@\000\000\000\000\000\000\000`:▒j▒\177\000\000P:▒j▒\177\000\000\200\231"...
cache_key_len = 1
dummy = (void ) 0x5
i = 9
set = (xdebug_set
) 0x25ce970
0000004 0x00002b9a435cc1fb in prefill_from_function_table (opa=0x21216e8, num_args=1, args=0x7fff6ad73ae0, hash_key=0x7fff6ad73ac0)
at /tmp/pear/temp/xdebug/xdebug_code_coverage.c:273
new_filename = 0xe14120 "/usr/share/php/phing/Phing.php"
0000005 0x000000000066074f in zend_hash_apply_with_arguments ()
No symbol table info available.
0000006 0x00002b9a435cc2cd in prefill_from_class_table (class_entry=0x25ca578, num_args=1, args=0x7fff6ad73c70, hash_key=0x7fff6ad73c50)
at /tmp/pear/temp/xdebug/xdebug_code_coverage.c:300
new_filename = 0xe14120 "/usr/share/php/phing/Phing.php"
ce = (zend_class_entry *) 0x21246e0
0000007 0x000000000066074f in zend_hash_apply_with_arguments ()
No symbol table info available.
0000008 0x00002b9a435cc373 in xdebug_prefill_code_coverage (op_array=0xe3a580) at /tmp/pear/temp/xdebug/xdebug_code_coverage.c:317
No locals.
0000009 0x00002b9a435c71ad in xdebug_execute (op_array=0xe3a580) at /tmp/pear/temp/xdebug/xdebug.c:1521
dummy = (zval *) 0x1cf8ff8
edata = (zend_execute_data
) 0x7fff6ad73ea0
fse = (function_stack_entry ) 0x25ce770
xfse = (function_stack_entry
) 0x648980
magic_cookie = 0x0
do_return = 0
function_nr = 13817
le = (xdebug_llist_element ) 0x660a90
eval_id = 0
0000010 0x000000000064a1f3 in zend_call_function ()
No symbol table info available.
0000011 0x000000000064b226 in call_user_function_ex ()
No symbol table info available.
0000012 0x0000000000656936 in zend_error_noreturn ()
No symbol table info available.
0000013 0x0000000000633214 in zendparse ()
No symbol table info available.
0000014 0x00000000006353ce in compile_file ()
No symbol table info available.
0000015 0x00002b9a435c977a in xdebug_compile_file (file_handle=0x7fff6ad76020, type=2) at /tmp/pear/temp/xdebug/xdebug.c:2379
op_array = (zend_op_array
) 0x20bf688
0000016 0x000000000067c6fc in ?? ()
No symbol table info available.
0000017 0x0000000000674ebc in execute ()
No symbol table info available.
0000018 0x00002b9a435c727a in xdebug_execute (op_array=0x20bf688) at /tmp/pear/temp/xdebug/xdebug.c:1541
dummy = (zval **) 0x7fff6ad76320
---Type <return> to continue, or q <return> to quit---Quit
(gdb)

oleg@shoom-gnome:~/workspace/phing$ valgrind php -d html_errors=off -qC /usr/share/php/phing.php -logger phing.listener.AnsiColorLogger test
==16587== Memcheck, a memory error detector.
==16587== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al.
==16587== Using LibVEX rev 1732, a library for dynamic binary translation.
==16587== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==16587== Using valgrind-3.2.3-Debian, a dynamic binary instrumentation framework.
==16587== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==16587== For more details, rerun with: -v
==16587==
==16587== Invalid read of size 8
==16587== at 0x4015AF0: (within /lib/ld-2.6.1.so)
==16587== by 0x400A8F7: (within /lib/ld-2.6.1.so)
==16587== by 0x4006174: (within /lib/ld-2.6.1.so)
==16587== by 0x40085F7: (within /lib/ld-2.6.1.so)
==16587== by 0x4011C98: (within /lib/ld-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== by 0x401155A: (within /lib/ld-2.6.1.so)
==16587== by 0x6749F8A: (within /lib/libdl-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== by 0x674A4EC: (within /lib/libdl-2.6.1.so)
==16587== by 0x6749EF0: dlopen (in /lib/libdl-2.6.1.so)
==16587== by 0x65F934: zend_load_extension (in /usr/bin/php5)
==16587== Address 0x84D09D8 is 32 bytes inside a block of size 33 alloc'd
==16587== at 0x4C21C16: malloc (vg_replace_malloc.c:149)
==16587== by 0x40077B3: (within /lib/ld-2.6.1.so)
==16587== by 0x400854E: (within /lib/ld-2.6.1.so)
==16587== by 0x4011C98: (within /lib/ld-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== by 0x401155A: (within /lib/ld-2.6.1.so)
==16587== by 0x6749F8A: (within /lib/libdl-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== by 0x674A4EC: (within /lib/libdl-2.6.1.so)
==16587== by 0x6749EF0: dlopen (in /lib/libdl-2.6.1.so)
==16587== by 0x65F934: zend_load_extension (in /usr/bin/php5)
==16587== by 0x64BAA6: zend_llist_apply (in /usr/bin/php5)
==16587==
==16587== Invalid read of size 8
==16587== at 0x4015B3E: (within /lib/ld-2.6.1.so)
==16587== by 0x400A8F7: (within /lib/ld-2.6.1.so)
==16587== by 0x4006174: (within /lib/ld-2.6.1.so)
==16587== by 0x40085F7: (within /lib/ld-2.6.1.so)
==16587== by 0x4011C98: (within /lib/ld-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== by 0x401155A: (within /lib/ld-2.6.1.so)
==16587== by 0x6749F8A: (within /lib/libdl-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== by 0x674A4EC: (within /lib/libdl-2.6.1.so)
==16587== by 0x6749EF0: dlopen (in /lib/libdl-2.6.1.so)
==16587== by 0x5A0766: php_dl (in /usr/bin/php5)
==16587== Address 0x84D12E8 is 24 bytes inside a block of size 31 alloc'd
==16587== at 0x4C21C16: malloc (vg_replace_malloc.c:149)
==16587== by 0x40077B3: (within /lib/ld-2.6.1.so)
==16587== by 0x400854E: (within /lib/ld-2.6.1.so)
==16587== by 0x4011C98: (within /lib/ld-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== by 0x401155A: (within /lib/ld-2.6.1.so)
==16587== by 0x6749F8A: (within /lib/libdl-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== by 0x674A4EC: (within /lib/libdl-2.6.1.so)
==16587== by 0x6749EF0: dlopen (in /lib/libdl-2.6.1.so)
==16587== by 0x5A0766: php_dl (in /usr/bin/php5)
==16587== by 0x6185E2: (within /usr/bin/php5)
==16587==
==16587== Invalid read of size 8
==16587== at 0x4015B24: (within /lib/ld-2.6.1.so)
==16587== by 0x400A8F7: (within /lib/ld-2.6.1.so)
==16587== by 0x4006174: (within /lib/ld-2.6.1.so)
==16587== by 0x40085F7: (within /lib/ld-2.6.1.so)
==16587== by 0x400BB6C: (within /lib/ld-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== by 0x400C239: (within /lib/ld-2.6.1.so)
==16587== by 0x4011CF8: (within /lib/ld-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== by 0x401155A: (within /lib/ld-2.6.1.so)
==16587== by 0x6749F8A: (within /lib/libdl-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== Address 0x84D1840 is 16 bytes inside a block of size 22 alloc'd
==16587== at 0x4C21C16: malloc (vg_replace_malloc.c:149)
==16587== by 0x4008AF5: (within /lib/ld-2.6.1.so)
==16587== by 0x400BB6C: (within /lib/ld-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== by 0x400C239: (within /lib/ld-2.6.1.so)
==16587== by 0x4011CF8: (within /lib/ld-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== by 0x401155A: (within /lib/ld-2.6.1.so)
==16587== by 0x6749F8A: (within /lib/libdl-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== by 0x674A4EC: (within /lib/libdl-2.6.1.so)
==16587== by 0x6749EF0: dlopen (in /lib/libdl-2.6.1.so)
==16587==
==16587== Invalid read of size 8
==16587== at 0x4015B0A: (within /lib/ld-2.6.1.so)
==16587== by 0x4011872: (within /lib/ld-2.6.1.so)
==16587== by 0x789B4FF: (within /lib/libc-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== by 0x789B666: libc_dlopen_mode (in /lib/libc-2.6.1.so)
==16587== by 0x7875F1C:
nss_lookup_function (in /lib/libc-2.6.1.so)
==16587== by 0x7875FF4: (within /lib/libc-2.6.1.so)
==16587== by 0x787E137: getprotobyname_r (in /lib/libc-2.6.1.so)
==16587== by 0x787DED3: getprotobyname (in /lib/libc-2.6.1.so)
==16587== by 0x56FD0F: zm_startup_sockets (in /usr/bin/php5)
==16587== by 0x65B112: zend_startup_module_ex (in /usr/bin/php5)
==16587== by 0x660454: zend_hash_apply (in /usr/bin/php5)
==16587== Address 0x85804B0 is 40 bytes inside a block of size 46 alloc'd
==16587== at 0x4C21C16: malloc (vg_replace_malloc.c:149)
==16587== by 0x400DB10: (within /lib/ld-2.6.1.so)
==16587== by 0x4008D25: (within /lib/ld-2.6.1.so)
==16587== by 0x4011C98: (within /lib/ld-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== by 0x401155A: (within /lib/ld-2.6.1.so)
==16587== by 0x789B4FF: (within /lib/libc-2.6.1.so)
==16587== by 0x400DA05: (within /lib/ld-2.6.1.so)
==16587== by 0x789B666: libc_dlopen_mode (in /lib/libc-2.6.1.so)
==16587== by 0x7875F1C:
nss_lookup_function (in /lib/libc-2.6.1.so)
==16587== by 0x7875FF4: (within /lib/libc-2.6.1.so)
==16587== by 0x787E137: getprotobyname_r (in /lib/libc-2.6.1.so)
Buildfile: /home/oleg/workspace/phing/build.xml
[property] Loading /home/oleg/workspace/phing/./build.properties

Telme > clean:

[delete] Deleting directory /home/oleg/workspace/phing/build

Telme > init:

[mkdir] Created dir: /home/oleg/workspace/phing/build

Telme > _test:

[mkdir] Created dir: /home/oleg/workspace/phing/build/reports
[mkdir] Created dir: /home/oleg/workspace/phing/build/reports/tests
[mkdir] Created dir: /home/oleg/workspace/phing/build/reports/coverage
 [echo] Running tests...

==16587==
==16587== Conditional jump or move depends on uninitialised value(s)
==16587== at 0x85A6EE5: prefill_from_oparray (xdebug_code_coverage.c:241)
==16587== by 0x85A71FA: prefill_from_function_table (xdebug_code_coverage.c:273)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A72CC: prefill_from_class_table (xdebug_code_coverage.c:300)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A7372: xdebug_prefill_code_coverage (xdebug_code_coverage.c:317)
==16587== by 0x85A21AC: xdebug_execute (xdebug.c:1521)
==16587== by 0x64A1F2: zend_call_function (in /usr/bin/php5)
==16587== by 0x64B225: call_user_function_ex (in /usr/bin/php5)
==16587== by 0x656935: zend_error (in /usr/bin/php5)
==16587== by 0x633213: zendparse (in /usr/bin/php5)
==16587== by 0x6353CD: compile_file (in /usr/bin/php5)
==16587==
==16587== Conditional jump or move depends on uninitialised value(s)
==16587== at 0x85A6AC2: xdebug_find_jump (xdebug_code_coverage.c:121)
==16587== by 0x85A6D2B: xdebug_analyse_branch (xdebug_code_coverage.c:177)
==16587== by 0x85A6D42: xdebug_analyse_branch (xdebug_code_coverage.c:184)
==16587== by 0x85A6F2A: prefill_from_oparray (xdebug_code_coverage.c:251)
==16587== by 0x85A71FA: prefill_from_function_table (xdebug_code_coverage.c:273)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A72CC: prefill_from_class_table (xdebug_code_coverage.c:300)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A7372: xdebug_prefill_code_coverage (xdebug_code_coverage.c:317)
==16587== by 0x85A21AC: xdebug_execute (xdebug.c:1521)
==16587== by 0x64A1F2: zend_call_function (in /usr/bin/php5)
==16587== by 0x64B225: call_user_function_ex (in /usr/bin/php5)
==16587==
==16587== Conditional jump or move depends on uninitialised value(s)
==16587== at 0x85A6B22: xdebug_find_jump (xdebug_code_coverage.c:128)
==16587== by 0x85A6D2B: xdebug_analyse_branch (xdebug_code_coverage.c:177)
==16587== by 0x85A6D42: xdebug_analyse_branch (xdebug_code_coverage.c:184)
==16587== by 0x85A6F2A: prefill_from_oparray (xdebug_code_coverage.c:251)
==16587== by 0x85A71FA: prefill_from_function_table (xdebug_code_coverage.c:273)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A72CC: prefill_from_class_table (xdebug_code_coverage.c:300)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A7372: xdebug_prefill_code_coverage (xdebug_code_coverage.c:317)
==16587== by 0x85A21AC: xdebug_execute (xdebug.c:1521)
==16587== by 0x64A1F2: zend_call_function (in /usr/bin/php5)
==16587== by 0x64B225: call_user_function_ex (in /usr/bin/php5)
==16587==
==16587== Conditional jump or move depends on uninitialised value(s)
==16587== at 0x85A6B2A: xdebug_find_jump (xdebug_code_coverage.c:128)
==16587== by 0x85A6D2B: xdebug_analyse_branch (xdebug_code_coverage.c:177)
==16587== by 0x85A6D42: xdebug_analyse_branch (xdebug_code_coverage.c:184)
==16587== by 0x85A6F2A: prefill_from_oparray (xdebug_code_coverage.c:251)
==16587== by 0x85A71FA: prefill_from_function_table (xdebug_code_coverage.c:273)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A72CC: prefill_from_class_table (xdebug_code_coverage.c:300)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A7372: xdebug_prefill_code_coverage (xdebug_code_coverage.c:317)
==16587== by 0x85A21AC: xdebug_execute (xdebug.c:1521)
==16587== by 0x64A1F2: zend_call_function (in /usr/bin/php5)
==16587== by 0x64B225: call_user_function_ex (in /usr/bin/php5)
==16587==
==16587== Conditional jump or move depends on uninitialised value(s)
==16587== at 0x85A6B32: xdebug_find_jump (xdebug_code_coverage.c:128)
==16587== by 0x85A6D2B: xdebug_analyse_branch (xdebug_code_coverage.c:177)
==16587== by 0x85A6D42: xdebug_analyse_branch (xdebug_code_coverage.c:184)
==16587== by 0x85A6F2A: prefill_from_oparray (xdebug_code_coverage.c:251)
==16587== by 0x85A71FA: prefill_from_function_table (xdebug_code_coverage.c:273)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A72CC: prefill_from_class_table (xdebug_code_coverage.c:300)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A7372: xdebug_prefill_code_coverage (xdebug_code_coverage.c:317)
==16587== by 0x85A21AC: xdebug_execute (xdebug.c:1521)
==16587== by 0x64A1F2: zend_call_function (in /usr/bin/php5)
==16587== by 0x64B225: call_user_function_ex (in /usr/bin/php5)
==16587==
==16587== Conditional jump or move depends on uninitialised value(s)
==16587== at 0x85A6B3A: xdebug_find_jump (xdebug_code_coverage.c:128)
==16587== by 0x85A6D2B: xdebug_analyse_branch (xdebug_code_coverage.c:177)
==16587== by 0x85A6D42: xdebug_analyse_branch (xdebug_code_coverage.c:184)
==16587== by 0x85A6F2A: prefill_from_oparray (xdebug_code_coverage.c:251)
==16587== by 0x85A71FA: prefill_from_function_table (xdebug_code_coverage.c:273)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A72CC: prefill_from_class_table (xdebug_code_coverage.c:300)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A7372: xdebug_prefill_code_coverage (xdebug_code_coverage.c:317)
==16587== by 0x85A21AC: xdebug_execute (xdebug.c:1521)
==16587== by 0x64A1F2: zend_call_function (in /usr/bin/php5)
==16587== by 0x64B225: call_user_function_ex (in /usr/bin/php5)
==16587==
==16587== Conditional jump or move depends on uninitialised value(s)
==16587== at 0x85A6BAF: xdebug_find_jump (xdebug_code_coverage.c:141)
==16587== by 0x85A6D2B: xdebug_analyse_branch (xdebug_code_coverage.c:177)
==16587== by 0x85A6D42: xdebug_analyse_branch (xdebug_code_coverage.c:184)
==16587== by 0x85A6F2A: prefill_from_oparray (xdebug_code_coverage.c:251)
==16587== by 0x85A71FA: prefill_from_function_table (xdebug_code_coverage.c:273)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A72CC: prefill_from_class_table (xdebug_code_coverage.c:300)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A7372: xdebug_prefill_code_coverage (xdebug_code_coverage.c:317)
==16587== by 0x85A21AC: xdebug_execute (xdebug.c:1521)
==16587== by 0x64A1F2: zend_call_function (in /usr/bin/php5)
==16587== by 0x64B225: call_user_function_ex (in /usr/bin/php5)
==16587==
==16587== Conditional jump or move depends on uninitialised value(s)
==16587== at 0x85A6BE6: xdebug_find_jump (xdebug_code_coverage.c:145)
==16587== by 0x85A6D2B: xdebug_analyse_branch (xdebug_code_coverage.c:177)
==16587== by 0x85A6D42: xdebug_analyse_branch (xdebug_code_coverage.c:184)
==16587== by 0x85A6F2A: prefill_from_oparray (xdebug_code_coverage.c:251)
==16587== by 0x85A71FA: prefill_from_function_table (xdebug_code_coverage.c:273)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A72CC: prefill_from_class_table (xdebug_code_coverage.c:300)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A7372: xdebug_prefill_code_coverage (xdebug_code_coverage.c:317)
==16587== by 0x85A21AC: xdebug_execute (xdebug.c:1521)
==16587== by 0x64A1F2: zend_call_function (in /usr/bin/php5)
==16587== by 0x64B225: call_user_function_ex (in /usr/bin/php5)
==16587==
==16587== Conditional jump or move depends on uninitialised value(s)
==16587== at 0x85A6BEE: xdebug_find_jump (xdebug_code_coverage.c:145)
==16587== by 0x85A6D2B: xdebug_analyse_branch (xdebug_code_coverage.c:177)
==16587== by 0x85A6D42: xdebug_analyse_branch (xdebug_code_coverage.c:184)
==16587== by 0x85A6F2A: prefill_from_oparray (xdebug_code_coverage.c:251)
==16587== by 0x85A71FA: prefill_from_function_table (xdebug_code_coverage.c:273)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A72CC: prefill_from_class_table (xdebug_code_coverage.c:300)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A7372: xdebug_prefill_code_coverage (xdebug_code_coverage.c:317)
==16587== by 0x85A21AC: xdebug_execute (xdebug.c:1521)
==16587== by 0x64A1F2: zend_call_function (in /usr/bin/php5)
==16587== by 0x64B225: call_user_function_ex (in /usr/bin/php5)
==16587==
==16587== Conditional jump or move depends on uninitialised value(s)
==16587== at 0x85A6C7F: xdebug_find_jump (xdebug_code_coverage.c:153)
==16587== by 0x85A6D2B: xdebug_analyse_branch (xdebug_code_coverage.c:177)
==16587== by 0x85A6D42: xdebug_analyse_branch (xdebug_code_coverage.c:184)
==16587== by 0x85A6F2A: prefill_from_oparray (xdebug_code_coverage.c:251)
==16587== by 0x85A71FA: prefill_from_function_table (xdebug_code_coverage.c:273)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A72CC: prefill_from_class_table (xdebug_code_coverage.c:300)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A7372: xdebug_prefill_code_coverage (xdebug_code_coverage.c:317)
==16587== by 0x85A21AC: xdebug_execute (xdebug.c:1521)
==16587== by 0x64A1F2: zend_call_function (in /usr/bin/php5)
==16587== by 0x64B225: call_user_function_ex (in /usr/bin/php5)
==16587==
==16587== Conditional jump or move depends on uninitialised value(s)
==16587== at 0x85A6C87: xdebug_find_jump (xdebug_code_coverage.c:153)
==16587== by 0x85A6D2B: xdebug_analyse_branch (xdebug_code_coverage.c:177)
==16587== by 0x85A6D42: xdebug_analyse_branch (xdebug_code_coverage.c:184)
==16587== by 0x85A6F2A: prefill_from_oparray (xdebug_code_coverage.c:251)
==16587== by 0x85A71FA: prefill_from_function_table (xdebug_code_coverage.c:273)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A72CC: prefill_from_class_table (xdebug_code_coverage.c:300)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A7372: xdebug_prefill_code_coverage (xdebug_code_coverage.c:317)
==16587== by 0x85A21AC: xdebug_execute (xdebug.c:1521)
==16587== by 0x64A1F2: zend_call_function (in /usr/bin/php5)
==16587== by 0x64B225: call_user_function_ex (in /usr/bin/php5)
==16587==
==16587== Conditional jump or move depends on uninitialised value(s)
==16587== at 0x85A6D90: xdebug_analyse_branch (xdebug_code_coverage.c:192)
==16587== by 0x85A6D42: xdebug_analyse_branch (xdebug_code_coverage.c:184)
==16587== by 0x85A6F2A: prefill_from_oparray (xdebug_code_coverage.c:251)
==16587== by 0x85A71FA: prefill_from_function_table (xdebug_code_coverage.c:273)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A72CC: prefill_from_class_table (xdebug_code_coverage.c:300)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A7372: xdebug_prefill_code_coverage (xdebug_code_coverage.c:317)
==16587== by 0x85A21AC: xdebug_execute (xdebug.c:1521)
==16587== by 0x64A1F2: zend_call_function (in /usr/bin/php5)
==16587== by 0x64B225: call_user_function_ex (in /usr/bin/php5)
==16587== by 0x656935: zend_error (in /usr/bin/php5)
==16587==
==16587== Conditional jump or move depends on uninitialised value(s)
==16587== at 0x85A6DFE: xdebug_analyse_branch (xdebug_code_coverage.c:209)
==16587== by 0x85A6D42: xdebug_analyse_branch (xdebug_code_coverage.c:184)
==16587== by 0x85A6F2A: prefill_from_oparray (xdebug_code_coverage.c:251)
==16587== by 0x85A71FA: prefill_from_function_table (xdebug_code_coverage.c:273)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A72CC: prefill_from_class_table (xdebug_code_coverage.c:300)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A7372: xdebug_prefill_code_coverage (xdebug_code_coverage.c:317)
==16587== by 0x85A21AC: xdebug_execute (xdebug.c:1521)
==16587== by 0x64A1F2: zend_call_function (in /usr/bin/php5)
==16587== by 0x64B225: call_user_function_ex (in /usr/bin/php5)
==16587== by 0x656935: zend_error (in /usr/bin/php5)
==16587==
==16587== Conditional jump or move depends on uninitialised value(s)
==16587== at 0x85A6E27: xdebug_analyse_branch (xdebug_code_coverage.c:214)
==16587== by 0x85A6D42: xdebug_analyse_branch (xdebug_code_coverage.c:184)
==16587== by 0x85A6F2A: prefill_from_oparray (xdebug_code_coverage.c:251)
==16587== by 0x85A71FA: prefill_from_function_table (xdebug_code_coverage.c:273)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A72CC: prefill_from_class_table (xdebug_code_coverage.c:300)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A7372: xdebug_prefill_code_coverage (xdebug_code_coverage.c:317)
==16587== by 0x85A21AC: xdebug_execute (xdebug.c:1521)
==16587== by 0x64A1F2: zend_call_function (in /usr/bin/php5)
==16587== by 0x64B225: call_user_function_ex (in /usr/bin/php5)
==16587== by 0x656935: zend_error (in /usr/bin/php5)
==16587==
==16587== Invalid read of size 1
==16587== at 0x85B95A4: xdebug_set_in_ex (xdebug_set.c:72)
==16587== by 0x85A6CFE: xdebug_analyse_branch (xdebug_code_coverage.c:168)
==16587== by 0x85A6D63: xdebug_analyse_branch (xdebug_code_coverage.c:186)
==16587== by 0x85A6F2A: prefill_from_oparray (xdebug_code_coverage.c:251)
==16587== by 0x85A71FA: prefill_from_function_table (xdebug_code_coverage.c:273)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A72CC: prefill_from_class_table (xdebug_code_coverage.c:300)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A7372: xdebug_prefill_code_coverage (xdebug_code_coverage.c:317)
==16587== by 0x85A21AC: xdebug_execute (xdebug.c:1521)
==16587== by 0x64A1F2: zend_call_function (in /usr/bin/php5)
==16587== by 0x64B225: call_user_function_ex (in /usr/bin/php5)
==16587== Address 0x1562086D is not stack'd, malloc'd or (recently) free'd
==16587==
==16587== Process terminating with default action of signal 11 (SIGSEGV)
==16587== Access not within mapped region at address 0x1562086D
==16587== at 0x85B95A4: xdebug_set_in_ex (xdebug_set.c:72)
==16587== by 0x85A6CFE: xdebug_analyse_branch (xdebug_code_coverage.c:168)
==16587== by 0x85A6D63: xdebug_analyse_branch (xdebug_code_coverage.c:186)
==16587== by 0x85A6F2A: prefill_from_oparray (xdebug_code_coverage.c:251)
==16587== by 0x85A71FA: prefill_from_function_table (xdebug_code_coverage.c:273)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A72CC: prefill_from_class_table (xdebug_code_coverage.c:300)
==16587== by 0x66074E: zend_hash_apply_with_arguments (in /usr/bin/php5)
==16587== by 0x85A7372: xdebug_prefill_code_coverage (xdebug_code_coverage.c:317)
==16587== by 0x85A21AC: xdebug_execute (xdebug.c:1521)
==16587== by 0x64A1F2: zend_call_function (in /usr/bin/php5)
==16587== by 0x64B225: call_user_function_ex (in /usr/bin/php5)
==16587==
==16587== ERROR SUMMARY: 639 errors from 19 contexts (suppressed: 25 from 1)
==16587== malloc/free: in use at exit: 25,125,310 bytes in 133,373 blocks.
==16587== malloc/free: 517,894 allocs, 384,521 frees, 36,408,358 bytes allocated.
==16587== For counts of detected errors, rerun with: -v
==16587== searching for pointers to 133,373 not-freed blocks.
==16587== checked 23,812,960 bytes.
==16587==
==16587== LEAK SUMMARY:
==16587== definitely lost: 0 bytes in 0 blocks.
==16587== possibly lost: 0 bytes in 0 blocks.
==16587== still reachable: 25,125,310 bytes in 133,373 blocks.
==16587== suppressed: 0 bytes in 0 blocks.
==16587== Rerun with --leak-check=full to see details of leaked memory.
Segmentation fault
oleg@shoom-gnome:~/workspace/phing$

oleg@shoom-gnome:~/workspace/phing$ php -v
PHP 5.2.4-2ubuntu5 with Suhosin-Patch 0.9.6.2 (cli) (built: Apr 16 2008 12:11:38)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Xdebug v2.0.3, Copyright (c) 2002-2007, by Derick Rethans

rudis

2008-04-19 16:29

reporter   ~0000841

Hi,

I have a smiliar issue. When running a PHPUnit test case with --coverage-html I get a Segmentation fault. I tried to reduce the test environment so you could maybe reproduce the bug. Here is an archive which contains the minial data (just 38 lines): http://ruderich.com/simon/xdebug-code-coverage.zip

When running "phpunit --coverage-html report TestTest.php" I get the following error:

PHPUnit 3.2-svn by Sebastian Bergmann.

Segmentation fault

When I run it with gdb I get the following information:

PHPUnit 3.2-svn by Sebastian Bergmann.

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x02a59faa
0x01662177 in xdebug_set_in_ex ()
(gdb) bt full
#0 0x01662177 in xdebug_set_in_ex ()
No symbol table info available.
#1 0x0164f039 in xdebug_analyse_branch ()
No symbol table info available.
0000002 0x0164f0be in xdebug_analyse_branch ()
No symbol table info available.
0000003 0x0164f238 in prefill_from_oparray ()
No symbol table info available.
0000004 0x0164f39f in prefill_from_function_table ()
No symbol table info available.
0000005 0x002753c2 in zend_hash_apply_with_arguments ()
No symbol table info available.
0000006 0x0164f423 in prefill_from_class_table ()
No symbol table info available.
0000007 0x002753c2 in zend_hash_apply_with_arguments ()
No symbol table info available.
0000008 0x0164f4cd in xdebug_prefill_code_coverage ()
No symbol table info available.
0000009 0x0164a67a in xdebug_execute ()
No symbol table info available.
0000010 0x0025f181 in zend_call_function ()
No symbol table info available.
0000011 0x00260569 in call_user_function_ex ()
No symbol table info available.
0000012 0x0026b85d in zend_error ()
No symbol table info available.
0000013 0x002482b6 in zendparse ()
No symbol table info available.
0000014 0x0024cb7e in compile_file ()
No symbol table info available.
0000015 0x0164cdfe in xdebug_compile_file ()
No symbol table info available.
0000016 0x0028e032 in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER ()
No symbol table info available.
0000017 0x00288813 in execute ()
No symbol table info available.
0000018 0x0164a745 in xdebug_execute ()
No symbol table info available.
0000019 0x0028a4ba in zend_do_fcall_common_helper_SPEC ()
No symbol table info available.
0000020 0x00288813 in execute ()
No symbol table info available.
0000021 0x0164a745 in xdebug_execute ()
No symbol table info available.
0000022 0x0025f181 in zend_call_function ()
No symbol table info available.
0000023 0x0011edc9 in zim_reflection_method_invoke ()
No symbol table info available.
0000024 0x002886bd in execute_internal ()
No symbol table info available.
0000025 0x0164aaa1 in xdebug_execute_internal ()
No symbol table info available.
0000026 0x0028ab38 in zend_do_fcall_common_helper_SPEC ()
No symbol table info available.
0000027 0x00288813 in execute ()
No symbol table info available.
0000028 0x0164a745 in xdebug_execute ()
No symbol table info available.
0000029 0x0028a4ba in zend_do_fcall_common_helper_SPEC ()
No symbol table info available.
0000030 0x00288813 in execute ()
No symbol table info available.
0000031 0x0164a745 in xdebug_execute ()
No symbol table info available.
0000032 0x0028a4ba in zend_do_fcall_common_helper_SPEC ()
No symbol table info available.
0000033 0x00288813 in execute ()
No symbol table info available.
0000034 0x0164a745 in xdebug_execute ()
No symbol table info available.
#35 0x0028a4ba in zend_do_fcall_common_helper_SPEC ()
No symbol table info available.
0000036 0x00288813 in execute ()
No symbol table info available.
0000037 0x0164a745 in xdebug_execute ()
No symbol table info available.
0000038 0x0028a4ba in zend_do_fcall_common_helper_SPEC ()
No symbol table info available.
0000039 0x00288813 in execute ()
No symbol table info available.
0000040 0x0164a745 in xdebug_execute ()
No symbol table info available.
0000041 0x0028a4ba in zend_do_fcall_common_helper_SPEC ()
No symbol table info available.
0000042 0x00288813 in execute ()
No symbol table info available.
0000043 0x0164a745 in xdebug_execute ()
No symbol table info available.
0000044 0x0028a4ba in zend_do_fcall_common_helper_SPEC ()
No symbol table info available.
0000045 0x00288813 in execute ()
No symbol table info available.
0000046 0x0164a745 in xdebug_execute ()
No symbol table info available.
0000047 0x0028a4ba in zend_do_fcall_common_helper_SPEC ()
No symbol table info available.
0000048 0x00288813 in execute ()
No symbol table info available.
#49 0x0164a745 in xdebug_execute ()
No symbol table info available.
0000050 0x0028a4ba in zend_do_fcall_common_helper_SPEC ()
No symbol table info available.
#51 0x00288813 in execute ()
No symbol table info available.
0000052 0x0164a745 in xdebug_execute ()
No symbol table info available.
0000053 0x0028dd94 in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER ()
No symbol table info available.
0000054 0x00288813 in execute ()
No symbol table info available.
0000055 0x0164a745 in xdebug_execute ()
No symbol table info available.
0000056 0x0026bd8c in zend_execute_scripts ()
No symbol table info available.
0000057 0x002276c9 in php_execute_script ()
No symbol table info available.
0000058 0x002fdb74 in main ()
No symbol table info available.

I'm running this on Mac OS X with PHPUnit r2821 and the following PHP version:

PHP 5.2.6RC5 (cli) (built: Apr 16 2008 22:49:20)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
with Xdebug v2.0.3, Copyright (c) 2002-2007, by Derick Rethans

If you need any more information please tell me.

Thanks,
Simon

user702

2008-05-02 16:08

  ~0000849

Hi, I am also having this problem and noticed that the crash occurs whenever I try to run a test in phpunit that instantiates a MDB2 connection to a mysql database.

PHP 5.2.3-1ubuntu6.3
Xdebug v2.0.3
PHPUnit 3.2.19
MDB2 2.4.1

hernst

2008-05-09 10:21

reporter   ~0000851

I also encountered that problem with version 2.0.3 and 2.1.0-CVS. I'm using SuSE10.3 x86_64. Backtrace and valgrindoutput can be found at
http://www3.interexa.de/~hernst/xdebug/
I can also provide shell access to that server upon request.

dmoney

2009-06-10 15:05

reporter   ~0000965

Hi,

I don't know if this has already been fixed, but when I ran the command in valgrind, instead of a seg fault, I got an error about not being able to find a required()'d file. Strangely, when I provided the missing file, it still got a seg fault, but now it runs ok with valgrind, albeit very slowly.

Dan

derick

2009-07-09 17:56

administrator   ~0000988

This should've been fixed in CVS. I made changes to the code coverage some months ago and the fix should be in 2.0.5.

Issue History

Date Modified Username Field Change
2008-04-14 16:08 kingoleg New Issue
2008-04-14 17:30 derick Note Added: 0000831
2008-04-14 17:30 derick Status new => feedback
2008-04-14 17:54 kingoleg Note Added: 0000832
2008-04-16 08:57 kingoleg Note Added: 0000833
2008-04-18 18:18 derick Note Added: 0000834
2008-04-18 19:57 kingoleg Note Added: 0000840
2008-04-19 16:29 rudis Note Added: 0000841
2008-05-02 16:08 user702 Note Added: 0000849
2008-05-09 10:21 hernst Note Added: 0000851
2009-06-10 15:05 dmoney Note Added: 0000965
2009-07-09 17:56 derick Note Added: 0000988
2009-07-09 17:56 derick Status feedback => closed
2009-07-09 17:57 derick Resolution open => fixed
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