Message104312
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 ;-) |
|
Date |
User |
Action |
Args |
2010-04-27 12:20:45 | neologix | set | recipients:
+ neologix, loewis, jhylton, gregory.p.smith, jcea, pitrou, movement, larry, eric.smith, kevinwatters, tarek, djc, karld, carljm, coderanger, durin42, eric.araujo, nirai, alex, andrix, konryd, brian.curtin, flox, DazWorrall, salgado, cool-RR, rh0dium, rcohen, dabeaz, mahmoudimus, aconrad, ysj.ray, thouis |
2010-04-27 12:20:45 | neologix | set | messageid: <1272370845.74.0.50987667001.issue7946@psf.upfronthosting.co.za> |
2010-04-27 12:20:43 | neologix | link | issue7946 messages |
2010-04-27 12:20:43 | neologix | create | |
|