[LLVMbugs] [Bug 22981] New: LLVM messing up NCurses-based applications
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Mar 22 04:57:58 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=22981
Bug ID: 22981
Summary: LLVM messing up NCurses-based applications
Product: new-bugs
Version: 3.5
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: me at jmendeth.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
When trying to use the Clang Python bindings inside bpython, every time I
loaded a TranslationUnit from source, bpython segfaulted.
I've found the problem to be in
llvm::sys::Process::FileDescriptorHasColors(int). It uses terminfo to check if
the file descriptor has colors, but instead of restoring the `cur_term`
variable to its original value, it sets it to NULL. When control returns to the
NCurses app (bpython), it crashes because no current terminal is set.
This is the first time I ever deal with LLVM or NCurses code, so I might be
wrong. I did a search to see if this had been reported before, but I didn't
find anything.
To reproduce, fire up bpython and enter:
import clang.cindex
clang.cindex.TranslationUnit.from_source("path to some C file")
You need the Clang Python bindings installed, of course.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150322/1353423b/attachment.html>
More information about the llvm-bugs
mailing list