This is the mail archive of the cygwin mailing list for the Cygwin project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hello, I've come across an issue when using Python's ctypes module. On the whole the module works correctly, but if an attempt is made to access a property of the library that does not exist instead of raising the appropriate exception a segmentation fault occurs. This is the case for both Python 2.x and Python 3.x installed using the cygwin installer. See example blow. I've picked a random DLL for testing, as I don't think it matters. The expected return from "hasattr(lib, 'fail')" should be False. Instead a segmentation fault occurs. This problem does not occur on the Windows version of Python that I also have installed on the same machine, or on OS X. $ python3 Python 3.2.5 (default, Jul 25 2014, 14:13:17) [GCC 4.8.3] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> import ctypes >>> lib = ctypes.CDLL('C:/Windows/System32/OpenCL.dll') >>> lib <CDLL 'C:/Windows/System32/OpenCL.dll', handle 7feea330000 at 6ffffe02b90> >>> hasattr(lib, 'fail') Segmentation fault (core dumped) Kind regards, Josh
Attachment:
cygcheck.out
Description: Binary data
-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |