php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46846 Regex failure in run-tests
Submitted: 2008-12-12 12:35 UTC Modified: 2008-12-17 08:44 UTC
From: hannes dot magnusson at gmail dot com Assigned: zoe (profile)
Status: Closed Package: *Configuration Issues
PHP Version: 5.3.0alpha3 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
24 - 2 = ?
Subscribe to this entry?

 
 [2008-12-12 12:35 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-12-12 16:39 UTC] 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 17:07 UTC] zoe@php.net
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.

 [2008-12-17 08:44 UTC] zoe@php.net
Fixed by reducing the amount of test output slightly
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 12:01:32 2024 UTC