[ZCM] [ZC] 1338/ 1 Request "Publishing machinery should not pass around traceback objects"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Mon May 17 13:49:19 EDT 2004


Issue #1338 Update (Request) "Publishing machinery should not pass around traceback objects"
 Status Pending, Zope/bug medium
To followup, visit:
  http://zope.org/Collectors/Zope/1338

==============================================================
= Request - Entry #1 by mcdonc on May 17, 2004 1:49 pm

>From an email thread on Zope-dev:

>>>On a different subject, the publisher probably shouldn't pass around
>>>traceback objects (e.g. when it calls into err_hook) as Tres believes
>>>that may be a memory leak waiting to happen.
>>
>>The traceback is vital for error analysis.
>>
>>It may not be necessary that ZPublisher touches the traceback
>>but we will definitely need access to it during error handling.

Because the traceback contains stack frames, passing it through another 
stack frame (via a function call) is inherently tricky:  the called 
function must *not* raise another exception.

> Perhaps the traceback can be passed as a string to avoid leaks?
> Furthermore why can't the traceback be retrieved later from
> sys.exc_info()?

+1;  I don't want untrusted code handling tracebacks anyway.

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




More information about the Zope-Collector-Monitor mailing list