STINNER Victor <victor.stin...@gmail.com> added the comment:

I failed to build https://github.com/FynnBe/faulthandler-spam with a Python 
built myself. But I succeeded to recompile a Python extension (_overlapped) in 
C++ (I removed two functions which caused compilation error) and then added 
faulthandler-spam/test_module/module.cpp code into _overlapped. So I was able 
to test C++ code raising a regular extension called by Python.

Sadly, using "AddVectoredExceptionHandler(0, faulthandler_exc_handler);" 
(instead of "AddVectoredExceptionHandler(1, ...") doesn't solve the issue: the 
exception is still logged. It seems like the faulthandler exception handler is 
called before C++ has the opportunity to handle the exception.

So it doesn't seem possible to log *unhandled* C++ exceptions using 
AddVectoredExceptionHandler() without flooding logs with *handled* C++ 
extensions.

I now agree with Steve Dower to ignore *all* C++ exceptions in faulthandler.

----------

_______________________________________
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