New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python readline module crashes in history_get on FreeBSD with libedit #68576
Comments
I encountered a segfault in Python's call_readline from LLDB on FreeBSD, with libedit. There is a fix for this issue already in readline.c, but under #ifdef __APPLE__ Backtrace: (lldb) target create "/data/emaste/src/llvm/build/bin/lldb" --core "lldb-3.7.0.core"
frame #0: 0x0000000809706dcd readline.so`call_readline(sys_stdin=0x00000008055d9d10, sys_stdout=0x00000008055d9e40, prompt=0x0000000806eb7854) + 397 at readline.c:1132 It looks like a straightforward s/#ifdef __APPLE__/#if defined(APPLE) || defined(FreeBSD)/ fixes the issue (as in the attached proof of concept patch). |
Presumably the #ifdefs ought to just be deleted though, relying on the runtime detection of libedit compatibility issues on any platform. |
The change in spec in editline was to better match GNU readline behavior. Unfortunately, we depended on the old behavior. Technically, we don't support editline out-of-the-box other than on OS X; as Martin notes, generalizing that support is what bpo-13501 is about. I'm going to close this as a duplicate of it. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: