Charles-Francois Natali <neolo...@free.fr> added the comment: I don't see segfaults anymore, but there's still an unsafe dereference of gil_last_holder inside take_gil:
/* Wait on the appropriate GIL depending on thread's classification */ if (!tstate->cpu_bound) { /* We are I/O bound. If the current thread is CPU-bound, force it off now! */ if (gil_last_holder->cpu_bound) { SET_GIL_DROP_REQUEST(); } You're still accessing a location that may have been free()'d previously: while it will work most of the time (that's why I said it's not as risky), if the page gets unmapped between the time the current thread is deleted and the next thread takes over, you'll get a segfault. And that's undefined behaviour anyway ;-) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7946> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com