php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81693 mb_check_encoding does not return a value but quits php
Submitted: 2021-12-03 14:27 UTC Modified: 2021-12-04 10:45 UTC
From: richardbrinkman at hotmail dot com Assigned: cmb (profile)
Status: Closed Package: mbstring related
PHP Version: 8.1.0 OS: Debian (php:8.1-apache docker)
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: richardbrinkman at hotmail dot com
New email:
PHP Version: OS:

 

 [2021-12-03 14:27 UTC] richardbrinkman at hotmail dot com
Description:
------------
Write a file test.php with the content of the attached test script:

Run this script with "php test.php" results in: 
Segmentation fault (core dumped)

I use the php:apache Docker image.

If I run the same script with the php:8.0-apache Docker image then it will return the correct:
bool(true)

Both docker images install mbstring with:
docker-php-ext-install mbstring



Test script:
---------------
<?php
    var_dump(mb_check_encoding('Hello world', '7bit'));
?>


Expected result:
----------------
bool(true)

Actual result:
--------------
Segmentation fault (core dumped)

Patches

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-12-03 17:44 UTC] cmb@php.net
The following pull request has been associated:

Patch Name: Fix #81693: mb_check_encoding(7bit) segfaults
On GitHub:  https://github.com/php/php-src/pull/7712
Patch:      https://github.com/php/php-src/pull/7712.patch
 [2021-12-03 17:45 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2021-12-04 10:45 UTC] cmb@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC