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 eudoxos
Recipients eric.araujo, eudoxos, tarek
Date 2012-11-14.13:34:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1352900041.91.0.554679168644.issue16472@psf.upfronthosting.co.za>
In-reply-to
Content
Compiling an extension with --compiler=mingw32 with official python 2.7.3 distribution on Windows (64bit) leads to unusable result - crash on module load ("invalid access to memory").

The reasons is that Lib/distutils/cygwincompiler.py#l62 links the resulting .pyd file against msvcr90.dll (version is determined by version of MSVC used to build python itself), while python27.dll is linked against msvcrt.dll (shows the Dependency Walker). 

Based on my own experience (above) and MSDN docs http://msdn.microsoft.com/en-us/library/abx4dbyh.aspx,  http://msdn.microsoft.com/en-us/library/ms235460.aspx), loading 2 different runtimes is asking for trouble.

I raised this topic on distutils-sig, hoping for an explanation. Judging by the reaction, it is quite possibly historical relict which is no longer needed. This is also hinted at by comments at the beginning of Lib/distutils/cygwincompiler.py

   "if you use a msvc compiled python version (1.5.2)"
   "mingw gcc 3.2/ld 2.13 works"

I am aware of distutils being frozen for new features (unless you want to call bugfix a new feature).
History
Date User Action Args
2012-11-14 13:34:01eudoxossetrecipients: + eudoxos, tarek, eric.araujo
2012-11-14 13:34:01eudoxossetmessageid: <1352900041.91.0.554679168644.issue16472@psf.upfronthosting.co.za>
2012-11-14 13:34:01eudoxoslinkissue16472 messages
2012-11-14 13:34:01eudoxoscreate