Steve Dower <steve.do...@python.org> added the comment:

Haven't had a chance to test this, but I suspect our change should depend on 
what happens when a C++ exception is actually unhandled.

In this case, the following sequence has occurred:
* exception is raised
* debug event is raised (if a debugger is attached)
* stack-based handlers get first-chance to ignore the exception
 * there is a stack-based handler that says "let it be raised" and the search 
stops
* vector-based handlers are called
* stack unwind begins, and when the handler is reached it allows execution to 
continue

Unfortunately, I don't think there's going to be any difference between the 
unhandled and handled cases at the point where our handler exists - at worst, 
the OS is going to say that it is "handled" and its handler will kill the 
process. The first chance lookup is actually there to continue execution and 
ignore the exception (possibly after fixing an argument or allocating a new 
page, etc.).

So I think our choices are:
* report no C++/CLR exceptions via faulthandler
* report all C++/CLR exceptions via faulthandler (current behaviour)

I'm inclined towards changing to the first option. The runtime is going to dump 
a more useful message than us if the exception makes it that far, and a C++ 
exception can never be caused by CPython itself.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31701>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to