]> granicus.if.org Git - python/commit
bpo-33895: Relase GIL while calling functions that acquire Windows loader lock (GH...
authorTony Roberts <tony@pyxll.com>
Sat, 2 Feb 2019 17:16:42 +0000 (18:16 +0100)
committerSteve Dower <steve.dower@microsoft.com>
Sat, 2 Feb 2019 17:16:42 +0000 (09:16 -0800)
commit4860f01ac0f07cdc8fc0cc27c33f5a64e5cfec9f
tree18e9232f27d8bee1c9a8139937b69ec013a19abf
parent2de576e16d42ce43698d384d0dd46ba6cf165424
bpo-33895: Relase GIL while calling functions that acquire Windows loader lock (GH-7789)

LoadLibrary, GetProcAddress, FreeLibrary and GetModuleHandle acquire the system loader lock. Calling these while holding the GIL will cause a deadlock on the rare occasion that another thread is detaching and needs to destroy its thread state at the same time.
Misc/NEWS.d/next/Windows/2018-06-19-11-57-50.bpo-33895.zpblTy.rst [new file with mode: 0644]
Modules/_ctypes/_ctypes.c
Modules/_ctypes/callproc.c
Modules/overlapped.c
Modules/posixmodule.c
PC/winreg.c
Python/dynload_win.c
Python/sysmodule.c