Bug #15829 Updated: using nonexistingn back reference in regex crashes PHP

From: Date: Fri, 12 Apr 2002 18:57:18 +0000
Subject: Bug #15829 Updated: using nonexistingn back reference in regex crashes PHP
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-4768@lists.php.net to get a copy of this message
ID: 15829 Updated by: sniper@php.net Reported By: sander@php.net Status: Open Bug Type: Reproducible crash Operating System: Debian (Sid) Linux PHP Version: 4.0CVS-2002-03-0 New Comment: Doesn't crash here either.. Previous Comments: ------------------------------------------------------------------------ [2002-04-12 12:38:02] cynic@php.net I have it segfaulting there as well. FreeBSD roman.mobil.cz 4.4-STABLE FreeBSD 4.4-STABLE #0: Wed Dec 26 12:45:18 CET 2001 root@roman.mobil.cz:/usr/obj/usr/src/sys/CRUDPUPPY_3 i386 './configure' \ '--disable-shared' \ '--disable-session' \ '--enable-debug' \ '--enable-inline-optimization' \ '--enable-dio' \ '--enable-ftp' \ '--enable-pcntl' \ '--enable-shmop' \ '--enable-sysvsem' \ '--enable-sysvshm' \ '--enable-sockets' \ '--enable-tokenizer' \ '--without-mysql' \ '--with-openssl' \ '--with-zlib' \ '--with-bz2' \ '--with-curl' \ '--with-gettext' \ '--with-iconv' \ '--with-ncurses' \ '--with-readline' \ "$@" I don't have a backtrace yet. ------------------------------------------------------------------------ [2002-03-02 07:42:55] sander@php.net It crashes with a plain ./configure too btw... ------------------------------------------------------------------------ [2002-03-02 07:25:30] derick@php.net Doesn't crash for me: php -q <?php $a="abc123"; echo ereg_replace("123",'def\1ghi',$a)?> abcdef\1ghi Derick ------------------------------------------------------------------------ [2002-03-02 07:24:07] sander@php.net Errm... That test passes here too: \0 back reference ... passed But this one doesn't: nonexisting back reference (012.phpt) ... failed (it crashes) ------------------------------------------------------------------------ [2002-03-02 07:15:12] yohgaki@php.net With my configuration it passes. Running tests in /home/yohgaki/cvs/php/DEV/ext/standard/tests/reg ================================================================= \0 back reference ... passed However, there is something wrong in current PHP. I got exit status 255 when run-tests.php finished. (It doesn't now) The real problem may be in broken heap memory area by some other place. ------------------------------------------------------------------------ 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/15829 -- Edit this bug report at http://bugs.php.net/?id=15829&edit=1

« previous php.bugs (#4768) next »