Re: [PHP4BETA] Bad 2nd arg to pcre_replace causes SIGSEGV when /e

From: Date: Fri, 05 May 2000 16:10:58 +0000
Subject: Re: [PHP4BETA] Bad 2nd arg to pcre_replace causes SIGSEGV when /e
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-14530@lists.php.net to get a copy of this message
On Fri, 05 May 2000, Joey wrote: > This is from CVS, ~8 am this morning (-0700). > Short desc. is that preg_replace is causing a SIGSEGV when I miss a quote > mark in the 2nd arg and use /e. Not sure if this is PHP or PCRE. If it's > PCRE, not much we can do about it, otherwise I'll log a bug. > > Input: > <?xml version="1.0" encoding="UTF-8" standalone="no"?> > > Command being run: > preg_replace("/(<)([^>]*)(>)/e", "'\\1FOO\\3", $line); > > Note the missing ' in the replace statement. This causes a SIGSEGV. > Backtrace follows: On my machine it doesn't segfault, just prints "Failed executing: 'FOO", but I can see where it might fail. To properly detect it, though, would require some changes in Zend. Stay tuned. -Andrei * I don't mind going nowhere as long as it's an interesting path. *

« previous php.version4 (#14530) next »