Bugs item #1220756, was opened at 2005-06-14 22:16
Message generated for change (Comment added) made by mwh
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1220756&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Threads
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Jay T Miller (jaytmiller)
>Assigned to: Neil Schemenauer (nascheme)
Summary: Re-importing embedded thread dumps core

Initial Comment:
I noticed the following while working on an "embedding
numarray" problem:

[EMAIL PROTECTED] Python-2.4.1]$
Python-2.4.1/Demo/embed/loop 'from thread import *' 10
[6675 refs]
[7009 refs]
[7320 refs]
[7631 refs]
[7942 refs]
[8253 refs]
loop: Objects/typeobject.c:2104: type_dealloc:
Assertion `type->tp_flags & (1L<<9)' failed.
Abort (core dumped)

The tp_flags bit in question is:

#define Py_TPFLAGS_HEAPTYPE (1L<<9)



----------------------------------------------------------------------

>Comment By: Michael Hudson (mwh)
Date: 2005-06-15 13:28

Message:
Logged In: YES 
user_id=6656

Fixed the issue in the report in revision 2.62 of Modules/threadmodule.c.

I'm leaving this open because "./loop 'import gc'" crashes and because I 
think there are too many places that incref before 
PyModule_AddObject()...

Neil, any ideas about the gc one? 

----------------------------------------------------------------------

Comment By: Michael Hudson (mwh)
Date: 2005-06-15 12:35

Message:
Logged In: YES 
user_id=6656

Oh dear.  The problem here is that PyModule_AddObject steals a 
reference to the object, but this is not taken care of in threadmodule.c (or 
gcmodule, it turns out, and I bet many other places).

Shouldn't be too hard to fix.

(Looks like noone's run Demo/embed/loop for a while...)

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1220756&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to