python segfault for-loop + print
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
IPython |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Python segfaults for a fairly simple python for-loop. I realize that a segfault shouldn't happen anyway, and that it likely means there is a bug in python, but I am posting it here since I was running IPython. I also am not sure that what I am typing makes sense, as I don't know python much at all.
Steps to reproduce:
1. start ipython
2. type:
for i in range: [enter]
print 42 [enter]
Observe: segfault (backtrace attached below). Happens every time.
Version info:
IPython 0.10
Python 2.5.4 (r254:67916, Oct 1 2009, 01:51:32)
Linux 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:32:02 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux
Backtrace:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 182894237888 (LWP 25515)]
0x00000031e32691a5 in free () from /lib64/
(gdb) bt
#0 0x00000031e32691a5 in free () from /lib64/
#1 0x0000002a96d58d6a in py_remove_history (self=0x20, args=0x20) at /arm/scratch/
#2 0x000000000048afa2 in PyEval_EvalFrameEx (f=0x92a8d0, throwflag=9611920) at Python/ceval.c:3612
#3 0x000000000048c861 in PyEval_EvalCodeEx (co=0x2a974c1a08, globals=0x935bf0, locals=0x20, args=0x91e618, argcount=3, kws=0x91e630, kwcount=0, defs=0x2a97721410, defcount=2, closure=0x0)
at Python/ceval.c:2875
#4 0x000000000048abdd in PyEval_EvalFrameEx (f=0x91e470, throwflag=
#5 0x000000000048c861 in PyEval_EvalCodeEx (co=0x2a974c1288, globals=0x935bf0, locals=0x20, args=0x928298, argcount=2, kws=0x9282a8, kwcount=0, defs=0x2a97717de8, defcount=1, closure=0x0)
at Python/ceval.c:2875
#6 0x000000000048abdd in PyEval_EvalFrameEx (f=0x928110, throwflag=
#7 0x000000000048c861 in PyEval_EvalCodeEx (co=0x2a974b9f30, globals=0x935bf0, locals=0x20, args=0x91c790, argcount=2, kws=0x91c7a0, kwcount=0, defs=0x2a97717da8, defcount=1, closure=0x0)
at Python/ceval.c:2875
#8 0x000000000048abdd in PyEval_EvalFrameEx (f=0x91c600, throwflag=
#9 0x000000000048c861 in PyEval_EvalCodeEx (co=0x2a95655a80, globals=0x935bf0, locals=0x20, args=0x2a97133930, argcount=1, kws=0x6d19e0, kwcount=0, defs=0x2a97133920, defcount=2, closure=0x0)
at Python/ceval.c:2875
#10 0x000000000048abdd in PyEval_EvalFrameEx (f=0x6d1860, throwflag=
#11 0x000000000048c861 in PyEval_EvalCodeEx (co=0x2a955ed5d0, globals=0x935bf0, locals=0x20, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2875
#12 0x000000000048c9d2 in PyEval_EvalCode (co=0x20, globals=0x935bf0, locals=0x20) at Python/ceval.c:514
#13 0x00000000004af283 in PyRun_FileExFlags (fp=0x65e010, filename=
flags=
#14 0x00000000004b011f in PyRun_SimpleFil
#15 0x0000000000412061 in Py_Main (argc=0, argv=0x0) at Modules/main.c:532
#16 0x00000031e321c3fb in __libc_start_main () from /lib64/
#17 0x000000000041172a in _start ()
(gdb) up
#1 0x0000002a96d58d6a in py_remove_history (self=0x20, args=0x20) at /arm/scratch/
318 /arm/scratch/
in /arm/scratch/
(gdb) info locals
entry_number = 16
entry = (HIST_ENTRY *) 0x92aec0
Ehm, the "script" I am trying to run should be:
for i in range(10): [enter]
print 42 [enter]