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 Fynn Be, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2017-10-09.11:09:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1507547393.74.0.213398074469.issue31701@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-10-09 11:09:53vstinnersetrecipients: + vstinner, paul.moore, tim.golden, zach.ware, steve.dower, Fynn Be
2017-10-09 11:09:53vstinnersetmessageid: <1507547393.74.0.213398074469.issue31701@psf.upfronthosting.co.za>
2017-10-09 11:09:53vstinnerlinkissue31701 messages
2017-10-09 11:09:53vstinnercreate