You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
segfault.py: Script that will cause a segmentation fault.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2012-08-21.00:50:15.259>created_at=<Date2012-04-12.13:11:02.042>labels= ['ctypes', 'type-crash']
title='Segmentation fault on ctypes.Structure subclass with byte string field names'updated_at=<Date2012-08-21.00:50:15.257>user='https://bugs.python.org/aliles'
Python 3.2 will exit with a segmentation fault if a byte string is used as a field name in a subclass of ctypes.Structure.
Python 3.2.2 (default, Dec 18 2011, 18:56:20)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> classPoint(ctypes.Structure):
... _fields_ = ((b'x', ctypes.c_int), (b'y', ctypes.c_int))
...
Segmentation fault: 11
This also occurs if None or an int is used as the field name.
I would expect that a TypeError exception would be raised if an attempt is made to use an invalid type for the field name.
This is a duplicate of bpo-12764, which was already fixed for 3.2.2 (in September 2011)
Which version of python are you using exactly?
What does "import platform; platform.python_revision()" return?
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: