php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75362 Unsupported charset results in stack overflow
Submitted: 2017-10-12 01:16 UTC Modified: 2017-10-12 08:00 UTC
From: soreepeong at gmail dot com Assigned:
Status: Duplicate Package: Reproducible crash
PHP Version: 7.1.10 OS: CentOS 6
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: soreepeong at gmail dot com
New email:
PHP Version: OS:

 

 [2017-10-12 01:16 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-12 08:00 UTC] requinix@php.net
-Status: Open +Status: Duplicate
 [2017-10-12 08:00 UTC] requinix@php.net
Duplicate of bug #75236, will be fixed in PHP 7.0.25 and 7.1.1.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Oct 12 04:01:27 2024 UTC