]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Issue #11393: Fix faulthandler_thread(): release cancel lock before join lock
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 1 Apr 2011 00:28:22 +0000 (02:28 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 1 Apr 2011 00:28:22 +0000 (02:28 +0200)
commit1c76b7f5e505e370a5e0b840af3002054eda1e0c
tree26047c6dced9cf6d8d417bc3ddd6010ab86b0abb
parentd6056b7d8d53581748eaacb31e3df23d4adb0561
Issue #11393: Fix faulthandler_thread(): release cancel lock before join lock

If the thread releases the join lock before the cancel lock, the thread may
sometimes still be alive at cancel_dump_tracebacks_later() exit. So the cancel
lock may be destroyed while the thread is still alive, whereas the thread will
try to release the cancel lock, which just crash.

Another minor fix: the thread doesn't release the cancel lock if it didn't
acquire it.
Modules/faulthandler.c