Bug #75362 [NEW]: Unsupported charset results in stack overflow

From: Date: Thu, 12 Oct 2017 01:16:59 +0000
Subject: Bug #75362 [NEW]: Unsupported charset results in stack overflow
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211634@lists.php.net to get a copy of this message
From: soreepeong at gmail dot com Operating system: CentOS 6 PHP version: 7.1.10 Package: Reproducible crash Bug Type: Bug Bug description:Unsupported charset results in stack overflow Description: ------------ It happens whenever PHP encounters some kind of error message. It tries to print an error message, which apparently requires charset conversion, which triggers a warning about unsupported charset, and it tries to convert encoding again, and so on. GDB Backtrace: https://pastebin.com/7u96Z8HE Test script: --------------- <?php // the following invalid line prints error (expected) asdf // this one segfaults at the 2nd line ini_set('default_charset', "EUC-KR"); @ini_set('mbstring.internal_encoding', "EUC-KR"); Expected result: ---------------- Print error, or actually suppress the deprecated warning since it has "@" Actual result: -------------- Segfault -- Edit bug report at https://bugs.php.net/bug.php?id=75362&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75362&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75362&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75362&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75362&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75362&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75362&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75362&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75362&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75362&r=support Expected behavior: https://bugs.php.net/fix.php?id=75362&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75362&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75362&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75362&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75362&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75362&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75362&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75362&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75362&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75362&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75362&r=mysqlcfg

« previous php.bugs (#211634) next »