Bug #1828: call to ereg crashes apache with a segfault 11.
| From: | rasjani at pcuf dot fi | Date: | Thu, 22 Jul 1999 13:19:40 +0000 |
| Subject: | Bug #1828: call to ereg crashes apache with a segfault 11. | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-8970@lists.php.net to get a copy of this message | ||
From: rasjani@pcuf.fi
Operating system: Linux / REdhat 6.0
PHP version: 3.0.11
PHP Bug Type: Reproduceable crash
Bug description: call to ereg crashes apache with a segfault 11.
This following script is from php manual and is causing me trouble. Ive asked help from #php (from
efnet & ircnet) and in both places ppl think its a bug. Here's the script.
<?PHP
$date = "1999-01-01";
if ( ereg( "([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $date, $regs ) ) {
echo "$regs[3].$regs[2].$regs[1]";
} else {
echo "Invalid date format: $date";
}
?>
This script wasnt the first time i found the bug but ive tested this too and the same things
happens. Browser complains about empty document and apache's errlog file gets this message:
[Thu Jul 22 15:59:22 1999] [notice] child pid 16696 exit signal Segmentation fault (11)
Here's info that might help to solve the problem..
PHP Version: 3.0.11 (selfcompiled, with following switches)
--with-apxs=/usr/sbin/apxs --with-pgsql=/usr/include/pgsql --with-system-regex
Apache: 1.3.6 (straight from redhat RPM, not self compiled)
Distro: Linux Redhat 6.0