[ python-Bugs-1598083 ] Top-level exception handler writes to stdout unsafely

SourceForge.net noreply at sourceforge.net
Fri Nov 17 00:50:10 CET 2006


Bugs item #1598083, was opened at 2006-11-16 18:50
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1598083&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jp Calderone (kuran)
Assigned to: Nobody/Anonymous (nobody)
Summary: Top-level exception handler writes to stdout unsafely

Initial Comment:
When an exception reaches the top frame and is displayed by the exception handler, they are handled by formatting them to stderr.  This involves a series of calls to PyFile_WriteString, either directly from PyErr_Display or indirectly through PyTraceBack_Print.  Few, if any, of these PyFile_WriteString calls have their result checked for error.  Worse, PyFile_WriteString itself does not check the return value of fputs().

So, for example, with a signal handler installed, a signal received while a traceback is being printed can result in the traceback _not_ being printed.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1598083&group_id=5470


More information about the Python-bugs-list mailing list