Message159229
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 :-) |
|
Date |
User |
Action |
Args |
2012-04-24 22:51:14 | vstinner | set | recipients:
+ vstinner, ncoghlan, pitrou |
2012-04-24 22:51:14 | vstinner | set | messageid: <1335307874.67.0.444140711184.issue14665@psf.upfronthosting.co.za> |
2012-04-24 22:51:14 | vstinner | link | issue14665 messages |
2012-04-24 22:51:14 | vstinner | create | |
|