Re: PHP 4.0 Bug #2670: ereg causes segfault

From: Date: Fri, 05 Nov 1999 19:27:45 +0000
Subject: Re: PHP 4.0 Bug #2670: ereg causes segfault
Groups: php.dev 
Request: Send a blank email to php-dev+get-12143@lists.php.net to get a copy of this message
Still segfaulting without "!" before ereg. It is an actual segfault(i.e. Document contains no data) --- Lars Torben Wilson <torben@pinc.com> wrote: > roberts_chris@yahoo.com writes: > > From: roberts_chris@yahoo.com > > Operating system: Solaris 7 x86 > > PHP version: 4.0 Latest CVS (05/11/1999) > > PHP Bug Type: Misbehaving function > > Bug description: ereg causes segfault > > > > ereg is crashing apache when the variable data > begins with a ".". > > There are probably better ways to do this, but , > it does work with ALL > > previous versions tested. Not able to get a core > dump or backtrace. > > > > Soalris 7 x86 on PII 400 > > Apache 1.3.9 with PHP as DSO > > > > ./configure --with-apxs=/opt/apache/bin/apxs > --with-config-file-path=/opt/apache/conf > --without-gd --with-yp --with-ldap=/opt > > > > > ********************************************************************************** > > <html> > > <head><title>Ereg Test</title></head> > > <body> > > <? > > $testvar=".bunk variable data"; > > > > if ( !ereg( "^\.+", $testvar) ) { > > echo "<h2>Testvar passed regex</h2>\n"; > > } > > ?> > > </body> > > </html> > > OK, just for informational purposes: this doesn't > crash on PHP > 3.0.13-dev or 4 for me (Linux, glibc, Apache 1.3.6). > However, the '!' > in front of the regex inverts the logic, which may > cause it to look a > little like it's not working; try removing it and > see what you get. > > If you're getting an actual segfault in apache (i.e. > 'Document > contains no data' then that's a different story...:) > > > Torben > ===== __________________________________________________ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com

« previous php.dev (#12143) next »