llvm-project/lldb
Todd Fiala 9bb71b73d9 Suppress python readline module under Linux to fix a seg fault.
Bug fix for pr18841:
http://llvm.org/bugs/show_bug.cgi?id=18841

This change creates a stub Python readline.so module that does almost
nothing. Its whole purpose is to prevent Python from loading the real
module, something it does during the embedded Python interpreter's
initialization sequence (and way before lldb ever requests it within
embedded_interpreter.py).

On Ubuntu 12.04 and 13.10 x86_64, and in the Python 2.7.6 tree, the
stock Python readline module links against the GNU readline library.
This appears to be the case on all Pythons except where __APPLE__ is
defined. LLDB now requires linking against the libedit library.
Something about having both libedit.so and libreadline.so linked into
the same process space is causing the Python readline.so to trigger a
NULL memory access. I have put in a separate patch to python.org.

This suppression of embedded interpreter readline support can be
removed if at least any one of the following happens:

1. The stock python distribution accepts a patch similar to what I
submitted to Python 2.7.6's Modules/readline.c file.

2. The stock python distribution implements Modules/readline.c in
terms of libedit's readline compatibility mode (i.e. essentially
compiles it the way __APPLE__ compiles that module) under Linux.

3. a clean-room implementation of the python readline module is
implemented against libedit (either readline compatibility mode or
native libedit). This could be implemented within the readline.cpp
file that this change introduces. It cannot be a fork of python's
readline.c module due to llvm licensing.

The net effect of this change on Linux is that the embedded python's
readline support will not exist.

llvm-svn: 202243
2014-02-26 07:39:20 +00:00
..
docs Note that qHostInfo prints the cputype and cpusubtype in base10; 2014-01-25 04:44:34 +00:00
examples Add example target description file for QEMU for x86-64. 2014-02-20 14:02:56 +00:00
include Fixed the command line LLDB so that "CTRL+C" will interrupt a running process again. 2014-02-24 22:50:57 +00:00
lib Add libs needed by iohandler merge to Makefile for FreeBSD 2014-01-31 14:30:11 +00:00
lldb.xcodeproj Move the libpanel dependency into the Libraries project folder. 2014-02-18 19:22:13 +00:00
lldb.xcworkspace Move the performance test cases into their own project. 2013-03-18 23:05:00 +00:00
resources Update the lldb version number in the xcode project files from 310.99.0 to 320.99.0. 2014-01-10 06:12:10 +00:00
scripts Suppress python readline module under Linux to fix a seg fault. 2014-02-26 07:39:20 +00:00
source Suppress python readline module under Linux to fix a seg fault. 2014-02-26 07:39:20 +00:00
test Make TestStdCXXDisassembly.StdCXXDisassembleTestCase work with libc++ 2014-02-25 18:47:23 +00:00
tools Switch debugserver to detach on error by default, and change the flag to kill-on-error. 2014-02-25 19:57:47 +00:00
utils LUI: Fix some issues causing crashes in the source view 2013-10-23 01:18:21 +00:00
www Add conditional breakpoints to our cheat sheet 2014-02-07 21:30:02 +00:00
.arcconfig Adding .arcconfig file to LLDB to allow using Phabricator for reviews 2013-05-23 20:21:28 +00:00
.gitignore Remove "llvm" from list of things to ignore. This results in the 2012-03-03 06:43:59 +00:00
CMakeLists.txt Fixing the Windows build for the changes brought in from the iohandler merge. 2014-01-31 18:48:46 +00:00
INSTALL.txt Update INSTALL.txt to mention LLDB builds on Linux with GCC or Clang. 2013-02-21 22:37:18 +00:00
LICENSE.TXT
Makefile Suppress python readline module under Linux to fix a seg fault. 2014-02-26 07:39:20 +00:00