[issue4804] Python on Windows disables all C runtime library assertions
Kristján Valur Jónsson
report at bugs.python.org
Fri Jan 2 10:56:19 CET 2009
Kristján Valur Jónsson <kristjan at ccpgames.com> added the comment:
Btw,
It occurred to me that a more gentle way to do this is to disable the functionality only around close().
This is far less intrusive, for example, in an embedded environment.
I must confess that I had completely forgototten about the disabling of the assertion and only stumbled on this recently when I was trying to find out why none of my _ASSERTS in eve worked! Making wholesale CRT settings certainly should be avoided.
So, as I said, we could very well avoid this by just wrapping a few instances of close() with a CrtSetErrorHandler calls and friends. With the caveat that these are not threadsafe, that is, it is a process global setting for the CRT. But toggling it during a limited scope surely is less intrusive than modifying it for the entire process permanently.
Kristján
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4804>
_______________________________________
More information about the Python-bugs-list
mailing list