[issue4804] Python on Windows disables all C runtime library assertions

Kristján Valur Jónsson report at bugs.python.org
Mon Feb 2 10:20:10 CET 2009


Kristján Valur Jónsson <kristjan at ccpgames.com> added the comment:

Mark, I have two concerns:
1) Python shouldn't (IMHO) crahs, even if you give bogus input to 
python functions.  Making sure that it doesn't crash in the test suite 
is not enough, I think.
2) It shouldn't disable assertions and other runtime tests for other 
code just because of this, as I know you are in agreement with.

My patch achieves the former, and also the latter in most cases.  That 
is to say, yes, assertions will be disabled for the whole program 
during the time some thread is running one of the "fd" functions in the 
os module, but left alone otherwise.  For the most part, a typical 
windows application (where this issue exists) will not be using those 
functions much anyway.

If you want, we can split my patch in two:  The fixes for the strftime 
and fopen() (checkable by us) and the fixes for invalid file 
desctiptors.  The workaround for the latter seems more contentious.

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


More information about the Python-bugs-list mailing list