How to crash Python in 1 easy step (python 2.2.2)

Jeff Epler jepler at
Wed Jul 16 17:28:09 CEST 2003

On Tue, Jul 15, 2003 at 03:55:37PM +0000, Michael Hudson wrote:
> This has almost surely got to be a readline problem.  Does it happen
> in (e.g.) gdb?

It happens in bc, but not in gdb or my shell.

The traceback is endless frames of
#2094 0x4045e803 in _rl_dispatch_subseq () from /usr/lib/
#2095 0x4045e77e in _rl_dispatch () from /usr/lib/
.. the same in bc or python

So does this simple C program:
	#include <stdio.h>
	#include <readline/readline.h>
	#include <readline/history.h>

	int main(void) {
		char *line = readline(">>>");
		if(line == NULL) return 1;
		printf("The user entered %s\n", line);
		return 0;

It seems fairly clear that this is a readline bug.  I'm not sure what
Python can do about it, if anything...


More information about the Python-list mailing list