New submission from Tibor Csonka: When Py_SetPath is used to set up module path at initialization, the Py_SetPath causes getpathp.c::calculate_path not to be called. However, calculate path is the only function calling getpathp.c::get_progpath which initializes the local dllpath static variable.
Later the interpreter tries to load python3.dll and uses dllpath which is empty by default. This empty path gets joined with \python3.dll and \DLLs\python3.dll which is used in the LoadLibraryExW resulting in loading python3.dll from the root location of the windows drive the application is running from. The behavior was reproduced using PyInstaller but it is present in any embedding application which uses Py_SetPath. ---------- components: Windows messages: 289334 nosy: Tibor Csonka, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: _Py_CheckPython3 uses uninitialized dllpath when embedder sets module path with Py_SetPath versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29778> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com