[New-bugs-announce] [issue16576] ctypes: structure with bitfields as argument

Armin Rigo report at bugs.python.org
Thu Nov 29 05:53:32 CET 2012


New submission from Armin Rigo:

ctypes pretends to support passing arguments to C functions that are structures containing bitfields, or at least does not explicitly forbid it.  But doing so results in misbehavior or segfaults in libffi itself.  Indeed, libffi has no support for this, and ctypes just describes a field like "int x:1;" as "int x;".  The attached example segfaults on Linux x86-64.

----------
components: ctypes
files: test185_lib.tgz
messages: 176629
nosy: arigo
priority: normal
severity: normal
status: open
title: ctypes: structure with bitfields as argument
type: crash
versions: Python 2.7, Python 3.2
Added file: http://bugs.python.org/file28156/test185_lib.tgz

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


More information about the New-bugs-announce mailing list