#36267 [NEW]: Crash (segfault) not reproducible under Win32

From: Date: Thu, 02 Feb 2006 20:06:44 +0000
Subject: #36267 [NEW]: Crash (segfault) not reproducible under Win32
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-92848@lists.php.net to get a copy of this message
From: mikeb at tracersinfo dot com Operating system: Linux PHP version: 5.1.2 PHP Bug Type: PCRE related Bug description: Crash (segfault) not reproducible under Win32 Description: ------------ I use PCRE's every day to harvest information from webpages (i.e., not a newbie, and I use many very complex expressions regularly). I recently ran into a problem with an expression I needed to use (essentially, to select a particular <table>, its contents, and everything that follows it on page full of tables -- specifically without allowing an intervening <table> or </table> tag) that worked perfectly throughout my development under Windows XP Home SP2. As soon as I ported the script to GNU/Linux (3 different machines: Mandrake 10 [2.6.8 kernel]; 2 Ubuntu 5.10 [2.6.12 kernel]), it segfaults both under the CLI and Apache (1.3.33) SAPI. (The use of once-only subpattern is not significant -- same result is obtained using merely non-matching subpattern.) I've simplified the referenced script to what it takes to reproduce the problem, and I note that significant reduction in size of the two <tag> sections can allow this to function properly under Linux, but I do not have that luxury with arbitrary incoming webpages that must be parsed without advance knowledge of their contents. The same symptom obtains if I attempt to use preg_match instead of preg_replace. One of the failing PHP's config lines: --disable-cgi --with-apxs=/www/bin/apxs --enable-magic-quotes --with-openssl --with-zlib --enable-bcmath --with-bz2 --enable-calendar --with-curl --with-curlwrappers --enable-ftp --with-gd --with-mysql --with-mysqli --with-pdo-mysql --with-readline --enable-soap --enable-sockets --with-xsl Fails with stock php.ini-dist. Reproduce code: --------------- http://home.tampabay.rr.com/greenorb/testpregfault2.txt Expected result: ---------------- I expect to see the first <tag> tag echoed to my screen with a legend that "Stripfootpat worked". (Note that this IS the result obtained under Win32 [Windows XP Pro/Home SP2].) Actual result: -------------- Segmentation fault -- Edit bug report at http://bugs.php.net/?id=36267&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36267&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36267&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36267&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36267&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36267&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36267&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36267&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36267&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36267&r=support Expected behavior: http://bugs.php.net/fix.php?id=36267&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36267&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36267&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36267&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36267&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36267&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36267&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36267&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36267&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36267&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36267&r=mysqlcfg

« previous php.bugs (#92848) next »