This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年04月12日 13:11 by aliles, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| segfault.py | aliles, 2012年04月12日 13:11 | Script that will cause a segmentation fault. | ||
| Messages (4) | |||
|---|---|---|---|
| msg158127 - (view) | Author: Aaron Iles (aliles) * | Date: 2012年04月12日 13:11 | |
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. |
|||
| msg158173 - (view) | Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) | Date: 2012年04月12日 21:42 | |
This is a duplicate of issue12764, 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? |
|||
| msg158184 - (view) | Author: Aaron Iles (aliles) * | Date: 2012年04月12日 22:54 | |
Should I build a version from the tip of the 3.2 or default branch on hg.python.org?
This version is Python 3.2.2 built using homebrew. The revision is being reported as an empty string.
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 platform
>>> platform.python_revision()
''
>>> platform.python_version_tuple()
('3', '2', '2')
>>> platform.python_build()
('default', 'Dec 18 2011 18:56:20')
>>> platform.release()
'11.3.0'
>>> platform.version()
'Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-16992423~1/RELEASE_X86_64'
Sorry, I did a search but didn't find issue12764. :-(
|
|||
| msg168723 - (view) | Author: Aaron Iles (aliles) * | Date: 2012年08月21日 00:50 | |
Tested with Python 3.3b2 built from trunk. This issue is resolved. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:29 | admin | set | github: 58768 |
| 2012年08月21日 00:50:15 | aliles | set | status: open -> closed resolution: fixed messages: + msg168723 |
| 2012年04月12日 22:54:44 | aliles | set | messages: + msg158184 |
| 2012年04月12日 21:42:15 | amaury.forgeotdarc | set | nosy:
+ amaury.forgeotdarc messages: + msg158173 |
| 2012年04月12日 13:11:02 | aliles | create | |