[issue9266] ctypes "ValueError: NULL pointer access" on Win7 x64

Greg Hazel report at bugs.python.org
Fri Jul 16 06:29:07 CEST 2010


Greg Hazel <ghazel at users.sourceforge.net> added the comment:

Ok, this issue is worse, and much easier to reproduce, than I thought. Here is an updated ctypes_test.zip with a repro using only integers and callbacks.

Correct output:
('three', (1, 2, 3))
('four', (1, 2, 3, 4))
('five', (1, 2, 3, 4, 5))

Incorrect output:
('three', (1, 2, 3))
('four', (1, 2, 3, 0))
('five', (1, 2, 3, 0, 5))

I built Python 2.7 from source with MSVC 9. This is not reproducible in Debug mode, or Win32 Release mode. It only happens in x64 Release mode. 

One very interesting discovery is that if I set these options:

Optimization: Disabled (/Od)
Enable Instrinsic Functions: No

the error does not occur!

----------
Added file: http://bugs.python.org/file18023/ctypes_test.zip

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9266>
_______________________________________


More information about the Python-bugs-list mailing list