MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000422XdebugUsage problems (Wrong Results)public2009-01-19 14:552009-01-24 21:04
Reportercweiske 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.0.0dev 
Target VersionFixed in Version 
Summary0000422: xdebug 2.0.4 segfaults when using code coverage
DescriptionI get a segfault when using phpunit 3.3.10 and xdebug 2.0.4 on php 5.2.8 to get code coverage information in a project of mine. I'll try to gather information.
TagsNo tags attached.
Operating System
PHP Version5.2.8
Attached Files

- Relationships

-  Notes
(0000904)
cweiske (reporter)
2009-01-20 12:46
edited on: 2009-01-20 12:48

crash.php that has to be run:
<?php
function hdl(){}
set_error_handler('hdl');
xdebug_start_code_coverage(XDEBUG_CC_UNUSED | XDEBUG_CC_DEAD_CODE);
require_once 'test.php';
?>

test.php:
<?php
class DB
{
    function f()
    {
        if (true) {}
        $obj =& new a;
    }
}
?>

(0000905)
cweiske (reporter)
2009-01-20 12:47

[Thread debugging using libthread_db enabled]
[New Thread 0xb740f6d0 (LWP 25361)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb740f6d0 (LWP 25361)]
0xb7283a2c in xdebug_set_in_ex (set=0x87a8410, position=54643701, noisy=1) at /tmp/pear/temp/xdebug/xdebug_set.c:72
warning: Source file is more recent than executable.
72 return (*byte & (1 << bit));
(gdb) bt
#0 0xb7283a2c in xdebug_set_in_ex (set=0x87a8410, position=54643701, noisy=1)
    at /tmp/pear/temp/xdebug/xdebug_set.c:72
#1 0xb7270c95 in xdebug_analyse_branch (opa=0x8772688, position=54643701, set=0x87a8410)
    at /tmp/pear/temp/xdebug/xdebug_code_coverage.c:174
0000002 0xb7270cf3 in xdebug_analyse_branch (opa=0x8772688, position=3, set=0x87a8410)
    at /tmp/pear/temp/xdebug/xdebug_code_coverage.c:190
0000003 0xb7270cf3 in xdebug_analyse_branch (opa=0x8772688, position=2, set=0x87a8410)
    at /tmp/pear/temp/xdebug/xdebug_code_coverage.c:190
0000004 0xb7270ea1 in prefill_from_oparray (
    fn=0x877222c "/mnt/work/www.aida.de/crashtest/typo3conf/ext/aida_ibe3/tests/Aida/IBE3/test.php", opa=0x8772688)
    at /tmp/pear/temp/xdebug/xdebug_code_coverage.c:257
0000005 0xb7271008 in prefill_from_function_table (opa=0x8772688, num_args=1,
    args=0xbfc4c460 " ÄÄ¿[øõ·\230\232k\b\210\027w\b\024#w\b@\201z\b¸ÄÄ¿\221x5\bL\201z\b\001", hash_key=0xbfc4c42c)
    at /tmp/pear/temp/xdebug/xdebug_code_coverage.c:279
0000006 0x08357891 in zend_hash_apply_with_arguments (ht=0x8772330, apply_func=0xb7270faf <prefill_from_function_table>,
    num_args=1) at /root/php-5.2.8/Zend/zend_hash.c:729
0000007 0xb7271091 in prefill_from_class_table (class_entry=0x87a814c, num_args=1,
    args=0xbfc4c4d0 "`³z\b\234!)·hÅÄ¿áÂ&·`³z\b\003", hash_key=0xbfc4c49c)
    at /tmp/pear/temp/xdebug/xdebug_code_coverage.c:306
0000008 0x08357891 in zend_hash_apply_with_arguments (ht=0x86654e0, apply_func=0xb7271013 <prefill_from_class_table>,
    num_args=1) at /root/php-5.2.8/Zend/zend_hash.c:729
0000009 0xb727113b in xdebug_prefill_code_coverage (op_array=0x87ab360)
    at /tmp/pear/temp/xdebug/xdebug_code_coverage.c:323
---Type <return> to continue, or q <return> to quit---
0000010 0xb726c2e1 in xdebug_execute (op_array=0x87ab360) at /tmp/pear/temp/xdebug/xdebug.c:1536
0000011 0x08343240 in zend_call_function (fci=0xbfc4c644, fci_cache=0x0) at /root/php-5.2.8/Zend/zend_execute_API.c:1015
0000012 0x0834427e in call_user_function_ex (function_table=0x86654b0, object_pp=0x0, function_name=0x8771198,
    retval_ptr_ptr=0xbfc4c6c0, param_count=5, params=0x8772914, no_separation=1, symbol_table=0x0)
    at /root/php-5.2.8/Zend/zend_execute_API.c:640
0000013 0x0834e8e6 in zend_error (type=2048,
    format=0x8610298 "Assigning the return value of new by reference is deprecated")
    at /root/php-5.2.8/Zend/zend.c:1041
0000014 0x0832ca33 in zendparse () at /root/php-5.2.8/Zend/zend_language_parser.c:3843
0000015 0x08331f9d in compile_file (file_handle=0xbfc4daf0, type=8) at /root/php-5.2.8/Zend/zend_language_scanner.c:3420
0000016 0xb726ea0f in xdebug_compile_file (file_handle=0xbfc4daf0, type=8) at /tmp/pear/temp/xdebug/xdebug.c:2404
0000017 0x0836da37 in ZEND_INCLUDE_OR_EVAL_SPEC_CONST_HANDLER (execute_data=0xbfc4dc00)
    at /root/php-5.2.8/Zend/zend_vm_execute.h:2041
0000018 0x0836b178 in execute (op_array=0x87716bc) at /root/php-5.2.8/Zend/zend_vm_execute.h:92
0000019 0xb726c3c3 in xdebug_execute (op_array=0x87716bc) at /tmp/pear/temp/xdebug/xdebug.c:1561
0000020 0x0834da24 in zend_execute_scripts (type=8, retval=<value optimized out>, file_count=3)
    at /root/php-5.2.8/Zend/zend.c:1134
0000021 0x0830daa0 in php_execute_script (primary_file=0xbfc50094) at /root/php-5.2.8/main/main.c:2023
0000022 0x083d28dc in main (argc=2, argv=0xbfc501b4) at /root/php-5.2.8/sapi/cli/php_cli.c:1133
(0000906)
derick (administrator)
2009-01-24 21:04

Fixed in CVS, thanks for your report. A detailed analysis of the issues is here: http://derickrethans.nl/phps_twopass_compiler.php [^]

- Issue History
Date Modified Username Field Change
2009-01-19 14:55 cweiske New Issue
2009-01-19 14:55 cweiske PHP Version => 5.2.8
2009-01-19 14:55 cweiske Xdebug Version => 2.0.4-dev
2009-01-19 15:00 cweiske Note Added: 0000903
2009-01-20 12:46 cweiske Note Added: 0000904
2009-01-20 12:47 cweiske Note Deleted: 0000903
2009-01-20 12:47 cweiske Note Added: 0000905
2009-01-20 12:48 cweiske Note Edited: 0000904
2009-01-24 21:04 derick Note Added: 0000906
2009-01-24 21:04 derick Status new => closed
2009-01-24 21:04 derick Resolution open => fixed
2016-07-31 13:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 13:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker