[Stackless] a stackless crash
Kristján Valur Jónsson
kristjan at ccpgames.com
Wed Nov 7 12:26:39 CET 2007
> -----Original Message-----
> From: Christian Tismer [mailto:tismer at stackless.com]
>
> Good! So after all, this is not really channel related, just the
> remove code is not really developed regarding cstacks!
Yes.
Here is my fix to stacklesseval.c that stops the crashes.
Left file: C:\Documents and Settings\kristjan\Local Settings\Temp\p4v\kristjanvalur nostrum 1666\depot\sdk\stackless25\Stackless\core\stacklesseval#2.c
Right file: C:\p4\sdk\stackless25\Stackless\core\stacklesseval.c
342,344c343,346
< chain = &t;
< SLP_CHAIN_REMOVE(PyTaskletObject, chain, task, next, prev)
---
> if (t->next && t->prev) { /* it may have been removed() */
> chain = &t;
> SLP_CHAIN_REMOVE(PyTaskletObject, chain, task, next, prev)
> }
351a354
> Py_INCREF(t); /* because the following steals a reference */
Does this look ok?
We can then discuss channel death semantics separately...
Kristján
More information about the Stackless
mailing list