Message158127
| Author |
aliles |
| Recipients |
aliles |
| Date |
2012年04月12日.13:11:01 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1334236262.62.0.0349212060005.issue14563@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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 2336100)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ctypes
>>> class Point(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. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年04月12日 13:11:02 | aliles | set | recipients:
+ aliles |
| 2012年04月12日 13:11:02 | aliles | set | messageid: <1334236262.62.0.0349212060005.issue14563@psf.upfronthosting.co.za> |
| 2012年04月12日 13:11:02 | aliles | link | issue14563 messages |
| 2012年04月12日 13:11:01 | aliles | create |
|