[Pyrex] creating and populating Python/C structs
Christopher Armstrong
radeex at gmail.com
Sun Sep 4 11:27:25 CEST 2005
On 9/4/05, Christopher Armstrong <radeex at gmail.com> wrote:
> hrmm.... On the other hand, perhaps I can get a frame from
> PyFrame_New, and then just decref and replace its f_back member....
Hooray, I've got a fully functional newframe with this strategy!
(replacing its f_back after decrefing what was there)
Only problem is that I'm reliably segfaulting when Python exits.... :S
(note that this happens even when I don't replace the f_back)
#0 0x080e45ab in local_dealloc (self=0xb7d74f08) at Modules/threadmodule.c:247
#1 0x0807a118 in dict_dealloc (mp=0xb7ae9b54) at Objects/dictobject.c:730
#2 0x0805ec5b in instance_dealloc (inst=0xb7ae8a0c) at
Objects/classobject.c:662
#3 0x080796ae in insertdict (mp=0xb7bd0b54, key=0xb7b9c650,
hash=387997183, value=0x812c620) at Objects/dictobject.c:397
#4 0x08079bf4 in PyDict_SetItem (op=0xb7bd0b54, key=0xb7b9c650,
value=0x812c620) at Objects/dictobject.c:553
#5 0x081047fa in _PyModule_Clear (m=0xb7d747c4) at Objects/moduleobject.c:136
#6 0x080d1a34 in PyImport_Cleanup () at Python/import.c:438
#7 0x080db9f8 in Py_Finalize () at Python/pythonrun.c:354
#8 0x080dde6d in Py_Exit (sts=0) at Python/pythonrun.c:1579
#9 0x080dcc23 in handle_system_exit () at Python/pythonrun.c:1044
#10 0x080dcc41 in PyErr_PrintEx (set_sys_last_vars=1) at Python/pythonrun.c:1054
#11 0x080dc9ac in PyErr_Print () at Python/pythonrun.c:968
#12 0x080dc5dc in PyRun_SimpleFileExFlags (fp=0x8152008,
filename=0xbffffaf5 "/home/radix/Projects/Twisted/bin/trial",
closeit=1,
flags=0xbffff8a4) at Python/pythonrun.c:867
#13 0x080dbf1d in PyRun_AnyFileExFlags (fp=0x8152008,
filename=0xbffffaf5 "/home/radix/Projects/Twisted/bin/trial",
closeit=1,
flags=0xbffff8a4) at Python/pythonrun.c:667
#14 0x08055cbb in Py_Main (argc=3, argv=0xbffff984) at Modules/main.c:484
#15 0x08055206 in main (argc=3, argv=0xbffff984) at Modules/python.c:23
Man, I'm getting deep into it. Excitement abounds! I'll keep bashing.
--
Twisted | Christopher Armstrong: International Man of Twistery
Radix | -- http://radix.twistedmatrix.com
| Release Manager, Twisted Project
\\\V/// | -- http://twistedmatrix.com
|o O| |
w----v----w-+
More information about the Pyrex
mailing list