#46846 [Opn]: Regex failure in run-tests
| From: | zoe@php.net | Date: | Fri, 12 Dec 2008 17:07:05 +0000 |
| Subject: | #46846 [Opn]: Regex failure in run-tests | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-131962@lists.php.net to get a copy of this message | ||
ID: 46846
Updated by: zoe@php.net
Reported By: hannes dot magnusson at gmail dot com
Status: Open
Bug Type: *Configuration Issues
Operating System: Linux
PHP Version: 5.3.0alpha3
Assigned To: zoe
New Comment:
Ignore my previous comment. It not a PCRE problem, it's that the test
is producing too much output. The behaviour of PCRE hasn't changed, but
the test has. I have no idea how it ever passed in this form.
Previous Comments:
------------------------------------------------------------------------
[2008-12-12 16:39:59] zoe@php.net
Although the test isn't very good at it produces far too much output
the problem is in preg_match() and did not exist in PHP 5.2.6.I believe
that it was probably introduced when the PCRE library was upgraded to
version 7.8. From the documentation for preg_match() the maximum length
of a compiled pattern is 65539, preg_match() fails with pattern strings
sizes somewhere between 29738 and 29310 characters, I'm not sure what
the relationship is between the string length and the compiled pattern
length.
------------------------------------------------------------------------
[2008-12-12 12:35:58] hannes dot magnusson at gmail dot com
Description:
------------
Running ext/standard/tests/file/tempnam_variation4.phpt via
run-tests.php causes regex compile failure.
Reproduce code:
---------------
5.3$ TEST_PHP_EXECUTABLE=auto sapi/cli/php run-tests.php
ext/standard/tests/file/tempnam_variation4.phpt
Actual result:
--------------
PHP Warning: preg_match(): Compilation failed: regular expression is
too large at offset 35480 in /usr/src/php/5.3/run-tests.php on line
1781
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=46846&edit=1