[issue23524] Use _set_thread_local_invalid_parameter_handler in posixmodule

Steve Dower report at bugs.python.org
Fri Feb 27 17:08:53 CET 2015


Steve Dower added the comment:

#4804 has most of the prior discussion, but here's some code that will cause the process to terminate:

import os
os.close(3)

The instant termination rather than OSError is why _PyVerify_fd exists at all, and that's only there because when the behaviour was disabled globally users complained (#3545 and #4804).

You are correct that _PyVerify_fd is used in more places where it should be updated (specifically _io/fileio.c and fileutils.c). It only makes sense where it's protecting a call into a CRT function though, so not all of these places should be changed. I'll make updates.

This is why I beg for reviews - I know that I'll miss things :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23524>
_______________________________________


More information about the Python-bugs-list mailing list