[issue12881] ctypes: segfault with large structure field names

2011-10-03 Thread Meador Inge
Meador Inge added the comment: Fixed. Opened issue13096 and issue13097 for the other crashers. -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue12881] ctypes: segfault with large structure field names

2011-10-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset aa3ebc2dfc15 by Meador Inge in branch '2.7': Issue #12881: ctypes: Fix segfault with large structure field names. http://hg.python.org/cpython/rev/aa3ebc2dfc15 New changeset d05350c14e77 by Meador Inge in branch '3.2': Issue #12881: ctypes: Fix seg

[issue12881] ctypes: segfault with large structure field names

2011-09-27 Thread Meador Inge
Changes by Meador Inge : -- assignee: -> meador.inge versions: +Python 2.7, Python 3.2 ___ Python tracker ___ ___ Python-bugs-list ma

[issue12881] ctypes: segfault with large structure field names

2011-09-21 Thread Meador Inge
Meador Inge added the comment: I am going to open separate issues for the other crashers. > Also, PyUnicode_FromFormat could be used instead of sprintf. Amaury, how so? 'sprintf' and 'stgdict->format' work with 'char *'s where as 'PyUnicode_FromFormat' builds a unicode string object. Unless

[issue12881] ctypes: segfault with large structure field names

2011-09-13 Thread Meador Inge
Meador Inge added the comment: > 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, (Struct

[issue12881] ctypes: segfault with large structure field names

2011-09-12 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Note that there is at least one other place where alloca() is used with potentially large values: the POINTER() function in callproc.c. Also, PyUnicode_FromFormat could be used instead of sprintf. -- ___ Pytho

[issue12881] ctypes: segfault with large structure field names

2011-09-11 Thread Charles-François Natali
Charles-François Natali added the comment: Looks good to me. -- nosy: +neologix stage: patch review -> commit review ___ Python tracker ___ _

[issue12881] ctypes: segfault with large structure field names

2011-09-10 Thread Meador Inge
Meador Inge added the comment: Ping. Any thoughts on this one? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue12881] ctypes: segfault with large structure field names

2011-09-03 Thread Meador Inge
Meador Inge added the comment: Here is a patch that replaces the 'alloca' call with 'PyMem_Malloc'. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file23094/issue12881.patch ___ Python tracker

[issue12881] ctypes: segfault with large structure field names

2011-09-02 Thread Meador Inge
Meador Inge added the comment: On Fri, Sep 2, 2011 at 4:26 PM, Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > Certainly the effect of some "alloca" call with a large value, then the stack > overflows. Yeah, I noticed that too. I was actually pretty surprised to

[issue12881] ctypes: segfault with large structure field names

2011-09-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Certainly the effect of some "alloca" call with a large value, then the stack overflows. -- ___ Python tracker ___ _

[issue12881] ctypes: segfault with large structure field names

2011-09-01 Thread Meador Inge
New submission from Meador Inge : Reproduced on Fedora 15 with tip Python: [meadori@motherbrain cpython]$ ./python Python 3.3.0a0 (default:3102951cc1ce+, Sep 1 2011, 22:19:06) [GCC 4.6.0 20110603 (Red Hat 4.6.0-10)] on linux Type "help", "copyright", "credits" or "license" for more informatio