This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Seg fault in readline call.
Type: Stage:
Components: Extension Modules Versions: Python 2.4
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: ajaksu2, gnovak, mwh
Priority: normal Keywords:

Created on 2007-01-08 18:02 by gnovak, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
extra.txt gnovak, 2007-01-08 18:02 Additional instructions and backtrace
Messages (5)
msg30945 - (view) Author: gnovak (gnovak) Date: 2007-01-08 18:02
GDL is a free implementation of the IDL programming language that can be built as a Python module to allow one to call IDL code from Python. 
http://gnudatalanguage.sourceforge.net/

When "enough" of readline has been activated, I get a seg fault
with the backtrace listed below when trying to call any GDL code from Python.  I've also reported the problem there.

One way to initialize enough of readline is to use IPython (http://ipython.scipy.org), an enhanced interactive Python shell (this is how I found the bug). Another way is to follow the instructions from IPython's
author (no IPython required) listed below.

I am using:
OS X 10.4.8
Python 2.4.2 (#1, Mar 22 2006, 21:27:43) 
[GCC 4.0.1 (Apple Computer, Inc. build 5247)] on darwin
GDL 0.9 pre 3
readline 5.0

msg30946 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2007-01-08 21:09
You don't really provide enough information for us to be able to help you.  A self-contained test case would be best, failing that a backtrace from gdb might help.

Also, Python 2.5 and readline 5.1 are out now, maybe you could try with them?
msg30947 - (view) Author: gnovak (gnovak) Date: 2007-01-08 21:46
The GDB backtrace is (and was) in the attached text file extra.txt.  Also in extra.txt are instructions for causing Python to crash using plain Python and GDL.  Unfortunately I don't know a way to cause the seg fault without installing GDL.

I'm working on trying it with Python2.5 and newer readlines.
msg30948 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2007-01-09 09:40
Ah, I didn't see extra.txt, sorry about that.  I'd advise a debug build, and continuing to try newer versions of Python and readline.

The crashing line seems to be:

			line = history_get(state->length)->line;

which suggests that readline has gotten confused somehow.  But it could be Python misuse, of course.  Or a memory scribbling bug in some extension module, that's always fun
msg81570 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-02-10 18:10
Not confirmed with newer versions, closing suggested.
History
Date User Action Args
2022-04-11 14:56:22adminsetgithub: 44428
2009-02-17 01:47:47benjamin.petersonsetstatus: open -> closed
resolution: not a bug
2009-02-10 18:10:49ajaksu2setnosy: + ajaksu2
messages: + msg81570
2007-01-08 18:02:52gnovakcreate