Message298915
As the faulthandler documentation notes:
> The fault handler is called on catastrophic cases and therefore can only use signal-safe functions (e.g. it cannot allocate memory on the heap). Because of this limitation traceback dumping is minimal compared to normal Python tracebacks:
This immediately disqualifies glibc's backtrace function as it is explicitly marked as AS-Unsafe.
The Windows code you linked also has a heap allocation, it isn't open source like backtrace but I'd imagine its implementation is fairly complex underneath.
Overall, adding more complexity especially to a handler dealing with a catastrophic failure is generally not a very good idea and it's really not a trivial problem to have easy cross platform stack traces. As much as I like this idea I don't think implementing is going to be possible and this is one of the points where you just have to attach a debugger like gdb for good information. |
|
Date |
User |
Action |
Args |
2017-07-23 21:20:26 | ammar2 | set | recipients:
+ ammar2, vstinner, The Compiler |
2017-07-23 21:20:26 | ammar2 | set | messageid: <1500844826.71.0.262646612213.issue30998@psf.upfronthosting.co.za> |
2017-07-23 21:20:26 | ammar2 | link | issue30998 messages |
2017-07-23 21:20:26 | ammar2 | create | |
|