#19386 [Fbk]: crash at if (preg_match('/(.|[\r\n])+/', $x)):

From: Date: Tue, 17 Sep 2002 12:56:39 +0000
Subject: #19386 [Fbk]: crash at if (preg_match('/(.|[\r\n])+/', $x)):
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-19541@lists.php.net to get a copy of this message
 ID:               19386
 Updated by:       sniper@php.net
 Reported By:      paul.dodd@usb.unibe.ch
 Status:           Feedback
 Bug Type:         PCRE related
 Operating System: *
 PHP Version:      4.2.3, 4.3.0-dev
 New Comment:

And I can still reproduce it with the short script and using latest
CVS. (which has the new pcre lib)



Previous Comments:
------------------------------------------------------------------------

[2002-09-17 07:10:20] wez@php.net

I didn't see that Jani reproduced this.

FWIW, I can not reproduce using current CVS or with
PHP 4.2.1 (the oldest version I had to hand just now)
using the short script that you provided.

------------------------------------------------------------------------

[2002-09-17 07:03:48] wez@php.net

Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.

Could you supply a backtrace?
Also, could you try with a non-stable snapshot from the
last couple of days as the PCRE library was updated recently.

------------------------------------------------------------------------

[2002-09-17 05:22:14] paul.dodd@usb.unibe.ch

Tests of different lengths of string '$x' show that if
strlen($x) > 4040 the crash occurs i.e. with the last
text is 'Randomized-Controlled-Trial' php will crash. A
shorter script as requested is:
<?php
$x = '';
while (true) {
	$x .= '*';
	$len = strlen($x);
	preg_match('/(.|[\r\n])+/', $x, $match);
	echo "<br />$len\n";
}
?>

------------------------------------------------------------------------

[2002-09-13 12:31:15] sniper@php.net

I can reproduce the crash on Linux too. But could you try
shortening the example script to something bit smaller?


------------------------------------------------------------------------

[2002-09-13 09:53:19] paul.dodd@usb.unibe.ch

By php version 4.3.1 I mean 4.2.1 of course ;-)

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/19386

-- 
Edit this bug report at http://bugs.php.net/?id=19386&edit=1



Thread (14 messages)

« previous php.bugs (#19541) next »