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 Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or 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

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

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-2023 The PHP Group
All rights reserved.
Last updated: Sat Feb 04 13:03:38 2023 UTC