Bug #75362 [Opn->Dup]: Unsupported charset results in stack overflow

From: Date: Thu, 12 Oct 2017 08:00:29 +0000
Subject: Bug #75362 [Opn->Dup]: Unsupported charset results in stack overflow
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211635@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75362&edit=1 ID: 75362 Updated by: requinix@php.net Reported by: soreepeong at gmail dot com Summary: Unsupported charset results in stack overflow -Status: Open +Status: Duplicate Type: Bug Package: Reproducible crash Operating System: CentOS 6 PHP Version: 7.1.10 Block user comment: N Private report: N New Comment: Duplicate of bug #75236, will be fixed in PHP 7.0.25 and 7.1.1. Previous Comments: ------------------------------------------------------------------------ [2017-10-12 01:16:51] soreepeong at gmail dot com 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 this bug report at https://bugs.php.net/bug.php?id=75362&edit=1

« previous php.bugs (#211635) next »