Page MenuHomePhabricator

DiffHistoryBlobTest::testXdiffAdler32 fails with "String is not zero-terminated" with PHP 5.3.10
Closed, ResolvedPublic

Description

script session of phpunit

Running

LC_MESSAGES=C LANG=C LC_TIME=C php phpunit.php --configuration suite.xml --exclude-group Brok
en,Stub,ParserFuzz --log-junit $HOME/tests/log/postgres-log.xml "$@"

on a PostgreSQL-based wiki

using r113535

PHP Version 5.3.10-pl0-gentoo
pecl-xdiff-1.5.1
libxdiff-0.23

Errors are displayed during the run:

[Sat Mar 10 03:07:06 2012] Script: 'phpunit.php'

/var/tmp/portage/dev-php/pecl-xdiff-1.5.1-r1/work/php5.3/xdiff.c(79) : Block 0x00000000 status:

NULL

and in the log:

  1. DiffHistoryBlobTest::testXdiffAdler32 with data set #0 ('', 'Empty string')

String is not zero-terminated () (source: /var/tmp/portage/dev-lang/php-5.3.10/work/sapis-build/cli/Zend/zend_execute_API.c:447)

/usr/home/saper/public_html/pg/w/tests/phpunit/includes/DiffHistoryBlobTest.php:24
/usr/home/saper/public_html/pg/w/tests/phpunit/includes/DiffHistoryBlobTest.php:24
/usr/home/saper/public_html/pg/w/tests/phpunit/MediaWikiTestCase.php:70
/usr/home/saper/public_html/pg/w/tests/phpunit/MediaWikiPHPUnitCommand.php:45
/usr/home/saper/public_html/pg/w/tests/phpunit/phpunit.php:60

etc.

Full log attached


Version: unspecified
Severity: normal
OS: Linux
Platform: PC
URL: http://tools.wikimedia.pl/~saper/fail/php_test_results_20120312_1425.txt

Attached:

Details

Reference
bz35110

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 12:11 AM
bzimport set Reference to bz35110.
bzimport added a subscriber: Unknown Object (MLST).

Looks like it's related to PHP 5.3.10.

Can't reproduce it with PHP 5.3.8 on FreeBSD.

Tests fail in the same way for MySQL and PostgreSQL.

https://bugs.php.net/bug.php?id=61358

(can we add "bugs.php.net" to "Seealso"?)

Bug fixed upstream, there is a new pecl-xdiff release 1.5.2:

http://pecl.php.net/package-info.php?package=xdiff&version=1.5.2

  • Fixed bug #61358 ("Warning: String is not zero-terminated" failing tests w/PHP 5.3.10)
  • Fixed build on PHP 5.4+

So, for builds with PHP 5.3.10+ and 5.4+ pecl-xdiff-1.5.2 is needed to pass tests