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.

Author meador.inge
Recipients amaury.forgeotdarc, belopolsky, meador.inge, neologix
Date 2011-09-14.02:42:58
SpamBayes Score 0.00014352004
Marked as misclassified No
Message-id <1315968179.55.0.207902575775.issue12881@psf.upfronthosting.co.za>
In-reply-to
Content
> Note that there is at least one other place where alloca() is
> used with potentially large values:

Ouch!  I found three more crashers (including the one you found)
by grepping for 'alloca' in ctypes:

>>> from ctypes import *
>>> T = type('x' * 2 ** 25, (Structure,), {})
>>> p = POINTER(T)
Segmentation fault (core dumped)

>>> from ctypes import *
>>> p = POINTER('x' * 2 ** 25)
Segmentation fault (core dumped)

>>> 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)

I will fix those too.
History
Date User Action Args
2011-09-14 02:42:59meador.ingesetrecipients: + meador.inge, amaury.forgeotdarc, belopolsky, neologix
2011-09-14 02:42:59meador.ingesetmessageid: <1315968179.55.0.207902575775.issue12881@psf.upfronthosting.co.za>
2011-09-14 02:42:58meador.ingelinkissue12881 messages
2011-09-14 02:42:58meador.ingecreate