reassign 480721 ctypes
thanks

not a python bug, please check it with ctypes and/or current libffi.

Kurt Roeckx writes:
> Package: python2.4
> Version: 2.4.5-2
> Severity: important
> 
> Hi,
> 
> When building ctypes (1.0.2-5) on amd64, I get the following error:
> running build_ext
>         find_library('c') ->  libc.so.6
>         find_library('m') ->  libm.so.6
> ..............................................................................................make[1]:
>  *** [install-python2.4] Segmentation fault 
> 
> Core was generated by `python2.4 setup.py test'.
> Program terminated with signal 4, Illegal instruction.
> [New process 5520]
> #0  0x00002ad46533ff28 in ?? ()
> (gdb) bt
> #0  0x00002ad46533ff28 in ?? ()
> #1  0x00002ad4637bf8bc in ffi_call_unix64 () from /usr/lib/libffi.so.5
> #2  0x00002ad4637bf305 in ffi_call (cif=0x7fff485dd290, fn=0x2ad46533ff28,
>     rvalue=0x7fff485dd1e0, avalue=0x7fff485dd1c0) at ../src/x86/ffi64.c:430
> #3  0x00002ad4635a6de1 in _CallProc (pProc=0x2ad46533ff28,
>     argtuple=0x2ad464a41998, flags=<value optimized out>,
>     argtypes=0x2ad464a42f38, restype=0x81cc50, checker=0x0)
>     at source/callproc.c:668
> #4  0x00002ad4635a1f61 in CFuncPtr_call (self=0x2ad464a4f050, inargs=0x2,
>     kwds=0x0) at source/_ctypes.c:3362
> #5  0x0000000000415660 in PyObject_Call (func=0x1, arg=0x2, kw=0x2)
>     at ../Objects/abstract.c:1795
> #6  0x0000000000474164 in PyEval_EvalFrame (f=0x7c4580)
>     at ../Python/ceval.c:3776
> #7  0x0000000000477520 in PyEval_EvalFrame (f=0x7a6710)
>     at ../Python/ceval.c:3651
> #8  0x00000000004780a4 in PyEval_EvalCodeEx (co=0x2ad463505260,
>     globals=<value optimized out>, locals=<value optimized out>,
>     args=0x2ad464a41f98, argcount=2, kws=0x8ae710, kwcount=0,
>     defs=0x2ad463501728, defcount=1, closure=0x0) at ../Python/ceval.c:2741
> #9  0x00000000004c039c in function_call (func=0x2ad46350aa28,
>     arg=0x2ad464a41f80, kw=0x921820) at ../Objects/funcobject.c:548
> #10 0x0000000000415660 in PyObject_Call (func=0x1, arg=0x2, kw=0x2)
>     at ../Objects/abstract.c:1795
> #11 0x00000000004753fa in PyEval_EvalFrame (f=0x7c5580)
>     at ../Python/ceval.c:3845
> #12 0x00000000004780a4 in PyEval_EvalCodeEx (co=0x2ad4635052d0,
>     globals=<value optimized out>, locals=<value optimized out>,
>     args=0x2ad464a3ab18, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0,
>     closure=0x0) at ../Python/ceval.c:2741
> #13 0x00000000004c0403 in function_call (func=0x2ad46350aaa0,
>     arg=0x2ad464a3ab00, kw=0x0) at ../Objects/funcobject.c:548
> #14 0x0000000000415660 in PyObject_Call (func=0x1, arg=0x2, kw=0x2)
>     at ../Objects/abstract.c:1795
> #15 0x000000000041b3af in instancemethod_call (func=0x2ad46350aaa0,
>     arg=0x2ad464a3ab00, kw=0x0) at ../Objects/classobject.c:2532
> #16 0x0000000000415660 in PyObject_Call (func=0x1, arg=0x2, kw=0x2)
>     at ../Objects/abstract.c:1795
> #17 0x000000000044a546 in slot_tp_call (self=<value optimized out>,
>     args=0x2ad464a48d90, kwds=0x0) at ../Objects/typeobject.c:4546
> #18 0x0000000000415660 in PyObject_Call (func=0x1, arg=0x2, kw=0x2)
>     at ../Objects/abstract.c:1795
> #19 0x0000000000474164 in PyEval_EvalFrame (f=0x7a6430)
>     at ../Python/ceval.c:3776
> #20 0x00000000004780a4 in PyEval_EvalCodeEx (co=0x2ad463505c00,
>     globals=<value optimized out>, locals=<value optimized out>,
>     args=0x2ad464a414a0, argcount=2, kws=0x905a70, kwcount=0, defs=0x0,
>     defcount=0, closure=0x0) at ../Python/ceval.c:2741
> #21 0x00000000004c039c in function_call (func=0x2ad46350c320,
>     arg=0x2ad464a41488, kw=0x921700) at ../Objects/funcobject.c:548
> #22 0x0000000000415660 in PyObject_Call (func=0x1, arg=0x2, kw=0x2)
>     at ../Objects/abstract.c:1795
> #23 0x00000000004753fa in PyEval_EvalFrame (f=0x793800)
>     at ../Python/ceval.c:3845
> #24 0x00000000004780a4 in PyEval_EvalCodeEx (co=0x2ad463505c70,
>     globals=<value optimized out>, locals=<value optimized out>,
>     args=0x2ad464a41800, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0,
>     closure=0x0) at ../Python/ceval.c:2741
> #25 0x00000000004c0403 in function_call (func=0x2ad46350c398,
>     arg=0x2ad464a417e8, kw=0x0) at ../Objects/funcobject.c:548
> #26 0x0000000000415660 in PyObject_Call (func=0x1, arg=0x2, kw=0x2)
>     at ../Objects/abstract.c:1795
> #27 0x000000000041b3af in instancemethod_call (func=0x2ad46350c398,
>     arg=0x2ad464a417e8, kw=0x0) at ../Objects/classobject.c:2532
> #28 0x0000000000415660 in PyObject_Call (func=0x1, arg=0x2, kw=0x2)
>     at ../Objects/abstract.c:1795
> #29 0x000000000044a546 in slot_tp_call (self=<value optimized out>,
>     args=0x2ad464a48cd0, kwds=0x0) at ../Objects/typeobject.c:4546
> #30 0x0000000000415660 in PyObject_Call (func=0x1, arg=0x2, kw=0x2)
>     at ../Objects/abstract.c:1795
> #31 0x0000000000474164 in PyEval_EvalFrame (f=0x7d91d0)
>     at ../Python/ceval.c:3776
> #32 0x00000000004780a4 in PyEval_EvalCodeEx (co=0x2ad463505c00,
>     globals=<value optimized out>, locals=<value optimized out>,
>     args=0x2ad464a3a770, argcount=2, kws=0x916c20, kwcount=0, defs=0x0,
>     defcount=0, closure=0x0) at ../Python/ceval.c:2741
> #33 0x00000000004c039c in function_call (func=0x2ad46350c320,
>     arg=0x2ad464a3a758, kw=0x9215e0) at ../Objects/funcobject.c:548
> #34 0x0000000000415660 in PyObject_Call (func=0x1, arg=0x2, kw=0x2)
>     at ../Objects/abstract.c:1795
> #35 0x00000000004753fa in PyEval_EvalFrame (f=0x7e8560)
>     at ../Python/ceval.c:3845
> #36 0x00000000004780a4 in PyEval_EvalCodeEx (co=0x2ad463505c70,
>     globals=<value optimized out>, locals=<value optimized out>,
>     args=0x2ad464a41e30, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0,
>     closure=0x0) at ../Python/ceval.c:2741
> #37 0x00000000004c0403 in function_call (func=0x2ad46350c398,
>     arg=0x2ad464a41e18, kw=0x0) at ../Objects/funcobject.c:548
> #38 0x0000000000415660 in PyObject_Call (func=0x1, arg=0x2, kw=0x2)
>     at ../Objects/abstract.c:1795
> #39 0x000000000041b3af in instancemethod_call (func=0x2ad46350c398,
>     arg=0x2ad464a41e18, kw=0x0) at ../Objects/classobject.c:2532
> #40 0x0000000000415660 in PyObject_Call (func=0x1, arg=0x2, kw=0x2)
>     at ../Objects/abstract.c:1795
> #41 0x000000000044a546 in slot_tp_call (self=<value optimized out>,
>     args=0x2ad46268c590, kwds=0x0) at ../Objects/typeobject.c:4546
> #42 0x0000000000415660 in PyObject_Call (func=0x1, arg=0x2, kw=0x2)
>     at ../Objects/abstract.c:1795
> #43 0x0000000000474164 in PyEval_EvalFrame (f=0x7e7090)
>     at ../Python/ceval.c:3776
> #44 0x0000000000477520 in PyEval_EvalFrame (f=0x790b70)
>     at ../Python/ceval.c:3651
> #45 0x0000000000477520 in PyEval_EvalFrame (f=0x72c7c0)
>     at ../Python/ceval.c:3651
> #46 0x0000000000477520 in PyEval_EvalFrame (f=0x7f3ac0)
>     at ../Python/ceval.c:3651
> #47 0x0000000000477520 in PyEval_EvalFrame (f=0x765560)
>     at ../Python/ceval.c:3651
> #48 0x0000000000477520 in PyEval_EvalFrame (f=0x77e280)
>     at ../Python/ceval.c:3651
> #49 0x00000000004780a4 in PyEval_EvalCodeEx (co=0x2ad462545d50,
>     globals=<value optimized out>, locals=<value optimized out>,
>     args=0x747390, argcount=0, kws=0x7472c0, kwcount=14, defs=0x0, defcount=0,
>     closure=0x0) at ../Python/ceval.c:2741
> #50 0x00000000004773d3 in PyEval_EvalFrame (f=0x747130)
>     at ../Python/ceval.c:3661
> #51 0x00000000004780a4 in PyEval_EvalCodeEx (co=0x2ad462545c70,
>     globals=<value optimized out>, locals=<value optimized out>, args=0x0,
>     argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0)
>     at ../Python/ceval.c:2741
> #52 0x00000000004781c2 in PyEval_EvalCode (co=0x1, globals=0x2, locals=0x2)
>     at ../Python/ceval.c:484
> #53 0x000000000049c62a in PyRun_FileExFlags (fp=0x729010,
>     filename=0x7fff485e1cfd "setup.py", start=<value optimized out>,
>     globals=0x72a6a0, locals=0x72a6a0, closeit=<value optimized out>,
>     flags=0x7fff485dff60) at ../Python/pythonrun.c:1287
> #54 0x000000000049c879 in PyRun_SimpleFileExFlags (fp=0x729010,
>     filename=0x7fff485e1cfd "setup.py", closeit=1, flags=0x7fff485dff60)
>     at ../Python/pythonrun.c:871
> #55 0x0000000000412449 in Py_Main (argc=<value optimized out>,
>     argv=0x7fff485e0088) at ../Modules/main.c:493
> #56 0x00002ad462fa31c4 in __libc_start_main () from /lib/libc.so.6
> #57 0x0000000000411969 in _start ()
> 
> It seems that the "fn" in ffi_call() (#2) is what is getting called,
> which that gets from _CallProc()'s pProc:
> (gdb) frame 3
> #3  0x00002ad4635a6de1 in _CallProc (pProc=0x2ad46533ff28,
>     argtuple=0x2ad464a41998, flags=<value optimized out>,
>     argtypes=0x2ad464a42f38, restype=0x81cc50, checker=0x0)
>     at source/callproc.c:668
> 668                             ffi_call(&cif, (void *)pProc, resmem, 
> avalues);
> (gdb) up
> #4  0x00002ad4635a1f61 in CFuncPtr_call (self=0x2ad464a4f050, inargs=0x2,
>     kwds=0x0) at source/_ctypes.c:3362
> 3362            result = _CallProc(pProc,
> 
> Which comes from:
> (gdb) p (void **)self->b_ptr
> $5 = (void **) 0x2ad464a4f090
> (gdb) p *(void **)self->b_ptr
> $6 = (void *) 0x2ad46533ff28
> 
> (gdb) p *self
> $11 = {ob_refcnt = 4, ob_type = 0x950130, b_ptr = 0x2ad464a4f090 "(ÿ3eO*",
>   b_needsfree = 1, b_base = 0x0, b_size = 8, b_length = 1, b_index = 0,
>   b_objects = 0x929fd0, b_value = {
>     c = "(ÿ3eO*\000\000\000\000\000\000\000\000\000", s = -216,
>     i = 1697906472, l = 47091719339816, f = 5.31256502e+22,
>     d = 2.3266400729400912e-310, ll = 47091719339816}, thunk = 0x78d740,
>   callable = 0x2ad464a46c80, converters = 0x0, argtypes = 0x0, restype = 0x0,
>   checker = 0x0, errcheck = 0x0, paramflags = 0x0}
> 
> 
> Kurt
> 
> 



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to