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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hannes dot magnusson at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Sun Dec 22 02:01:28 2024 UTC