[ZCM] [ZC] 995/ 2 Comment "zope/python seg fault with infinite __str__ recursion"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Fri May 28 13:32:27 EDT 2004


Issue #995 Update (Comment) "zope/python seg fault with infinite __str__ recursion"
 Status Pending, Zope/bug medium
To followup, visit:
  http://zope.org/Collectors/Zope/995

==============================================================
= Comment - Entry #2 by mcdonc on May 28, 2004 1:32 pm

Can you confirm that this is an issue with more recent versions of Python and Zope?
________________________________________
= Request - Entry #1 by Anonymous User on Jul 30, 2003 2:06 am

I am using only the ZServer part of Zope with Apache as the front end web server, communicating with the Python ZServer process using the fastcgi apache module. The following code produces a segmentation fault with Zope2.6.1 and Python2.1 or Python2.2 running under Solaris 8 when it should produce a RuntimeError, as it does when executed on the commandline:

class HTMLObj:

def __str__(self):
    return str(self)

def index_html():
    x = HTMLObj()
    return str(x)


This is the simplest example I know that reliably produces the seg fault.

A more realistic example might be if you are using an HTML publishing module such as HTMLgen and accidently put tableA inside tableB and tableB inside tableA.

I am currently bugfixing a large zope system with plenty of HTMLgen that regularly crashes with segmenation faults of an unknown origin. I fear/hope there may be recursive HTML objects in our code somewhere that are causing the seg faults, but I cannot find them because seg faults give no traceback.

==============================================================




More information about the Zope-Collector-Monitor mailing list