This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients ncoghlan, pitrou, vstinner
Date 2012-04-24.22:51:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1335307874.67.0.444140711184.issue14665@psf.upfronthosting.co.za>
In-reply-to
Content
faulthandler has to be as simple as possible because Python internal state may be completly corrupted. faulthandler was written to display the traceback on bugs like invalid memory read or write. I chose to print the traceback as it is stored in memory (from the current frame to the bottom of the stack using f_back).

If the traceback is corrupted in the middle of the frame stack, faulthandler displays the first half of the traceback, whereas it would not display anything with your patch.

The number of frames is also limited to avoid unlimited loops. The internal state may be corrupted and I don't want to track already seen frames or something like that. With your patch, you may miss where the bug occurred if the stack contains more than 100 frames. The limit is hardcoded and cannot be changed at runtime yet.

I already seen a segfault while faulthandler was trying to display the traceback of a segfault, more than once :-)
History
Date User Action Args
2012-04-24 22:51:14vstinnersetrecipients: + vstinner, ncoghlan, pitrou
2012-04-24 22:51:14vstinnersetmessageid: <1335307874.67.0.444140711184.issue14665@psf.upfronthosting.co.za>
2012-04-24 22:51:14vstinnerlinkissue14665 messages
2012-04-24 22:51:14vstinnercreate