Date: Mon Oct 29 19:59:27 CET 2007
User: Derick Rethans
Directory: xdebug
Log Message:
[0.25]
- Fixed bug #313: Code coverage crashes on empty PHP files.
Modified files:
xdebug/xdebug_code_coverage.c (version: 1.36)
Added files:
xdebug/tests/bug00313.inc (new version: 1.1)
xdebug/tests/bug00313.phpt (new version: 1.1)
[FILE: /xdebug/xdebug_code_coverage.c]
===================================================================
RCS file: cvstemp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- xdebug/xdebug_code_coverage.c:1.35 Sat Oct 27 13:47:42 2007 GMT
+++ xdebug/xdebug_code_coverage.c Mon Oct 29 17:59:27 2007 GMT
@@ -234,7 +234,7 @@
#ifdef ZEND_ENGINE_2
/* Check for abstract methods and simply return from this function in those
* cases. */
- if (opa->opcodes[opa->size - 4].opcode == ZEND_RAISE_ABSTRACT_ERROR)
+ if (opa->size >= 4 && opa->opcodes[opa->size - 4].opcode == ZEND_RAISE_ABSTRACT_ERROR)
{
return;
}
[FILE: /xdebug/tests/bug00313.inc]
<?php
?>
[FILE: /xdebug/tests/bug00313.phpt]
--TEST--
Test for bug #313: Segmentation Fault in code coverage analysis on empty PHP files.
--SKIPIF--
<?php if (!extension_loaded("xdebug")) print "skip"; ?>
--INI--
xdebug.default_enable=1
xdebug.dump_globals=0
xdebug.show_mem_delta=0
xdebug.profiler_enable=0
xdebug.trace_format=0
--FILE--
<?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(dirname(__FILE__).'/bug00313.inc'); // File with problem in it.
xdebug_stop_code_coverage();
echo "ALIVE\n";
?>
--EXPECTF--
ALIVE
Received on Mon Oct 29 2007 - 19:59:30 GMT
This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST