From: asm at asm dot flynet dot pl
Operating system: Linux
PHP version: 5.0.2
PHP Bug Type: *Regular Expressions
Bug description: preg_match causes segfault in cli/cgi interactive mode
Description:
------------
Please forgive, that I haven't attached backtrace, and
whole ./configure options. But I see this behaviour
on diffrent boxes (an old slackware with 2.2 and fedora with 2.4) with
diffrent versions
of PHP5's CLI/CGI interactive mode (so it should be easy to recover). It
doesn't affect PHP4.
Reproduce code:
---------------
BOX1$ php -v ; php -a
PHP 5.0.0 (cli) (built: Oct 15 2004 17:43:01)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.0, Copyright (c) 1998-2004 Zend Technologies
Interactive mode enabled
<?
if (preg_match('/.*end$/', 'abcend')) echo 'got it';
?>
got itSegmentation fault
***
BOX2$ php5 -v ; php5 -a
PHP 5.0.2 (cli) (built: Oct 17 2004 00:46:25)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v2.0.2, Copyright (c) 1998-2004 Zend Technologies
Interactive mode enabled
<?
if (preg_match('/.*end$/', 'abcend')) echo 'got it';
?>
got itSegmentation fault
Expected result:
----------------
got it
Actual result:
--------------
expected + segfault
--
Edit bug report at http://bugs.php.net/?id=30513&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30513&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30513&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30513&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=30513&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=30513&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=30513&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=30513&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=30513&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=30513&r=support
Expected behavior: http://bugs.php.net/fix.php?id=30513&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=30513&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=30513&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=30513&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30513&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=30513&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=30513&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=30513&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=30513&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=30513&r=mysqlcfg