View Issue Details

IDProjectCategoryView StatusLast Update
0000318XdebugUncategorizedpublic2007-10-27 16:48
ReporterDH Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionopen 
Summary0000318: Segmentation Fault in code coverage analysis
Description

When collecting code coverage information, certain kinds of compile-time PHP errors will cause XDebug to silently segfault before reaching the problem code or running any lines in the PHP file that has the problem.

Identified triggers: Usage of 'continue' and 'break' outside a proper loop context.

Additional Information

(Running PHP 5.2.3) Affects versions 2.0.0 and 2.1.0.

Here is code to reproduce.

======FILE: run.php =========================
<?php
// Run me from the PHP CLI
xdebug_start_code_coverage(XDEBUG_CC_DEAD_CODE | XDEBUG_CC_UNUSED);
// MUST be both code coverage options to cause problems
include('./faulty.php'); // File with problem in it.
xdebug_stop_code_coverage();
?>
======FILE: faulty.php ======================
<?php
//FILE: faulty.php
if(true){break;} // 'Continue' also causes problems
?>

Boy, am I glad that's over. Though I was going insane trying to debug it.

TagsNo tags attached.
Operating SystemCentos 4.4
PHP Version5.2.1

Activities

DH

2007-10-17 05:33

reporter   ~0000742

P.S.: Again, stepping through the code until XDebug crashes suggests that faulty.php is never actually executed--the problem occurs right after the include() step.

Good news for people with this problem is that at least the segfault is proximal to the file with the problem--it's not like it could be more than one include() or require() away along a long chain.

derick

2007-10-25 22:12

administrator   ~0000761

I found why... just need to think of a good way of fixing it :)

derick

2007-10-27 16:48

administrator   ~0000764

Fixed in CVS, thanks for your report!

Issue History

Date Modified Username Field Change
2007-10-17 05:20 DH New Issue
2007-10-17 05:33 DH Note Added: 0000742
2007-10-25 22:12 derick Note Added: 0000761
2007-10-27 16:48 derick Status new => closed
2007-10-27 16:48 derick Note Added: 0000764
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