Message17508
The following code reliably produces a segmentation
fault under Solaris8 in Python2.3, Python2.2,
Python2.1.3 and Python1.5. It produces a Bus Error when
run on Python2.2 under OSX. Clearly it should produce a
Python RuntimeError.
import thread, time
class Frog:
def __str__(self):
return str(self)
f = Frog()
thread.start_new_thread(str,(f,))
time.sleep(1000)
This problem manifests in scenarios such as when you
have 2 publishing objects (such as HTMLgen objects) A
and B and you put A inside B and B inside A and each
objects __str__ method calls its childrens __str__
methods and voila! (I hope this might be the reason my
Zope server has been intermitently crashing for the
past year or so though I have not found any recursive
structures yet.)
With Python2.3 gdb reports:
vgetargskeywords (args=0x1bdaf0, keywords=0x0,
format=0xd2579 "0:str", kwlist=0xf7b4c,
p_va=0xfed0C02c) at Python/getargs.c:1167
Though with Python2.1 it dies at line 330 in getargs.c.
|
|
Date |
User |
Action |
Args |
2007-08-23 14:15:34 | admin | link | issue780714 messages |
2007-08-23 14:15:34 | admin | create | |
|