From: jacob at keystreams dot com Operating system: Mandrake Linux; 2.4.8-26mdk PHP version: 4.3.1 PHP Bug Type: Reproducible crash Bug description: Apache segfaults when combination of functions are applied to empty variable
Description: ------------ When attempting to decode a string using three functions at once (utf8_decode, html_entity_decode, stripslashes) and if the string is null, Apache reports a segfault error and a general 'The page cannot be displayed' error page is shown or the last working client-side cached version of the page. Running Apache 1.3.27 w/ mod_rewrite. PHP ./configure: ./configure --with-mysql=/usr --with-xml --enable-track-vars --with-apache=../apache_1.3.27 --with-curl=/usr/lib --with-dom --with-zlib Reproduce code: --------------- <?php $string = null; $string = utf8_decode(html_entity_decode(stripslashes($string))); echo $string; ?> Expected result: ---------------- It is expected that a decoded string will be returned and echo'd to the browser. Actual result: -------------- [no backtrace available] Web browser displays nothing or last cached page results. Apache error_log shows the following: [Fri Aug 8 15:57:16 2003] [notice] child pid 420 exit signal Segmentation fault (11) This error is reproduced successfully everytime. -- Edit bug report at http://bugs.php.net/?id=24990&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=24990&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=24990&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=24990&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24990&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24990&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24990&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24990&r=support Expected behavior: http://bugs.php.net/fix.php?id=24990&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24990&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24990&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24990&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24990&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24990&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24990&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24990&r=gnused
