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
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:1 (33.3%)
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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.
 [2021-10-27 18:28 UTC] Ernaelsten at gmail dot com
I have the same problem with the local fr_BE , under Mint and Pop!Os (ubuntu 20.04) for php8.0 and php8.1.
On the other hand with php7.4 no problem.
I can't put accented characters in the response of a readline() function either.
 [2022-02-09 04:41 UTC] sebagi8166 at mxclip dot com
< a href="https://www.customersurveys.xyz/>Customer Satisfaction Survey </a>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC