diff options
| author | Ebuka Ezike <yerimyah1@gmail.com> | 2026-01-08 18:46:03 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-08 18:46:03 +0000 |
| commit | 43cb4631c1f42dbfce78288b8ae30b5840ed59b3 (patch) | |
| tree | b753c1d68e5fe96b0109962a8718ea722718de7a /lldb/test/Shell/ScriptInterpreter/Python | |
| parent | f0275bd6ba888d409cf677d498233d3be75cbf6b (diff) | |
| download | llvm-43cb4631c1f42dbfce78288b8ae30b5840ed59b3.zip llvm-43cb4631c1f42dbfce78288b8ae30b5840ed59b3.tar.gz llvm-43cb4631c1f42dbfce78288b8ae30b5840ed59b3.tar.bz2 | |
[lldb] Fix typed commands not shown on the screen (#174216)
The cause is that in `python3.14`, `fcntl.ioctl` now throws a buffer
overflow error
when the buffer is too small or too large (see
https://github.com/python/cpython/pull/132919). This caused the Python
interpreter to fail terminal detection and not properly echo user
commands back to the screen.
Fix by dropping the custom terminal size check entirely and using the
built-in `sys.stdin.isatty()` instead.
Fixes #173302
Diffstat (limited to 'lldb/test/Shell/ScriptInterpreter/Python')
| -rw-r--r-- | lldb/test/Shell/ScriptInterpreter/Python/io.test | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/test/Shell/ScriptInterpreter/Python/io.test b/lldb/test/Shell/ScriptInterpreter/Python/io.test new file mode 100644 index 0000000..25e3de4 --- /dev/null +++ b/lldb/test/Shell/ScriptInterpreter/Python/io.test @@ -0,0 +1,12 @@ +# RUN: rm -rf %t.stdout %t.stderr +# RUN: cat %s | %lldb --script-language python > %t.stdout 2> %t.stderr +# RUN: cat %t.stdout | FileCheck %s --check-prefix STDOUT +# RUN: cat %t.stderr | FileCheck %s --check-prefix STDERR +script +variable = 300 +print(variable) +print(not_value) +quit + +# STDOUT: 300 +# STDERR: NameError{{.*}}is not defined |
