Message183022
> Note that in threadmodule.c, in local_clear, we are iterating through all threads:
>
> In PyDict_DelItem, if the GIL is released and meanwhile, the list of threadstates is altered, is that a problem for this loop? So maybe tstate becomes invalid there.
Yes.
If PyDict_DelItem() releases the GIL and tstate is deleted,
PyThreadState_Next(tstate) is undefined behavior (it accesses
tstate->next).
Changing your reproducer to create/wait for termination of threads in
a loop in a background thread. |
|
Date |
User |
Action |
Args |
2013-02-26 06:57:33 | neologix | set | recipients:
+ neologix, pitrou, r.david.murray, Albert.Zeyer |
2013-02-26 06:57:32 | neologix | link | issue17263 messages |
2013-02-26 06:57:32 | neologix | create | |
|