[PEAK] access violation with py24/msvc compiler

alexander smishlajev alex at ank-sia.com
Fri Jan 28 09:29:18 EST 2005


Phillip J. Eby wrote, at 28.01.2005 15:52:
> 
>> it fails in function newWrapper, in the call to PyMem_NEW at line 1724.
>>
>> by the way, it seems to me that PyMem_Del(wp) is missing before return 
>> NULL at line 1737 in that function.
>>
>> in fact, i would like to stop this investigation.  mingw build is ok 
>> for us.  msvc would be more handy, but that is not worth the time spent.
> 
> Thanks for the help.

you're most welcome.

> In the meantime, I'll take a look at kjbuckets' memory allocation and 
> see if it is incorrectly mixing allocation types.  I seem to recall that 
> there was a change in the Python memory APIs during the 2.x series 
> wherein extensions that used to work could possibly fail.

if you want me to do something more about that, please say so.  i am not 
motivated to do that for ourselves, but it would be pleasure to help you.

if you are interested, the compiler i use is freely available from 
microsoft at http://msdn.microsoft.com/visualc/vctoolkit2003/.  python24 
(but not python23) distutils also require microsoft .NET Framework SDK 
 
(http://www.microsoft.com/downloads/details.aspx?familyid=9b3a2ca6-3647-4070-9f41-a333c6b9181d&displaylang=en) 
and platform sdk may be needed too 
(http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm).

to make distutils work, i've manually added required registry entries 
pointing at msvc bin, include and lib directories:

=== cut ===
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\VC]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\VC\VC_OBJECTS_PLATFORM_INFO]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\VC\VC_OBJECTS_PLATFORM_INFO\Win32]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\7.1\VC\VC_OBJECTS_PLATFORM_INFO\Win32\Directories]
"Include Dirs"="E:\\usr\\vc7\\psdk\\include;E:\\usr\\vc7\\include"
"Library Dirs"="E:\\usr\\vc7\\psdk\\lib;E:\\usr\\vc7\\lib"
"Path Dirs"="E:\\usr\\vc7\\bin"
=== cut ===

best wishes,
alex.




More information about the PEAK mailing list