rpms/php-pecl-xdebug/devel xdebug-2.0.3-codecoverage.patch, NONE, 1.1 php-pecl-xdebug.spec, 1.15, 1.16
Christopher Stone
xulchris at fedoraproject.org
Thu Oct 9 18:43:55 UTC 2008
Author: xulchris
Update of /cvs/pkgs/rpms/php-pecl-xdebug/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv20242/devel
Modified Files:
php-pecl-xdebug.spec
Added Files:
xdebug-2.0.3-codecoverage.patch
Log Message:
add codecoverage patch (bz #460348)
xdebug-2.0.3-codecoverage.patch:
--- NEW FILE xdebug-2.0.3-codecoverage.patch ---
diff -u xdebug-2.0.3-orig/xdebug_code_coverage.c xdebug-2.0.3/xdebug_code_coverage.c
--- xdebug-2.0.3-orig/xdebug_code_coverage.c 2008-04-09 10:52:03.000000000 -0400
+++ xdebug-2.0.3/xdebug_code_coverage.c 2008-08-27 13:18:54.000000000 -0400
@@ -133,7 +133,12 @@
) {
*jmp1 = position + 1;
#ifdef ZEND_ENGINE_2
- *jmp2 = ((long) opcode.op2.u.jmp_addr - (long) base_address) / sizeof(zend_op);
+ /* if opline_num is smaller than base_address, use it directly */
+ if ((long) opcode.op2.u.opline_num < (long) base_address) {
+ *jmp2 = opcode.op2.u.opline_num;
+ } else {
+ *jmp2 = ((long) opcode.op2.u.jmp_addr - (long) base_address) / sizeof(zend_op);
+ }
#else
*jmp2 = opcode.op1.u.opline_num;
#endif
@@ -163,6 +168,11 @@
long jump_pos1 = -1;
long jump_pos2 = -1;
+ /* Cancel if position is bigger than the actual size */
+ if (position > opa->size) {
+ return;
+ }
+
/*(fprintf(stderr, "Branch analysis from position: %d\n", position);)*/
/* First we see if the branch has been visited, if so we bail out. */
if (xdebug_set_in(set, position)) {
Index: php-pecl-xdebug.spec
===================================================================
RCS file: /cvs/pkgs/rpms/php-pecl-xdebug/devel/php-pecl-xdebug.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- php-pecl-xdebug.spec 9 Oct 2008 16:15:07 -0000 1.15
+++ php-pecl-xdebug.spec 9 Oct 2008 18:43:24 -0000 1.16
@@ -13,6 +13,7 @@
Group: Development/Languages
URL: http://pecl.php.net/package/xdebug
Source0: http://pecl.php.net/get/xdebug-%{version}.tgz
+Patch0: %{pecl_name}-2.0.3-codecoverage.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: automake php-devel php-pear >= 1:1.4.9-1.2
@@ -45,6 +46,7 @@
[ -f package2.xml ] || mv package.xml package2.xml
mv package2.xml %{pecl_name}-%{version}/%{pecl_name}.xml
cd xdebug-%{version}
+%patch0 -p1 -b .codecoverage~
# fix rpmlint warnings
iconv -f iso8859-1 -t utf-8 Changelog > Changelog.conv && mv -f Changelog.conv Changelog
@@ -121,6 +123,8 @@
%changelog
* Thu Oct 09 2008 Christopher Stone <chris.stone at gmail.com> 2.0.3-3
- Revert last change
+- Add code coverage patch (bz #460348)
+- http://bugs.xdebug.org/bug_view_page.php?bug_id=0000344
* Thu Oct 09 2008 Christopher Stone <chris.stone at gmail.com> 2.0.3-2
- Add php-xml to Requires (bz #464758)
More information about the fedora-extras-commits
mailing list