MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000318XdebugUsage problems (Wrong Results)public2007-10-17 06:202007-10-27 17:48
ReporterDH 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000318: Segmentation Fault in code coverage analysis
DescriptionWhen 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
Attached Files

- Relationships

-  Notes
(0000742)
DH (reporter)
2007-10-17 06:33

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.
(0000761)
derick (administrator)
2007-10-25 23:12

I found why... just need to think of a good way of fixing it :)
(0000764)
derick (administrator)
2007-10-27 17:48

Fixed in CVS, thanks for your report!

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