[issue33030] GetLastError() may be overwritten by Py_END_ALLOW_THREADS

Steve Dower report at bugs.python.org
Thu Mar 8 16:30:30 EST 2018


Steve Dower <steve.dower at python.org> added the comment:

> Before take_gil() knows whether it has to do any work

I thought we had a check for when the GIL was not even initialized, but that doesn't seem to exist in master any more.

Preserving GetLastError() at the same place we do errno is probably sufficient. There shouldn't be any more of a performance penalty (and maybe we don't have to preserve errno on Windows? That will save a TLS lookup at least)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33030>
_______________________________________


More information about the Python-bugs-list mailing list