Eryk Sun added the comment:

I would call SetDllDirectory instead of changing the current directory. This 
replaces the current directory in the DLL search. Then call 
SetDllDirectory(NULL) to restore the default before returning. 
When you say "the CRT assembly", you're talking about vcruntime140.dll, right? 
This module implements exceptions, setjmp/longjmp, and other functions that are 
closely coupled with the VC++ version, but most of the universal CRT is 
implemented in the system DLL ucrtbase.dll. 

vcruntime was initially linked statically everywhere, but that was a problem 
for extension modules, since each instance was taking a fiber locale storage 
slot. 

However, it really should be static for the bdist_wininst installer. I believe 
Steve had the link configuration customized as a partially static build that 
linked dynamically with ucrtbase.dll. This benefits from continuous CRT bug 
fixes and security updates. To configure this he added ucrt[d].lib as a 
dependency and ignored the default library libucrt[d].lib. See the following 
diff for the changes that were made to revert this:

    https://hg.python.org/cpython/diff/8374472c6a6e/PCbuild/pyproject.props

----------
nosy: +eryksun

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26071>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to