Closed Chi-teck closed 2 years ago
With the non-debug PHP 7.4 I have on hand,
(gdb) bt
#0 0x00007ffff3c846e5 in ?? () from /usr/lib/x86_64-linux-gnu/libedit.so.2
#1 0x00007ffff3c858db in ?? () from /usr/lib/x86_64-linux-gnu/libedit.so.2
#2 0x00007ffff3c84e57 in ?? () from /usr/lib/x86_64-linux-gnu/libedit.so.2
#3 0x00007ffff3c85258 in el_wgets () from /usr/lib/x86_64-linux-gnu/libedit.so.2
#4 0x00007ffff3c7fd63 in el_gets () from /usr/lib/x86_64-linux-gnu/libedit.so.2
#5 0x00007ffff3c93486 in readline () from /usr/lib/x86_64-linux-gnu/libedit.so.2
#6 0x00007ffff3cb0762 in ?? () from /usr/lib/php/20190902/readline.so
Searching around, it seems there might be some issues with libedit - doesn't seem like the bug is with PHP itself:
https://bugs.mysql.com/bug.php?id=89359
https://github.com/racket/racket/issues/3223
See also: https://bugs.php.net/bug.php?id=81280 https://bugs.php.net/bug.php?id=76989
Are you using libreadline or libeditline? Which version? See READLINE_LIB
and the phpinfo()
output.
Readline library => EditLine wrapper
Thank you! While I cannot reproduce a segfault when building against libreadline-dev, I can when building against libedit-dev (3.1-20181209-1). As @damianwadley already said, this doesn't appear to be a PHP issue, though, but rather an issue with libedit.
Prior conversations:
This issue is (I think) fixed in 8.1 by 7635.
Well, the issue is not fixed if you explicitly set the C locale; but as has been pointed out before, this is likely an issue with libedit.
Description
PHP Version
PHP 8.1.7
Operating System
Debian