php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80583 cli readline causes crash
Submitted: 2021-01-04 13:53 UTC Modified: 2021-01-04 14:05 UTC
From: jan dot hana at atlas dot cz Assigned:
Status: Verified Package: *Unicode Issues
PHP Version: 8.0.0 OS: Ubuntu 20.04
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: jan dot hana at atlas dot cz
New email:
PHP Version: OS:

 

 [2021-01-04 13:53 UTC] jan dot hana at atlas dot cz
Description:
------------
When using the Czech diacritics in readline parametter, whole application crashes.

It works in PHP 7.4.

Test script:
---------------
<?php
readline('doména ěščřžýáíé');

Actual result:
--------------
Neoprávněný přístup do paměti (SIGSEGV) (core dumped [obraz paměti uložen])

Translated to EN: Unauthorized Memory Access (SIGSEGV) (core dumped)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-01-04 14:05 UTC] nikic@php.net
-Status: Open +Status: Verified
 [2021-01-04 14:05 UTC] nikic@php.net
This works on 7.4 and 8.0:

var_dump(setlocale(LC_ALL, 'en_US.UTF-8'));
readline('doména ěščřžýáíé');

This crashes on 7.4 and 8.0:

var_dump(setlocale(LC_ALL, 'C'));
readline('doména ěščřžýáíé');

Locale-dependent crashes in libedit, this is horrible.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Jul 29 00:01:25 2021 UTC