2017-05-22 13:17 GMT-05:00 Steve Dower <steve.do...@python.org>: > Once the special protection is removed, most of these cases will become > OSError due to the general protection against segmentation faults.
It didn't know that ctypes on Windows had a special protection against programming errors. I'm not aware of such protection Linux. If you call a function with the wrong number of arguments, it's likely to crash or return random data. I guess that the point is to help debugging. But since Python 3.6, faulthandler now registers a Windows exception handler and so it able to dump the Python traceback on any Windows exception: https://docs.python.org/dev/library/faulthandler.html#faulthandler.enable So I think that it's now fine to remove the ctypes protection. Just advice (remind? ;-)) users to enable faulthandler: python3 -X faulthandler, or call faulthandler.enable(). (You might want to use a log file for that on Windows, depends on the use case.) _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com