php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3599 preg_match_all
Submitted: 2000-02-23 21:07 UTC Modified: 2000-02-24 09:38 UTC
From: april at digex dot com Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0.12 OS: Solaris 2.7 (Sparc)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: april at digex dot com
New email:
PHP Version: OS:

 

 [2000-02-23 21:07 UTC] april at digex dot com
i'm using the stock php3.ini file.

compile time options:
./configure  --with-apache=../apache_1.3.11 --with-mysql=/usr/local/mysql --enable-debug=no --enable-track-vars=yes --enable-bcmath=yes --enable-memory-limit=yes --with-imap --with-gd=/usr/local/include/gd

When using preg_match_all (in place of preg_match) like this:

$thing = "blah@blah.com";
if ((preg_match_all("/\@/i", $thing)) && (preg_match_all("/\./i", $thing))) {
  echo "match";
}
else { echo "no match"; }

hitting it with a web browser causes a segmentation fault (11) error in the Apache (1.3.11) logs:
[Wed Feb 23 19:31:46 2000] [notice] child pid 20345 exit signal Segmentation Fault (11)
and the page comes back as having No Data.
it doesn't kill the webserver or cause any further problems (except causing IE to run slow until it's restarted :P )

The error and problem are completely reproducable.

Unfortunately, i have not been able to test this with the most recent version of php (for which i apologize for posting this anyway), but it broke some obscure parts of a set of live scripts i have and had to revert temporarily :P

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-02-24 09:38 UTC] andrei at cvs dot php dot net
preg_match_all() requires 3 arguments. It's been fixed in CVS
to output a warning if not all 3 are passed.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 27 22:01:28 2024 UTC