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 craigh
Recipients christian.heimes, craigh, ggenellina, johnshue, loewis, mhammond
Date 2009-01-02.06:37:31
SpamBayes Score 1.309397e-11
Marked as misclassified No
Message-id <1230878253.66.0.0124780593753.issue4566@psf.upfronthosting.co.za>
In-reply-to
Content
I took a look at this with the debugger, as Mark recommended.  The CRT's
DLLMain is called _CRTDLL_INIT, that in turn calls __CRTDLL_INIT. 
__CRTDLL_INIT calls another function, _check_manifest.

_check_manifest calls an SxS function called FindActCtxSectionString. 
It's looking for a string called "msvcr90.dll" in the
ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION section of the process's
activation context (activation contexts are data structures used by
SxS).  That call fails (_check_manifest doesn't call GetLastError or
anything, it just returns FALSE right there).  There's a comment there
that says:

/* no activation context used to load CRT DLL, means no manifest present
in the process */

What's bizarre is that python26.dll successfully loaded msvcr90.dll (the
global one from WinSxS), so it must have passed _check_manifest.  It
seems like the activation context consists of the DLL's manifest
(_socket.pyd's in this case) and the exe's manifest, but no other ones,
regardless of what other libraries have been loaded.  The documentation
doesn't seem to explain the interaction between manifests in different
modules.  It's also annoying that this restriction (the _check_manifest
call) is completely artificial.

I don't know if any of this information is useful (I'm only
superficially familiar with activation contexts and the functions to
manipulate them).  The code is all in crtlib.c (in the CRT source) if
someone else wants to take a look.
History
Date User Action Args
2009-01-02 06:37:33craighsetrecipients: + craigh, loewis, mhammond, ggenellina, christian.heimes, johnshue
2009-01-02 06:37:33craighsetmessageid: <1230878253.66.0.0124780593753.issue4566@psf.upfronthosting.co.za>
2009-01-02 06:37:32craighlinkissue4566 messages
2009-01-02 06:37:31craighcreate