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.

Author vstinner
Recipients georg.brandl, jonaskoelker, terry.reedy, vstinner
Date 2008-09-29.10:40:00
SpamBayes Score 3.7676025e-07
Marked as misclassified No
Message-id <1222684802.99.0.845012231689.issue1069092@psf.upfronthosting.co.za>
In-reply-to
Content
This issue is a stack overflow: your code do recursive calls to 
internal_print().

Backtrace from gdb:
--------------------------------------------
#0  0xb7e92064 in _IO_new_file_overflow () 
from /lib/tls/i686/cmov/libc.so.6
#1  0xb7e94bc3 in __overflow () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7e8e03b in fputc () from /lib/tls/i686/cmov/libc.so.6
#3  0x080a2f2d in tupleprint (op=0xb7b5cc2c, fp=0xb7f744e0, flags=0) 
at Objects/tupleobject.c:193
#4  0x0808b9f7 in internal_print (op=0xb7b5cc2c, fp=0xb7f744e0, 
flags=0, nesting=0) at Objects/object.c:309
#5  0x0808ba60 in PyObject_Print (op=0xb7b5cc2c, fp=0xb7f744e0, 
flags=0) at Objects/object.c:324
(...)
#4628 0x0808ba60 in PyObject_Print (op=0xb7b68e4c, fp=0xb7f744e0, 
flags=0) at Objects/object.c:324
#4629 0x080a2f9e in tupleprint (op=0xb7b68e6c, fp=0xb7f744e0, flags=0) 
at Objects/tupleobject.c:201
#4630 0x0808b9f7 in internal_print (op=0xb7b68e6c, fp=0xb7f744e0, 
flags=0, nesting=0) at Objects/object.c:309
#4631 0x0808ba60 in PyObject_Print (op=0xb7b68e6c, fp=0xb7f744e0, 
flags=0) at Objects/object.c:324
(...)
#4638 0x080a2f9e in tupleprint (op=0xb7b68ecc, fp=0xb7f744e0, flags=0) 
at Objects/tupleobject.c:201
#4639 0x0808b9f7 in internal_print (op=0xb7b68ecc, fp=0xb7f744e0, 
flags=0, nesting=0) at Objects/object.c:309
#4640 0x0808ba60 in PyObject_Print (op=0xb7b68ecc, fp=0xb7f744e0, 
flags=0) at Objects/object.c:324
#4641 0x080a2f9e in tupleprint (op=0xb7b68eec, fp=0xb7f744e0, flags=0) 
at Objects/tupleobject.c:201
#4642 0x0808b9f7 in internal_print (op=0xb7b68eec, fp=0xb7f744e0, 
flags=0, nesting=0) at Objects/object.c:309
(...)
--------------------------------------------

Informations using my debugger (python-ptrace):
------------------------------------------------------------
PID: 1201
Signal: SIGSEGV
STACK OVERFLOW! Stack pointer is in 0xbf10d000-0xbf90d000 => [stack] 
(rw-p)
- instruction: CALL 0x80d3305
- mapping: 0xbf10cff0 is not mapped in memory
- register <stack ptr>=0xbf10cff0
------------------------------------------------------------

Some solutions:
 - avoid creation of nested sequence
 - create generic protection against stack overflow (use 
setjmp/longjmp)
 - avoid recursive call to internal_print()
History
Date User Action Args
2008-09-29 10:40:03vstinnersetrecipients: + vstinner, terry.reedy, birkenfeld, jonaskoelker
2008-09-29 10:40:02vstinnersetmessageid: <1222684802.99.0.845012231689.issue1069092@psf.upfronthosting.co.za>
2008-09-29 10:40:02vstinnerlinkissue1069092 messages
2008-09-29 10:40:01vstinnercreate