[New-bugs-announce] [issue13097] ctypes: segfault with large number of callback arguments

Meador Inge report at bugs.python.org
Tue Oct 4 05:57:17 CEST 2011


New submission from Meador Inge <meadori at gmail.com>:

Reproducible in 2.7 and tip:

[meadori at motherbrain cpython]$ ./python 
Python 3.3.0a0 (default:61de28fa5537+d05350c14e77+, Oct  3 2011, 21:47:04) 
[GCC 4.6.0 20110603 (Red Hat 4.6.0-10)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import *
>>> NARGS = 2 ** 20
>>> proto = CFUNCTYPE(None, *(c_int,) * NARGS)
>>> def func(*args):
...    return (1, "abc", None)
... 
>>> cb = proto(func)
>>> cb(*(1,) * NARGS)
Segmentation fault (core dumped)

----------
components: ctypes
messages: 144852
nosy: amaury.forgeotdarc, belopolsky, meador.inge
priority: normal
severity: normal
stage: needs patch
status: open
title: ctypes: segfault with large number of callback arguments
type: crash
versions: Python 2.7, Python 3.2, Python 3.3

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


More information about the New-bugs-announce mailing list