This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Tibor Csonka
Recipients Tibor Csonka, paul.moore, steve.dower, tim.golden, zach.ware
Date 2017-03-10.04:58:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1489121898.66.0.224917416789.issue29778@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-03-10 04:58:18Tibor Csonkasetrecipients: + Tibor Csonka, paul.moore, tim.golden, zach.ware, steve.dower
2017-03-10 04:58:18Tibor Csonkasetmessageid: <1489121898.66.0.224917416789.issue29778@psf.upfronthosting.co.za>
2017-03-10 04:58:18Tibor Csonkalinkissue29778 messages
2017-03-10 04:58:17Tibor Csonkacreate