Publishing machinery should not pass around traceback objects

Bug #142995 reported by Chris McDonough
2
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Medium
Unassigned

Bug Description

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.

Tags: bug zope
Revision history for this message
Tres Seaver (tseaver) wrote :

This isn't a bug report: it is an invitation to a deep dive research project.

Please open a new issue with specifics if you disagree.

Changed in zope2:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.