php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1619 apxs and --with-system-regex doesn't combine, causing crash
Submitted: 1999-06-28 19:00 UTC Modified: 1999-06-30 20:13 UTC
From: rene at seindal dot dk Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 3.0.11 OS: linux 2.0.36/slackware 3.6
Private report: No CVE-ID: None
 [1999-06-28 19:00 UTC] rene at seindal dot dk
For some unknown reason the bundled regex doesn't work anymore (for me).  Maybe it is connected to the (new?) PCRE code??

The bundled regex did work for me with 3.0.9

When I used --with-system-regex, config.h didn't change.
I don't understand why, but configure.in tested for USE_HSREGEX in the output of "apxs -q CFLAGS" before using the system regex.  It wasn't there.  I removed the test, autoconfed, configured, compiled and it runs with the system regex.

This one crashed (with bundled regex) consistently apache with a sigsegv
<?
$regex = "^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$";
print "<BR>pre ereg";flush();
ereg($regex, ".");
print "<BR>post ereg";flush();
?>
The second print never arrived.

Php configured as (with changed configure.in!):

./configure  --with-apxs=/usr/local/apache/bin/apxs --with-imap=/vol/src/drift/imap-4.4/c-client  --enable-track-vars --with-gd=/vol/src/test/gd1.3 --with-mysql=/usr/local/mysql/ --with-gdbm --with-system-regex  --without-pcre-regex

The diff to configure.in is ridiculous, but did the job:
*** configure.in        Tue Jun 29 00:24:19 1999
--- configure.in~       Sun Jun 27 19:53:49 1999
***************
*** 485,491 ****
  [  --with-system-regex     Do not use the bundled regex library],
  [
        if test -n "$APXS"; then
!               if test -z "QQQQ`$APXS -q CFLAGS | grep USE_HSREGEX`"; then
                        REGEX_LIB=regex/libregex.a
                        HSREGEX=yes
                        AC_MSG_RESULT(yes)
--- 485,491 ----
  [  --with-system-regex     Do not use the bundled regex library],
  [
        if test -n "$APXS"; then
!               if test -z "`$APXS -q CFLAGS | grep USE_HSREGEX`"; then
                        REGEX_LIB=regex/libregex.a
                        HSREGEX=yes
                        AC_MSG_RESULT(yes)

(it got wrapped, right?)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-06-30 20:13 UTC] sas at cvs dot php dot net
fixed in CVS
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 16:01:35 2024 UTC