Date: Thu Oct 25 22:42:30 CEST 2007
User: Derick Rethans
Directory: xdebug
Log Message:
[0.50]
- Fixed bug #315: Xdebug crashes when including a file that doesn't exist.
Modified files:
xdebug/xdebug.c (version: 1.410)
Added files:
xdebug/tests/bug00315.phpt (new version: 1.1)
[FILE: /xdebug/xdebug.c]
===================================================================
RCS file: cvstemp,v
retrieving revision 1.409
retrieving revision 1.410
diff -u -r1.409 -r1.410
--- xdebug/xdebug.c:1.409 Sat Oct 20 14:48:31 2007 GMT
+++ xdebug/xdebug.c Thu Oct 25 18:42:30 2007 GMT
@@ -2424,10 +2424,13 @@
zend_op_array *op_array;
op_array = old_compile_file(file_handle, type TSRMLS_CC);
- op_array->reserved[XG(reserved_offset)] = 0;
- if (XG(do_code_coverage) && XG(code_coverage_unused)) {
- xdebug_prefill_code_coverage(op_array TSRMLS_CC);
+ if (op_array) {
+ op_array->reserved[XG(reserved_offset)] = 0;
+
+ if (XG(do_code_coverage) && XG(code_coverage_unused)) {
+ xdebug_prefill_code_coverage(op_array TSRMLS_CC);
+ }
}
return op_array;
}
[FILE: /xdebug/tests/bug00315.phpt]
--TEST--
Test for bug #315: Xdebug crashes when including a file that doesn't exist.
--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
@include 'this-file-does-not-exist.php';
echo "ALIVE\n";
?>
--EXPECT--
ALIVE
Received on Thu Oct 25 2007 - 22:46:49 BST
This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST